aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/base.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2011-04-25 14:34:25 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-25 14:34:25 -0400
commitcfef6047c4027a8448ec8dafeaf2bb362cc882e4 (patch)
treec254bd25aa8b4b0696b5b5cc45d8e30c7c1bb9dd /drivers/net/wireless/rtlwifi/base.c
parentb71d1d426d263b0b6cb5760322efebbfc89d4463 (diff)
parent73b48099cc265f88fa1255f3f43e52fe6a94fd5c (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts: drivers/net/wireless/iwlwifi/iwl-core.c drivers/net/wireless/rt2x00/rt2x00queue.c drivers/net/wireless/rt2x00/rt2x00queue.h
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 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)
251 bool blocked; 251 bool blocked;
252 u8 valid = 0; 252 u8 valid = 0;
253 253
254 radio_state = rtlpriv->cfg->ops->radio_onoff_checking(hw, &valid); 254 /*set init state to on */
255 rtlpriv->rfkill.rfkill_state = 1;
256 wiphy_rfkill_set_hw_state(hw->wiphy, 0);
255 257
256 /*set init state to that of switch */ 258 radio_state = rtlpriv->cfg->ops->radio_onoff_checking(hw, &valid);
257 rtlpriv->rfkill.rfkill_state = radio_state;
258 printk(KERN_INFO "rtlwifi: wireless switch is %s\n",
259 rtlpriv->rfkill.rfkill_state ? "on" : "off");
260 259
261 if (valid) { 260 if (valid) {
261 printk(KERN_INFO "rtlwifi: wireless switch is %s\n",
262 rtlpriv->rfkill.rfkill_state ? "on" : "off");
263
262 rtlpriv->rfkill.rfkill_state = radio_state; 264 rtlpriv->rfkill.rfkill_state = radio_state;
263 265
264 blocked = (rtlpriv->rfkill.rfkill_state == 1) ? 0 : 1; 266 blocked = (rtlpriv->rfkill.rfkill_state == 1) ? 0 : 1;