* [PATCH] mac80211: get STA after tx radiotap snipped
@ 2007-09-01 9:02 warmcat
2007-09-01 9:24 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: warmcat @ 2007-09-01 9:02 UTC (permalink / raw)
To: linux-wireless
Johannes Berg noticed that in __ieee80211_tx_prepare() we try to get the
STA from addr1 of the ieee80211 header when the radiotap header is actually
still at the front of the packet. This patch defers doing that until the
radiotap header is gone.
Signed-off-by: Andy Green <andy@warmcat.com>
---
net/mac80211/tx.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 902d5b4..075f982 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -950,8 +950,6 @@ __ieee80211_tx_prepare(struct ieee80211_txrx_data *tx,
tx->dev = dev; /* use original interface */
tx->local = local;
tx->sdata = IEEE80211_DEV_TO_SUB_IF(dev);
- tx->sta = sta_info_get(local, hdr->addr1);
- tx->fc = le16_to_cpu(hdr->frame_control);
/*
* set defaults for things that can be set by
@@ -976,6 +974,8 @@ __ieee80211_tx_prepare(struct ieee80211_txrx_data *tx,
res = TXRX_QUEUED; /* indication it was monitor packet */
}
+ tx->sta = sta_info_get(local, hdr->addr1);
+ tx->fc = le16_to_cpu(hdr->frame_control);
tx->u.tx.control = control;
if (is_multicast_ether_addr(hdr->addr1)) {
tx->flags &= ~IEEE80211_TXRXD_TXUNICAST;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-09-01 9:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-01 9:02 [PATCH] mac80211: get STA after tx radiotap snipped warmcat
2007-09-01 9:24 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).