[rdkb][common][bsp][Refactor and sync wifi from openwrt]
[Description]
ac60b1ff [MAC80211][misc][Add Filogic 880/860/830/820/630 Release Information]
7eb946a0 [MAC80211][WiFi7][hostapd][sync hostapd patches]
91638fc9 [MAC80211][WiFi7][mac80211][sync backports code]
8e45746b [MAC80211][WiFi7][mt76][sync mt76 patches]
1c564afa [MAC80211][WiFi7][mt76][Add Eagle BE19000 ifem default bin]
[Release-log]
Change-Id: I1d4218d3b1211700acb5937fe310cbd0bf219968
diff --git a/recipes-wifi/linux-mac80211/files/patches-6.x/subsys/0058-mtk-wifi-mt76-mt7996-assign-link-address-to-the-head.patch b/recipes-wifi/linux-mac80211/files/patches-6.x/subsys/0058-mtk-wifi-mt76-mt7996-assign-link-address-to-the-head.patch
new file mode 100644
index 0000000..eb8db1a
--- /dev/null
+++ b/recipes-wifi/linux-mac80211/files/patches-6.x/subsys/0058-mtk-wifi-mt76-mt7996-assign-link-address-to-the-head.patch
@@ -0,0 +1,54 @@
+From 70e027ce4ac9e4de16829c88ee846b7e12f14953 Mon Sep 17 00:00:00 2001
+From: Michael-CY Lee <michael-cy.lee@mediatek.com>
+Date: Mon, 25 Mar 2024 16:26:34 +0800
+Subject: [PATCH 58/61] mtk: wifi: mt76: mt7996: assign link address to the
+ header of broadcast mgmt.
+
+AAD calculation should use link addr as input for broadcast mgmt. skb.
+This commit assigns link address to the header of cloned broadcast mgmt.
+for the correct AAD calculation.
+
+CR-Id: WCNCR00289305
+Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
+Change-Id: Ieeee17cc2121fdbc9eb34f171f2d4da583d91154
+---
+ net/mac80211/offchannel.c | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
+index a571be0..15948f9 100644
+--- a/net/mac80211/offchannel.c
++++ b/net/mac80211/offchannel.c
+@@ -981,16 +981,26 @@ int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
+ if (is_multicast_ether_addr(mgmt->da) && hweight16(links) > 1) {
+ unsigned int link;
+ struct sk_buff *dskb;
++ struct ieee80211_hdr *hdr;
++ struct ieee80211_bss_conf *conf;
+
+ for_each_set_bit(link, &links, IEEE80211_MLD_MAX_NUM_LINKS) {
++ conf = rcu_dereference(sdata->vif.link_conf[link]);
++ if (!conf)
++ continue;
++
+ dskb = skb_clone(skb, GFP_ATOMIC);
+- if (dskb) {
+- ieee80211_tx_skb_tid(sdata, dskb, 7, link);
+- } else {
++ if (!dskb) {
+ ret = -ENOMEM;
+ kfree_skb(skb);
+ goto out_unlock;
+ }
++
++ /* Assign link address */
++ hdr = (void *)dskb->data;
++ memcpy(hdr->addr2, conf->addr, ETH_ALEN);
++ memcpy(hdr->addr3, conf->addr, ETH_ALEN);
++ ieee80211_tx_skb_tid(sdata, dskb, 7, link);
+ }
+ kfree_skb(skb);
+ } else {
+--
+2.39.2
+