nl80211: Generate EVENT_IBSS_RSN_START events
This is needed to trigger start of 4-way handshake when a new STA is detected in an RSN IBSS.
This commit is contained in:
parent
df4bc5091e
commit
18d2ba083b
1 changed files with 22 additions and 0 deletions
|
@ -1220,6 +1220,25 @@ static void nl80211_cqm_event(struct wpa_driver_nl80211_data *drv,
|
|||
}
|
||||
|
||||
|
||||
static void nl80211_new_station_event(struct wpa_driver_nl80211_data *drv,
|
||||
struct nlattr **tb)
|
||||
{
|
||||
u8 *addr;
|
||||
union wpa_event_data data;
|
||||
|
||||
if (tb[NL80211_ATTR_MAC] == NULL)
|
||||
return;
|
||||
addr = nla_data(tb[NL80211_ATTR_MAC]);
|
||||
wpa_printf(MSG_DEBUG, "nl80211: New station " MACSTR, MAC2STR(addr));
|
||||
if (drv->nlmode != NL80211_IFTYPE_ADHOC)
|
||||
return;
|
||||
|
||||
os_memset(&data, 0, sizeof(data));
|
||||
os_memcpy(data.ibss_rsn_start.peer, addr, ETH_ALEN);
|
||||
wpa_supplicant_event(drv->ctx, EVENT_IBSS_RSN_START, &data);
|
||||
}
|
||||
|
||||
|
||||
static int process_event(struct nl_msg *msg, void *arg)
|
||||
{
|
||||
struct wpa_driver_nl80211_data *drv = arg;
|
||||
|
@ -1330,6 +1349,9 @@ static int process_event(struct nl_msg *msg, void *arg)
|
|||
wpa_supplicant_event(drv->ctx, EVENT_CHANNEL_LIST_CHANGED,
|
||||
NULL);
|
||||
break;
|
||||
case NL80211_CMD_NEW_STATION:
|
||||
nl80211_new_station_event(drv, tb);
|
||||
break;
|
||||
default:
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Ignored unknown event "
|
||||
"(cmd=%d)", gnlh->cmd);
|
||||
|
|
Loading…
Reference in a new issue