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>
This commit is contained in:
committed by
John W. Linville
parent
e24549485f
commit
e039fa4a41
@@ -714,7 +714,7 @@ static int ap_sta_ps_end(struct net_device *dev, struct sta_info *sta)
|
||||
struct sk_buff *skb;
|
||||
int sent = 0;
|
||||
struct ieee80211_sub_if_data *sdata;
|
||||
struct ieee80211_tx_packet_data *pkt_data;
|
||||
struct ieee80211_tx_info *info;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
sdata = sta->sdata;
|
||||
@@ -734,13 +734,13 @@ static int ap_sta_ps_end(struct net_device *dev, struct sta_info *sta)
|
||||
|
||||
/* Send all buffered frames to the station */
|
||||
while ((skb = skb_dequeue(&sta->tx_filtered)) != NULL) {
|
||||
pkt_data = (struct ieee80211_tx_packet_data *) skb->cb;
|
||||
info = IEEE80211_SKB_CB(skb);
|
||||
sent++;
|
||||
pkt_data->flags |= IEEE80211_TXPD_REQUEUE;
|
||||
info->flags |= IEEE80211_TX_CTL_REQUEUE;
|
||||
dev_queue_xmit(skb);
|
||||
}
|
||||
while ((skb = skb_dequeue(&sta->ps_tx_buf)) != NULL) {
|
||||
pkt_data = (struct ieee80211_tx_packet_data *) skb->cb;
|
||||
info = IEEE80211_SKB_CB(skb);
|
||||
local->total_ps_buffered--;
|
||||
sent++;
|
||||
#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
|
||||
@@ -748,7 +748,7 @@ static int ap_sta_ps_end(struct net_device *dev, struct sta_info *sta)
|
||||
"since STA not sleeping anymore\n", dev->name,
|
||||
print_mac(mac, sta->addr), sta->aid);
|
||||
#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
|
||||
pkt_data->flags |= IEEE80211_TXPD_REQUEUE;
|
||||
info->flags |= IEEE80211_TX_CTL_REQUEUE;
|
||||
dev_queue_xmit(skb);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user