aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-08-01 12:14:45 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-09-03 15:49:10 -0400
commitdf197c00bf1dbdee888aa886e5e93b49b42a268b (patch)
treec85f30b8d666d70a78f11a59044e38d1147c1991
parentb2d81db7b3d3e51f6f465cae8d450acf0ca8d2dc (diff)
iwlwifi: mvm: clarify stop_count, remove transport_stopped
The queue handling is a bit unclear - we have an array for stop_count[IWL_MAX_HW_QUEUES] but indices really are the mac80211 queue numbers. Change the array to be only of the right size for mac80211 queues (IEEE80211_MAX_QUEUES) and rename it to be clearer. While at it, also remove the unused transport queue stop bitmap in mvm. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/fw.c4
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mvm.h3
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/ops.c9
3 files changed, 6 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw.c b/drivers/net/wireless/iwlwifi/mvm/fw.c
index c958a7d0458d..21d606028ca6 100644
--- a/drivers/net/wireless/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/iwlwifi/mvm/fw.c
@@ -244,10 +244,10 @@ static int iwl_mvm_load_ucode_wait_alive(struct iwl_mvm *mvm,
244 mvm->queue_to_mac80211[i] = i; 244 mvm->queue_to_mac80211[i] = i;
245 else 245 else
246 mvm->queue_to_mac80211[i] = IWL_INVALID_MAC80211_QUEUE; 246 mvm->queue_to_mac80211[i] = IWL_INVALID_MAC80211_QUEUE;
247 atomic_set(&mvm->queue_stop_count[i], 0);
248 } 247 }
249 248
250 mvm->transport_queue_stop = 0; 249 for (i = 0; i < IEEE80211_MAX_QUEUES; i++)
250 atomic_set(&mvm->mac80211_queue_stop_count[i], 0);
251 251
252 mvm->ucode_loaded = true; 252 mvm->ucode_loaded = true;
253 253
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h
index b529cf64a5b6..e292de96e09a 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h
@@ -562,9 +562,8 @@ struct iwl_mvm {
562 562
563 struct mvm_statistics_rx rx_stats; 563 struct mvm_statistics_rx rx_stats;
564 564
565 unsigned long transport_queue_stop;
566 u8 queue_to_mac80211[IWL_MAX_HW_QUEUES]; 565 u8 queue_to_mac80211[IWL_MAX_HW_QUEUES];
567 atomic_t queue_stop_count[IWL_MAX_HW_QUEUES]; 566 atomic_t mac80211_queue_stop_count[IEEE80211_MAX_QUEUES];
568 567
569 const char *nvm_file_name; 568 const char *nvm_file_name;
570 struct iwl_nvm_data *nvm_data; 569 struct iwl_nvm_data *nvm_data;
diff --git a/drivers/net/wireless/iwlwifi/mvm/ops.c b/drivers/net/wireless/iwlwifi/mvm/ops.c
index d7ec07d48d98..87f278cc9b2c 100644
--- a/drivers/net/wireless/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/iwlwifi/mvm/ops.c
@@ -703,14 +703,13 @@ static void iwl_mvm_stop_sw_queue(struct iwl_op_mode *op_mode, int queue)
703 if (WARN_ON_ONCE(mq == IWL_INVALID_MAC80211_QUEUE)) 703 if (WARN_ON_ONCE(mq == IWL_INVALID_MAC80211_QUEUE))
704 return; 704 return;
705 705
706 if (atomic_inc_return(&mvm->queue_stop_count[mq]) > 1) { 706 if (atomic_inc_return(&mvm->mac80211_queue_stop_count[mq]) > 1) {
707 IWL_DEBUG_TX_QUEUES(mvm, 707 IWL_DEBUG_TX_QUEUES(mvm,
708 "queue %d (mac80211 %d) already stopped\n", 708 "queue %d (mac80211 %d) already stopped\n",
709 queue, mq); 709 queue, mq);
710 return; 710 return;
711 } 711 }
712 712
713 set_bit(mq, &mvm->transport_queue_stop);
714 ieee80211_stop_queue(mvm->hw, mq); 713 ieee80211_stop_queue(mvm->hw, mq);
715} 714}
716 715
@@ -722,15 +721,13 @@ static void iwl_mvm_wake_sw_queue(struct iwl_op_mode *op_mode, int queue)
722 if (WARN_ON_ONCE(mq == IWL_INVALID_MAC80211_QUEUE)) 721 if (WARN_ON_ONCE(mq == IWL_INVALID_MAC80211_QUEUE))
723 return; 722 return;
724 723
725 if (atomic_dec_return(&mvm->queue_stop_count[mq]) > 0) { 724 if (atomic_dec_return(&mvm->mac80211_queue_stop_count[mq]) > 0) {
726 IWL_DEBUG_TX_QUEUES(mvm, 725 IWL_DEBUG_TX_QUEUES(mvm,
727 "queue %d (mac80211 %d) already awake\n", 726 "queue %d (mac80211 %d) still stopped\n",
728 queue, mq); 727 queue, mq);
729 return; 728 return;
730 } 729 }
731 730
732 clear_bit(mq, &mvm->transport_queue_stop);
733
734 ieee80211_wake_queue(mvm->hw, mq); 731 ieee80211_wake_queue(mvm->hw, mq);
735} 732}
736 733