aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-01-31 17:25:24 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-02-01 15:40:08 -0500
commitb4d57adb727ec7c34020390eeb0eeb9e0a2959bc (patch)
tree7819dc3d403d80788fdc1c4b5af337fff2989bcf /net/mac80211/tx.c
parent17ad353b8d9843731258b5d23556667b764939e9 (diff)
mac80211: fix sta lookup with AP VLAN interfaces and injected frames
When injecting frames, mac80211 currently looks for the first AP interface that matches the source address of the injected frame. This breaks when such a frame is directed at a STA that has been moved to a VLAN. This patch fixes it by using sta_info_get_bss instead of sta_info_get, which also finds stations belonging to a VLAN interface of the same BSS as the AP interface. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index e7b1cdc7651b..85e382aa894e 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1133,6 +1133,8 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
1133 tx->sta = rcu_dereference(sdata->u.vlan.sta); 1133 tx->sta = rcu_dereference(sdata->u.vlan.sta);
1134 if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr) 1134 if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr)
1135 return TX_DROP; 1135 return TX_DROP;
1136 } else if (info->flags & IEEE80211_TX_CTL_INJECTED) {
1137 tx->sta = sta_info_get_bss(sdata, hdr->addr1);
1136 } 1138 }
1137 if (!tx->sta) 1139 if (!tx->sta)
1138 tx->sta = sta_info_get(sdata, hdr->addr1); 1140 tx->sta = sta_info_get(sdata, hdr->addr1);