Support BTM operations in wpa_supplicant AP mode
Extend AP mode BTM control interface commands to work from wpa_supplicant in additiona to the previously support hostapd case. Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
This commit is contained in:
parent
0f8c6e9955
commit
febcdf3243
3 changed files with 56 additions and 0 deletions
|
@ -1569,6 +1569,47 @@ int ap_ctrl_iface_wpa_get_status(struct wpa_supplicant *wpa_s, char *buf,
|
||||||
return pos - buf;
|
return pos - buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef CONFIG_WNM_AP
|
||||||
|
|
||||||
|
int ap_ctrl_iface_disassoc_imminent(struct wpa_supplicant *wpa_s,
|
||||||
|
const char *buf)
|
||||||
|
{
|
||||||
|
struct hostapd_data *hapd;
|
||||||
|
|
||||||
|
if (wpa_s->ap_iface)
|
||||||
|
hapd = wpa_s->ap_iface->bss[0];
|
||||||
|
else
|
||||||
|
return -1;
|
||||||
|
return hostapd_ctrl_iface_disassoc_imminent(hapd, buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int ap_ctrl_iface_ess_disassoc(struct wpa_supplicant *wpa_s, const char *buf)
|
||||||
|
{
|
||||||
|
struct hostapd_data *hapd;
|
||||||
|
|
||||||
|
if (wpa_s->ap_iface)
|
||||||
|
hapd = wpa_s->ap_iface->bss[0];
|
||||||
|
else
|
||||||
|
return -1;
|
||||||
|
return hostapd_ctrl_iface_ess_disassoc(hapd, buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int ap_ctrl_iface_bss_tm_req(struct wpa_supplicant *wpa_s, const char *buf)
|
||||||
|
{
|
||||||
|
struct hostapd_data *hapd;
|
||||||
|
|
||||||
|
if (wpa_s->ap_iface)
|
||||||
|
hapd = wpa_s->ap_iface->bss[0];
|
||||||
|
else
|
||||||
|
return -1;
|
||||||
|
return hostapd_ctrl_iface_bss_tm_req(hapd, buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* CONFIG_WNM_AP */
|
||||||
|
|
||||||
#endif /* CONFIG_CTRL_IFACE */
|
#endif /* CONFIG_CTRL_IFACE */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,10 @@ int ap_ctrl_iface_sta_disassociate(struct wpa_supplicant *wpa_s,
|
||||||
const char *txtaddr);
|
const char *txtaddr);
|
||||||
int ap_ctrl_iface_wpa_get_status(struct wpa_supplicant *wpa_s, char *buf,
|
int ap_ctrl_iface_wpa_get_status(struct wpa_supplicant *wpa_s, char *buf,
|
||||||
size_t buflen, int verbose);
|
size_t buflen, int verbose);
|
||||||
|
int ap_ctrl_iface_disassoc_imminent(struct wpa_supplicant *wpa_s,
|
||||||
|
const char *buf);
|
||||||
|
int ap_ctrl_iface_ess_disassoc(struct wpa_supplicant *wpa_s, const char *buf);
|
||||||
|
int ap_ctrl_iface_bss_tm_req(struct wpa_supplicant *wpa_s, const char *buf);
|
||||||
void ap_tx_status(void *ctx, const u8 *addr,
|
void ap_tx_status(void *ctx, const u8 *addr,
|
||||||
const u8 *buf, size_t len, int ack);
|
const u8 *buf, size_t len, int ack);
|
||||||
void ap_eapol_tx_status(void *ctx, const u8 *dst,
|
void ap_eapol_tx_status(void *ctx, const u8 *dst,
|
||||||
|
|
|
@ -12117,6 +12117,17 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
|
||||||
if (wpas_ctrl_iface_coloc_intf_report(wpa_s, buf + 18))
|
if (wpas_ctrl_iface_coloc_intf_report(wpa_s, buf + 18))
|
||||||
reply_len = -1;
|
reply_len = -1;
|
||||||
#endif /* CONFIG_WNM */
|
#endif /* CONFIG_WNM */
|
||||||
|
#ifdef CONFIG_WNM_AP
|
||||||
|
} else if (os_strncmp(buf, "DISASSOC_IMMINENT ", 18) == 0) {
|
||||||
|
if (ap_ctrl_iface_disassoc_imminent(wpa_s, buf + 18))
|
||||||
|
reply_len = -1;
|
||||||
|
} else if (os_strncmp(buf, "ESS_DISASSOC ", 13) == 0) {
|
||||||
|
if (ap_ctrl_iface_ess_disassoc(wpa_s, buf + 13))
|
||||||
|
reply_len = -1;
|
||||||
|
} else if (os_strncmp(buf, "BSS_TM_REQ ", 11) == 0) {
|
||||||
|
if (ap_ctrl_iface_bss_tm_req(wpa_s, buf + 11))
|
||||||
|
reply_len = -1;
|
||||||
|
#endif /* CONFIG_WNM_AP */
|
||||||
} else if (os_strcmp(buf, "FLUSH") == 0) {
|
} else if (os_strcmp(buf, "FLUSH") == 0) {
|
||||||
wpa_supplicant_ctrl_iface_flush(wpa_s);
|
wpa_supplicant_ctrl_iface_flush(wpa_s);
|
||||||
} else if (os_strncmp(buf, "RADIO_WORK ", 11) == 0) {
|
} else if (os_strncmp(buf, "RADIO_WORK ", 11) == 0) {
|
||||||
|
|
Loading…
Reference in a new issue