summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/base.c
diff options
context:
space:
mode:
authorChaoming Li <chaoming_li@realsil.com.cn>2011-04-10 18:30:23 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-04-12 16:59:34 -0400
commit228bdfca9a09c1263c24509b4bc23a67be168e1a (patch)
tree4e7d1a0e12213f75213b19dbb5956548c024acf6 /drivers/net/wireless/rtlwifi/base.c
parentf0bce44f5f2eb37dba58aa992d0c58da92ded201 (diff)
rtlwifi: rtl8192ce: Fix LED initialization
Driver rtl8192ce does not initialize the LED correctly. Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn> 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.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index dd5318ed787..9477785f116 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -251,14 +251,16 @@ void rtl_init_rfkill(struct ieee80211_hw *hw)
bool blocked;
u8 valid = 0;
- radio_state = rtlpriv->cfg->ops->radio_onoff_checking(hw, &valid);
+ /*set init state to on */
+ rtlpriv->rfkill.rfkill_state = 1;
+ wiphy_rfkill_set_hw_state(hw->wiphy, 0);
- /*set init state to that of switch */
- rtlpriv->rfkill.rfkill_state = radio_state;
- printk(KERN_INFO "rtlwifi: wireless switch is %s\n",
- rtlpriv->rfkill.rfkill_state ? "on" : "off");
+ radio_state = rtlpriv->cfg->ops->radio_onoff_checking(hw, &valid);
if (valid) {
+ printk(KERN_INFO "rtlwifi: wireless switch is %s\n",
+ rtlpriv->rfkill.rfkill_state ? "on" : "off");
+
rtlpriv->rfkill.rfkill_state = radio_state;
blocked = (rtlpriv->rfkill.rfkill_state == 1) ? 0 : 1;