diff options
author | Don Fry <donald.h.fry@intel.com> | 2012-03-07 12:52:37 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-08 13:59:55 -0500 |
commit | 83626404a70da74c67f32f119e53c0ba032ba2d8 (patch) | |
tree | fdd6cff4fdffbe099d24a0c0dc8c6d07f6aca900 /drivers/net/wireless/iwlwifi/iwl-mac80211.c | |
parent | 9bdfbfadc4f0b3a756b54e7ec7cfaf92c22ce258 (diff) |
iwlwifi: more status bit factoring
Continue splitting the status bits between transport and op_mode.
All but a few are separated.
Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-mac80211.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-mac80211.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-mac80211.c b/drivers/net/wireless/iwlwifi/iwl-mac80211.c index dcf39f84f239..54d3709c0a6c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-mac80211.c +++ b/drivers/net/wireless/iwlwifi/iwl-mac80211.c | |||
@@ -266,7 +266,7 @@ static int __iwl_up(struct iwl_priv *priv) | |||
266 | 266 | ||
267 | lockdep_assert_held(&priv->mutex); | 267 | lockdep_assert_held(&priv->mutex); |
268 | 268 | ||
269 | if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status)) { | 269 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) { |
270 | IWL_WARN(priv, "Exit pending; will not bring the NIC up\n"); | 270 | IWL_WARN(priv, "Exit pending; will not bring the NIC up\n"); |
271 | return -EIO; | 271 | return -EIO; |
272 | } | 272 | } |
@@ -297,9 +297,9 @@ static int __iwl_up(struct iwl_priv *priv) | |||
297 | return 0; | 297 | return 0; |
298 | 298 | ||
299 | error: | 299 | error: |
300 | set_bit(STATUS_EXIT_PENDING, &priv->shrd->status); | 300 | set_bit(STATUS_EXIT_PENDING, &priv->status); |
301 | iwl_down(priv); | 301 | iwl_down(priv); |
302 | clear_bit(STATUS_EXIT_PENDING, &priv->shrd->status); | 302 | clear_bit(STATUS_EXIT_PENDING, &priv->status); |
303 | 303 | ||
304 | IWL_ERR(priv, "Unable to initialize device.\n"); | 304 | IWL_ERR(priv, "Unable to initialize device.\n"); |
305 | return ret; | 305 | return ret; |
@@ -322,7 +322,7 @@ static int iwlagn_mac_start(struct ieee80211_hw *hw) | |||
322 | IWL_DEBUG_INFO(priv, "Start UP work done.\n"); | 322 | IWL_DEBUG_INFO(priv, "Start UP work done.\n"); |
323 | 323 | ||
324 | /* Now we should be done, and the READY bit should be set. */ | 324 | /* Now we should be done, and the READY bit should be set. */ |
325 | if (WARN_ON(!test_bit(STATUS_READY, &priv->shrd->status))) | 325 | if (WARN_ON(!test_bit(STATUS_READY, &priv->status))) |
326 | ret = -EIO; | 326 | ret = -EIO; |
327 | 327 | ||
328 | iwlagn_led_enable(priv); | 328 | iwlagn_led_enable(priv); |
@@ -807,7 +807,7 @@ static int iwlagn_mac_sta_state(struct ieee80211_hw *hw, | |||
807 | * mac80211 might WARN if we fail, but due the way we | 807 | * mac80211 might WARN if we fail, but due the way we |
808 | * (badly) handle hard rfkill, we might fail here | 808 | * (badly) handle hard rfkill, we might fail here |
809 | */ | 809 | */ |
810 | if (iwl_is_rfkill(priv->shrd)) | 810 | if (iwl_is_rfkill(priv)) |
811 | ret = 0; | 811 | ret = 0; |
812 | 812 | ||
813 | mutex_unlock(&priv->mutex); | 813 | mutex_unlock(&priv->mutex); |
@@ -839,12 +839,12 @@ static void iwlagn_mac_channel_switch(struct ieee80211_hw *hw, | |||
839 | 839 | ||
840 | mutex_lock(&priv->mutex); | 840 | mutex_lock(&priv->mutex); |
841 | 841 | ||
842 | if (iwl_is_rfkill(priv->shrd)) | 842 | if (iwl_is_rfkill(priv)) |
843 | goto out; | 843 | goto out; |
844 | 844 | ||
845 | if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status) || | 845 | if (test_bit(STATUS_EXIT_PENDING, &priv->status) || |
846 | test_bit(STATUS_SCANNING, &priv->shrd->status) || | 846 | test_bit(STATUS_SCANNING, &priv->status) || |
847 | test_bit(STATUS_CHANNEL_SWITCH_PENDING, &priv->shrd->status)) | 847 | test_bit(STATUS_CHANNEL_SWITCH_PENDING, &priv->status)) |
848 | goto out; | 848 | goto out; |
849 | 849 | ||
850 | if (!iwl_is_associated_ctx(ctx)) | 850 | if (!iwl_is_associated_ctx(ctx)) |
@@ -884,10 +884,10 @@ static void iwlagn_mac_channel_switch(struct ieee80211_hw *hw, | |||
884 | * at this point, staging_rxon has the | 884 | * at this point, staging_rxon has the |
885 | * configuration for channel switch | 885 | * configuration for channel switch |
886 | */ | 886 | */ |
887 | set_bit(STATUS_CHANNEL_SWITCH_PENDING, &priv->shrd->status); | 887 | set_bit(STATUS_CHANNEL_SWITCH_PENDING, &priv->status); |
888 | priv->switch_channel = cpu_to_le16(ch); | 888 | priv->switch_channel = cpu_to_le16(ch); |
889 | if (cfg(priv)->lib->set_channel_switch(priv, ch_switch)) { | 889 | if (cfg(priv)->lib->set_channel_switch(priv, ch_switch)) { |
890 | clear_bit(STATUS_CHANNEL_SWITCH_PENDING, &priv->shrd->status); | 890 | clear_bit(STATUS_CHANNEL_SWITCH_PENDING, &priv->status); |
891 | priv->switch_channel = 0; | 891 | priv->switch_channel = 0; |
892 | ieee80211_chswitch_done(ctx->vif, false); | 892 | ieee80211_chswitch_done(ctx->vif, false); |
893 | } | 893 | } |
@@ -954,11 +954,11 @@ static void iwlagn_mac_flush(struct ieee80211_hw *hw, bool drop) | |||
954 | mutex_lock(&priv->mutex); | 954 | mutex_lock(&priv->mutex); |
955 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 955 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
956 | 956 | ||
957 | if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status)) { | 957 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) { |
958 | IWL_DEBUG_TX(priv, "Aborting flush due to device shutdown\n"); | 958 | IWL_DEBUG_TX(priv, "Aborting flush due to device shutdown\n"); |
959 | goto done; | 959 | goto done; |
960 | } | 960 | } |
961 | if (iwl_is_rfkill(priv->shrd)) { | 961 | if (iwl_is_rfkill(priv)) { |
962 | IWL_DEBUG_TX(priv, "Aborting flush due to RF Kill\n"); | 962 | IWL_DEBUG_TX(priv, "Aborting flush due to RF Kill\n"); |
963 | goto done; | 963 | goto done; |
964 | } | 964 | } |
@@ -999,7 +999,7 @@ static int iwlagn_mac_remain_on_channel(struct ieee80211_hw *hw, | |||
999 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 999 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
1000 | mutex_lock(&priv->mutex); | 1000 | mutex_lock(&priv->mutex); |
1001 | 1001 | ||
1002 | if (test_bit(STATUS_SCAN_HW, &priv->shrd->status)) { | 1002 | if (test_bit(STATUS_SCAN_HW, &priv->status)) { |
1003 | err = -EBUSY; | 1003 | err = -EBUSY; |
1004 | goto out; | 1004 | goto out; |
1005 | } | 1005 | } |
@@ -1140,7 +1140,7 @@ static int iwlagn_mac_conf_tx(struct ieee80211_hw *hw, | |||
1140 | 1140 | ||
1141 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 1141 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
1142 | 1142 | ||
1143 | if (!iwl_is_ready_rf(priv->shrd)) { | 1143 | if (!iwl_is_ready_rf(priv)) { |
1144 | IWL_DEBUG_MAC80211(priv, "leave - RF not ready\n"); | 1144 | IWL_DEBUG_MAC80211(priv, "leave - RF not ready\n"); |
1145 | return -EIO; | 1145 | return -EIO; |
1146 | } | 1146 | } |
@@ -1241,7 +1241,7 @@ static int iwlagn_mac_add_interface(struct ieee80211_hw *hw, | |||
1241 | 1241 | ||
1242 | iwlagn_disable_roc(priv); | 1242 | iwlagn_disable_roc(priv); |
1243 | 1243 | ||
1244 | if (!iwl_is_ready_rf(priv->shrd)) { | 1244 | if (!iwl_is_ready_rf(priv)) { |
1245 | IWL_WARN(priv, "Try to add interface when device not ready\n"); | 1245 | IWL_WARN(priv, "Try to add interface when device not ready\n"); |
1246 | err = -EINVAL; | 1246 | err = -EINVAL; |
1247 | goto out; | 1247 | goto out; |
@@ -1365,7 +1365,7 @@ static int iwlagn_mac_change_interface(struct ieee80211_hw *hw, | |||
1365 | 1365 | ||
1366 | mutex_lock(&priv->mutex); | 1366 | mutex_lock(&priv->mutex); |
1367 | 1367 | ||
1368 | if (!ctx->vif || !iwl_is_ready_rf(priv->shrd)) { | 1368 | if (!ctx->vif || !iwl_is_ready_rf(priv)) { |
1369 | /* | 1369 | /* |
1370 | * Huh? But wait ... this can maybe happen when | 1370 | * Huh? But wait ... this can maybe happen when |
1371 | * we're in the middle of a firmware restart! | 1371 | * we're in the middle of a firmware restart! |