Skip to content

Commit 925c2f2

Browse files
committed
drivers: wifi: separate nrf70 buslib from driver lib
Separate the nRF70 wifi driver from the bus driver. Create a new nrf70_bus library separate from the wifi driver. Further link the nrf70_bus library with the wifi driver library so this change will be agnostic to users of wifi library. Signed-off-by: Bansidhar P.M. <[email protected]>
1 parent c50777a commit 925c2f2

File tree

14 files changed

+9
-2653
lines changed

14 files changed

+9
-2653
lines changed

drivers/wifi/nrfwifi/CMakeLists.txt

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ zephyr_include_directories(
1818
${OS_AGNOSTIC_BASE}/fw_if/umac_if/inc
1919
${OS_AGNOSTIC_BASE}/fw_load/mips/fw/inc
2020
${OS_AGNOSTIC_BASE}/hw_if/hal/inc
21-
src/qspi/inc
2221
# for net_sprint_ll_addr
2322
${ZEPHYR_BASE}/subsys/net/ip
2423
${OS_AGNOSTIC_BASE}/hw_if/hal/inc/fw
@@ -62,9 +61,7 @@ zephyr_library_sources(
6261
src/shim.c
6362
src/work.c
6463
src/timer.c
65-
src/qspi/src/device.c
66-
src/qspi/src/rpu_hw_if.c
67-
src/qspi/src/ficr_prog.c
64+
src/ficr_prog.c
6865
)
6966

7067
zephyr_library_sources_ifndef(CONFIG_NRF70_OFFLOADED_RAW_TX
@@ -132,14 +129,6 @@ zephyr_library_sources_ifdef(CONFIG_NRF70_PROMISC_DATA_RX
132129
${OS_AGNOSTIC_BASE}/fw_if/umac_if/src/fmac_promisc.c
133130
)
134131

135-
zephyr_library_sources_ifdef(CONFIG_NRF70_ON_QSPI
136-
src/qspi/src/qspi_if.c
137-
)
138-
139-
zephyr_library_sources_ifdef(CONFIG_NRF70_ON_SPI
140-
src/qspi/src/spi_if.c
141-
)
142-
143132
zephyr_library_sources_ifdef(CONFIG_NRF70_UTIL
144133
src/wifi_util.c
145134
)
@@ -349,3 +338,6 @@ zephyr_compile_definitions(
349338
-DNRF_WIFI_PS_INT_PS=${CONFIG_NRF_WIFI_PS_INT_PS}
350339
-DNRF_WIFI_RPU_RECOVERY_PS_ACTIVE_TIMEOUT_MS=${CONFIG_NRF_WIFI_RPU_RECOVERY_PS_ACTIVE_TIMEOUT_MS}
351340
)
341+
342+
target_link_libraries(nrfwifi PRIVATE nrf70-buslib)
343+

drivers/wifi/nrfwifi/Kconfig.nrfwifi

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,6 @@ menuconfig WIFI_NRF70
2020
Nordic Wi-Fi Driver
2121

2222
if WIFI_NRF70
23-
# Hidden symbols for internal use
24-
config WIFI_NRF7002
25-
bool
26-
default y if DT_HAS_NORDIC_NRF7002_SPI_ENABLED || DT_HAS_NORDIC_NRF7002_QSPI_ENABLED
27-
28-
config WIFI_NRF7001
29-
bool
30-
default y if DT_HAS_NORDIC_NRF7001_SPI_ENABLED || DT_HAS_NORDIC_NRF7001_QSPI_ENABLED
31-
32-
config WIFI_NRF7000
33-
bool
34-
default y if DT_HAS_NORDIC_NRF7000_SPI_ENABLED || DT_HAS_NORDIC_NRF7000_QSPI_ENABLED
35-
36-
37-
module = WIFI_NRF70_BUS
38-
module-dep = LOG
39-
module-str = Log level for Wi-Fi nRF70 bus layers
40-
module-help = Sets log level for Wi-Fi nRF70 bus layers
41-
source "subsys/net/Kconfig.template.log_config.net"
42-
43-
config WIFI_NRF70_BUS_LOG_LEVEL
44-
# Enable error by default
45-
default 1
4623

4724
choice NRF70_OPER_MODES
4825
bool "nRF70 operating modes"

drivers/wifi/nrfwifi/src/qspi/src/ficr_prog.c renamed to drivers/wifi/nrfwifi/src/ficr_prog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "ficr_prog.h"
1616

1717

18-
LOG_MODULE_DECLARE(otp_prog, CONFIG_WIFI_NRF70_BUS_LOG_LEVEL);
18+
LOG_MODULE_DECLARE(wifi_nrf, CONFIG_WIFI_NRF70_LOG_LEVEL);
1919

2020
static void write_word(unsigned int addr, unsigned int data)
2121
{

drivers/wifi/nrfwifi/src/qspi/inc/qspi_if.h

Lines changed: 0 additions & 116 deletions
This file was deleted.

drivers/wifi/nrfwifi/src/qspi/inc/rpu_hw_if.h

Lines changed: 0 additions & 61 deletions
This file was deleted.

drivers/wifi/nrfwifi/src/qspi/inc/spi_if.h

Lines changed: 0 additions & 36 deletions
This file was deleted.

drivers/wifi/nrfwifi/src/qspi/inc/spi_nor.h

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)