Search Linux Wireless

[PATCH] mac80211: add ieee80211_wake_queues()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For zd1211rw I need the possibility to wake the tx queues in the
mac80211 stack. Though the mac80211 stack provides the function
ieee80211_stop_queues() there is no function
ieee80211_wake_queues(). This patch adds ieee80211_wake_queues().

The patch includes also a tiny simplification of
ieee80211_stop_queues().

Signed-off-by: Ulrich Kunitz <kune@xxxxxxxxxxxxxx>
---
 include/net/mac80211.h   |    8 ++++++++
 net/mac80211/ieee80211.c |   12 ++++++++++--
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index eb785c9..a0ac4a8 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1019,6 +1019,14 @@ void ieee80211_start_queues(struct ieee80211_hw *hw);
 void ieee80211_stop_queues(struct ieee80211_hw *hw);
 
 /**
+ * ieee80211_wake_queues - wake all queues
+ * @hw: pointer as obtained from ieee80211_alloc_hw().
+ *
+ * Drivers should use this function instead of netif_wake_queue.
+ */
+void ieee80211_wake_queues(struct ieee80211_hw *hw);
+
+/**
  * ieee80211_get_mc_list_item - iteration over items in multicast list
  * @hw: pointer as obtained from ieee80211_alloc_hw().
  * @prev: value returned by previous call to ieee80211_get_mc_list_item() or
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index b5a62b7..34b7837 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -5048,14 +5048,22 @@ EXPORT_SYMBOL(ieee80211_start_queues);
 
 void ieee80211_stop_queues(struct ieee80211_hw *hw)
 {
-	struct ieee80211_local *local = hw_to_local(hw);
 	int i;
 
-	for (i = 0; i < local->hw.queues; i++)
+	for (i = 0; i < hw->queues; i++)
 		ieee80211_stop_queue(hw, i);
 }
 EXPORT_SYMBOL(ieee80211_stop_queues);
 
+void ieee80211_wake_queues(struct ieee80211_hw *hw)
+{
+	int i;
+
+	for (i = 0; i < hw->queues; i++)
+		ieee80211_wake_queue(hw, i);
+}
+EXPORT_SYMBOL(ieee80211_wake_queues);
+
 struct net_device_stats *ieee80211_dev_stats(struct net_device *dev)
 {
 	struct ieee80211_sub_if_data *sdata;
-- 
1.5.1.1

-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux