summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2014-11-10 12:10:06 +0300
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-11-24 09:30:25 +0300
commitf028905c2033137f98d8c0025165644ac63cfe8d (patch)
treeaba713744a8bae9ba927e87dfbc11507ab4cb5b5 /drivers
parent1d3c3f63f71ff19076a9bef89aa89bbbcaf44a15 (diff)
downloadlinux-f028905c2033137f98d8c0025165644ac63cfe8d.tar.xz
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>
Diffstat (limited to 'drivers')
-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,
}
#endif
-static void iwl_mvm_channel_switch_beacon(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif,
- struct cfg80211_chan_def *chandef)
+static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif,
+ struct ieee80211_channel_switch *chsw)
{
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
struct ieee80211_vif *csa_vif;
+ int ret;
mutex_lock(&mvm->mutex);
csa_vif = rcu_dereference_protected(mvm->csa_vif,
lockdep_is_held(&mvm->mutex));
if (WARN(csa_vif && csa_vif->csa_active,
- "Another CSA is already in progress"))
+ "Another CSA is already in progress")) {
+ ret = -EBUSY;
goto out_unlock;
+ }
IWL_DEBUG_MAC80211(mvm, "CSA started to freq %d\n",
- chandef->center_freq1);
+ chsw->chandef.center_freq1);
rcu_assign_pointer(mvm->csa_vif, vif);
+ ret = 0;
+
out_unlock:
mutex_unlock(&mvm->mutex);
+
+ return ret;
}
static void iwl_mvm_mac_flush(struct ieee80211_hw *hw,
@@ -3215,7 +3222,7 @@ const struct ieee80211_ops iwl_mvm_hw_ops = {
.set_tim = iwl_mvm_set_tim,
- .channel_switch_beacon = iwl_mvm_channel_switch_beacon,
+ .pre_channel_switch = iwl_mvm_pre_channel_switch,
.tdls_channel_switch = iwl_mvm_tdls_channel_switch,
.tdls_cancel_channel_switch = iwl_mvm_tdls_cancel_channel_switch,