diff mbox

[RFCv4,1/2] mac80211: fix WPA with VLAN on AP side with ps-sta

Message ID 1360695107-5721-2-git-send-email-michael-dev@fami-braun.de (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

michael-dev Feb. 12, 2013, 6:51 p.m. UTC
When sending a broadcast while at least on of the connected stations is
sleeping, it gets queued and send after a DTIM beacon is sent.
If the packet was to be sent on a vlan interface, the vif used for dequeing
from the per-bss queue does not hold the per-vlan sdata. The correct sdata is
required to use the correct per-vlan broadcast/multicast key.

This patch fixes this by restoring the per-vlan sdata using the skb->dev entry.

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
---
V2: fix compile warning
V3: simplify change

 net/mac80211/tx.c |    1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 2ef0e19..ee169b1 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2770,6 +2770,7 @@  ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
 				cpu_to_le16(IEEE80211_FCTL_MOREDATA);
 		}
 
+		sdata = IEEE80211_DEV_TO_SUB_IF(skb->dev);
 		if (!ieee80211_tx_prepare(sdata, &tx, skb))
 			break;
 		dev_kfree_skb_any(skb);