Skip to content

Commit

Permalink
nrf_wifi: Introduce separate patch for Raw modes
Browse files Browse the repository at this point in the history
In order to save flash memory, move the support for Raw modes (TX
injection, monitor and promiscuous) to a separate image.

Update RPU patch to rev#c826ee89bf9

Implements SHEL-2580 which should fix SHEL-2579.

Signed-off-by: Chaitanya Tata <[email protected]>
Signed-off-by: srinivasa raju chintalapati <[email protected]>
Signed-off-by: Vivekananda Uppunda <[email protected]>
  • Loading branch information
krish2718 authored and cvinayak committed Mar 18, 2024
1 parent 9570844 commit 2d90eef
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 3 deletions.
Binary file modified nrf_wifi/fw_bins/default/nrf70.bin
Binary file not shown.
Binary file modified nrf_wifi/fw_bins/radio_test/nrf70.bin
Binary file not shown.
Binary file modified nrf_wifi/fw_bins/scan_only/nrf70.bin
Binary file not shown.
Binary file added nrf_wifi/fw_bins/system_with_raw/nrf70.bin
Binary file not shown.
2 changes: 2 additions & 0 deletions nrf_wifi/fw_if/umac_if/inc/fmac_api_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ int nrf_wifi_phy_rf_params_init(struct nrf_wifi_osal_priv *opriv,
unsigned int package_info,
unsigned char *str);

#ifdef CONFIG_NRF700X_SYSTEM_WITH_RAW_MODES
/**
* @brief Set the current mode of operation
* @param dev_ctx Pointer to the UMAC IF context for a RPU WLAN device.
Expand All @@ -320,6 +321,7 @@ int nrf_wifi_phy_rf_params_init(struct nrf_wifi_osal_priv *opriv,
enum nrf_wifi_status nrf_wifi_fmac_set_mode(void *dev_ctx,
unsigned char if_idx,
unsigned char mode);
#endif

#if defined(CONFIG_NRF700X_RAW_DATA_TX) || defined(CONFIG_NRF700X_RAW_DATA_RX)
/**
Expand Down
1 change: 1 addition & 0 deletions nrf_wifi/fw_if/umac_if/inc/fw/patch_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ enum nrf70_feature_flags {
NRF70_FEAT_SYSTEM_MODE = BIT(0),
NRF70_FEAT_RADIO_TEST = BIT(1),
NRF70_FEAT_SCAN_ONLY = BIT(2),
NRF70_FEAT_SYSTEM_WITH_RAW_MODES = BIT(3),
};

enum nrf70_image_ids {
Expand Down
6 changes: 3 additions & 3 deletions nrf_wifi/fw_if/umac_if/src/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ static enum nrf_wifi_status umac_event_stats_process(struct nrf_wifi_fmac_dev_ct
return status;
}

#ifdef CONFIG_NRF700X_SYSTEM_MODE
#ifdef CONFIG_NRF700X_SYSTEM_WITH_RAW_MODES
static enum nrf_wifi_status
nrf_wifi_fmac_if_mode_set_event_proc(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx,
struct nrf_wifi_event_raw_config_mode *mode_event)
Expand Down Expand Up @@ -962,7 +962,7 @@ nrf_wifi_fmac_if_mode_set_event_proc(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx,
out:
return status;
}
#endif
#endif /* CONFIG_NRF700X_SYSTEM_WITH_RAW_MODES */

static enum nrf_wifi_status umac_process_sys_events(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx,
struct host_rpu_msg *rpu_msg)
Expand Down Expand Up @@ -1018,7 +1018,7 @@ static enum nrf_wifi_status umac_process_sys_events(struct nrf_wifi_fmac_dev_ctx
(struct nrf_wifi_event_raw_tx_done *)sys_head);
break;
#endif
#ifdef CONFIG_NRF700X_SYSTEM_MODE
#ifdef CONFIG_NRF700X_SYSTEM_WITH_RAW_MODES
case NRF_WIFI_EVENT_MODE_SET_DONE:
status = nrf_wifi_fmac_if_mode_set_event_proc(fmac_dev_ctx,
(struct nrf_wifi_event_raw_config_mode *)sys_head);
Expand Down
8 changes: 8 additions & 0 deletions nrf_wifi/fw_if/umac_if/src/fmac_api_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ static int nrf_wifi_patch_feature_flags_compat(struct nrf_wifi_fmac_dev_ctx *fma
"System mode feature flag not set");
return -1;
}
#elif defined(CONFIG_NRF700X_SYSTEM_WITH_RAW_MODES)
if (!(feature_flags & NRF70_FEAT_SYSTEM_WITH_RAW_MODES)) {
nrf_wifi_osal_log_err(fmac_dev_ctx->fpriv->opriv,
"System with raw modes feature flag not set");
return -1;
}
#else
nrf_wifi_osal_log_err(fmac_dev_ctx->fpriv->opriv,
"Invalid feature flags: 0x%x or build configuration",
Expand Down Expand Up @@ -1151,6 +1157,7 @@ enum nrf_wifi_status nrf_wifi_fmac_get_host_rpu_ps_ctrl_state(void *dev_ctx,
#endif /* CONFIG_NRF_WIFI_LOW_POWER */
#endif /* CONFIG_NRF700X_UTIL */

#ifdef CONFIG_NRF700X_SYSTEM_WITH_RAW_MODES
enum nrf_wifi_status nrf_wifi_fmac_set_mode(void *dev_ctx,
unsigned char if_idx,
unsigned char mode)
Expand Down Expand Up @@ -1192,6 +1199,7 @@ enum nrf_wifi_status nrf_wifi_fmac_set_mode(void *dev_ctx,
out:
return status;
}
#endif

#if defined(CONFIG_NRF700X_RAW_DATA_TX) || defined(CONFIG_NRF700X_RAW_DATA_RX)
enum nrf_wifi_status nrf_wifi_fmac_set_channel(void *dev_ctx,
Expand Down

0 comments on commit 2d90eef

Please sign in to comment.