From 2dd5fbbff884af488870a37e339b4817c83954de Mon Sep 17 00:00:00 2001 From: Dmitry Lebed Date: Wed, 4 Apr 2018 23:44:07 +0300 Subject: [PATCH] wpa_supplicant: Rename wpas_event_*() to wpas_ap_event_*() Rename DFS event handling functions, since they are located in ap.c and refer to AP-mode only. Needed to add some STA-mode DFS event handling. Signed-off-by: Dmitry Lebed --- wpa_supplicant/ap.c | 20 ++++++++++---------- wpa_supplicant/ap.h | 18 +++++++++--------- wpa_supplicant/events.c | 13 +++++++------ 3 files changed, 26 insertions(+), 25 deletions(-) diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c index 679b34600..fe7ffe1bd 100644 --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c @@ -1528,8 +1528,8 @@ int wpas_ap_pmksa_cache_add_external(struct wpa_supplicant *wpa_s, char *cmd) #ifdef NEED_AP_MLME -void wpas_event_dfs_radar_detected(struct wpa_supplicant *wpa_s, - struct dfs_event *radar) +void wpas_ap_event_dfs_radar_detected(struct wpa_supplicant *wpa_s, + struct dfs_event *radar) { if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0]) return; @@ -1541,8 +1541,8 @@ void wpas_event_dfs_radar_detected(struct wpa_supplicant *wpa_s, } -void wpas_event_dfs_cac_started(struct wpa_supplicant *wpa_s, - struct dfs_event *radar) +void wpas_ap_event_dfs_cac_started(struct wpa_supplicant *wpa_s, + struct dfs_event *radar) { if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0]) return; @@ -1553,8 +1553,8 @@ void wpas_event_dfs_cac_started(struct wpa_supplicant *wpa_s, } -void wpas_event_dfs_cac_finished(struct wpa_supplicant *wpa_s, - struct dfs_event *radar) +void wpas_ap_event_dfs_cac_finished(struct wpa_supplicant *wpa_s, + struct dfs_event *radar) { if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0]) return; @@ -1565,8 +1565,8 @@ void wpas_event_dfs_cac_finished(struct wpa_supplicant *wpa_s, } -void wpas_event_dfs_cac_aborted(struct wpa_supplicant *wpa_s, - struct dfs_event *radar) +void wpas_ap_event_dfs_cac_aborted(struct wpa_supplicant *wpa_s, + struct dfs_event *radar) { if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0]) return; @@ -1577,8 +1577,8 @@ void wpas_event_dfs_cac_aborted(struct wpa_supplicant *wpa_s, } -void wpas_event_dfs_cac_nop_finished(struct wpa_supplicant *wpa_s, - struct dfs_event *radar) +void wpas_ap_event_dfs_cac_nop_finished(struct wpa_supplicant *wpa_s, + struct dfs_event *radar) { if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0]) return; diff --git a/wpa_supplicant/ap.h b/wpa_supplicant/ap.h index 3fa656f7b..447b55186 100644 --- a/wpa_supplicant/ap.h +++ b/wpa_supplicant/ap.h @@ -89,16 +89,16 @@ int wpas_ap_pmksa_cache_list_mesh(struct wpa_supplicant *wpa_s, const u8 *addr, char *buf, size_t len); int wpas_ap_pmksa_cache_add_external(struct wpa_supplicant *wpa_s, char *cmd); -void wpas_event_dfs_radar_detected(struct wpa_supplicant *wpa_s, +void wpas_ap_event_dfs_radar_detected(struct wpa_supplicant *wpa_s, + struct dfs_event *radar); +void wpas_ap_event_dfs_cac_started(struct wpa_supplicant *wpa_s, struct dfs_event *radar); -void wpas_event_dfs_cac_started(struct wpa_supplicant *wpa_s, - struct dfs_event *radar); -void wpas_event_dfs_cac_finished(struct wpa_supplicant *wpa_s, - struct dfs_event *radar); -void wpas_event_dfs_cac_aborted(struct wpa_supplicant *wpa_s, - struct dfs_event *radar); -void wpas_event_dfs_cac_nop_finished(struct wpa_supplicant *wpa_s, - struct dfs_event *radar); +void wpas_ap_event_dfs_cac_finished(struct wpa_supplicant *wpa_s, + struct dfs_event *radar); +void wpas_ap_event_dfs_cac_aborted(struct wpa_supplicant *wpa_s, + struct dfs_event *radar); +void wpas_ap_event_dfs_cac_nop_finished(struct wpa_supplicant *wpa_s, + struct dfs_event *radar); void ap_periodic(struct wpa_supplicant *wpa_s); diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 7c5452802..36ae5f20a 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -4183,24 +4183,25 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event, #ifdef NEED_AP_MLME case EVENT_DFS_RADAR_DETECTED: if (data) - wpas_event_dfs_radar_detected(wpa_s, &data->dfs_event); + wpas_ap_event_dfs_radar_detected(wpa_s, + &data->dfs_event); break; case EVENT_DFS_CAC_STARTED: if (data) - wpas_event_dfs_cac_started(wpa_s, &data->dfs_event); + wpas_ap_event_dfs_cac_started(wpa_s, &data->dfs_event); break; case EVENT_DFS_CAC_FINISHED: if (data) - wpas_event_dfs_cac_finished(wpa_s, &data->dfs_event); + wpas_ap_event_dfs_cac_finished(wpa_s, &data->dfs_event); break; case EVENT_DFS_CAC_ABORTED: if (data) - wpas_event_dfs_cac_aborted(wpa_s, &data->dfs_event); + wpas_ap_event_dfs_cac_aborted(wpa_s, &data->dfs_event); break; case EVENT_DFS_NOP_FINISHED: if (data) - wpas_event_dfs_cac_nop_finished(wpa_s, - &data->dfs_event); + wpas_ap_event_dfs_cac_nop_finished(wpa_s, + &data->dfs_event); break; #endif /* NEED_AP_MLME */ #endif /* CONFIG_AP */