diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2008-07-17 04:53:15 -0700 |
---|---|---|
committer | Luis R. Rodriguez <lrodriguez@atheros.com> | 2008-07-17 04:53:45 -0700 |
commit | 37beb01986d3c7a2c9a2aeda2fa2ebc7790d180e (patch) | |
tree | d5cbfbf168edcd31d561fe2e40833467512878f2 | |
parent | 3426e551938236cebbc416356c74d5715a792fc7 (diff) | |
download | compat-wireless-2.6-old-37beb01986d3c7a2c9a2aeda2fa2ebc7790d180e.tar.gz |
Backport skb_copy_queue_mapping() handling in mac80211 tx.c
using the hacked up MQ support. Loading mac80211 now works
on 2.6.22.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
-rw-r--r-- | compat/compat.diff | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/compat/compat.diff b/compat/compat.diff index 3825d35..30a0101 100644 --- a/compat/compat.diff +++ b/compat/compat.diff @@ -869,8 +869,8 @@ ret = dev_alloc_name(ndev, ndev->name); if (ret < 0) ---- a/net/mac80211/tx.c 2008-07-15 01:44:52.000000000 -0700 -+++ b/net/mac80211/tx.c 2008-07-15 01:44:52.000000000 -0700 +--- a/net/mac80211/tx.c 2008-07-17 04:48:24.000000000 -0700 ++++ b/net/mac80211/tx.c 2008-07-17 04:44:47.000000000 -0700 @@ -18,12 +18,17 @@ #include <linux/etherdevice.h> #include <linux/bitmap.h> @@ -910,7 +910,19 @@ return TX_DROP; first = tx->skb; -@@ -1173,8 +1183,9 @@ +@@ -731,7 +741,11 @@ + copylen = left > per_fragm ? per_fragm : left; + memcpy(skb_put(frag, copylen), pos, copylen); + memcpy(frag->cb, first->cb, sizeof(frag->cb)); ++#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22)) ++ IEEE80211_SKB_CB(frag)->queue = IEEE80211_SKB_CB(first)->queue; ++#else + skb_copy_queue_mapping(frag, first); ++#endif + + pos += copylen; + left -= copylen; +@@ -1173,8 +1187,9 @@ u16 queue; queue = skb_get_queue_mapping(skb); @@ -921,7 +933,7 @@ if (unlikely(skb->len < 10)) { dev_kfree_skb(skb); -@@ -1216,7 +1227,12 @@ +@@ -1216,7 +1231,12 @@ if (ret == IEEE80211_TX_FRAG_AGAIN) skb = NULL; @@ -934,7 +946,7 @@ smp_mb(); /* * When the driver gets out of buffers during sending of -@@ -1230,7 +1246,12 @@ +@@ -1230,7 +1250,12 @@ * possible to have happened. */ if (!__netif_subqueue_stopped(local->mdev, queue)) { @@ -947,7 +959,7 @@ retries++; /* * Driver bug, it's rejecting packets but -@@ -1662,8 +1683,13 @@ +@@ -1662,8 +1687,13 @@ info->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS; skb->dev = local->mdev; @@ -961,7 +973,7 @@ /* Update skb pointers to various headers since this modified frame * is going to go through Linux networking code that may potentially -@@ -1695,14 +1721,24 @@ +@@ -1695,14 +1725,24 @@ struct ieee80211_tx_stored_packet *store; for (i = 0; i < ieee80211_num_regular_queues(&local->hw); i++) { @@ -986,7 +998,7 @@ } } -@@ -1723,8 +1759,11 @@ +@@ -1723,8 +1763,11 @@ /* Check that this queue is ok */ if (__netif_subqueue_stopped(local->mdev, i)) continue; @@ -999,7 +1011,7 @@ ieee80211_wake_queue(&local->hw, i); continue; } -@@ -1741,7 +1780,12 @@ +@@ -1741,7 +1784,12 @@ if (ret == IEEE80211_TX_FRAG_AGAIN) store->skb = NULL; } else { |