aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2014-11-10 04:10:06 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-11-24 01:30:25 -0500
commitf028905c2033137f98d8c0025165644ac63cfe8d (patch)
treeaba713744a8bae9ba927e87dfbc11507ab4cb5b5
parent1d3c3f63f71ff19076a9bef89aa89bbbcaf44a15 (diff)
iwlwifi: mvm: use new pre_channel_switch op instead of channel_switch_beacon
A new callback has been added to prepare the device for a channel switch. Use the new callback instead of the old channel_switch_beacon operation. This makes it possible to remove the channel_switch_beacon operation from mac80211. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index 3841fcfbee2c..1f53f81ca69d 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -3100,27 +3100,34 @@ static int iwl_mvm_mac_testmode_cmd(struct ieee80211_hw *hw,
3100} 3100}
3101#endif 3101#endif
3102 3102
3103static void iwl_mvm_channel_switch_beacon(struct ieee80211_hw *hw, 3103static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw,
3104 struct ieee80211_vif *vif, 3104 struct ieee80211_vif *vif,
3105 struct cfg80211_chan_def *chandef) 3105 struct ieee80211_channel_switch *chsw)
3106{ 3106{
3107 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); 3107 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
3108 struct ieee80211_vif *csa_vif; 3108 struct ieee80211_vif *csa_vif;
3109 int ret;
3109 3110
3110 mutex_lock(&mvm->mutex); 3111 mutex_lock(&mvm->mutex);
3111 3112
3112 csa_vif = rcu_dereference_protected(mvm->csa_vif, 3113 csa_vif = rcu_dereference_protected(mvm->csa_vif,
3113 lockdep_is_held(&mvm->mutex)); 3114 lockdep_is_held(&mvm->mutex));
3114 if (WARN(csa_vif && csa_vif->csa_active, 3115 if (WARN(csa_vif && csa_vif->csa_active,
3115 "Another CSA is already in progress")) 3116 "Another CSA is already in progress")) {
3117 ret = -EBUSY;
3116 goto out_unlock; 3118 goto out_unlock;
3119 }
3117 3120
3118 IWL_DEBUG_MAC80211(mvm, "CSA started to freq %d\n", 3121 IWL_DEBUG_MAC80211(mvm, "CSA started to freq %d\n",
3119 chandef->center_freq1); 3122 chsw->chandef.center_freq1);
3120 rcu_assign_pointer(mvm->csa_vif, vif); 3123 rcu_assign_pointer(mvm->csa_vif, vif);
3121 3124
3125 ret = 0;
3126
3122out_unlock: 3127out_unlock:
3123 mutex_unlock(&mvm->mutex); 3128 mutex_unlock(&mvm->mutex);
3129
3130 return ret;
3124} 3131}
3125 3132
3126static void iwl_mvm_mac_flush(struct ieee80211_hw *hw, 3133static void iwl_mvm_mac_flush(struct ieee80211_hw *hw,
@@ -3215,7 +3222,7 @@ const struct ieee80211_ops iwl_mvm_hw_ops = {
3215 3222
3216 .set_tim = iwl_mvm_set_tim, 3223 .set_tim = iwl_mvm_set_tim,
3217 3224
3218 .channel_switch_beacon = iwl_mvm_channel_switch_beacon, 3225 .pre_channel_switch = iwl_mvm_pre_channel_switch,
3219 3226
3220 .tdls_channel_switch = iwl_mvm_tdls_channel_switch, 3227 .tdls_channel_switch = iwl_mvm_tdls_channel_switch,
3221 .tdls_cancel_channel_switch = iwl_mvm_tdls_cancel_channel_switch, 3228 .tdls_cancel_channel_switch = iwl_mvm_tdls_cancel_channel_switch,