iwl3945: use changed in iwl3945_mac_config
authorMohamed Abbas <mohamed.abbas@intel.com>
Wed, 18 Mar 2009 04:51:42 +0000 (21:51 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Sat, 28 Mar 2009 00:12:57 +0000 (20:12 -0400)
In function iwl3945_mac_config use changed flag to call only
the affected functions.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl3945-base.c

index 4465320f27350d2c59b12d48afafacb50e3dfb78..16ecf03a155773b54e0954780b2c6cbc21ef6e5d 100644 (file)
@@ -3773,15 +3773,19 @@ static int iwl3945_mac_config(struct ieee80211_hw *hw, u32 changed)
        }
 #endif
 
-       if (conf->radio_enabled && iwl_radio_kill_sw_enable_radio(priv)) {
-               IWL_DEBUG_MAC80211(priv, "leave - RF-KILL - waiting for uCode\n");
-               goto out;
-       }
+       if (changed & IEEE80211_CONF_CHANGE_RADIO_ENABLED) {
+               if (conf->radio_enabled &&
+                   iwl_radio_kill_sw_enable_radio(priv)) {
+                       IWL_DEBUG_MAC80211(priv, "leave - RF-KILL - "
+                                                "waiting for uCode\n");
+                       goto out;
+               }
 
-       if (!conf->radio_enabled) {
-               iwl_radio_kill_sw_disable_radio(priv);
-               IWL_DEBUG_MAC80211(priv, "leave - radio disabled\n");
-               goto out;
+               if (!conf->radio_enabled) {
+                       iwl_radio_kill_sw_disable_radio(priv);
+                       IWL_DEBUG_MAC80211(priv, "leave - radio disabled\n");
+                       goto out;
+               }
        }
 
        if (iwl_is_rfkill(priv)) {