hostapd: Add ctrl iface indications for WDS STA interface
This allows user to get event indication when a new interface is added/removed for 4addr WDS STA and also WDS STA ifname is informed through the STA command. Signed-off-by: Bhagavathi Perumal S <bperumal@codeaurora.org>
This commit is contained in:
parent
2598e69303
commit
1952b626ba
8 changed files with 77 additions and 0 deletions
|
@ -1481,6 +1481,28 @@ static void hostapd_event_dfs_cac_started(struct hostapd_data *hapd,
|
|||
#endif /* NEED_AP_MLME */
|
||||
|
||||
|
||||
static void hostapd_event_wds_sta_interface_status(struct hostapd_data *hapd,
|
||||
int istatus,
|
||||
const char *ifname,
|
||||
const u8 *addr)
|
||||
{
|
||||
struct sta_info *sta = ap_get_sta(hapd, addr);
|
||||
|
||||
if (sta) {
|
||||
os_free(sta->ifname_wds);
|
||||
if (istatus == INTERFACE_ADDED)
|
||||
sta->ifname_wds = os_strdup(ifname);
|
||||
else
|
||||
sta->ifname_wds = NULL;
|
||||
}
|
||||
|
||||
wpa_msg(hapd->msg_ctx, MSG_INFO, "%sifname=%s sta_addr=" MACSTR,
|
||||
istatus == INTERFACE_ADDED ?
|
||||
WDS_STA_INTERFACE_ADDED : WDS_STA_INTERFACE_REMOVED,
|
||||
ifname, MAC2STR(addr));
|
||||
}
|
||||
|
||||
|
||||
void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
union wpa_event_data *data)
|
||||
{
|
||||
|
@ -1695,6 +1717,12 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
|||
data->sta_opmode.chan_width,
|
||||
data->sta_opmode.rx_nss);
|
||||
break;
|
||||
case EVENT_WDS_STA_INTERFACE_STATUS:
|
||||
hostapd_event_wds_sta_interface_status(
|
||||
hapd, data->wds_sta_interface.istatus,
|
||||
data->wds_sta_interface.ifname,
|
||||
data->wds_sta_interface.sta_addr);
|
||||
break;
|
||||
default:
|
||||
wpa_printf(MSG_DEBUG, "Unknown event %d", event);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue