mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-10 01:45:30 +00:00
101 lines
3.0 KiB
Diff
101 lines
3.0 KiB
Diff
From b6063c3c2566911919194c88cb9b68e68596d994 Mon Sep 17 00:00:00 2001
|
|
From: "himanshu.goyal" <himanshu.goyal@mediatek.com>
|
|
Date: Tue, 24 Jan 2023 14:32:08 +0800
|
|
Subject: [PATCH 1024/1053] wifi: mt76: mt7915: Add vendor command attribute
|
|
for RTS BW signaling.
|
|
|
|
Signed-off-by: himanshu.goyal <himanshu.goyal@mediatek.com>
|
|
---
|
|
mt7915/mcu.c | 6 ++++++
|
|
mt7915/mcu.h | 9 +++++++++
|
|
mt7915/vendor.c | 4 ++++
|
|
mt7915/vendor.h | 1 +
|
|
4 files changed, 20 insertions(+)
|
|
|
|
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
|
|
index eb7638b..8e9b801 100644
|
|
--- a/mt7915/mcu.c
|
|
+++ b/mt7915/mcu.c
|
|
@@ -4863,6 +4863,12 @@ int mt7915_mcu_set_cfg(struct mt7915_phy *phy, u8 cfg_info, u8 type)
|
|
req.cert.length = cpu_to_le16(tlv_len);
|
|
req.cert.cert_program = type;
|
|
break;
|
|
+ case CFGINFO_RTS_SIGTA_EN_FEATURE:
|
|
+ tlv_len = sizeof(struct rts_sigta_cfg);
|
|
+ req.rts_sigta.tag = cpu_to_le16(cfg_info);
|
|
+ req.rts_sigta.length = cpu_to_le16(tlv_len);
|
|
+ req.rts_sigta.enable = type ? 1: 0;
|
|
+ break;
|
|
case CFGINFO_3WIRE_EN_CFG:
|
|
tlv_len = sizeof(struct three_wire_cfg);
|
|
req.three_wire.tag = cpu_to_le16(cfg_info);
|
|
diff --git a/mt7915/mcu.h b/mt7915/mcu.h
|
|
index 94eff26..6ebcce0 100644
|
|
--- a/mt7915/mcu.h
|
|
+++ b/mt7915/mcu.h
|
|
@@ -936,6 +936,13 @@ struct three_wire_cfg {
|
|
u8 rsv[3];
|
|
} __packed;
|
|
|
|
+struct rts_sigta_cfg {
|
|
+ __le16 tag;
|
|
+ __le16 length;
|
|
+ bool enable; /* 0: Disable, 1: Enable */
|
|
+ u8 rsv[3];
|
|
+} __packed;
|
|
+
|
|
struct cfg_basic_info {
|
|
u8 dbdc_idx;
|
|
u8 rsv[3];
|
|
@@ -943,11 +950,13 @@ struct cfg_basic_info {
|
|
union {
|
|
struct cert_cfg cert;
|
|
struct three_wire_cfg three_wire;
|
|
+ struct rts_sigta_cfg rts_sigta;
|
|
};
|
|
} __packed;
|
|
|
|
enum {
|
|
CFGINFO_CERT_CFG = 4,
|
|
+ CFGINFO_RTS_SIGTA_EN_FEATURE = 7,
|
|
CFGINFO_3WIRE_EN_CFG = 10,
|
|
};
|
|
|
|
diff --git a/mt7915/vendor.c b/mt7915/vendor.c
|
|
index e25a0ce..8370216 100644
|
|
--- a/mt7915/vendor.c
|
|
+++ b/mt7915/vendor.c
|
|
@@ -34,6 +34,7 @@ wireless_ctrl_policy[NUM_MTK_VENDOR_ATTRS_WIRELESS_CTRL] = {
|
|
[MTK_VENDOR_ATTR_WIRELESS_CTRL_AMSDU] = {.type = NLA_U8 },
|
|
[MTK_VENDOR_ATTR_WIRELESS_CTRL_MU_EDCA] = {.type = NLA_U8 },
|
|
[MTK_VENDOR_ATTR_WIRELESS_CTRL_CERT] = {.type = NLA_U8 },
|
|
+ [MTK_VENDOR_ATTR_WIRELESS_CTRL_RTS_SIGTA] = {.type = NLA_U8 },
|
|
};
|
|
|
|
static const struct nla_policy
|
|
@@ -1013,6 +1014,9 @@ static int mt7915_vendor_wireless_ctrl(struct wiphy *wiphy,
|
|
} else if (tb[MTK_VENDOR_ATTR_WIRELESS_CTRL_AMSDU]) {
|
|
val8 = nla_get_u8(tb[MTK_VENDOR_ATTR_WIRELESS_CTRL_AMSDU]);
|
|
mt7915_set_wireless_amsdu(hw, val8);
|
|
+ } else if (tb[MTK_VENDOR_ATTR_WIRELESS_CTRL_RTS_SIGTA]) {
|
|
+ val8 = nla_get_u8(tb[MTK_VENDOR_ATTR_WIRELESS_CTRL_RTS_SIGTA]);
|
|
+ mt7915_mcu_set_cfg(phy, CFGINFO_RTS_SIGTA_EN_FEATURE, val8);
|
|
}
|
|
|
|
return 0;
|
|
diff --git a/mt7915/vendor.h b/mt7915/vendor.h
|
|
index 7c4e914..3672420 100644
|
|
--- a/mt7915/vendor.h
|
|
+++ b/mt7915/vendor.h
|
|
@@ -77,6 +77,7 @@ enum mtk_vendor_attr_wireless_ctrl {
|
|
MTK_VENDOR_ATTR_WIRELESS_CTRL_MIMO,
|
|
MTK_VENDOR_ATTR_WIRELESS_CTRL_AMSDU,
|
|
MTK_VENDOR_ATTR_WIRELESS_CTRL_CERT = 9,
|
|
+ MTK_VENDOR_ATTR_WIRELESS_CTRL_RTS_SIGTA,
|
|
|
|
MTK_VENDOR_ATTR_WIRELESS_CTRL_MU_EDCA, /* reserve */
|
|
/* keep last */
|
|
--
|
|
2.18.0
|
|
|