diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-05-15 06:55:29 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-21 21:48:11 -0400 |
commit | e039fa4a4195ac4ee895e6f3d1334beed63256fe (patch) | |
tree | cfd0762d73df96b73052378be7b157c4ac6e7035 /net/mac80211/sta_info.c | |
parent | e24549485f859be6518929bb1c9c0257d79f033d (diff) |
mac80211: move TX info into skb->cb
This patch converts mac80211 and all drivers to have transmit
information and status in skb->cb rather than allocating extra
memory for it and copying all the data around. To make it fit,
a union is used where only data that is necessary for all steps
is kept outside of the union.
A number of fixes were done by Ivo, as well as the rt2x00 part
of this patch.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r-- | net/mac80211/sta_info.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index baf5e4746884..ef3149324d54 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -511,20 +511,20 @@ static inline int sta_info_buffer_expired(struct ieee80211_local *local, | |||
511 | struct sta_info *sta, | 511 | struct sta_info *sta, |
512 | struct sk_buff *skb) | 512 | struct sk_buff *skb) |
513 | { | 513 | { |
514 | struct ieee80211_tx_packet_data *pkt_data; | 514 | struct ieee80211_tx_info *info; |
515 | int timeout; | 515 | int timeout; |
516 | 516 | ||
517 | if (!skb) | 517 | if (!skb) |
518 | return 0; | 518 | return 0; |
519 | 519 | ||
520 | pkt_data = (struct ieee80211_tx_packet_data *) skb->cb; | 520 | info = IEEE80211_SKB_CB(skb); |
521 | 521 | ||
522 | /* Timeout: (2 * listen_interval * beacon_int * 1024 / 1000000) sec */ | 522 | /* Timeout: (2 * listen_interval * beacon_int * 1024 / 1000000) sec */ |
523 | timeout = (sta->listen_interval * local->hw.conf.beacon_int * 32 / | 523 | timeout = (sta->listen_interval * local->hw.conf.beacon_int * 32 / |
524 | 15625) * HZ; | 524 | 15625) * HZ; |
525 | if (timeout < STA_TX_BUFFER_EXPIRE) | 525 | if (timeout < STA_TX_BUFFER_EXPIRE) |
526 | timeout = STA_TX_BUFFER_EXPIRE; | 526 | timeout = STA_TX_BUFFER_EXPIRE; |
527 | return time_after(jiffies, pkt_data->jiffies + timeout); | 527 | return time_after(jiffies, info->control.jiffies + timeout); |
528 | } | 528 | } |
529 | 529 | ||
530 | 530 | ||