diff options
author | David S. Miller <davem@davemloft.net> | 2011-04-25 12:46:37 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-25 12:46:37 -0700 |
commit | 345578d97c549995ddbcc178f16f710602cc06bb (patch) | |
tree | ce05e39a01ffce847f6f7f65f19b1e8e20dbf0c2 /drivers/net/wireless/rtlwifi/base.c | |
parent | fe2a70eefa18a3e419dd9a23e16af14258b7cc20 (diff) | |
parent | cfef6047c4027a8448ec8dafeaf2bb362cc882e4 (diff) |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'drivers/net/wireless/rtlwifi/base.c')
-rw-r--r-- | drivers/net/wireless/rtlwifi/base.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c index 4803f54842e..b259f807ad2 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; |