Skip to content

Commit aff5b38

Browse files
VivekUppundarlubos
authored andcommitted
drivers: wifi: Remove NRF700X_RAW_DATA_TX check for setting Wi-Fi mode
This change removes the CONFIG_NRF700X_RAW_DATA_TX check for Wi-Fi mode setting. Signed-off-by: Vivekananda Uppunda <[email protected]>
1 parent 0692684 commit aff5b38

File tree

5 files changed

+20
-3
lines changed

5 files changed

+20
-3
lines changed

drivers/wifi/nrf700x/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ zephyr_library_sources_ifdef(CONFIG_NET_L2_WIFI_MGMT
7575
src/wifi_mgmt_scan.c
7676
)
7777

78+
zephyr_library_sources_ifdef(CONFIG_NRF700X_SYSTEM_MODE
79+
src/wifi_mgmt.c
80+
)
81+
82+
zephyr_library_sources_ifdef(CONFIG_NRF700X_SCAN_ONLY
83+
src/wifi_mgmt_scan.c
84+
)
85+
7886
zephyr_library_sources_ifdef(CONFIG_NRF700X_RADIO_TEST
7987
${OS_AGNOSTIC_BASE}/fw_if/umac_if/src/radio_test/fmac_api.c
8088
${OS_AGNOSTIC_BASE}/fw_if/umac_if/src/fmac_util.c

drivers/wifi/nrf700x/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ choice NRF700X_OPER_MODES
3838

3939
config NRF700X_SYSTEM_MODE
4040
bool "Enable nRF700X system mode"
41+
select NET_L2_WIFI_MGMT
4142
depends on WPA_SUPP
4243
help
4344
Select this option to enable system mode of the nRF700x driver
4445

4546
config NRF700X_SCAN_ONLY
4647
bool "Enable nRF700X scan only mode"
48+
select NET_L2_WIFI_MGMT
4749
help
4850
Select this option to enable scan only mode of the nRF700x driver
4951

drivers/wifi/nrf700x/inc/wifi_mgmt.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ void nrf_wifi_event_proc_get_power_save_info(void *vif_ctx,
5151
struct nrf_wifi_umac_event_power_save_info *ps_info,
5252
unsigned int event_len);
5353

54-
#ifdef CONFIG_NRF700X_RAW_DATA_TX
54+
#ifdef CONFIG_NRF700X_SYSTEM_MODE
5555
int nrf_wifi_mode(const struct device *dev,
5656
struct wifi_mode_info *mode);
57+
#endif
5758

59+
#ifdef CONFIG_NRF700X_RAW_DATA_TX
5860
int nrf_wifi_channel(const struct device *dev,
5961
struct wifi_channel_info *channel);
6062
#endif /* CONFIG_NRF700X_RAW_DATA_TX */

drivers/wifi/nrf700x/src/fmac_main.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include <wifi_mgmt.h>
3232
#include <wpa_supp_if.h>
3333
#else
34+
#include <wifi_mgmt.h>
3435
#include <wifi_mgmt_scan.h>
3536
#endif /* CONFIG_WPA_SPP */
3637
#include <zephyr/net/conn_mgr_connectivity.h>
@@ -725,8 +726,10 @@ static struct wifi_mgmt_ops nrf_wifi_mgmt_ops = {
725726
.reg_domain = nrf_wifi_reg_domain,
726727
.get_power_save_config = nrf_wifi_get_power_save_config,
727728
#endif /* CONFIG_NRF700X_STA_MODE */
728-
#ifdef CONFIG_NRF700X_RAW_DATA_TX
729+
#ifdef CONFIG_NRF700X_SYSTEM_MODE
729730
.mode = nrf_wifi_mode,
731+
#endif
732+
#ifdef CONFIG_NRF700X_RAW_DATA_TX
730733
.channel = nrf_wifi_channel,
731734
#endif /* CONFIG_NRF700X_RAW_DATA_TX */
732735
};

drivers/wifi/nrf700x/src/wifi_mgmt.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ void nrf_wifi_event_proc_twt_sleep_zep(void *vif_ctx,
685685
}
686686
}
687687

688-
#ifdef CONFIG_NRF700X_RAW_DATA_TX
688+
#ifdef CONFIG_NRF700X_SYSTEM_MODE
689689
int nrf_wifi_mode(const struct device *dev,
690690
struct wifi_mode_info *mode)
691691
{
@@ -744,7 +744,9 @@ int nrf_wifi_mode(const struct device *dev,
744744
out:
745745
return ret;
746746
}
747+
#endif
747748

749+
#ifdef CONFIG_NRF700X_RAW_DATA_TX
748750
int nrf_wifi_channel(const struct device *dev,
749751
struct wifi_channel_info *channel)
750752
{

0 commit comments

Comments
 (0)