mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
wpa_supplicant: Make channel switch event available for non-AP builds
This allows user to get channel switch indication in station mode even if wpa_supplicant is built without CONFIG_AP=y. Signed-off-by: Bhagavathi Perumal S <bperumal@codeaurora.org>
This commit is contained in:
parent
f98fdc4e4b
commit
d57e06170b
@ -4230,6 +4230,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
|||||||
ap_rx_from_unknown_sta(wpa_s, data->rx_from_unknown.addr,
|
ap_rx_from_unknown_sta(wpa_s, data->rx_from_unknown.addr,
|
||||||
data->rx_from_unknown.wds);
|
data->rx_from_unknown.wds);
|
||||||
break;
|
break;
|
||||||
|
#endif /* CONFIG_AP */
|
||||||
case EVENT_CH_SWITCH:
|
case EVENT_CH_SWITCH:
|
||||||
if (!data || !wpa_s->current_ssid)
|
if (!data || !wpa_s->current_ssid)
|
||||||
break;
|
break;
|
||||||
@ -4246,6 +4247,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
|||||||
wpa_s->assoc_freq = data->ch_switch.freq;
|
wpa_s->assoc_freq = data->ch_switch.freq;
|
||||||
wpa_s->current_ssid->frequency = data->ch_switch.freq;
|
wpa_s->current_ssid->frequency = data->ch_switch.freq;
|
||||||
|
|
||||||
|
#ifdef CONFIG_AP
|
||||||
if (wpa_s->current_ssid->mode == WPAS_MODE_AP ||
|
if (wpa_s->current_ssid->mode == WPAS_MODE_AP ||
|
||||||
wpa_s->current_ssid->mode == WPAS_MODE_P2P_GO ||
|
wpa_s->current_ssid->mode == WPAS_MODE_P2P_GO ||
|
||||||
wpa_s->current_ssid->mode ==
|
wpa_s->current_ssid->mode ==
|
||||||
@ -4257,9 +4259,11 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
|||||||
data->ch_switch.cf1,
|
data->ch_switch.cf1,
|
||||||
data->ch_switch.cf2);
|
data->ch_switch.cf2);
|
||||||
}
|
}
|
||||||
|
#endif /* CONFIG_AP */
|
||||||
|
|
||||||
wpas_p2p_update_channel_list(wpa_s, WPAS_P2P_CHANNEL_UPDATE_CS);
|
wpas_p2p_update_channel_list(wpa_s, WPAS_P2P_CHANNEL_UPDATE_CS);
|
||||||
break;
|
break;
|
||||||
|
#ifdef CONFIG_AP
|
||||||
#ifdef NEED_AP_MLME
|
#ifdef NEED_AP_MLME
|
||||||
case EVENT_DFS_RADAR_DETECTED:
|
case EVENT_DFS_RADAR_DETECTED:
|
||||||
if (data)
|
if (data)
|
||||||
|
Loading…
Reference in New Issue
Block a user