Skip to content

Commit 4a4741f

Browse files
MaochenWang1dleach02
authored andcommitted
middleware: wifi_nxp: add back signal_change_callbk_fn definition
The hostap side roaming patch is merged, so add the related wifi_nxp change back. Signed-off-by: Maochen Wang <[email protected]>
1 parent 6667778 commit 4a4741f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

mcux/middleware/wifi_nxp/wifidriver/wpa_supp_if/rtos_wpa_supp_if.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2669,6 +2669,25 @@ void wifi_nxp_wpa_supp_event_proc_dfs_cac_finished(void *if_priv, nxp_wifi_dfs_c
26692669
}
26702670
}
26712671

2672+
void wifi_nxp_wpa_supp_event_signal_change(void *if_priv, t_s16 *curr_rssi)
2673+
{
2674+
struct wifi_nxp_ctx_rtos *wifi_if_ctx_rtos = NULL;
2675+
union wpa_event_data event;
2676+
2677+
wifi_if_ctx_rtos = (struct wifi_nxp_ctx_rtos *)if_priv;
2678+
2679+
if (wifi_if_ctx_rtos == NULL)
2680+
{
2681+
wifi_e("%s: wifi_if_ctx_rtos is NULL", __func__);
2682+
return;
2683+
}
2684+
memset(&event, 0, sizeof(event));
2685+
event.signal_change.above_threshold = 0;
2686+
event.signal_change.current_signal = abs(*curr_rssi);
2687+
2688+
wifi_if_ctx_rtos->supp_callbk_fns.signal_change(wifi_if_ctx_rtos->supp_drv_if_ctx, &event);
2689+
}
2690+
26722691
#if CONFIG_WIFI_SOFTAP_SUPPORT
26732692
int wifi_nxp_wpa_supp_init_ap(void *if_priv, struct wpa_driver_associate_params *params)
26742693
{

mcux/middleware/wifi_nxp/wifidriver/wpa_supp_if/wifi_nxp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ static const wifi_nxp_callbk_fns_t supp_callbk_fns = {
162162
.mgmt_rx_callbk_fn = wifi_nxp_wpa_supp_event_proc_mgmt_rx,
163163
.get_wiphy_callbk_fn = wifi_nxp_wpa_supp_event_get_wiphy,
164164
.is_supp_scan_in_progress_callbk_fn = wifi_nxp_wpa_is_supp_scan_in_progress,
165+
.signal_change_callbk_fn = wifi_nxp_wpa_supp_event_signal_change,
165166
};
166167

167168
int wifi_supp_init(void)

0 commit comments

Comments
 (0)