Skip to content

Commit 6062fca

Browse files
committed
drivers: nrf_wifi: Remove station mode from monitor mode
Monitor mode doesn't require station mode. Disabling station mode require necessary changes to work monitor mode. Signed-off-by: Kapil Bhatt <[email protected]>
1 parent dfccb09 commit 6062fca

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

drivers/wifi/nrf_wifi/inc/fmac_main.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,19 @@ struct nrf_wifi_vif_ctx_zep {
6262
#ifdef CONFIG_NET_STATISTICS_ETHERNET
6363
struct net_stats_eth eth_stats;
6464
#endif /* CONFIG_NET_STATISTICS_ETHERNET */
65+
#if defined(CONFIG_NRF70_STA_MODE) || defined(CONFIG_NRF70_RAW_DATA_RX)
66+
unsigned char twt_flows_map;
67+
unsigned char twt_flow_in_progress_map;
68+
struct wifi_ps_config *ps_info;
69+
bool ps_config_info_evnt;
70+
bool authorized;
71+
#endif
6572
#ifdef CONFIG_NRF70_STA_MODE
6673
unsigned int assoc_freq;
6774
enum nrf_wifi_fmac_if_carr_state if_carr_state;
6875
struct wpa_signal_info *signal_info;
6976
struct wpa_conn_info *conn_info;
7077
struct zep_wpa_supp_dev_callbk_fns supp_callbk_fns;
71-
unsigned char twt_flows_map;
72-
unsigned char twt_flow_in_progress_map;
73-
struct wifi_ps_config *ps_info;
74-
bool ps_config_info_evnt;
75-
bool authorized;
7678
bool cookie_resp_received;
7779
#ifdef CONFIG_NRF70_DATA_TX
7880
struct k_work nrf_wifi_net_iface_work;

drivers/wifi/nrf_wifi/src/fmac_main.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ int nrf_wifi_reg_domain(const struct device *dev, struct wifi_reg_domain *reg_do
350350
goto out;
351351
}
352352

353-
#ifdef CONFIG_NRF70_SCAN_ONLY
353+
#ifdef CONFIG_NRF70_SCAN_ONLY || defined(CONFIG_NRF70_RAW_DATA_RX)
354354
if (reg_domain->oper == WIFI_MGMT_SET) {
355355
memcpy(reg_domain_info.alpha2, reg_domain->country_code, WIFI_COUNTRY_CODE_LEN);
356356

@@ -756,6 +756,7 @@ static int nrf_wifi_drv_main_zep(const struct device *dev)
756756
callbk_fns.scan_start_callbk_fn = nrf_wifi_event_proc_scan_start_zep;
757757
callbk_fns.scan_done_callbk_fn = nrf_wifi_event_proc_scan_done_zep;
758758
callbk_fns.reg_change_callbk_fn = reg_change_callbk_fn;
759+
callbk_fns.event_get_reg = nrf_wifi_event_get_reg_zep;
759760
#ifdef CONFIG_NET_L2_WIFI_MGMT
760761
callbk_fns.disp_scan_res_callbk_fn = nrf_wifi_event_proc_disp_scan_res_zep;
761762
#endif /* CONFIG_NET_L2_WIFI_MGMT */
@@ -769,7 +770,6 @@ static int nrf_wifi_drv_main_zep(const struct device *dev)
769770
callbk_fns.twt_config_callbk_fn = nrf_wifi_event_proc_twt_setup_zep;
770771
callbk_fns.twt_teardown_callbk_fn = nrf_wifi_event_proc_twt_teardown_zep;
771772
callbk_fns.twt_sleep_callbk_fn = nrf_wifi_event_proc_twt_sleep_zep;
772-
callbk_fns.event_get_reg = nrf_wifi_event_get_reg_zep;
773773
callbk_fns.event_get_ps_info = nrf_wifi_event_proc_get_power_save_info;
774774
callbk_fns.cookie_rsp_callbk_fn = nrf_wifi_event_proc_cookie_rsp;
775775
callbk_fns.process_rssi_from_rx = nrf_wifi_process_rssi_from_rx;
@@ -858,10 +858,12 @@ static struct wifi_mgmt_ops nrf_wifi_mgmt_ops = {
858858
.get_stats = nrf_wifi_stats_get,
859859
.reset_stats = nrf_wifi_stats_reset,
860860
#endif /* CONFIG_NET_STATISTICS_WIFI */
861+
#if defined(CONFIG_NRF70_STA_MODE) || defined(CONFIG_NRF70_RAW_DATA_RX)
862+
.reg_domain = nrf_wifi_reg_domain,
863+
#endif
861864
#ifdef CONFIG_NRF70_STA_MODE
862865
.set_power_save = nrf_wifi_set_power_save,
863866
.set_twt = nrf_wifi_set_twt,
864-
.reg_domain = nrf_wifi_reg_domain,
865867
.get_power_save_config = nrf_wifi_get_power_save_config,
866868
.set_rts_threshold = nrf_wifi_set_rts_threshold,
867869
.get_rts_threshold = nrf_wifi_get_rts_threshold,

0 commit comments

Comments
 (0)