[rdkb][common][bsp][Refactor ans sync wifi from openwrt]
[Description]
174f052 [MAC80211][wpa_supplicant][Add sae_pwe config to wpa_supplicant]
393edf7 [mac80211][mt76][Fix kernel crash because wcid may be null]
693a907 [MAC80211][misc][Change the HEMU name]
319b70b [MT7622+Kite WHNAT development]
3040258 [MAC80211][core][refine backports 5.15 patches]
[Release-log]
Change-Id: Icaa248f9381c398c78a71e09d4427594cb536f28
diff --git a/recipes-wifi/linux-mt76/files/patches/1007-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch b/recipes-wifi/linux-mt76/files/patches/1007-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
index 92f3f59..050a40b 100644
--- a/recipes-wifi/linux-mt76/files/patches/1007-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1007-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
@@ -18,7 +18,7 @@
if (val == 0)
phy->muru_onoff = MUMIMO_DL_CERT | MUMIMO_DL;
break;
-+ case RATE_PARAM_AUTO_HEMU:
++ case RATE_PARAM_AUTO_MU:
+ if (val < 0 || val > 15) {
+ printk("Wrong value! The value is between 0-15.\n");
+ break;
@@ -36,7 +36,7 @@
#ifdef CONFIG_MTK_VENDOR
RATE_PARAM_FIXED_MIMO = 30,
RATE_PARAM_FIXED_OFDMA = 31,
-+ RATE_PARAM_AUTO_HEMU = 32,
++ RATE_PARAM_AUTO_MU = 32,
#endif
};
@@ -49,8 +49,8 @@
};
+static const struct nla_policy
-+hemu_ctrl_policy[NUM_MTK_VENDOR_ATTRS_HEMU_CTRL] = {
-+ [MTK_VENDOR_ATTR_HEMU_CTRL_ONOFF] = {.type = NLA_U8 },
++mu_ctrl_policy[NUM_MTK_VENDOR_ATTRS_MU_CTRL] = {
++ [MTK_VENDOR_ATTR_MU_CTRL_ONOFF] = {.type = NLA_U8 },
+};
+
static const struct nla_policy
@@ -60,25 +60,25 @@
return 0;
}
-+static int mt7915_vendor_hemu_ctrl(struct wiphy *wiphy,
++static int mt7915_vendor_mu_ctrl(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data,
+ int data_len)
+{
+ struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
-+ struct nlattr *tb[NUM_MTK_VENDOR_ATTRS_HEMU_CTRL];
++ struct nlattr *tb[NUM_MTK_VENDOR_ATTRS_MU_CTRL];
+ int err;
+ u8 val8;
+ u32 val32 = 0;
+
-+ err = nla_parse(tb, MTK_VENDOR_ATTR_HEMU_CTRL_MAX, data, data_len,
-+ hemu_ctrl_policy, NULL);
++ err = nla_parse(tb, MTK_VENDOR_ATTR_MU_CTRL_MAX, data, data_len,
++ mu_ctrl_policy, NULL);
+ if (err)
+ return err;
+
-+ if (tb[MTK_VENDOR_ATTR_HEMU_CTRL_ONOFF]) {
-+ val8 = nla_get_u8(tb[MTK_VENDOR_ATTR_HEMU_CTRL_ONOFF]);
-+ val32 |= FIELD_PREP(RATE_CFG_MODE, RATE_PARAM_AUTO_HEMU) |
++ if (tb[MTK_VENDOR_ATTR_MU_CTRL_ONOFF]) {
++ val8 = nla_get_u8(tb[MTK_VENDOR_ATTR_MU_CTRL_ONOFF]);
++ val32 |= FIELD_PREP(RATE_CFG_MODE, RATE_PARAM_AUTO_MU) |
+ FIELD_PREP(RATE_CFG_VAL, val8);
+ ieee80211_iterate_active_interfaces_atomic(hw, IEEE80211_IFACE_ITER_RESUME_ALL,
+ mt7915_set_wireless_vif, &val32);
@@ -98,13 +98,13 @@
+ {
+ .info = {
+ .vendor_id = MTK_NL80211_VENDOR_ID,
-+ .subcmd = MTK_NL80211_VENDOR_SUBCMD_HEMU_CTRL,
++ .subcmd = MTK_NL80211_VENDOR_SUBCMD_MU_CTRL,
+ },
+ .flags = WIPHY_VENDOR_CMD_NEED_NETDEV |
+ WIPHY_VENDOR_CMD_NEED_RUNNING,
-+ .doit = mt7915_vendor_hemu_ctrl,
-+ .policy = hemu_ctrl_policy,
-+ .maxattr = MTK_VENDOR_ATTR_HEMU_CTRL_MAX,
++ .doit = mt7915_vendor_mu_ctrl,
++ .policy = mu_ctrl_policy,
++ .maxattr = MTK_VENDOR_ATTR_MU_CTRL_MAX,
}
};
@@ -116,7 +116,7 @@
MTK_NL80211_VENDOR_SUBCMD_CSI_CTRL = 0xc2,
MTK_NL80211_VENDOR_SUBCMD_RFEATURE_CTRL = 0xc3,
MTK_NL80211_VENDOR_SUBCMD_WIRELESS_CTRL = 0xc4,
-+ MTK_NL80211_VENDOR_SUBCMD_HEMU_CTRL = 0xc5,
++ MTK_NL80211_VENDOR_SUBCMD_MU_CTRL = 0xc5,
};
enum mtk_capi_control_changed {
@@ -124,15 +124,15 @@
NUM_MTK_VENDOR_ATTRS_WIRELESS_CTRL - 1
};
-+enum mtk_vendor_attr_hemu_ctrl {
-+ MTK_VENDOR_ATTR_HEMU_CTRL_UNSPEC,
++enum mtk_vendor_attr_mu_ctrl {
++ MTK_VENDOR_ATTR_MU_CTRL_UNSPEC,
+
-+ MTK_VENDOR_ATTR_HEMU_CTRL_ONOFF,
++ MTK_VENDOR_ATTR_MU_CTRL_ONOFF,
+
+ /* keep last */
-+ NUM_MTK_VENDOR_ATTRS_HEMU_CTRL,
-+ MTK_VENDOR_ATTR_HEMU_CTRL_MAX =
-+ NUM_MTK_VENDOR_ATTRS_HEMU_CTRL - 1
++ NUM_MTK_VENDOR_ATTRS_MU_CTRL,
++ MTK_VENDOR_ATTR_MU_CTRL_MAX =
++ NUM_MTK_VENDOR_ATTRS_MU_CTRL - 1
+};
+
enum mtk_vendor_attr_rfeature_ctrl {
diff --git a/recipes-wifi/linux-mt76/files/patches/1120-mt76-mt7915-add-phy-capability-vendor-command.patch b/recipes-wifi/linux-mt76/files/patches/1120-mt76-mt7915-add-phy-capability-vendor-command.patch
index d9f1eec..302d0ab 100644
--- a/recipes-wifi/linux-mt76/files/patches/1120-mt76-mt7915-add-phy-capability-vendor-command.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1120-mt76-mt7915-add-phy-capability-vendor-command.patch
@@ -44,7 +44,7 @@
struct csi_null_tone {
u8 start;
u8 end;
-@@ -974,6 +986,35 @@ static int mt7915_vendor_hemu_ctrl(struct wiphy *wiphy,
+@@ -974,6 +986,35 @@ static int mt7915_vendor_mu_ctrl(struct wiphy *wiphy,
return 0;
}
@@ -81,9 +81,9 @@
{
.info = {
@@ -1031,6 +1072,17 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
- .doit = mt7915_vendor_hemu_ctrl,
- .policy = hemu_ctrl_policy,
- .maxattr = MTK_VENDOR_ATTR_HEMU_CTRL_MAX,
+ .doit = mt7915_vendor_mu_ctrl,
+ .policy = mu_ctrl_policy,
+ .maxattr = MTK_VENDOR_ATTR_MU_CTRL_MAX,
+ },
+ {
+ .info = {
@@ -105,7 +105,7 @@
@@ -9,6 +9,7 @@ enum mtk_nl80211_vendor_subcmds {
MTK_NL80211_VENDOR_SUBCMD_RFEATURE_CTRL = 0xc3,
MTK_NL80211_VENDOR_SUBCMD_WIRELESS_CTRL = 0xc4,
- MTK_NL80211_VENDOR_SUBCMD_HEMU_CTRL = 0xc5,
+ MTK_NL80211_VENDOR_SUBCMD_MU_CTRL = 0xc5,
+ MTK_NL80211_VENDOR_SUBCMD_PHY_CAPA_CTRL = 0xc6,
};
diff --git a/recipes-wifi/linux-mt76/files/patches/1121-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable-thre.patch b/recipes-wifi/linux-mt76/files/patches/1121-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable-thre.patch
index 9472892..ca559be 100644
--- a/recipes-wifi/linux-mt76/files/patches/1121-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable-thre.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1121-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable-thre.patch
@@ -339,7 +339,7 @@
MTK_NL80211_VENDOR_SUBCMD_AMNT_CTRL = 0xae,
@@ -10,6 +11,38 @@ enum mtk_nl80211_vendor_subcmds {
MTK_NL80211_VENDOR_SUBCMD_WIRELESS_CTRL = 0xc4,
- MTK_NL80211_VENDOR_SUBCMD_HEMU_CTRL = 0xc5,
+ MTK_NL80211_VENDOR_SUBCMD_MU_CTRL = 0xc5,
MTK_NL80211_VENDOR_SUBCMD_PHY_CAPA_CTRL = 0xc6,
+ MTK_NL80211_VENDOR_SUBCMD_EDCCA_CTRL = 0xc7,
+};
diff --git a/recipes-wifi/linux-mt76/files/patches/1124-mt76-mt7915-Add-hemu-dump-support.patch b/recipes-wifi/linux-mt76/files/patches/1124-mt76-mt7915-Add-mu-dump-support.patch
similarity index 64%
rename from recipes-wifi/linux-mt76/files/patches/1124-mt76-mt7915-Add-hemu-dump-support.patch
rename to recipes-wifi/linux-mt76/files/patches/1124-mt76-mt7915-Add-mu-dump-support.patch
index 0fcde9d..b3789c3 100644
--- a/recipes-wifi/linux-mt76/files/patches/1124-mt76-mt7915-Add-hemu-dump-support.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1124-mt76-mt7915-Add-mu-dump-support.patch
@@ -1,7 +1,7 @@
From dc1ea53db698073c61765925cdb17d28043c6f2d Mon Sep 17 00:00:00 2001
From: TomLiu <tomml.liu@mediatek.com>
Date: Thu, 11 Aug 2022 18:09:45 -0700
-Subject: [PATCH 1124/1133] mt76: mt7915: Add hemu dump support
+Subject: [PATCH 1124/1133] mt76: mt7915: Add mu dump support
Change-Id: I521214f3feb6f0d528a9f550255050ffd1ec96d2
---
@@ -15,19 +15,19 @@
+++ b/mt7915/vendor.c
@@ -37,6 +37,7 @@ wireless_ctrl_policy[NUM_MTK_VENDOR_ATTRS_WIRELESS_CTRL] = {
static const struct nla_policy
- hemu_ctrl_policy[NUM_MTK_VENDOR_ATTRS_HEMU_CTRL] = {
- [MTK_VENDOR_ATTR_HEMU_CTRL_ONOFF] = {.type = NLA_U8 },
-+ [MTK_VENDOR_ATTR_HEMU_CTRL_DUMP] = {.type = NLA_U8 },
+ mu_ctrl_policy[NUM_MTK_VENDOR_ATTRS_MU_CTRL] = {
+ [MTK_VENDOR_ATTR_MU_CTRL_ONOFF] = {.type = NLA_U8 },
++ [MTK_VENDOR_ATTR_MU_CTRL_DUMP] = {.type = NLA_U8 },
};
static const struct nla_policy
-@@ -1004,6 +1005,28 @@ static int mt7915_vendor_hemu_ctrl(struct wiphy *wiphy,
+@@ -1004,6 +1005,28 @@ static int mt7915_vendor_mu_ctrl(struct wiphy *wiphy,
return 0;
}
+
+static int
-+mt7915_vendor_hemu_ctrl_dump(struct wiphy *wiphy, struct wireless_dev *wdev,
++mt7915_vendor_mu_ctrl_dump(struct wiphy *wiphy, struct wireless_dev *wdev,
+ struct sk_buff *skb, const void *data, int data_len,
+ unsigned long *storage)
+{
@@ -39,7 +39,7 @@
+ return -ENOENT;
+ *storage = 1;
+
-+ if (nla_put_u8(skb, MTK_VENDOR_ATTR_HEMU_CTRL_DUMP, phy->muru_onoff))
++ if (nla_put_u8(skb, MTK_VENDOR_ATTR_MU_CTRL_DUMP, phy->muru_onoff))
+ return -ENOMEM;
+ len += 1;
+
@@ -53,23 +53,23 @@
@@ -1190,6 +1213,7 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
.flags = WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
- .doit = mt7915_vendor_hemu_ctrl,
-+ .dumpit = mt7915_vendor_hemu_ctrl_dump,
- .policy = hemu_ctrl_policy,
- .maxattr = MTK_VENDOR_ATTR_HEMU_CTRL_MAX,
+ .doit = mt7915_vendor_mu_ctrl,
++ .dumpit = mt7915_vendor_mu_ctrl_dump,
+ .policy = mu_ctrl_policy,
+ .maxattr = MTK_VENDOR_ATTR_MU_CTRL_MAX,
},
diff --git a/mt7915/vendor.h b/mt7915/vendor.h
index 72319717..c19ffe72 100644
--- a/mt7915/vendor.h
+++ b/mt7915/vendor.h
-@@ -72,6 +72,7 @@ enum mtk_vendor_attr_hemu_ctrl {
- MTK_VENDOR_ATTR_HEMU_CTRL_UNSPEC,
+@@ -72,6 +72,7 @@ enum mtk_vendor_attr_mu_ctrl {
+ MTK_VENDOR_ATTR_MU_CTRL_UNSPEC,
- MTK_VENDOR_ATTR_HEMU_CTRL_ONOFF,
-+ MTK_VENDOR_ATTR_HEMU_CTRL_DUMP,
+ MTK_VENDOR_ATTR_MU_CTRL_ONOFF,
++ MTK_VENDOR_ATTR_MU_CTRL_DUMP,
/* keep last */
- NUM_MTK_VENDOR_ATTRS_HEMU_CTRL,
+ NUM_MTK_VENDOR_ATTRS_MU_CTRL,
--
2.18.0
diff --git a/recipes-wifi/linux-mt76/files/patches/1125-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ctrl.patch b/recipes-wifi/linux-mt76/files/patches/1125-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ctrl.patch
index 370bbcf..cd5fd8f 100644
--- a/recipes-wifi/linux-mt76/files/patches/1125-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ctrl.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1125-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ctrl.patch
@@ -149,8 +149,8 @@
index 83f38e07..48d124e0 100644
--- a/mt7915/vendor.c
+++ b/mt7915/vendor.c
-@@ -40,6 +40,11 @@ hemu_ctrl_policy[NUM_MTK_VENDOR_ATTRS_HEMU_CTRL] = {
- [MTK_VENDOR_ATTR_HEMU_CTRL_DUMP] = {.type = NLA_U8 },
+@@ -40,6 +40,11 @@ mu_ctrl_policy[NUM_MTK_VENDOR_ATTRS_MU_CTRL] = {
+ [MTK_VENDOR_ATTR_MU_CTRL_DUMP] = {.type = NLA_U8 },
};
+static const struct nla_policy
@@ -233,7 +233,7 @@
--- a/mt7915/vendor.h
+++ b/mt7915/vendor.h
@@ -12,6 +12,7 @@ enum mtk_nl80211_vendor_subcmds {
- MTK_NL80211_VENDOR_SUBCMD_HEMU_CTRL = 0xc5,
+ MTK_NL80211_VENDOR_SUBCMD_MU_CTRL = 0xc5,
MTK_NL80211_VENDOR_SUBCMD_PHY_CAPA_CTRL = 0xc6,
MTK_NL80211_VENDOR_SUBCMD_EDCCA_CTRL = 0xc7,
+ MTK_NL80211_VENDOR_SUBCMD_3WIRE_CTRL = 0xc8
diff --git a/recipes-wifi/linux-mt76/files/patches/1126-mt76-mt7915-add-ibf-control-vendor-cmd.patch b/recipes-wifi/linux-mt76/files/patches/1126-mt76-mt7915-add-ibf-control-vendor-cmd.patch
index 899c849..1fa6a9a 100644
--- a/recipes-wifi/linux-mt76/files/patches/1126-mt76-mt7915-add-ibf-control-vendor-cmd.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1126-mt76-mt7915-add-ibf-control-vendor-cmd.patch
@@ -104,7 +104,7 @@
--- a/mt7915/vendor.h
+++ b/mt7915/vendor.h
@@ -12,7 +12,8 @@ enum mtk_nl80211_vendor_subcmds {
- MTK_NL80211_VENDOR_SUBCMD_HEMU_CTRL = 0xc5,
+ MTK_NL80211_VENDOR_SUBCMD_MU_CTRL = 0xc5,
MTK_NL80211_VENDOR_SUBCMD_PHY_CAPA_CTRL = 0xc6,
MTK_NL80211_VENDOR_SUBCMD_EDCCA_CTRL = 0xc7,
- MTK_NL80211_VENDOR_SUBCMD_3WIRE_CTRL = 0xc8
diff --git a/recipes-wifi/linux-mt76/files/patches/1130-mt76-mt7915-amsdu-set-and-get-control.patch b/recipes-wifi/linux-mt76/files/patches/1130-mt76-mt7915-amsdu-set-and-get-control.patch
index 6db0006..54ca9d2 100644
--- a/recipes-wifi/linux-mt76/files/patches/1130-mt76-mt7915-amsdu-set-and-get-control.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1130-mt76-mt7915-amsdu-set-and-get-control.patch
@@ -62,8 +62,8 @@
+};
+
static const struct nla_policy
- hemu_ctrl_policy[NUM_MTK_VENDOR_ATTRS_HEMU_CTRL] = {
- [MTK_VENDOR_ATTR_HEMU_CTRL_ONOFF] = {.type = NLA_U8 },
+ mu_ctrl_policy[NUM_MTK_VENDOR_ATTRS_MU_CTRL] = {
+ [MTK_VENDOR_ATTR_MU_CTRL_ONOFF] = {.type = NLA_U8 },
@@ -983,11 +989,35 @@ static int mt7915_vendor_wireless_ctrl(struct wiphy *wiphy,
val8 = nla_get_u8(tb[MTK_VENDOR_ATTR_WIRELESS_CTRL_CERT]);
mt7915_mcu_set_cfg(phy, CFGINFO_CERT_CFG, val8); /* Cert Enable for OMI */
@@ -97,7 +97,7 @@
+ return len;
+}
+
- static int mt7915_vendor_hemu_ctrl(struct wiphy *wiphy,
+ static int mt7915_vendor_mu_ctrl(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data,
@@ -1286,6 +1316,7 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
@@ -135,8 +135,8 @@
+ NUM_MTK_VENDOR_ATTRS_WIRELESS_DUMP - 1
+};
+
- enum mtk_vendor_attr_hemu_ctrl {
- MTK_VENDOR_ATTR_HEMU_CTRL_UNSPEC,
+ enum mtk_vendor_attr_mu_ctrl {
+ MTK_VENDOR_ATTR_MU_CTRL_UNSPEC,
--
2.18.0
diff --git a/recipes-wifi/linux-mt76/files/patches/3013-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch b/recipes-wifi/linux-mt76/files/patches/3013-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch
index b2560bb..e596240 100644
--- a/recipes-wifi/linux-mt76/files/patches/3013-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3013-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch
@@ -1,8 +1,8 @@
-From 28eed1babbb1cc80d74d5d7fa433ee9d7acd1287 Mon Sep 17 00:00:00 2001
+From be812eb6a9ceafc732c518070458fed74a09cd2e Mon Sep 17 00:00:00 2001
From: Peter Chiu <chui-hao.chiu@mediatek.com>
Date: Tue, 17 Jan 2023 21:15:00 +0800
-Subject: [PATCH 3013/3015] wifi: mt76: mt7915: get tx retries from tx free
- done event for sw path
+Subject: [PATCH] wifi: mt76: mt7915: get tx retries from tx free done event
+ for sw path
---
mt7915/mac.c | 14 +++++++++++---
@@ -11,7 +11,7 @@
3 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 175498b1..b7559182 100644
+index 175498b1..180c1ae3 100644
--- a/mt7915/mac.c
+++ b/mt7915/mac.c
@@ -1005,6 +1005,7 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
@@ -49,7 +49,7 @@
+ else if (!v3 && (info & MT_TX_FREE_MPDU_HEADER))
+ retries = u32_get_bits(info, MT_TX_FREE_TX_COUNT) - 1;
+
-+ if (!mtk_wed_device_active(&mdev->mmio.wed))
++ if (!mtk_wed_device_active(&mdev->mmio.wed) && wcid)
+ wcid->stats.tx_retries += retries;
+
+ if (v3 && (info & MT_TX_FREE_MPDU_HEADER_V3))
diff --git a/recipes-wifi/linux-mt76/files/patches/patches.inc b/recipes-wifi/linux-mt76/files/patches/patches.inc
index 84cafb7..c041c72 100644
--- a/recipes-wifi/linux-mt76/files/patches/patches.inc
+++ b/recipes-wifi/linux-mt76/files/patches/patches.inc
@@ -23,7 +23,7 @@
file://1121-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable-thre.patch \
file://1122-mt76-mt7915-implement-bin-file-mode.patch \
file://1123-mt76-mt7915-initialize-wcid.patch \
- file://1124-mt76-mt7915-Add-hemu-dump-support.patch \
+ file://1124-mt76-mt7915-Add-mu-dump-support.patch \
file://1125-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ctrl.patch \
file://1126-mt76-mt7915-add-ibf-control-vendor-cmd.patch \
file://1127-mt76-mt7915-add-E3-re-bonding-for-low-yield-rate-iss.patch \