Skip to content

Commit 91437e2

Browse files
kapbhNordicBuilder
authored andcommitted
samples: Fix cmake include and radio_test with code restructuring
Fix library include and radio_test sample with latest code changes in restructuring. Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
1 parent 21686cc commit 91437e2

File tree

6 files changed

+25
-21
lines changed

6 files changed

+25
-21
lines changed

samples/wifi/radio_test/multi_domain/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ target_sources(app PRIVATE
2121
src/nrf_wifi_radio_ficr_shell.c
2222
src/ficr_prog.c
2323
)
24+
25+
target_link_libraries(app PRIVATE nrf-wifi-osal)

samples/wifi/radio_test/multi_domain/inc/nrf_wifi_radio_test_shell.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <zephyr/init.h>
1616
#include <ctype.h>
1717
#include <host_rpu_sys_if.h>
18-
#include <fmac_structs.h>
18+
#include <radio_test/fmac_structs.h>
1919
#include <zephyr/drivers/wifi/nrf_wifi/bus/rpu_hw_if.h>
2020

2121
struct nrf_wifi_ctx_zep_rt {

samples/wifi/radio_test/multi_domain/src/ficr_prog.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <zephyr/kernel.h>
1313
#include <zephyr/drivers/wifi/nrf_wifi/bus/rpu_hw_if.h>
1414

15-
#include "rpu_if.h"
15+
#include "common/rpu_if.h"
1616
#include "ficr_prog.h"
1717

1818

samples/wifi/radio_test/multi_domain/src/nrf_wifi_radio_ficr_shell.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <nrf_wifi_radio_test_shell.h>
1515
#include "ficr_prog.h"
1616

17-
#include "fmac_api_common.h"
17+
#include "common/fmac_api_common.h"
1818

1919
extern struct nrf_wifi_drv_priv_zep rpu_drv_priv_zep;
2020
static struct nrf_wifi_ctx_zep *ctx = &rpu_drv_priv_zep.rpu_ctx_zep;

samples/wifi/radio_test/multi_domain/src/nrf_wifi_radio_test_shell.c

+18-18
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <fmac_main.h>
1212
#include <nrf_wifi_radio_test_shell.h>
1313
#include <util.h>
14-
#include "fmac_api_common.h"
14+
#include "common/fmac_api_common.h"
1515

1616
extern struct nrf_wifi_drv_priv_zep rpu_drv_priv_zep;
1717
struct nrf_wifi_ctx_zep *ctx = &rpu_drv_priv_zep.rpu_ctx_zep;
@@ -304,7 +304,7 @@ enum nrf_wifi_status nrf_wifi_radio_test_conf_init(struct rpu_conf_params *conf_
304304
/* Initialize values which are other than 0 */
305305
conf_params->op_mode = RPU_OP_MODE_RADIO_TEST;
306306

307-
status = nrf_wifi_fmac_rf_params_get(
307+
status = nrf_wifi_rt_fmac_rf_params_get(
308308
ctx->rpu_ctx,
309309
(struct nrf_wifi_phy_rf_params *)conf_params->rf_params);
310310
if (status != NRF_WIFI_STATUS_SUCCESS) {
@@ -1149,7 +1149,7 @@ static int nrf_wifi_radio_test_init(const struct shell *shell,
11491149

11501150
ctx->conf_params.rx = 0;
11511151

1152-
status = nrf_wifi_fmac_radio_test_prog_rx(ctx->rpu_ctx,
1152+
status = nrf_wifi_rt_fmac_prog_rx(ctx->rpu_ctx,
11531153
&ctx->conf_params);
11541154

11551155
if (status != NRF_WIFI_STATUS_SUCCESS) {
@@ -1167,7 +1167,7 @@ static int nrf_wifi_radio_test_init(const struct shell *shell,
11671167

11681168
ctx->conf_params.tx = 0;
11691169

1170-
status = nrf_wifi_fmac_radio_test_prog_tx(ctx->rpu_ctx,
1170+
status = nrf_wifi_rt_fmac_prog_tx(ctx->rpu_ctx,
11711171
&ctx->conf_params);
11721172

11731173
if (status != NRF_WIFI_STATUS_SUCCESS) {
@@ -1192,7 +1192,7 @@ static int nrf_wifi_radio_test_init(const struct shell *shell,
11921192
SHELL_INFO,
11931193
"Disabling ongoing TX tone test\n");
11941194

1195-
status = nrf_wifi_fmac_rf_test_tx_tone(ctx->rpu_ctx,
1195+
status = nrf_wifi_rt_fmac_rf_test_tx_tone(ctx->rpu_ctx,
11961196
0,
11971197
ctx->conf_params.tx_tone_freq,
11981198
ctx->conf_params.tx_power);
@@ -1220,7 +1220,7 @@ static int nrf_wifi_radio_test_init(const struct shell *shell,
12201220

12211221
ctx->conf_params.chan.primary_num = val;
12221222

1223-
status = nrf_wifi_fmac_radio_test_init(ctx->rpu_ctx,
1223+
status = nrf_wifi_rt_fmac_radio_test_init(ctx->rpu_ctx,
12241224
&ctx->conf_params);
12251225

12261226
if (status != NRF_WIFI_STATUS_SUCCESS) {
@@ -1322,7 +1322,7 @@ static int nrf_wifi_radio_test_set_tx(const struct shell *shell,
13221322

13231323
ctx->conf_params.tx = val;
13241324

1325-
status = nrf_wifi_fmac_radio_test_prog_tx(ctx->rpu_ctx,
1325+
status = nrf_wifi_rt_fmac_prog_tx(ctx->rpu_ctx,
13261326
&ctx->conf_params);
13271327

13281328
if (status != NRF_WIFI_STATUS_SUCCESS) {
@@ -1363,7 +1363,7 @@ static int nrf_wifi_radio_test_set_rx(const struct shell *shell,
13631363

13641364
ctx->conf_params.rx = val;
13651365

1366-
status = nrf_wifi_fmac_radio_test_prog_rx(ctx->rpu_ctx,
1366+
status = nrf_wifi_rt_fmac_prog_rx(ctx->rpu_ctx,
13671367
&ctx->conf_params);
13681368

13691369
if (status != NRF_WIFI_STATUS_SUCCESS) {
@@ -1460,7 +1460,7 @@ static int nrf_wifi_radio_test_rx_cap(const struct shell *shell,
14601460
ctx->rf_test_run = true;
14611461
ctx->rf_test = NRF_WIFI_RF_TEST_RX_ADC_CAP;
14621462

1463-
status = nrf_wifi_fmac_rf_test_rx_cap(ctx->rpu_ctx,
1463+
status = nrf_wifi_rt_fmac_rf_test_rx_cap(ctx->rpu_ctx,
14641464
rx_cap_type,
14651465
rx_cap_buf,
14661466
ctx->conf_params.capture_length,
@@ -1539,7 +1539,7 @@ static int nrf_wifi_radio_test_tx_tone(const struct shell *shell,
15391539

15401540
}
15411541

1542-
status = nrf_wifi_fmac_rf_test_tx_tone(ctx->rpu_ctx,
1542+
status = nrf_wifi_rt_fmac_rf_test_tx_tone(ctx->rpu_ctx,
15431543
(unsigned char)val,
15441544
ctx->conf_params.tx_tone_freq,
15451545
ctx->conf_params.tx_power);
@@ -1594,7 +1594,7 @@ static int nrf_wifi_radio_set_dpd(const struct shell *shell,
15941594
ctx->rf_test_run = true;
15951595
ctx->rf_test = NRF_WIFI_RF_TEST_DPD;
15961596

1597-
status = nrf_wifi_fmac_rf_test_dpd(ctx->rpu_ctx,
1597+
status = nrf_wifi_rt_fmac_rf_test_dpd(ctx->rpu_ctx,
15981598
val);
15991599

16001600
if (status != NRF_WIFI_STATUS_SUCCESS) {
@@ -1626,7 +1626,7 @@ static int nrf_wifi_radio_get_temperature(const struct shell *shell,
16261626
ctx->rf_test_run = true;
16271627
ctx->rf_test = NRF_WIFI_RF_TEST_GET_TEMPERATURE;
16281628

1629-
status = nrf_wifi_fmac_rf_get_temp(ctx->rpu_ctx);
1629+
status = nrf_wifi_rt_fmac_rf_get_temp(ctx->rpu_ctx);
16301630

16311631
if (status != NRF_WIFI_STATUS_SUCCESS) {
16321632
shell_fprintf(shell,
@@ -1658,7 +1658,7 @@ static int nrf_wifi_radio_get_rf_rssi(const struct shell *shell,
16581658
ctx->rf_test_run = true;
16591659
ctx->rf_test = NRF_WIFI_RF_TEST_RF_RSSI;
16601660

1661-
status = nrf_wifi_fmac_rf_get_rf_rssi(ctx->rpu_ctx);
1661+
status = nrf_wifi_rt_fmac_rf_get_rf_rssi(ctx->rpu_ctx);
16621662

16631663
if (status != NRF_WIFI_STATUS_SUCCESS) {
16641664
shell_fprintf(shell,
@@ -1712,7 +1712,7 @@ static int nrf_wifi_radio_set_xo_val(const struct shell *shell,
17121712
ctx->rf_test_run = true;
17131713
ctx->rf_test = NRF_WIFI_RF_TEST_XO_CALIB;
17141714

1715-
status = nrf_wifi_fmac_set_xo_val(ctx->rpu_ctx,
1715+
status = nrf_wifi_rt_fmac_set_xo_val(ctx->rpu_ctx,
17161716
(unsigned char)val);
17171717

17181718
if (status != NRF_WIFI_STATUS_SUCCESS) {
@@ -1747,7 +1747,7 @@ static int nrf_wifi_radio_comp_opt_xo_val(const struct shell *shell,
17471747
ctx->rf_test_run = true;
17481748
ctx->rf_test = NRF_WIFI_RF_TEST_XO_TUNE;
17491749

1750-
status = nrf_wifi_fmac_rf_test_compute_xo(ctx->rpu_ctx);
1750+
status = nrf_wifi_rt_fmac_rf_test_compute_xo(ctx->rpu_ctx);
17511751

17521752
if (status != NRF_WIFI_STATUS_SUCCESS) {
17531753
shell_fprintf(shell,
@@ -2015,20 +2015,20 @@ static int nrf_wifi_radio_test_get_stats(const struct shell *shell,
20152015
const char *argv[])
20162016
{
20172017
enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL;
2018-
struct rpu_op_stats stats;
2018+
struct rpu_rt_op_stats stats;
20192019

20202020
memset(&stats,
20212021
0,
20222022
sizeof(stats));
20232023

2024-
status = nrf_wifi_fmac_stats_get(ctx->rpu_ctx,
2024+
status = nrf_wifi_rt_fmac_stats_get(ctx->rpu_ctx,
20252025
ctx->conf_params.op_mode,
20262026
&stats);
20272027

20282028
if (status != NRF_WIFI_STATUS_SUCCESS) {
20292029
shell_fprintf(shell,
20302030
SHELL_ERROR,
2031-
"nrf_wifi_fmac_stats_get failed\n");
2031+
"nrf_wifi_rt_fmac_stats_get failed\n");
20322032
return -ENOEXEC;
20332033
}
20342034

subsys/net/lib/nrf70_fw_ext/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ else()
1919
endif()
2020
endif()
2121

22+
zephyr_library_link_libraries(nrf70-buslib nrf-wifi-shim)
23+
2224
if(DEFINED CONFIG_NRF_WIFI_PATCHES_EXT_FLASH_DISABLED OR
2325
DEFINED CONFIG_NRF_WIFI_PATCHES_EXT_FLASH_XIP)
2426
# NCS doesn't rely on hal_nordic blobs for nRF70 device driver

0 commit comments

Comments
 (0)