@@ -3139,6 +3139,7 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs)
31393139 }
31403140 if ( status & EV_LINK ) {
31413141 union iwreq_data wrqu ;
3142+ int scan_forceloss = 0 ;
31423143 /* The link status has changed, if you want to put a
31433144 monitor hook in, do it here. (Remember that
31443145 interrupts are still disabled!)
@@ -3157,7 +3158,8 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs)
31573158 code) */
31583159#define AUTHFAIL 0x0300 /* Authentication failure (low byte is reason
31593160 code) */
3160- #define ASSOCIATED 0x0400 /* Assocatied */
3161+ #define ASSOCIATED 0x0400 /* Associated */
3162+ #define REASSOCIATED 0x0600 /* Reassociated? Only on firmware >= 5.30.17 */
31613163#define RC_RESERVED 0 /* Reserved return code */
31623164#define RC_NOREASON 1 /* Unspecified reason */
31633165#define RC_AUTHINV 2 /* Previous authentication invalid */
@@ -3174,44 +3176,30 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs)
31743176 leaving BSS */
31753177#define RC_NOAUTH 9 /* Station requesting (Re)Association is not
31763178 Authenticated with the responding station */
3177- if (newStatus != ASSOCIATED ) {
3178- if (auto_wep && !apriv -> expires ) {
3179- apriv -> expires = RUN_AT (3 * HZ );
3180- wake_up_interruptible (& apriv -> thr_wait );
3181- }
3182- } else {
3183- struct task_struct * task = apriv -> task ;
3179+ if (newStatus == FORCELOSS && apriv -> scan_timeout > 0 )
3180+ scan_forceloss = 1 ;
3181+ if (newStatus == ASSOCIATED || newStatus == REASSOCIATED ) {
31843182 if (auto_wep )
31853183 apriv -> expires = 0 ;
3186- if (task )
3187- wake_up_process (task );
3184+ if (apriv -> task )
3185+ wake_up_process (apriv -> task );
31883186 set_bit (FLAG_UPDATE_UNI , & apriv -> flags );
31893187 set_bit (FLAG_UPDATE_MULTI , & apriv -> flags );
3190- }
3191- /* Question : is ASSOCIATED the only status
3192- * that is valid ? We want to catch handover
3193- * and reassociations as valid status
3194- * Jean II */
3195- if (newStatus == ASSOCIATED ) {
3196- #if 0
3197- /* FIXME: Grabbing scan results here
3198- * seems to be too early??? Just wait for
3199- * timeout instead. */
3200- if (apriv -> scan_timeout > 0 ) {
3201- set_bit (JOB_SCAN_RESULTS , & apriv -> flags );
3202- wake_up_interruptible (& apriv -> thr_wait );
3203- }
3204- #endif
3188+
32053189 if (down_trylock (& apriv -> sem ) != 0 ) {
32063190 set_bit (JOB_EVENT , & apriv -> flags );
32073191 wake_up_interruptible (& apriv -> thr_wait );
32083192 } else
32093193 airo_send_event (dev );
3210- } else {
3211- memset (wrqu .ap_addr .sa_data , '\0' , ETH_ALEN );
3212- wrqu .ap_addr .sa_family = ARPHRD_ETHER ;
3194+ } else if (!scan_forceloss ) {
3195+ if (auto_wep && !apriv -> expires ) {
3196+ apriv -> expires = RUN_AT (3 * HZ );
3197+ wake_up_interruptible (& apriv -> thr_wait );
3198+ }
32133199
32143200 /* Send event to user space */
3201+ memset (wrqu .ap_addr .sa_data , '\0' , ETH_ALEN );
3202+ wrqu .ap_addr .sa_family = ARPHRD_ETHER ;
32153203 wireless_send_event (dev , SIOCGIWAP , & wrqu ,NULL );
32163204 }
32173205 }
@@ -7136,10 +7124,10 @@ static int airo_set_scan(struct net_device *dev,
71367124 goto out ;
71377125
71387126 /* Initiate a scan command */
7127+ ai -> scan_timeout = RUN_AT (3 * HZ );
71397128 memset (& cmd , 0 , sizeof (cmd ));
71407129 cmd .cmd = CMD_LISTBSS ;
71417130 issuecommand (ai , & cmd , & rsp );
7142- ai -> scan_timeout = RUN_AT (3 * HZ );
71437131 wake = 1 ;
71447132
71457133out :
0 commit comments