diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-06-17 07:13:00 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 14:57:54 -0400 |
commit | f1d58c2521eb160178b2151d6326d8dc5d7c8560 (patch) | |
tree | af373bb1a5fbb6bc9436d29095133992d33d6598 /net/mac80211/main.c | |
parent | 18ad01c43918751cc22f8ee28f6b38b8954a55b2 (diff) |
mac80211: push rx status into skb->cb
Within mac80211, we often need to copy the rx status into
skb->cb. This is wasteful, as drivers could be building it
in there to start with. This patch changes the API so that
drivers are expected to pass the RX status in skb->cb, now
accessible as IEEE80211_SKB_RXCB(skb). It also updates all
drivers to pass the rx status in there, but only by making
them memcpy() it into place before the call to the receive
function (ieee80211_rx(_irqsafe)). Each driver can now be
optimised on its own schedule.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 092a017b237e..5b69f5f07299 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -330,19 +330,16 @@ static void ieee80211_tasklet_handler(unsigned long data) | |||
330 | { | 330 | { |
331 | struct ieee80211_local *local = (struct ieee80211_local *) data; | 331 | struct ieee80211_local *local = (struct ieee80211_local *) data; |
332 | struct sk_buff *skb; | 332 | struct sk_buff *skb; |
333 | struct ieee80211_rx_status rx_status; | ||
334 | struct ieee80211_ra_tid *ra_tid; | 333 | struct ieee80211_ra_tid *ra_tid; |
335 | 334 | ||
336 | while ((skb = skb_dequeue(&local->skb_queue)) || | 335 | while ((skb = skb_dequeue(&local->skb_queue)) || |
337 | (skb = skb_dequeue(&local->skb_queue_unreliable))) { | 336 | (skb = skb_dequeue(&local->skb_queue_unreliable))) { |
338 | switch (skb->pkt_type) { | 337 | switch (skb->pkt_type) { |
339 | case IEEE80211_RX_MSG: | 338 | case IEEE80211_RX_MSG: |
340 | /* status is in skb->cb */ | ||
341 | memcpy(&rx_status, skb->cb, sizeof(rx_status)); | ||
342 | /* Clear skb->pkt_type in order to not confuse kernel | 339 | /* Clear skb->pkt_type in order to not confuse kernel |
343 | * netstack. */ | 340 | * netstack. */ |
344 | skb->pkt_type = 0; | 341 | skb->pkt_type = 0; |
345 | __ieee80211_rx(local_to_hw(local), skb, &rx_status); | 342 | ieee80211_rx(local_to_hw(local), skb); |
346 | break; | 343 | break; |
347 | case IEEE80211_TX_STATUS_MSG: | 344 | case IEEE80211_TX_STATUS_MSG: |
348 | skb->pkt_type = 0; | 345 | skb->pkt_type = 0; |