Add AP channel switch mechanism
Build CSA settings and call the driver to perform the switch. Construct Beacon, Probe Response, and (Re)Association Response frames both for CSA period and for the new channel. These frames are built based on the current configuration. Add CSA IE in Beacon and Probe Response frames. Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
This commit is contained in:
parent
e44a384b68
commit
bf281c129f
9 changed files with 317 additions and 2 deletions
|
@ -1058,6 +1058,20 @@ int wpa_supplicant_ap_update_beacon(struct wpa_supplicant *wpa_s)
|
|||
}
|
||||
|
||||
|
||||
int ap_switch_channel(struct wpa_supplicant *wpa_s,
|
||||
struct csa_settings *settings)
|
||||
{
|
||||
#ifdef NEED_AP_MLME
|
||||
if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0])
|
||||
return -1;
|
||||
|
||||
return hostapd_switch_channel(wpa_s->ap_iface->bss[0], settings);
|
||||
#else /* NEED_AP_MLME */
|
||||
return -1;
|
||||
#endif /* NEED_AP_MLME */
|
||||
}
|
||||
|
||||
|
||||
void wpas_ap_ch_switch(struct wpa_supplicant *wpa_s, int freq, int ht,
|
||||
int offset)
|
||||
{
|
||||
|
|
|
@ -50,6 +50,8 @@ int wpa_supplicant_ap_update_beacon(struct wpa_supplicant *wpa_s);
|
|||
int wpa_supplicant_ap_mac_addr_filter(struct wpa_supplicant *wpa_s,
|
||||
const u8 *addr);
|
||||
void wpa_supplicant_ap_pwd_auth_fail(struct wpa_supplicant *wpa_s);
|
||||
int ap_switch_channel(struct wpa_supplicant *wpa_s,
|
||||
struct csa_settings *settings);
|
||||
void wpas_ap_ch_switch(struct wpa_supplicant *wpa_s, int freq, int ht,
|
||||
int offset);
|
||||
struct wpabuf * wpas_ap_wps_nfc_config_token(struct wpa_supplicant *wpa_s,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue