int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr,
- const u8 *ie, size_t ielen)
+ const u8 *ie, size_t ielen, int reassoc)
{
struct sta_info *sta;
int new_assoc, res;
case EVENT_ASSOC:
hostapd_notif_assoc(hapd, data->assoc_info.addr,
data->assoc_info.req_ies,
- data->assoc_info.req_ies_len);
+ data->assoc_info.req_ies_len,
+ data->assoc_info.reassoc);
break;
case EVENT_DISASSOC:
if (data)
/* drv_callbacks.c (TODO: move to somewhere else?) */
int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr,
- const u8 *ie, size_t ielen);
+ const u8 *ie, size_t ielen, int reassoc);
void hostapd_notif_disassoc(struct hostapd_data *hapd, const u8 *addr);
void hostapd_event_sta_low_ack(struct hostapd_data *hapd, const u8 *addr);
int hostapd_probe_req_rx(struct hostapd_data *hapd, const u8 *sa,
* calls.
*/
struct assoc_info {
+ /**
+ * reassoc - Flag to indicate association or reassociation
+ */
+ int reassoc;
+
/**
* req_ies - (Re)Association Request IEs
*
*/
static inline void drv_event_assoc(void *ctx, const u8 *addr, const u8 *ie,
- size_t ielen)
+ size_t ielen, int reassoc)
{
union wpa_event_data event;
os_memset(&event, 0, sizeof(event));
+ event.assoc_info.reassoc = reassoc;
event.assoc_info.req_ies = ie;
event.assoc_info.req_ies_len = ielen;
event.assoc_info.addr = addr;
ielen += 2;
no_ie:
- drv_event_assoc(hapd, addr, iebuf, ielen);
+ drv_event_assoc(hapd, addr, iebuf, ielen, 0);
if (memcmp(addr, drv->acct_mac, ETH_ALEN) == 0) {
/* Cached accounting data is not valid anymore. */
ielen += 2;
no_ie:
- drv_event_assoc(ctx, addr, iebuf, ielen);
+ drv_event_assoc(ctx, addr, iebuf, ielen, 0);
}
static int
ielen += 2;
no_ie:
- drv_event_assoc(hapd, addr, iebuf, ielen);
+ drv_event_assoc(hapd, addr, iebuf, ielen, 0);
if (memcmp(addr, drv->acct_mac, ETH_ALEN) == 0) {
/* Cached accounting data is not valid anymore. */
sendto(drv->test_socket, cmd, strlen(cmd), 0,
(struct sockaddr *) from, fromlen);
- drv_event_assoc(bss->bss_ctx, cli->addr, ie, ielen);
+ drv_event_assoc(bss->bss_ctx, cli->addr, ie, ielen, 0);
}
hostapd_notif_assoc(wpa_s->ap_iface->bss[0],
data->assoc_info.addr,
data->assoc_info.req_ies,
- data->assoc_info.req_ies_len);
+ data->assoc_info.req_ies_len,
+ data->assoc_info.reassoc);
return;
}
#endif /* CONFIG_AP */