aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-11-11 08:37:22 -0500
committerDavid S. Miller <davem@davemloft.net>2017-11-11 08:37:22 -0500
commit7c5556decd0a629e9ee02e93653f75ba7b7da03c (patch)
treebc56819788e9226efc04a1d1710b99fa6d4512e4 /drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
parent39b175211053c7a6a4d794c42e225994f1c069c2 (diff)
parentfdd0bd88ceaecf729db103ac8836af5805dd2dc1 (diff)
Merge tag 'wireless-drivers-next-for-davem-2017-11-11' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
Kalle Valo says: ==================== wireless-drivers-next patches for 4.15 Last minute patches before the merge window. Not really anything special standing out, mostly fixes or cleanup and some minor new features. Major changes: iwlwifi * some new PCI IDs ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c62
1 files changed, 32 insertions, 30 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index 0b3d275fe177..3e92a117c0b8 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -4002,39 +4002,36 @@ out_unlock:
4002 4002
4003static void iwl_mvm_flush_no_vif(struct iwl_mvm *mvm, u32 queues, bool drop) 4003static void iwl_mvm_flush_no_vif(struct iwl_mvm *mvm, u32 queues, bool drop)
4004{ 4004{
4005 if (drop) { 4005 int i;
4006 if (iwl_mvm_has_new_tx_api(mvm))
4007 /* TODO new tx api */
4008 WARN_ONCE(1,
4009 "Need to implement flush TX queue\n");
4010 else
4011 iwl_mvm_flush_tx_path(mvm,
4012 iwl_mvm_flushable_queues(mvm) & queues,
4013 0);
4014 } else {
4015 if (iwl_mvm_has_new_tx_api(mvm)) {
4016 struct ieee80211_sta *sta;
4017 int i;
4018 4006
4007 if (!iwl_mvm_has_new_tx_api(mvm)) {
4008 if (drop) {
4019 mutex_lock(&mvm->mutex); 4009 mutex_lock(&mvm->mutex);
4020 4010 iwl_mvm_flush_tx_path(mvm,
4021 for (i = 0; i < ARRAY_SIZE(mvm->fw_id_to_mac_id); i++) { 4011 iwl_mvm_flushable_queues(mvm) & queues, 0);
4022 sta = rcu_dereference_protected(
4023 mvm->fw_id_to_mac_id[i],
4024 lockdep_is_held(&mvm->mutex));
4025 if (IS_ERR_OR_NULL(sta))
4026 continue;
4027
4028 iwl_mvm_wait_sta_queues_empty(mvm,
4029 iwl_mvm_sta_from_mac80211(sta));
4030 }
4031
4032 mutex_unlock(&mvm->mutex); 4012 mutex_unlock(&mvm->mutex);
4033 } else { 4013 } else {
4034 iwl_trans_wait_tx_queues_empty(mvm->trans, 4014 iwl_trans_wait_tx_queues_empty(mvm->trans, queues);
4035 queues);
4036 } 4015 }
4016 return;
4017 }
4018
4019 mutex_lock(&mvm->mutex);
4020 for (i = 0; i < ARRAY_SIZE(mvm->fw_id_to_mac_id); i++) {
4021 struct ieee80211_sta *sta;
4022
4023 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[i],
4024 lockdep_is_held(&mvm->mutex));
4025 if (IS_ERR_OR_NULL(sta))
4026 continue;
4027
4028 if (drop)
4029 iwl_mvm_flush_sta_tids(mvm, i, 0xFF, 0);
4030 else
4031 iwl_mvm_wait_sta_queues_empty(mvm,
4032 iwl_mvm_sta_from_mac80211(sta));
4037 } 4033 }
4034 mutex_unlock(&mvm->mutex);
4038} 4035}
4039 4036
4040static void iwl_mvm_mac_flush(struct ieee80211_hw *hw, 4037static void iwl_mvm_mac_flush(struct ieee80211_hw *hw,
@@ -4294,9 +4291,7 @@ void iwl_mvm_sync_rx_queues_internal(struct iwl_mvm *mvm,
4294 4291
4295 lockdep_assert_held(&mvm->mutex); 4292 lockdep_assert_held(&mvm->mutex);
4296 4293
4297 /* TODO - remove a000 disablement when we have RXQ config API */ 4294 if (!iwl_mvm_has_new_rx_api(mvm))
4298 if (!iwl_mvm_has_new_rx_api(mvm) ||
4299 mvm->trans->cfg->device_family == IWL_DEVICE_FAMILY_A000)
4300 return; 4295 return;
4301 4296
4302 notif->cookie = mvm->queue_sync_cookie; 4297 notif->cookie = mvm->queue_sync_cookie;
@@ -4305,6 +4300,13 @@ void iwl_mvm_sync_rx_queues_internal(struct iwl_mvm *mvm,
4305 atomic_set(&mvm->queue_sync_counter, 4300 atomic_set(&mvm->queue_sync_counter,
4306 mvm->trans->num_rx_queues); 4301 mvm->trans->num_rx_queues);
4307 4302
4303 /* TODO - remove this when we have RXQ config API */
4304 if (mvm->trans->cfg->device_family == IWL_DEVICE_FAMILY_A000) {
4305 qmask = BIT(0);
4306 if (notif->sync)
4307 atomic_set(&mvm->queue_sync_counter, 1);
4308 }
4309
4308 ret = iwl_mvm_notify_rx_queue(mvm, qmask, (u8 *)notif, size); 4310 ret = iwl_mvm_notify_rx_queue(mvm, qmask, (u8 *)notif, size);
4309 if (ret) { 4311 if (ret) {
4310 IWL_ERR(mvm, "Failed to trigger RX queues sync (%d)\n", ret); 4312 IWL_ERR(mvm, "Failed to trigger RX queues sync (%d)\n", ret);