aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorZhu Yi <yi.zhu@intel.com>2006-02-16 03:21:09 -0500
committerJohn W. Linville <linville@tuxdriver.com>2006-03-17 15:08:03 -0500
commitd6d5b5c13e5003c9d33dcdcfdf1febc6efd7d319 (patch)
treed7de88aace32d5be27afcae756c94187fd9f53b2 /drivers
parent8da374fc44a5e0fb71a485497cae38eb562d078c (diff)
[PATCH] ipw2200: Fix rf_kill is activated after mode change with 'disable=1'
When loading the ipw2200 module with disabled=1, rf_kill is activated after every mode change. This is caused by ipw_sw_reset() is called when a mode is changed. The patch fixed the problem by distinguishing the purposes with the 'option' paramenter. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ipw2200.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index dfa2efb3e215..b80ebd37483e 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -7978,7 +7978,14 @@ static void ipw_rx(struct ipw_priv *priv)
7978#define DEFAULT_SHORT_RETRY_LIMIT 7U 7978#define DEFAULT_SHORT_RETRY_LIMIT 7U
7979#define DEFAULT_LONG_RETRY_LIMIT 4U 7979#define DEFAULT_LONG_RETRY_LIMIT 4U
7980 7980
7981static int ipw_sw_reset(struct ipw_priv *priv, int init) 7981/**
7982 * ipw_sw_reset
7983 * @option: options to control different reset behaviour
7984 * 0 = reset everything except the 'disable' module_param
7985 * 1 = reset everything and print out driver info (for probe only)
7986 * 2 = reset everything
7987 */
7988static int ipw_sw_reset(struct ipw_priv *priv, int option)
7982{ 7989{
7983 int band, modulation; 7990 int band, modulation;
7984 int old_mode = priv->ieee->iw_mode; 7991 int old_mode = priv->ieee->iw_mode;
@@ -8005,7 +8012,7 @@ static int ipw_sw_reset(struct ipw_priv *priv, int init)
8005 priv->essid_len = 0; 8012 priv->essid_len = 0;
8006 memset(priv->essid, 0, IW_ESSID_MAX_SIZE); 8013 memset(priv->essid, 0, IW_ESSID_MAX_SIZE);
8007 8014
8008 if (disable) { 8015 if (disable && option) {
8009 priv->status |= STATUS_RF_KILL_SW; 8016 priv->status |= STATUS_RF_KILL_SW;
8010 IPW_DEBUG_INFO("Radio disabled.\n"); 8017 IPW_DEBUG_INFO("Radio disabled.\n");
8011 } 8018 }
@@ -8057,7 +8064,7 @@ static int ipw_sw_reset(struct ipw_priv *priv, int init)
8057 8064
8058 if ((priv->pci_dev->device == 0x4223) || 8065 if ((priv->pci_dev->device == 0x4223) ||
8059 (priv->pci_dev->device == 0x4224)) { 8066 (priv->pci_dev->device == 0x4224)) {
8060 if (init) 8067 if (option == 2)
8061 printk(KERN_INFO DRV_NAME 8068 printk(KERN_INFO DRV_NAME
8062 ": Detected Intel PRO/Wireless 2915ABG Network " 8069 ": Detected Intel PRO/Wireless 2915ABG Network "
8063 "Connection\n"); 8070 "Connection\n");
@@ -8068,7 +8075,7 @@ static int ipw_sw_reset(struct ipw_priv *priv, int init)
8068 priv->adapter = IPW_2915ABG; 8075 priv->adapter = IPW_2915ABG;
8069 priv->ieee->mode = IEEE_A | IEEE_G | IEEE_B; 8076 priv->ieee->mode = IEEE_A | IEEE_G | IEEE_B;
8070 } else { 8077 } else {
8071 if (init) 8078 if (option == 2)
8072 printk(KERN_INFO DRV_NAME 8079 printk(KERN_INFO DRV_NAME
8073 ": Detected Intel PRO/Wireless 2200BG Network " 8080 ": Detected Intel PRO/Wireless 2200BG Network "
8074 "Connection\n"); 8081 "Connection\n");
@@ -9380,7 +9387,7 @@ static int ipw_wx_sw_reset(struct net_device *dev,
9380 9387
9381 mutex_lock(&priv->mutex); 9388 mutex_lock(&priv->mutex);
9382 9389
9383 ret = ipw_sw_reset(priv, 0); 9390 ret = ipw_sw_reset(priv, 2);
9384 if (!ret) { 9391 if (!ret) {
9385 free_firmware(); 9392 free_firmware();
9386 ipw_adapter_restart(priv); 9393 ipw_adapter_restart(priv);