diff mbox

mac80211: don't look up stations for multicast addresses

Message ID 1425155319-22553-1-git-send-email-johannes@sipsolutions.net (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show

Commit Message

Johannes Berg Feb. 28, 2015, 8:28 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

Since multicast addresses don't exist as stations, don't attempt
to look them up in the hashtable on TX.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
This replaces the broken commit "mac80211: simplify station
assignment in ieee80211_tx_prepare()".
---
 net/mac80211/tx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 88a18ffe2975..0e56ac5729ef 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1172,7 +1172,7 @@  ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
 		   tx->sdata->control_port_protocol == tx->skb->protocol) {
 		tx->sta = sta_info_get_bss(sdata, hdr->addr1);
 	}
-	if (!tx->sta)
+	if (!tx->sta && !is_multicast_ether_addr(hdr->addr1))
 		tx->sta = sta_info_get(sdata, hdr->addr1);
 
 	if (tx->sta && ieee80211_is_data_qos(hdr->frame_control) &&