Skip to content

Commit efdaa0e

Browse files
ajayparidanordicjm
authored andcommitted
Revert "[nrf noup] net: l2: wifi: Configure BSS max idle period"
This reverts commit 331f27b. Signed-off-by: Ajay Parida <[email protected]>
1 parent 4d1e9e3 commit efdaa0e

File tree

12 files changed

+2
-178
lines changed

12 files changed

+2
-178
lines changed

drivers/wifi/nrf_wifi/inc/fmac_main.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ struct nrf_wifi_vif_ctx_zep {
9191
struct k_work_delayable nrf_wifi_rpu_recovery_bringup_work;
9292
#endif /* CONFIG_NRF_WIFI_RPU_RECOVERY */
9393
int rts_threshold_value;
94-
unsigned short bss_max_idle_period;
9594
};
9695

9796
struct nrf_wifi_vif_ctx_map {

drivers/wifi/nrf_wifi/inc/wifi_mgmt.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,4 @@ int nrf_wifi_set_rts_threshold(const struct device *dev,
7777

7878
int nrf_wifi_get_rts_threshold(const struct device *dev,
7979
unsigned int *rts_threshold);
80-
81-
int nrf_wifi_set_bss_max_idle_period(const struct device *dev,
82-
unsigned short bss_max_idle_period);
8380
#endif /* __ZEPHYR_WIFI_MGMT_H__ */

drivers/wifi/nrf_wifi/src/fmac_main.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -858,9 +858,6 @@ static int nrf_wifi_drv_main_zep(const struct device *dev)
858858
#endif /* CONFIG_NRF70_RADIO_TEST */
859859

860860
k_mutex_init(&rpu_drv_priv_zep.rpu_ctx_zep.rpu_lock);
861-
#ifndef CONFIG_NRF70_RADIO_TEST
862-
vif_ctx_zep->bss_max_idle_period = USHRT_MAX;
863-
#endif /* !CONFIG_NRF70_RADIO_TEST */
864861
return 0;
865862
#ifdef CONFIG_NRF70_RADIO_TEST
866863
fmac_deinit:
@@ -888,7 +885,6 @@ static const struct wifi_mgmt_ops nrf_wifi_mgmt_ops = {
888885
.get_power_save_config = nrf_wifi_get_power_save_config,
889886
.set_rts_threshold = nrf_wifi_set_rts_threshold,
890887
.get_rts_threshold = nrf_wifi_get_rts_threshold,
891-
.set_bss_max_idle_period = nrf_wifi_set_bss_max_idle_period,
892888
#endif
893889
#ifdef CONFIG_NRF70_SYSTEM_WITH_RAW_MODES
894890
.mode = nrf_wifi_mode,

drivers/wifi/nrf_wifi/src/wifi_mgmt.c

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,56 +1077,3 @@ int nrf_wifi_get_rts_threshold(const struct device *dev,
10771077

10781078
return ret;
10791079
}
1080-
1081-
int nrf_wifi_set_bss_max_idle_period(const struct device *dev,
1082-
unsigned short bss_max_idle_period)
1083-
{
1084-
struct nrf_wifi_ctx_zep *rpu_ctx_zep = NULL;
1085-
struct nrf_wifi_vif_ctx_zep *vif_ctx_zep = NULL;
1086-
int ret = -1;
1087-
1088-
if (!dev) {
1089-
LOG_ERR("%s: dev is NULL", __func__);
1090-
return ret;
1091-
}
1092-
1093-
vif_ctx_zep = dev->data;
1094-
1095-
if (!vif_ctx_zep) {
1096-
LOG_ERR("%s: vif_ctx_zep is NULL", __func__);
1097-
return ret;
1098-
}
1099-
1100-
rpu_ctx_zep = vif_ctx_zep->rpu_ctx_zep;
1101-
1102-
if (!rpu_ctx_zep) {
1103-
LOG_ERR("%s: rpu_ctx_zep is NULL", __func__);
1104-
return ret;
1105-
}
1106-
1107-
1108-
if (!rpu_ctx_zep->rpu_ctx) {
1109-
LOG_ERR("%s: RPU context not initialized", __func__);
1110-
return ret;
1111-
}
1112-
1113-
if (((int)bss_max_idle_period < 0) ||
1114-
(bss_max_idle_period > 64000)) {
1115-
/* 0 or value less than 64000 is passed to f/w.
1116-
* All other values considered as invalid.
1117-
*/
1118-
LOG_ERR("%s: Invalid max_idle_period value : %d",
1119-
__func__, (int)bss_max_idle_period);
1120-
return ret;
1121-
}
1122-
1123-
k_mutex_lock(&vif_ctx_zep->vif_lock, K_FOREVER);
1124-
1125-
vif_ctx_zep->bss_max_idle_period = bss_max_idle_period;
1126-
1127-
ret = 0;
1128-
1129-
k_mutex_unlock(&vif_ctx_zep->vif_lock);
1130-
1131-
return ret;
1132-
}

drivers/wifi/nrf_wifi/src/wpa_supp_if.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -931,10 +931,8 @@ int nrf_wifi_wpa_supp_associate(void *if_priv, struct wpa_driver_associate_param
931931
assoc_info.use_mfp = NRF_WIFI_MFP_REQUIRED;
932932
}
933933

934-
if (vif_ctx_zep->bss_max_idle_period == USHRT_MAX) {
935-
assoc_info.bss_max_idle_time = CONFIG_WIFI_MGMT_BSS_MAX_IDLE_TIME;
936-
} else {
937-
assoc_info.bss_max_idle_time = vif_ctx_zep->bss_max_idle_period;
934+
if (params->bss_max_idle_period) {
935+
assoc_info.bss_max_idle_time = params->bss_max_idle_period;
938936
}
939937

940938
assoc_info.conn_type = NRF_WIFI_CONN_TYPE_OPEN;

include/zephyr/net/wifi_mgmt.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,6 @@ enum net_request_wifi_cmd {
133133
NET_REQUEST_WIFI_CMD_CANDIDATE_SCAN,
134134
/** AP WPS config */
135135
NET_REQUEST_WIFI_CMD_AP_WPS_CONFIG,
136-
/** Configure BSS maximum idle period */
137-
NET_REQUEST_WIFI_CMD_BSS_MAX_IDLE_PERIOD,
138136
/** @cond INTERNAL_HIDDEN */
139137
NET_REQUEST_WIFI_CMD_MAX
140138
/** @endcond */
@@ -319,11 +317,6 @@ NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_WIFI_START_ROAMING);
319317

320318
NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_WIFI_NEIGHBOR_REP_COMPLETE);
321319

322-
#define NET_REQUEST_WIFI_BSS_MAX_IDLE_PERIOD \
323-
(NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_BSS_MAX_IDLE_PERIOD)
324-
325-
NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_WIFI_BSS_MAX_IDLE_PERIOD);
326-
327320
/** @brief Wi-Fi management events */
328321
enum net_event_wifi_cmd {
329322
/** Scan results available */
@@ -1566,15 +1559,6 @@ struct wifi_mgmt_ops {
15661559
* @return 0 if ok, < 0 if error
15671560
*/
15681561
int (*start_11r_roaming)(const struct device *dev);
1569-
/** Set BSS max idle period
1570-
*
1571-
* @param dev Pointer to the device structure for the driver instance.
1572-
* @param BSS max idle period value
1573-
*
1574-
* @return 0 if ok, < 0 if error
1575-
*/
1576-
int (*set_bss_max_idle_period)(const struct device *dev,
1577-
unsigned short bss_max_idle_period);
15781562
};
15791563

15801564
/** Wi-Fi management offload API */

modules/hostap/src/supp_api.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1811,19 +1811,6 @@ int supplicant_legacy_roam(const struct device *dev)
18111811
return ret;
18121812
}
18131813

1814-
int supplicant_set_bss_max_idle_period(const struct device *dev,
1815-
unsigned short bss_max_idle_period)
1816-
{
1817-
const struct wifi_mgmt_ops *const wifi_mgmt_api = get_wifi_mgmt_api(dev);
1818-
1819-
if (!wifi_mgmt_api || !wifi_mgmt_api->set_bss_max_idle_period) {
1820-
wpa_printf(MSG_ERROR, "set_bss_max_idle_period is not supported");
1821-
return -ENOTSUP;
1822-
}
1823-
1824-
return wifi_mgmt_api->set_bss_max_idle_period(dev, bss_max_idle_period);
1825-
}
1826-
18271814
#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_WNM
18281815
int supplicant_btm_query(const struct device *dev, uint8_t reason)
18291816
{

modules/hostap/src/supp_api.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -305,15 +305,6 @@ int supplicant_get_wifi_conn_params(const struct device *dev,
305305
*/
306306
int supplicant_wps_config(const struct device *dev, struct wifi_wps_config_params *params);
307307

308-
/** @ Set Wi-Fi max idle period
309-
*
310-
* @param dev Wi-Fi interface handle to use
311-
* @param bss_max_idle_period Maximum idle period to set
312-
* @return 0 for OK; -1 for ERROR
313-
*/
314-
int supplicant_set_bss_max_idle_period(const struct device *dev,
315-
unsigned short bss_max_idle_period);
316-
317308
#ifdef CONFIG_AP
318309
int set_ap_bandwidth(const struct device *dev, enum wifi_frequency_bandwidths bandwidth);
319310

modules/hostap/src/supp_main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ static const struct wifi_mgmt_ops mgmt_ops = {
8383
#endif
8484
.get_conn_params = supplicant_get_wifi_conn_params,
8585
.wps_config = supplicant_wps_config,
86-
.set_bss_max_idle_period = supplicant_set_bss_max_idle_period,
8786
#ifdef CONFIG_AP
8887
.ap_enable = supplicant_ap_enable,
8988
.ap_disable = supplicant_ap_disable,

subsys/net/l2/wifi/Kconfig

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -154,20 +154,3 @@ config HEAP_MEM_POOL_ADD_SIZE_WIFI_CERT
154154
endif # WIFI_SHELL_RUNTIME_CERTIFICATES
155155

156156
endif # WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE
157-
158-
159-
config WIFI_MGMT_BSS_MAX_IDLE_TIME
160-
int "BSS max idle timeout in seconds"
161-
range 0 64000
162-
default 300
163-
help
164-
As per 802.11-2020: 11.21.13 BSS max idle period management
165-
If dot11WirelessManagementImplemented is true, dot11BSSMaxIdlePeriod is
166-
nonzero and dot11BSSMaxIdlePeriodIndicationByNonAPSTA is true, then a
167-
non-S1G non-AP STA shall include a BSS Max Idle Period element
168-
in the (Re)Association Request frame. If the BSS Max Idle Period
169-
element is present in the (Re)Association Request frame received
170-
by a non-S1G AP that has dot11BSSMaxIdlePeriodIndicationByNonAPSTA
171-
equal to true, then the non-S1G AP may choose the non-AP STA’s
172-
preferred maximum idle period. The non-S1G AP indicates its chosen
173-
value to the non-S1G STA in the (Re)Association Response frame.

0 commit comments

Comments
 (0)