]> Pileus Git - ~andy/linux/commitdiff
[MAC80211]: get STA after tx radiotap snipped
authorwarmcat <andy@warmcat.com>
Fri, 14 Sep 2007 15:10:25 +0000 (11:10 -0400)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:49:31 +0000 (16:49 -0700)
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>
net/mac80211/tx.c

index 3d57e6d80f6db7b2adfc720793a3fe28319fe1bf..1780c24f79579e0abd8a5a865e2e6e5e205807e6 100644 (file)
@@ -959,8 +959,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
@@ -985,6 +983,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;