* [PATCH 1/2] wifi: nxpwifi: add TX power limit host command support
2026-10-01 10:06 [PATCH 0/2] wifi: nxpwifi: add TX power limit configuration support jeff.chen_1
@ 2026-10-01 10:06 ` jeff.chen_1
2026-10-01 10:08 ` Johannes Berg
2026-10-01 10:06 ` [PATCH 2/2] wifi: nxpwifi: add netlink vendor command for TX power limits jeff.chen_1
1 sibling, 1 reply; 5+ messages in thread
From: jeff.chen_1 @ 2026-10-01 10:06 UTC (permalink / raw)
To: linux-wireless; +Cc: johannes, francesco, Jeff Chen
From: Jeff Chen <jeff.chen_1@nxp.com>
Add support for the firmware channel TRPC configuration command used to
retrieve and update TX power limit data.
Signed-off-by: Jeff Chen <jeff.chen_1@nxp.com>
---
drivers/net/wireless/nxp/nxpwifi/cfg.h | 14 ++++
drivers/net/wireless/nxp/nxpwifi/fw.h | 8 +++
drivers/net/wireless/nxp/nxpwifi/main.h | 2 +
drivers/net/wireless/nxp/nxpwifi/sta_cfg.c | 8 +++
drivers/net/wireless/nxp/nxpwifi/sta_cmd.c | 74 ++++++++++++++++++++++
5 files changed, 106 insertions(+)
diff --git a/drivers/net/wireless/nxp/nxpwifi/cfg.h b/drivers/net/wireless/nxp/nxpwifi/cfg.h
index 8627a3372978..c94ac8e9b368 100644
--- a/drivers/net/wireless/nxp/nxpwifi/cfg.h
+++ b/drivers/net/wireless/nxp/nxpwifi/cfg.h
@@ -755,6 +755,20 @@ struct nxpwifi_ds_coalesce_cfg {
struct nxpwifi_coalesce_rule rule[NXPWIFI_COALESCE_MAX_RULES];
};
+/* Host-side helper for the channel TRPC (TX power limit) command.
+ * This is not a firmware wire structure; @len counts the bytes from
+ * @action onwards (action + subband + tlvbuffer).
+ */
+struct nxpwifi_ds_chan_trpc_cfg {
+ u32 len;
+ u16 action;
+ u16 subband;
+ u8 tlvbuffer[];
+};
+
+/* Upper bound on the TRPC TLV table exchanged with the firmware. */
+#define NXPWIFI_MAX_TRPC_BUF (4 * 1024)
+
struct nxpwifi_11ax_he_cap_cfg {
u16 id;
u16 len;
diff --git a/drivers/net/wireless/nxp/nxpwifi/fw.h b/drivers/net/wireless/nxp/nxpwifi/fw.h
index 188110b020cf..3a6bf452e89c 100644
--- a/drivers/net/wireless/nxp/nxpwifi/fw.h
+++ b/drivers/net/wireless/nxp/nxpwifi/fw.h
@@ -386,6 +386,7 @@ enum NXPWIFI_802_11_PRIVACY_FILTER {
#define HOST_CMD_CAU_REG_ACCESS 0x00ed
#define HOST_CMD_SET_BSS_MODE 0x00f7
#define HOST_CMD_PCIE_DESC_DETAILS 0x00fa
+#define HOST_CMD_CHAN_TRPC_CONFIG 0x00fb
#define HOST_CMD_802_11_NET_MONITOR 0x0102
#define HOST_CMD_802_11_SCAN_EXT 0x0107
#define HOST_CMD_COALESCE_CFG 0x010a
@@ -2373,6 +2374,12 @@ struct host_cmd_twt_cfg {
u8 val[];
} __packed;
+struct host_cmd_chan_trpc_cfg {
+ u16 action;
+ u16 subband;
+ u8 tlvbuffer[];
+} __packed;
+
struct host_cmd_ds_command {
__le16 command;
__le16 size;
@@ -2447,6 +2454,7 @@ struct host_cmd_ds_command {
struct host_cmd_11ax_cmd ax_cmd;
struct host_cmd_ds_802_11_net_monitor net_mon;
struct host_cmd_twt_cfg twt_cfg;
+ struct host_cmd_chan_trpc_cfg ch_trpc_cfg;
} params;
} __packed;
diff --git a/drivers/net/wireless/nxp/nxpwifi/main.h b/drivers/net/wireless/nxp/nxpwifi/main.h
index b25a6a4f2936..9ae017bdc6ca 100644
--- a/drivers/net/wireless/nxp/nxpwifi/main.h
+++ b/drivers/net/wireless/nxp/nxpwifi/main.h
@@ -1415,6 +1415,8 @@ int nxpwifi_get_wakeup_reason(struct nxpwifi_private *priv, u16 action,
struct nxpwifi_ds_wakeup_reason *wakeup_reason);
int nxpwifi_get_chan_info(struct nxpwifi_private *priv,
struct nxpwifi_channel_band *channel_band);
+int nxpwifi_chan_trpc_cfg(struct nxpwifi_private *priv, int cmd_type,
+ struct nxpwifi_ds_chan_trpc_cfg *ch_trpc);
void nxpwifi_coex_ampdu_rxwinsize(struct nxpwifi_adapter *adapter);
void nxpwifi_11n_delba(struct nxpwifi_private *priv, int tid);
int nxpwifi_send_domain_info_cmd_fw(struct wiphy *wiphy, enum nl80211_band band);
diff --git a/drivers/net/wireless/nxp/nxpwifi/sta_cfg.c b/drivers/net/wireless/nxp/nxpwifi/sta_cfg.c
index 56cf63fbf7fe..650de6156912 100644
--- a/drivers/net/wireless/nxp/nxpwifi/sta_cfg.c
+++ b/drivers/net/wireless/nxp/nxpwifi/sta_cfg.c
@@ -1175,3 +1175,11 @@ int nxpwifi_get_chan_info(struct nxpwifi_private *priv,
HOST_ACT_GEN_GET, 0, channel_band,
NXPWIFI_SYNC_CMD);
}
+
+int nxpwifi_chan_trpc_cfg(struct nxpwifi_private *priv, int cmd_type,
+ struct nxpwifi_ds_chan_trpc_cfg *ch_trpc)
+{
+ return nxpwifi_send_cmd(priv, HOST_CMD_CHAN_TRPC_CONFIG,
+ ch_trpc->action, 0, ch_trpc,
+ cmd_type == NXPWIFI_SYNC_CMD);
+}
diff --git a/drivers/net/wireless/nxp/nxpwifi/sta_cmd.c b/drivers/net/wireless/nxp/nxpwifi/sta_cmd.c
index 9bfa4aebc3e5..07cab38f0644 100644
--- a/drivers/net/wireless/nxp/nxpwifi/sta_cmd.c
+++ b/drivers/net/wireless/nxp/nxpwifi/sta_cmd.c
@@ -3033,6 +3033,77 @@ nxpwifi_ret_sta_twt_cfg(struct nxpwifi_private *priv,
return nxpwifi_ret_twt_cfg(priv, resp, data_buf);
}
+static int nxpwifi_cmd_chan_trpc_cfg(struct nxpwifi_private *priv,
+ struct host_cmd_ds_command *cmd,
+ u16 cmd_no, void *data_buf, u16 cmd_action,
+ u32 cmd_type)
+{
+ struct host_cmd_chan_trpc_cfg *chan_trpc_cfg = &cmd->params.ch_trpc_cfg;
+ struct nxpwifi_ds_chan_trpc_cfg *usr_chan_trpc_cfg =
+ (struct nxpwifi_ds_chan_trpc_cfg *)data_buf;
+ u32 hdr_len = sizeof(chan_trpc_cfg->action) +
+ sizeof(chan_trpc_cfg->subband);
+
+ /* usr_chan_trpc_cfg->len covers action + subband + the TLV table.
+ * Reject a length that cannot hold the fixed fields or that would
+ * grow the command past the TLV buffer bound, so an untrusted @len
+ * can neither underflow the TLV size nor overflow the command body.
+ */
+ if (usr_chan_trpc_cfg->len < hdr_len ||
+ usr_chan_trpc_cfg->len > hdr_len + NXPWIFI_MAX_TRPC_BUF)
+ return -EINVAL;
+
+ cmd->command = cpu_to_le16(cmd_no);
+ cmd->size = cpu_to_le16(S_DS_GEN + usr_chan_trpc_cfg->len);
+
+ /* Copy action + subband + the TLV table verbatim into the firmware
+ * command body.
+ */
+ memcpy(chan_trpc_cfg, &usr_chan_trpc_cfg->action,
+ usr_chan_trpc_cfg->len);
+
+ return 0;
+}
+
+static int nxpwifi_ret_chan_trpc_cfg(struct nxpwifi_private *priv,
+ struct host_cmd_ds_command *resp,
+ u16 cmdresp_no, void *data_buf)
+{
+ struct host_cmd_chan_trpc_cfg *chan_trpc_cfg =
+ &resp->params.ch_trpc_cfg;
+ struct nxpwifi_ds_chan_trpc_cfg *usr_chan_trpc_cfg =
+ (struct nxpwifi_ds_chan_trpc_cfg *)data_buf;
+
+ if (chan_trpc_cfg->action == HOST_ACT_GEN_GET) {
+ u16 resp_size = le16_to_cpu(resp->size);
+ u16 resp_len;
+
+ if (resp_size < S_DS_GEN)
+ return -EINVAL;
+
+ resp_len = resp_size - S_DS_GEN;
+ /* The firmware response carries action + subband followed by
+ * the TLV table. Reject a response that is too short to hold
+ * those fields or larger than the caller's TLV buffer.
+ */
+ if (resp_len < sizeof(chan_trpc_cfg->action) +
+ sizeof(chan_trpc_cfg->subband) ||
+ resp_len > sizeof(chan_trpc_cfg->action) +
+ sizeof(chan_trpc_cfg->subband) +
+ NXPWIFI_MAX_TRPC_BUF) {
+ nxpwifi_dbg(priv->adapter, ERROR,
+ "chan_trpc bad resp len: %u\n", resp_len);
+ return -EINVAL;
+ }
+
+ /* Copy action + subband + the TLV table back to the caller. */
+ usr_chan_trpc_cfg->len = resp_len;
+ memcpy(&usr_chan_trpc_cfg->action, chan_trpc_cfg, resp_len);
+ }
+
+ return 0;
+}
+
static const struct nxpwifi_cmd_entry cmd_table_sta[] = {
{.cmd_no = HOST_CMD_GET_HW_SPEC,
.prepare_cmd = nxpwifi_cmd_sta_get_hw_spec,
@@ -3217,6 +3288,9 @@ static const struct nxpwifi_cmd_entry cmd_table_sta[] = {
{.cmd_no = HOST_CMD_TWT_CFG,
.prepare_cmd = nxpwifi_cmd_sta_twt_cfg,
.cmd_resp = nxpwifi_ret_sta_twt_cfg},
+ {.cmd_no = HOST_CMD_CHAN_TRPC_CONFIG,
+ .prepare_cmd = nxpwifi_cmd_chan_trpc_cfg,
+ .cmd_resp = nxpwifi_ret_chan_trpc_cfg},
};
/*
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] wifi: nxpwifi: add netlink vendor command for TX power limits
2026-10-01 10:06 [PATCH 0/2] wifi: nxpwifi: add TX power limit configuration support jeff.chen_1
2026-10-01 10:06 ` [PATCH 1/2] wifi: nxpwifi: add TX power limit host command support jeff.chen_1
@ 2026-10-01 10:06 ` jeff.chen_1
2026-10-01 10:10 ` Johannes Berg
1 sibling, 1 reply; 5+ messages in thread
From: jeff.chen_1 @ 2026-10-01 10:06 UTC (permalink / raw)
To: linux-wireless; +Cc: johannes, francesco, Jeff Chen
From: Jeff Chen <jeff.chen_1@nxp.com>
Add a cfg80211 vendor command that allows user space to retrieve and
update firmware TX power limit data through a stable netlink interface.
The firmware exposes TX power limits through the channel TRPC command.
The associated payload is a firmware-defined, chipset-specific table
containing TX power limit information.
The table format is part of the firmware ABI and has no equivalent
representation in the generic nl80211 TX power interface. Therefore,
the payload is carried as an opaque binary attribute through a vendor
command.
The driver forwards the firmware-defined payload between user space and
the firmware without interpreting its contents.
Signed-off-by: Jeff Chen <jeff.chen_1@nxp.com>
---
drivers/net/wireless/nxp/nxpwifi/Makefile | 1 +
drivers/net/wireless/nxp/nxpwifi/cfg80211.c | 5 +-
drivers/net/wireless/nxp/nxpwifi/main.h | 1 +
drivers/net/wireless/nxp/nxpwifi/vendor.c | 164 ++++++++++++++++++++
drivers/net/wireless/nxp/nxpwifi/vendor.h | 46 ++++++
5 files changed, 216 insertions(+), 1 deletion(-)
create mode 100644 drivers/net/wireless/nxp/nxpwifi/vendor.c
create mode 100644 drivers/net/wireless/nxp/nxpwifi/vendor.h
diff --git a/drivers/net/wireless/nxp/nxpwifi/Makefile b/drivers/net/wireless/nxp/nxpwifi/Makefile
index 8f581429f28d..f82435253a72 100644
--- a/drivers/net/wireless/nxp/nxpwifi/Makefile
+++ b/drivers/net/wireless/nxp/nxpwifi/Makefile
@@ -28,6 +28,7 @@ nxpwifi-y += sta_tx.o
nxpwifi-y += sta_rx.o
nxpwifi-y += uap_txrx.o
nxpwifi-y += cfg80211.o
+nxpwifi-y += vendor.o
nxpwifi-y += ethtool.o
nxpwifi-y += 11h.o
nxpwifi-$(CONFIG_DEBUG_FS) += debugfs.o
diff --git a/drivers/net/wireless/nxp/nxpwifi/cfg80211.c b/drivers/net/wireless/nxp/nxpwifi/cfg80211.c
index 8805439c0b4b..16b970227e9c 100644
--- a/drivers/net/wireless/nxp/nxpwifi/cfg80211.c
+++ b/drivers/net/wireless/nxp/nxpwifi/cfg80211.c
@@ -10,6 +10,7 @@
#include "cmdevt.h"
#include "11n.h"
#include "wmm.h"
+#include "vendor.h"
static const struct ieee80211_iface_limit nxpwifi_ap_sta_limits[] = {
{
@@ -91,7 +92,7 @@ u8 nxpwifi_get_chan_type(struct nxpwifi_private *priv)
}
/* Retrieve the driver private data from the wiphy */
-static void *nxpwifi_cfg80211_get_adapter(struct wiphy *wiphy)
+void *nxpwifi_cfg80211_get_adapter(struct wiphy *wiphy)
{
return (void *)(*(unsigned long *)wiphy_priv(wiphy));
}
@@ -3834,6 +3835,8 @@ int nxpwifi_register_cfg80211(struct nxpwifi_adapter *adapter)
wiphy->cipher_suites = nxpwifi_cipher_suites;
wiphy->n_cipher_suites = ARRAY_SIZE(nxpwifi_cipher_suites);
+ nxpwifi_set_vendor_commands(wiphy);
+
if (adapter->regd) {
wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG |
REGULATORY_DISABLE_BEACON_HINTS |
diff --git a/drivers/net/wireless/nxp/nxpwifi/main.h b/drivers/net/wireless/nxp/nxpwifi/main.h
index 9ae017bdc6ca..bbfc4266c48d 100644
--- a/drivers/net/wireless/nxp/nxpwifi/main.h
+++ b/drivers/net/wireless/nxp/nxpwifi/main.h
@@ -1435,4 +1435,5 @@ void nxpwifi_dev_debugfs_remove(struct nxpwifi_private *priv);
int nxpwifi_reinit_sw(struct nxpwifi_adapter *adapter);
void nxpwifi_shutdown_sw(struct nxpwifi_adapter *adapter);
bool nxpwifi_is_valid_region_code(enum nxpwifi_region_code code);
+void *nxpwifi_cfg80211_get_adapter(struct wiphy *wiphy);
#endif /* !_NXPWIFI_MAIN_H_ */
diff --git a/drivers/net/wireless/nxp/nxpwifi/vendor.c b/drivers/net/wireless/nxp/nxpwifi/vendor.c
new file mode 100644
index 000000000000..11cc2d123d3f
--- /dev/null
+++ b/drivers/net/wireless/nxp/nxpwifi/vendor.c
@@ -0,0 +1,164 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * NXP Wireless LAN device driver: vendor command interface
+ *
+ * Copyright 2011-2026 NXP
+ */
+
+#include <net/mac80211.h>
+#include <net/netlink.h>
+#include "vendor.h"
+#include "main.h"
+
+static const struct nla_policy
+nxpwifi_txpwr_policy[NXPWIFI_ATTR_TXPWR_MAX + 1] = {
+ [NXPWIFI_ATTR_TXPWR_ACTION] = NLA_POLICY_MAX(NLA_U8,
+ NXPWIFI_TXPWR_ACTION_SET),
+ [NXPWIFI_ATTR_TXPWR_SUBBAND] = { .type = NLA_U8 },
+ [NXPWIFI_ATTR_TXPWR_DATA] = { .type = NLA_BINARY,
+ .len = NXPWIFI_MAX_TRPC_BUF },
+};
+
+/* The subband selector is not a contiguous range: 0x00 selects the 2.4 GHz
+ * band and 0x10..0x13 select the four 5 GHz subbands. Validate it explicitly
+ * instead of relying on a simple min/max policy bound.
+ */
+static bool nxpwifi_txpwr_subband_valid(u8 subband)
+{
+ switch (subband) {
+ case NXPWIFI_TXPWR_SUBBAND_2G:
+ case NXPWIFI_TXPWR_SUBBAND_5G_0:
+ case NXPWIFI_TXPWR_SUBBAND_5G_1:
+ case NXPWIFI_TXPWR_SUBBAND_5G_2:
+ case NXPWIFI_TXPWR_SUBBAND_5G_3:
+ return true;
+ default:
+ return false;
+ }
+}
+
+static int nxpwifi_vendor_txpower_limit(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data, int data_len)
+{
+ struct nxpwifi_adapter *adapter = nxpwifi_cfg80211_get_adapter(wiphy);
+ struct nlattr *tb[NXPWIFI_ATTR_TXPWR_MAX + 1];
+ struct nxpwifi_ds_chan_trpc_cfg *ch_trpc;
+ struct nxpwifi_private *priv;
+ struct sk_buff *resp;
+ u8 action, subband = 0;
+ u16 tlv_len = 0;
+ int ret;
+
+ ret = nla_parse(tb, NXPWIFI_ATTR_TXPWR_MAX, data, data_len,
+ nxpwifi_txpwr_policy, NULL);
+ if (ret)
+ return ret;
+
+ if (!tb[NXPWIFI_ATTR_TXPWR_ACTION])
+ return -EINVAL;
+ action = nla_get_u8(tb[NXPWIFI_ATTR_TXPWR_ACTION]);
+
+ if (tb[NXPWIFI_ATTR_TXPWR_SUBBAND]) {
+ subband = nla_get_u8(tb[NXPWIFI_ATTR_TXPWR_SUBBAND]);
+ if (!nxpwifi_txpwr_subband_valid(subband))
+ return -EINVAL;
+ } else if (action == NXPWIFI_TXPWR_ACTION_GET) {
+ /* A GET selects which per-subband table to read back, so the
+ * subband selector is mandatory for a GET.
+ */
+ return -EINVAL;
+ }
+
+ if (action == NXPWIFI_TXPWR_ACTION_SET) {
+ if (!tb[NXPWIFI_ATTR_TXPWR_DATA])
+ return -EINVAL;
+ tlv_len = nla_len(tb[NXPWIFI_ATTR_TXPWR_DATA]);
+ }
+
+ priv = nxpwifi_get_priv(adapter, NXPWIFI_BSS_ROLE_STA);
+ if (!priv)
+ return -ENODEV;
+
+ /* A SET only needs room for the supplied TLVs; a GET needs room for
+ * the firmware to write back the full per-subband table.
+ */
+ ch_trpc = kzalloc_flex(*ch_trpc, tlvbuffer,
+ (action == NXPWIFI_TXPWR_ACTION_SET) ?
+ tlv_len : NXPWIFI_MAX_TRPC_BUF, GFP_KERNEL);
+ if (!ch_trpc)
+ return -ENOMEM;
+
+ ch_trpc->action = (action == NXPWIFI_TXPWR_ACTION_SET) ?
+ HOST_ACT_GEN_SET : HOST_ACT_GEN_GET;
+ ch_trpc->subband = subband;
+ if (tlv_len)
+ memcpy(ch_trpc->tlvbuffer,
+ nla_data(tb[NXPWIFI_ATTR_TXPWR_DATA]), tlv_len);
+ /* Firmware payload is action + subband followed by the TLV table. */
+ ch_trpc->len = sizeof(ch_trpc->action) + sizeof(ch_trpc->subband) +
+ tlv_len;
+
+ ret = nxpwifi_chan_trpc_cfg(priv, NXPWIFI_SYNC_CMD, ch_trpc);
+ if (ret)
+ goto done;
+
+ if (action == NXPWIFI_TXPWR_ACTION_GET) {
+ u16 hdr_len = sizeof(ch_trpc->action) +
+ sizeof(ch_trpc->subband);
+ u16 resp_len, skb_len;
+
+ /* Guard against a malformed firmware response before using
+ * ch_trpc->len to size the reply.
+ */
+ if (ch_trpc->len < hdr_len ||
+ ch_trpc->len > hdr_len + NXPWIFI_MAX_TRPC_BUF) {
+ ret = -EIO;
+ goto done;
+ }
+ resp_len = ch_trpc->len - hdr_len;
+ skb_len = nla_total_size(resp_len);
+
+ resp = cfg80211_vendor_cmd_alloc_reply_skb(wiphy, skb_len);
+ if (!resp) {
+ ret = -ENOMEM;
+ goto done;
+ }
+
+ if (nla_put(resp, NXPWIFI_ATTR_TXPWR_DATA, resp_len,
+ ch_trpc->tlvbuffer)) {
+ kfree_skb(resp);
+ ret = -ENOBUFS;
+ goto done;
+ }
+
+ ret = cfg80211_vendor_cmd_reply(resp);
+ }
+
+done:
+ kfree(ch_trpc);
+ return ret;
+}
+
+static const struct wiphy_vendor_command nxpwifi_vendor_commands[] = {
+ {
+ .info = {
+ .vendor_id = NXP_OUI,
+ .subcmd = NXPWIFI_VENDOR_CMD_TXPOWER_LIMIT,
+ },
+ /* TX power limits are a configuration/calibration setting and
+ * can be programmed while the interface is down, so no
+ * WIPHY_VENDOR_CMD_NEED_RUNNING flag is required.
+ */
+ .flags = 0,
+ .doit = nxpwifi_vendor_txpower_limit,
+ .policy = nxpwifi_txpwr_policy,
+ .maxattr = NXPWIFI_ATTR_TXPWR_MAX,
+ },
+};
+
+void nxpwifi_set_vendor_commands(struct wiphy *wiphy)
+{
+ wiphy->vendor_commands = nxpwifi_vendor_commands;
+ wiphy->n_vendor_commands = ARRAY_SIZE(nxpwifi_vendor_commands);
+}
diff --git a/drivers/net/wireless/nxp/nxpwifi/vendor.h b/drivers/net/wireless/nxp/nxpwifi/vendor.h
new file mode 100644
index 000000000000..f962ea520af0
--- /dev/null
+++ b/drivers/net/wireless/nxp/nxpwifi/vendor.h
@@ -0,0 +1,46 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * NXP Wireless LAN device driver: vendor command interface
+ *
+ * Copyright 2011-2026 NXP
+ */
+
+#ifndef __NXPWIFI_VENDOR_H__
+#define __NXPWIFI_VENDOR_H__
+
+#define NXP_OUI 0x006037
+
+enum nxpwifi_vendor_commands {
+ NXPWIFI_VENDOR_CMD_TXPOWER_LIMIT,
+};
+
+/* Actions for NXPWIFI_ATTR_TXPWR_ACTION. */
+enum nxpwifi_txpwr_action {
+ NXPWIFI_TXPWR_ACTION_GET,
+ NXPWIFI_TXPWR_ACTION_SET,
+};
+
+/* Subband selectors for NXPWIFI_ATTR_TXPWR_SUBBAND: 0x00 is the 2.4 GHz
+ * band and 0x10..0x13 are the four 5 GHz subbands.
+ */
+enum nxpwifi_txpwr_subband {
+ NXPWIFI_TXPWR_SUBBAND_2G = 0x00,
+ NXPWIFI_TXPWR_SUBBAND_5G_0 = 0x10,
+ NXPWIFI_TXPWR_SUBBAND_5G_1 = 0x11,
+ NXPWIFI_TXPWR_SUBBAND_5G_2 = 0x12,
+ NXPWIFI_TXPWR_SUBBAND_5G_3 = 0x13,
+};
+
+/* Attributes for NXPWIFI_VENDOR_CMD_TXPOWER_LIMIT. */
+enum nxpwifi_txpwr_attrs {
+ NXPWIFI_ATTR_TXPWR_UNSPEC,
+ NXPWIFI_ATTR_TXPWR_ACTION, /* u8, enum nxpwifi_txpwr_action */
+ NXPWIFI_ATTR_TXPWR_SUBBAND, /* u8, subband selector for GET */
+ NXPWIFI_ATTR_TXPWR_DATA, /* binary, per-subband TRPC TLVs */
+
+ __NXPWIFI_ATTR_TXPWR_AFTER_LAST,
+ NXPWIFI_ATTR_TXPWR_MAX = __NXPWIFI_ATTR_TXPWR_AFTER_LAST - 1
+};
+
+void nxpwifi_set_vendor_commands(struct wiphy *wiphy);
+#endif /* __NXPWIFI_VENDOR_H__ */
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread