@@ -5048,6 +5048,15 @@ static bool ieee80211_rx_for_interface(struct ieee80211_rx_data *rx,
struct ieee80211_hdr *hdr = (void *)skb->data;
struct sta_info *sta;
int link_id = -1;
+ const u8 *addr;
+
+ if (ieee80211_is_s1g_beacon(hdr->frame_control)) {
+ struct ieee80211_ext *ext_hdr = (struct ieee80211_ext *)skb->data;
+
+ addr = ext_hdr->u.s1g_beacon.sa;
+ } else {
+ addr = hdr->addr2;
+ }
/*
* Look up link station first, in case there's a
@@ -5055,14 +5064,14 @@ static bool ieee80211_rx_for_interface(struct ieee80211_rx_data *rx,
* is identical to the MLD address, that way we'll
* have the link information if needed.
*/
- link_sta = link_sta_info_get_bss(rx->sdata, hdr->addr2);
+ link_sta = link_sta_info_get_bss(rx->sdata, addr);
if (link_sta) {
sta = link_sta->sta;
link_id = link_sta->link_id;
} else {
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
- sta = sta_info_get_bss(rx->sdata, hdr->addr2);
+ sta = sta_info_get_bss(rx->sdata, addr);
if (status->link_valid)
link_id = status->link_id;
}
@@ -5102,7 +5111,7 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
if (ieee80211_is_data(fc) || ieee80211_is_mgmt(fc))
I802_DEBUG_INC(local->dot11ReceivedFragmentCount);
- if (ieee80211_is_mgmt(fc)) {
+ if (ieee80211_is_mgmt(fc) || ieee80211_is_ext(fc)) {
/* drop frame if too short for header */
if (skb->len < ieee80211_hdrlen(fc))
err = -ENOBUFS;