diff options
author | James Ketrenos <jketreno@linux.intel.com> | 2005-08-12 10:17:04 -0400 |
---|---|---|
committer | James Ketrenos <jketreno@linux.intel.com> | 2005-11-07 18:50:52 -0500 |
commit | e666619e232308c8ee2aba6b87f28ad26b38d905 (patch) | |
tree | 37cb616367595bb95c456ed938ff78c8db87846a /drivers/net/wireless/ipw2200.c | |
parent | 6de9f7f27defe6f1a2d33d0b78af6b1a0ad18330 (diff) |
Modified ipw_config and STATUS_INIT setting to correct race condition
with request_scan being called before initialized if invoked from
insmod, resulting in no association occurring during boot until iwlist
scan is run.
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
Diffstat (limited to 'drivers/net/wireless/ipw2200.c')
-rw-r--r-- | drivers/net/wireless/ipw2200.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index f825aa462c99..6e862c2905de 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -10465,9 +10465,17 @@ static int ipw_config(struct ipw_priv *priv) | |||
10465 | if (ipw_send_host_complete(priv)) | 10465 | if (ipw_send_host_complete(priv)) |
10466 | goto error; | 10466 | goto error; |
10467 | 10467 | ||
10468 | /* If configured to try and auto-associate, kick off a scan */ | 10468 | priv->status |= STATUS_INIT; |
10469 | if (priv->config & CFG_ASSOCIATE) | 10469 | |
10470 | queue_work(priv->workqueue, &priv->request_scan); | 10470 | ipw_led_init(priv); |
10471 | ipw_led_radio_on(priv); | ||
10472 | priv->notif_missed_beacons = 0; | ||
10473 | |||
10474 | /* Set hardware WEP key if it is configured. */ | ||
10475 | if ((priv->capability & CAP_PRIVACY_ON) && | ||
10476 | (priv->ieee->sec.level == SEC_LEVEL_1) && | ||
10477 | !(priv->ieee->host_encrypt || priv->ieee->host_decrypt)) | ||
10478 | ipw_set_hwcrypto_keys(priv); | ||
10471 | 10479 | ||
10472 | return 0; | 10480 | return 0; |
10473 | 10481 | ||
@@ -10773,17 +10781,10 @@ static int ipw_up(struct ipw_priv *priv) | |||
10773 | rc = ipw_config(priv); | 10781 | rc = ipw_config(priv); |
10774 | if (!rc) { | 10782 | if (!rc) { |
10775 | IPW_DEBUG_INFO("Configured device on count %i\n", i); | 10783 | IPW_DEBUG_INFO("Configured device on count %i\n", i); |
10776 | ipw_led_init(priv); | 10784 | |
10777 | ipw_led_radio_on(priv); | 10785 | /* If configure to try and auto-associate, kick |
10778 | priv->notif_missed_beacons = 0; | 10786 | * off a scan. */ |
10779 | priv->status |= STATUS_INIT; | 10787 | queue_work(priv->workqueue, &priv->request_scan); |
10780 | |||
10781 | /* Set hardware WEP key if it is configured. */ | ||
10782 | if ((priv->capability & CAP_PRIVACY_ON) && | ||
10783 | (priv->ieee->sec.level == SEC_LEVEL_1) && | ||
10784 | !(priv->ieee->host_encrypt || | ||
10785 | priv->ieee->host_decrypt)) | ||
10786 | ipw_set_hwcrypto_keys(priv); | ||
10787 | 10788 | ||
10788 | return 0; | 10789 | return 0; |
10789 | } | 10790 | } |