Skip to content

Commit dbc6a50

Browse files
Qingling-Wukartben
authored andcommitted
drivers: wifi: nxp: add set RTS threshold command support
Add set RTS threshold command support for sta and sap in nxp driver. Signed-off-by: Qingling Wu <[email protected]>
1 parent d22026c commit dbc6a50

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

drivers/wifi/nxp/Kconfig.nxp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,12 @@ config NXP_WIFI_11R
522522
help
523523
This option enables the use of 802.11r support.
524524

525+
config NXP_WIFI_RTS_THRESHOLD
526+
bool "Set RTS Threshold Support"
527+
default y
528+
help
529+
This option enables the set of rts threshold support.
530+
525531
config NXP_WIFI_INACTIVITY_TIMEOUT_EXT
526532
bool "Inactivity Timeout Ext Support"
527533
default y

drivers/wifi/nxp/nxp_wifi_drv.c

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,6 +1534,36 @@ static int nxp_wifi_set_btwt(const struct device *dev, struct wifi_twt_params *p
15341534
}
15351535
#endif
15361536

1537+
static int nxp_wifi_set_rts_threshold(const struct device *dev, unsigned int rts_threshold)
1538+
{
1539+
int ret = -1;
1540+
1541+
#if CONFIG_NXP_WIFI_RTS_THRESHOLD
1542+
if (rts_threshold == -1) {
1543+
rts_threshold = MLAN_RTS_MAX_VALUE;
1544+
}
1545+
1546+
ret = wlan_set_rts(rts_threshold);
1547+
#endif
1548+
1549+
return ret;
1550+
}
1551+
1552+
static int nxp_wifi_ap_set_rts_threshold(const struct device *dev, unsigned int rts_threshold)
1553+
{
1554+
int ret = -1;
1555+
1556+
#if CONFIG_NXP_WIFI_RTS_THRESHOLD
1557+
if (rts_threshold == -1) {
1558+
rts_threshold = MLAN_RTS_MAX_VALUE;
1559+
}
1560+
1561+
ret = wlan_set_uap_rts(rts_threshold);
1562+
#endif
1563+
1564+
return ret;
1565+
}
1566+
15371567
static void nxp_wifi_sta_init(struct net_if *iface)
15381568
{
15391569
const struct device *dev = net_if_get_device(iface);
@@ -1836,6 +1866,7 @@ static const struct wifi_mgmt_ops nxp_wifi_sta_mgmt = {
18361866
#ifdef CONFIG_NXP_WIFI_11AX_TWT
18371867
.set_twt = nxp_wifi_set_twt,
18381868
#endif
1869+
.set_rts_threshold = nxp_wifi_set_rts_threshold,
18391870
};
18401871

18411872
#if defined(CONFIG_WIFI_NM) && !defined(CONFIG_WIFI_NM_WPA_SUPPLICANT)
@@ -1914,6 +1945,7 @@ static const struct wifi_mgmt_ops nxp_wifi_uap_mgmt = {
19141945
#ifdef CONFIG_NXP_WIFI_11AX_TWT
19151946
.set_btwt = nxp_wifi_set_btwt,
19161947
#endif
1948+
.set_rts_threshold = nxp_wifi_ap_set_rts_threshold,
19171949
};
19181950

19191951
#if defined(CONFIG_WIFI_NM) && !defined(CONFIG_WIFI_NM_HOSTAPD_AP)

0 commit comments

Comments
 (0)