summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ipw2200.c
diff options
context:
space:
mode:
authorJames Ketrenos2005-08-12 16:17:04 +0200
committerJames Ketrenos2005-11-08 00:50:52 +0100
commite666619e232308c8ee2aba6b87f28ad26b38d905 (patch)
tree37cb616367595bb95c456ed938ff78c8db87846a /drivers/net/wireless/ipw2200.c
parentFix firmware error when setting tx_power. (diff)
downloadkernel-qcow2-linux-e666619e232308c8ee2aba6b87f28ad26b38d905.tar.gz
kernel-qcow2-linux-e666619e232308c8ee2aba6b87f28ad26b38d905.tar.xz
kernel-qcow2-linux-e666619e232308c8ee2aba6b87f28ad26b38d905.zip
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.c29
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)
if (ipw_send_host_complete(priv))
goto error;
- /* If configured to try and auto-associate, kick off a scan */
- if (priv->config & CFG_ASSOCIATE)
- queue_work(priv->workqueue, &priv->request_scan);
+ priv->status |= STATUS_INIT;
+
+ ipw_led_init(priv);
+ ipw_led_radio_on(priv);
+ priv->notif_missed_beacons = 0;
+
+ /* Set hardware WEP key if it is configured. */
+ if ((priv->capability & CAP_PRIVACY_ON) &&
+ (priv->ieee->sec.level == SEC_LEVEL_1) &&
+ !(priv->ieee->host_encrypt || priv->ieee->host_decrypt))
+ ipw_set_hwcrypto_keys(priv);
return 0;
@@ -10773,17 +10781,10 @@ static int ipw_up(struct ipw_priv *priv)
rc = ipw_config(priv);
if (!rc) {
IPW_DEBUG_INFO("Configured device on count %i\n", i);
- ipw_led_init(priv);
- ipw_led_radio_on(priv);
- priv->notif_missed_beacons = 0;
- priv->status |= STATUS_INIT;
-
- /* Set hardware WEP key if it is configured. */
- if ((priv->capability & CAP_PRIVACY_ON) &&
- (priv->ieee->sec.level == SEC_LEVEL_1) &&
- !(priv->ieee->host_encrypt ||
- priv->ieee->host_decrypt))
- ipw_set_hwcrypto_keys(priv);
+
+ /* If configure to try and auto-associate, kick
+ * off a scan. */
+ queue_work(priv->workqueue, &priv->request_scan);
return 0;
}