From 8e3655025150b491f24a66e0f5dd700dc064ab8d Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Mon, 30 Aug 2010 13:51:50 -0700 Subject: [PATCH] compat-wireless: fix multiqueue patches This patch changed the MQ helpers used, just adjust the context manually. Author: Johannes Berg Date: Fri Aug 27 13:36:49 2010 +0200 mac80211: use subqueue helpers There are subqueue helpers so that we don't need to get the TX queue and then wake/stop it, use those helpers. Signed-off-by: Johannes Berg Signed-off-by: John W. Linville Signed-off-by: Luis R. Rodriguez --- patches/22-multiqueue.patch | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/patches/22-multiqueue.patch b/patches/22-multiqueue.patch index c6ed5b308be5..1093097460f2 100644 --- a/patches/22-multiqueue.patch +++ b/patches/22-multiqueue.patch @@ -46,7 +46,7 @@ queue by using skb_set_queue_mapping(skb, 0) through ieee80211_tx_skb() --- a/net/mac80211/util.c +++ b/net/mac80211/util.c -@@ -264,6 +264,18 @@ __le16 ieee80211_ctstoself_duration(stru +@@ -264,6 +264,18 @@ } EXPORT_SYMBOL(ieee80211_ctstoself_duration); @@ -65,29 +65,29 @@ queue by using skb_set_queue_mapping(skb, 0) through ieee80211_tx_skb() static void __ieee80211_wake_queue(struct ieee80211_hw *hw, int queue, enum queue_stop_reason reason) { -@@ -284,7 +296,14 @@ static void __ieee80211_wake_queue(struc - if (skb_queue_empty(&local->pending[queue])) { - rcu_read_lock(); - list_for_each_entry_rcu(sdata, &local->interfaces, list) +@@ -286,7 +298,14 @@ + list_for_each_entry_rcu(sdata, &local->interfaces, list) { + if (test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state)) + continue; +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) - netif_tx_wake_queue(netdev_get_tx_queue(sdata->dev, queue)); + netif_wake_subqueue(sdata->dev, queue); +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)) + netif_start_subqueue(sdata->dev, queue); +#else + if (ieee80211_all_queues_started(hw)) + netif_wake_queue(sdata->dev); +#endif + } rcu_read_unlock(); } else - tasklet_schedule(&local->tx_pending_tasklet); -@@ -323,7 +342,13 @@ static void __ieee80211_stop_queue(struc +@@ -326,7 +345,13 @@ rcu_read_lock(); list_for_each_entry_rcu(sdata, &local->interfaces, list) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) - netif_tx_stop_queue(netdev_get_tx_queue(sdata->dev, queue)); -+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)) + netif_stop_subqueue(sdata->dev, queue); ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)) + netif_stop_subqueue(sdata->dev, queue); +#else + netif_stop_queue(sdata->dev); +#endif @@ -96,7 +96,7 @@ queue by using skb_set_queue_mapping(skb, 0) through ieee80211_tx_skb() --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -1599,6 +1599,10 @@ static void ieee80211_xmit(struct ieee80 +@@ -1620,6 +1620,10 @@ return; } @@ -107,13 +107,12 @@ queue by using skb_set_queue_mapping(skb, 0) through ieee80211_tx_skb() ieee80211_set_qos_hdr(local, skb); ieee80211_tx(sdata, skb, false); rcu_read_unlock(); -@@ -2070,8 +2074,15 @@ void ieee80211_tx_pending(unsigned long +@@ -2092,7 +2096,14 @@ if (skb_queue_empty(&local->pending[i])) list_for_each_entry_rcu(sdata, &local->interfaces, list) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) - netif_tx_wake_queue( - netdev_get_tx_queue(sdata->dev, i)); + netif_wake_subqueue(sdata->dev, i); +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)) + netif_start_subqueue(sdata->dev, i); +#else -- 2.30.2