diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2010-12-21 20:40:40 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-22 15:43:31 -0500 |
commit | e6d8a817d00793eecd063b1548bbc954ab62b124 (patch) | |
tree | 3a39436d74d406d43f2443548b59d6773b2b442a /drivers/net/wireless/rtlwifi/base.c | |
parent | 40d70dd12200ffeacfe9caaa8242e3ad2995bb5d (diff) |
rtlwifi: rtl8192ce: Fix driver problem when radio switch off at module load
If the radio enable switch is off when the driver is loaded, it is not
possible to get radio output until the driver is unloaded and reloaded
with the switch on.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/base.c')
-rw-r--r-- | drivers/net/wireless/rtlwifi/base.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c index f6cc07369d75..cf0b73e51fc2 100644 --- a/drivers/net/wireless/rtlwifi/base.c +++ b/drivers/net/wireless/rtlwifi/base.c | |||
@@ -251,16 +251,14 @@ void rtl_init_rfkill(struct ieee80211_hw *hw) | |||
251 | bool blocked; | 251 | bool blocked; |
252 | u8 valid = 0; | 252 | u8 valid = 0; |
253 | 253 | ||
254 | /*set init state to rf on */ | ||
255 | rtlpriv->rfkill.rfkill_state = 1; | ||
256 | |||
257 | radio_state = rtlpriv->cfg->ops->radio_onoff_checking(hw, &valid); | 254 | radio_state = rtlpriv->cfg->ops->radio_onoff_checking(hw, &valid); |
258 | 255 | ||
259 | if (valid) { | 256 | /*set init state to that of switch */ |
260 | RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, | 257 | rtlpriv->rfkill.rfkill_state = radio_state; |
261 | (KERN_INFO "wireless switch is %s\n", | 258 | printk(KERN_INFO "rtlwifi: wireless switch is %s\n", |
262 | rtlpriv->rfkill.rfkill_state ? "on" : "off")); | 259 | rtlpriv->rfkill.rfkill_state ? "on" : "off"); |
263 | 260 | ||
261 | if (valid) { | ||
264 | rtlpriv->rfkill.rfkill_state = radio_state; | 262 | rtlpriv->rfkill.rfkill_state = radio_state; |
265 | 263 | ||
266 | blocked = (rtlpriv->rfkill.rfkill_state == 1) ? 0 : 1; | 264 | blocked = (rtlpriv->rfkill.rfkill_state == 1) ? 0 : 1; |