diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-04-20 17:36:10 -0400 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-04-20 17:36:10 -0400 |
| commit | f18b95c3e2ab0f75b23a5aabab0bc8f99bd6bbf3 (patch) | |
| tree | 9ff4b7efdb2ca1e83c2a413f06268b268098b3ca | |
| parent | 17c281ab3e33be63693687d3db7ac9cf2bbdfd66 (diff) | |
| parent | 848ef8555296f25d9226d3bc43ce4028835ed633 (diff) | |
Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
24 files changed, 288 insertions, 170 deletions
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig index bad09ebdb5..e0874cbfef 100644 --- a/drivers/net/wireless/Kconfig +++ b/drivers/net/wireless/Kconfig | |||
| @@ -6,7 +6,7 @@ menu "Wireless LAN (non-hamradio)" | |||
| 6 | depends on NETDEVICES | 6 | depends on NETDEVICES |
| 7 | 7 | ||
| 8 | config NET_RADIO | 8 | config NET_RADIO |
| 9 | bool "Wireless LAN drivers (non-hamradio)" | 9 | bool "Wireless LAN drivers (non-hamradio) & Wireless Extensions" |
| 10 | select WIRELESS_EXT | 10 | select WIRELESS_EXT |
| 11 | ---help--- | 11 | ---help--- |
| 12 | Support for wireless LANs and everything having to do with radio, | 12 | Support for wireless LANs and everything having to do with radio, |
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 108d9fed8f..00764ddd74 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
| @@ -3139,6 +3139,7 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs) | |||
| 3139 | } | 3139 | } |
| 3140 | if ( status & EV_LINK ) { | 3140 | if ( status & EV_LINK ) { |
| 3141 | union iwreq_data wrqu; | 3141 | union iwreq_data wrqu; |
| 3142 | int scan_forceloss = 0; | ||
| 3142 | /* The link status has changed, if you want to put a | 3143 | /* The link status has changed, if you want to put a |
| 3143 | monitor hook in, do it here. (Remember that | 3144 | monitor hook in, do it here. (Remember that |
| 3144 | interrupts are still disabled!) | 3145 | interrupts are still disabled!) |
| @@ -3157,7 +3158,8 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs) | |||
| 3157 | code) */ | 3158 | code) */ |
| 3158 | #define AUTHFAIL 0x0300 /* Authentication failure (low byte is reason | 3159 | #define AUTHFAIL 0x0300 /* Authentication failure (low byte is reason |
| 3159 | code) */ | 3160 | code) */ |
| 3160 | #define ASSOCIATED 0x0400 /* Assocatied */ | 3161 | #define ASSOCIATED 0x0400 /* Associated */ |
| 3162 | #define REASSOCIATED 0x0600 /* Reassociated? Only on firmware >= 5.30.17 */ | ||
| 3161 | #define RC_RESERVED 0 /* Reserved return code */ | 3163 | #define RC_RESERVED 0 /* Reserved return code */ |
| 3162 | #define RC_NOREASON 1 /* Unspecified reason */ | 3164 | #define RC_NOREASON 1 /* Unspecified reason */ |
| 3163 | #define RC_AUTHINV 2 /* Previous authentication invalid */ | 3165 | #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) | |||
| 3174 | leaving BSS */ | 3176 | leaving BSS */ |
| 3175 | #define RC_NOAUTH 9 /* Station requesting (Re)Association is not | 3177 | #define RC_NOAUTH 9 /* Station requesting (Re)Association is not |
| 3176 | Authenticated with the responding station */ | 3178 | Authenticated with the responding station */ |
| 3177 | if (newStatus != ASSOCIATED) { | 3179 | if (newStatus == FORCELOSS && apriv->scan_timeout > 0) |
| 3178 | if (auto_wep && !apriv->expires) { | 3180 | scan_forceloss = 1; |
| 3179 | apriv->expires = RUN_AT(3*HZ); | 3181 | if(newStatus == ASSOCIATED || newStatus == REASSOCIATED) { |
| 3180 | wake_up_interruptible(&apriv->thr_wait); | ||
| 3181 | } | ||
| 3182 | } else { | ||
| 3183 | struct task_struct *task = apriv->task; | ||
| 3184 | if (auto_wep) | 3182 | if (auto_wep) |
| 3185 | apriv->expires = 0; | 3183 | apriv->expires = 0; |
| 3186 | if (task) | 3184 | if (apriv->task) |
| 3187 | wake_up_process (task); | 3185 | wake_up_process (apriv->task); |
| 3188 | set_bit(FLAG_UPDATE_UNI, &apriv->flags); | 3186 | set_bit(FLAG_UPDATE_UNI, &apriv->flags); |
| 3189 | set_bit(FLAG_UPDATE_MULTI, &apriv->flags); | 3187 | set_bit(FLAG_UPDATE_MULTI, &apriv->flags); |
| 3190 | } | 3188 | |
| 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 | ||
| 3205 | if (down_trylock(&apriv->sem) != 0) { | 3189 | if (down_trylock(&apriv->sem) != 0) { |
| 3206 | set_bit(JOB_EVENT, &apriv->flags); | 3190 | set_bit(JOB_EVENT, &apriv->flags); |
| 3207 | wake_up_interruptible(&apriv->thr_wait); | 3191 | wake_up_interruptible(&apriv->thr_wait); |
| 3208 | } else | 3192 | } else |
| 3209 | airo_send_event(dev); | 3193 | airo_send_event(dev); |
| 3210 | } else { | 3194 | } else if (!scan_forceloss) { |
| 3211 | memset(wrqu.ap_addr.sa_data, '\0', ETH_ALEN); | 3195 | if (auto_wep && !apriv->expires) { |
| 3212 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; | 3196 | apriv->expires = RUN_AT(3*HZ); |
| 3197 | wake_up_interruptible(&apriv->thr_wait); | ||
| 3198 | } | ||
| 3213 | 3199 | ||
| 3214 | /* Send event to user space */ | 3200 | /* Send event to user space */ |
| 3201 | memset(wrqu.ap_addr.sa_data, '\0', ETH_ALEN); | ||
| 3202 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; | ||
| 3215 | wireless_send_event(dev, SIOCGIWAP, &wrqu,NULL); | 3203 | wireless_send_event(dev, SIOCGIWAP, &wrqu,NULL); |
| 3216 | } | 3204 | } |
| 3217 | } | 3205 | } |
| @@ -7136,10 +7124,10 @@ static int airo_set_scan(struct net_device *dev, | |||
| 7136 | goto out; | 7124 | goto out; |
| 7137 | 7125 | ||
| 7138 | /* Initiate a scan command */ | 7126 | /* Initiate a scan command */ |
| 7127 | ai->scan_timeout = RUN_AT(3*HZ); | ||
| 7139 | memset(&cmd, 0, sizeof(cmd)); | 7128 | memset(&cmd, 0, sizeof(cmd)); |
| 7140 | cmd.cmd=CMD_LISTBSS; | 7129 | cmd.cmd=CMD_LISTBSS; |
| 7141 | issuecommand(ai, &cmd, &rsp); | 7130 | issuecommand(ai, &cmd, &rsp); |
| 7142 | ai->scan_timeout = RUN_AT(3*HZ); | ||
| 7143 | wake = 1; | 7131 | wake = 1; |
| 7144 | 7132 | ||
| 7145 | out: | 7133 | out: |
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 87afa6878f..8606c88886 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c | |||
| @@ -3463,6 +3463,7 @@ static void atmel_command_irq(struct atmel_private *priv) | |||
| 3463 | u8 status = atmel_rmem8(priv, atmel_co(priv, CMD_BLOCK_STATUS_OFFSET)); | 3463 | u8 status = atmel_rmem8(priv, atmel_co(priv, CMD_BLOCK_STATUS_OFFSET)); |
| 3464 | u8 command = atmel_rmem8(priv, atmel_co(priv, CMD_BLOCK_COMMAND_OFFSET)); | 3464 | u8 command = atmel_rmem8(priv, atmel_co(priv, CMD_BLOCK_COMMAND_OFFSET)); |
| 3465 | int fast_scan; | 3465 | int fast_scan; |
| 3466 | union iwreq_data wrqu; | ||
| 3466 | 3467 | ||
| 3467 | if (status == CMD_STATUS_IDLE || | 3468 | if (status == CMD_STATUS_IDLE || |
| 3468 | status == CMD_STATUS_IN_PROGRESS) | 3469 | status == CMD_STATUS_IN_PROGRESS) |
| @@ -3487,6 +3488,7 @@ static void atmel_command_irq(struct atmel_private *priv) | |||
| 3487 | atmel_scan(priv, 1); | 3488 | atmel_scan(priv, 1); |
| 3488 | } else { | 3489 | } else { |
| 3489 | int bss_index = retrieve_bss(priv); | 3490 | int bss_index = retrieve_bss(priv); |
| 3491 | int notify_scan_complete = 1; | ||
| 3490 | if (bss_index != -1) { | 3492 | if (bss_index != -1) { |
| 3491 | atmel_join_bss(priv, bss_index); | 3493 | atmel_join_bss(priv, bss_index); |
| 3492 | } else if (priv->operating_mode == IW_MODE_ADHOC && | 3494 | } else if (priv->operating_mode == IW_MODE_ADHOC && |
| @@ -3495,8 +3497,14 @@ static void atmel_command_irq(struct atmel_private *priv) | |||
| 3495 | } else { | 3497 | } else { |
| 3496 | priv->fast_scan = !fast_scan; | 3498 | priv->fast_scan = !fast_scan; |
| 3497 | atmel_scan(priv, 1); | 3499 | atmel_scan(priv, 1); |
| 3500 | notify_scan_complete = 0; | ||
| 3498 | } | 3501 | } |
| 3499 | priv->site_survey_state = SITE_SURVEY_COMPLETED; | 3502 | priv->site_survey_state = SITE_SURVEY_COMPLETED; |
| 3503 | if (notify_scan_complete) { | ||
| 3504 | wrqu.data.length = 0; | ||
| 3505 | wrqu.data.flags = 0; | ||
| 3506 | wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL); | ||
| 3507 | } | ||
| 3500 | } | 3508 | } |
| 3501 | break; | 3509 | break; |
| 3502 | 3510 | ||
| @@ -3509,6 +3517,9 @@ static void atmel_command_irq(struct atmel_private *priv) | |||
| 3509 | priv->site_survey_state = SITE_SURVEY_COMPLETED; | 3517 | priv->site_survey_state = SITE_SURVEY_COMPLETED; |
| 3510 | if (priv->station_is_associated) { | 3518 | if (priv->station_is_associated) { |
