aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorwarmcat <andy@warmcat.com>2007-09-14 11:10:25 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:49:31 -0400
commit24338793eea9dcc0865826e1115af86a19af8d18 (patch)
treeb7d73e8e897cfd2311db484fc7f8b8397b823325 /net/mac80211/tx.c
parent139c3a0492745192f999aaa67d11cb63983211f5 (diff)
[MAC80211]: get STA after tx radiotap snipped
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> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 3d57e6d80f6d..1780c24f7957 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -959,8 +959,6 @@ __ieee80211_tx_prepare(struct ieee80211_txrx_data *tx,
959 tx->dev = dev; /* use original interface */ 959 tx->dev = dev; /* use original interface */
960 tx->local = local; 960 tx->local = local;
961 tx->sdata = IEEE80211_DEV_TO_SUB_IF(dev); 961 tx->sdata = IEEE80211_DEV_TO_SUB_IF(dev);
962 tx->sta = sta_info_get(local, hdr->addr1);
963 tx->fc = le16_to_cpu(hdr->frame_control);
964 962
965 /* 963 /*
966 * set defaults for things that can be set by 964 * set defaults for things that can be set by
@@ -985,6 +983,8 @@ __ieee80211_tx_prepare(struct ieee80211_txrx_data *tx,
985 res = TXRX_QUEUED; /* indication it was monitor packet */ 983 res = TXRX_QUEUED; /* indication it was monitor packet */
986 } 984 }
987 985
986 tx->sta = sta_info_get(local, hdr->addr1);
987 tx->fc = le16_to_cpu(hdr->frame_control);
988 tx->u.tx.control = control; 988 tx->u.tx.control = control;
989 if (is_multicast_ether_addr(hdr->addr1)) { 989 if (is_multicast_ether_addr(hdr->addr1)) {
990 tx->flags &= ~IEEE80211_TXRXD_TXUNICAST; 990 tx->flags &= ~IEEE80211_TXRXD_TXUNICAST;