Skip to content

Commit de4f93a

Browse files
kapbhkrish2718
authored andcommitted
[nrf fromlist] drivers: wifi: Add Kconfig option for passive scan
Add kconfig option for forced passive scan, It will use for only scan only mode. Upstream PR: zephyrproject-rtos/zephyr#80003 Signed-off-by: Kapil Bhatt <[email protected]>
1 parent b3b6712 commit de4f93a

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

drivers/wifi/nrfwifi/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,4 +359,5 @@ zephyr_compile_definitions(
359359
-DNRF70_ANT_GAIN_5G_BAND2=${CONFIG_NRF70_ANT_GAIN_5G_BAND2}
360360
-DNRF70_ANT_GAIN_5G_BAND3=${CONFIG_NRF70_ANT_GAIN_5G_BAND3}
361361
-DNRF_WIFI_PS_INT_PS=${CONFIG_NRF_WIFI_PS_INT_PS}
362+
-DNRF70_PASSIVE_SCAN_ONLY=${CONFIG_NRF70_PASSIVE_SCAN_ONLY}
362363
)

drivers/wifi/nrfwifi/Kconfig.nrfwifi

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,4 +851,11 @@ config NRF_WIFI_PS_INT_PS
851851
whether to stay in PS (for lower amount of buffered data) or exit PS (for higher
852852
amount of buffered data).
853853
endchoice
854+
855+
config NRF70_PASSIVE_SCAN_ONLY
856+
bool "Forced Passive scan"
857+
depends on NRF70_SCAN_ONLY
858+
help
859+
Enable this configuration to force passive scan on all channels.
860+
This will override application specified scan type.
854861
endif # WIFI_NRF70

drivers/wifi/nrfwifi/src/wifi_mgmt_scan.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,10 @@ int nrf_wifi_disp_scan_zep(const struct device *dev, struct wifi_scan_params *pa
206206

207207
vif_ctx_zep->scan_res_cnt = 0;
208208

209+
#ifdef CONFIG_NRF70_PASSIVE_SCAN_ONLY
210+
scan_info->scan_params.passive_scan = 1;
211+
#endif /* CONFIG_NRF70_PASSIVE_SCAN_ONLY */
212+
209213
status = nrf_wifi_fmac_scan(rpu_ctx_zep->rpu_ctx, vif_ctx_zep->vif_idx, scan_info);
210214

211215
if (status != NRF_WIFI_STATUS_SUCCESS) {

0 commit comments

Comments
 (0)