hostapd: Added signal level to STA tracking

Add signal level information to the station tracking information. Also
make it available via the "TRACK_STA_LIST" control command.

Signed-off-by: Kevin Mahoney <k.mahoney@cablelabs.com>
This commit is contained in:
Kevin Mahoney 2016-10-18 22:07:13 +00:00 committed by Jouni Malinen
parent a1047f55b8
commit a818425d1c
5 changed files with 10 additions and 6 deletions

View file

@ -623,7 +623,7 @@ static struct hostapd_sta_info * sta_track_get(struct hostapd_iface *iface,
}
void sta_track_add(struct hostapd_iface *iface, const u8 *addr)
void sta_track_add(struct hostapd_iface *iface, const u8 *addr, int ssi_signal)
{
struct hostapd_sta_info *info;
@ -633,6 +633,7 @@ void sta_track_add(struct hostapd_iface *iface, const u8 *addr)
dl_list_del(&info->list);
dl_list_add_tail(&iface->sta_seen, &info->list);
os_get_reltime(&info->last_seen);
info->ssi_signal = ssi_signal;
return;
}
@ -642,6 +643,7 @@ void sta_track_add(struct hostapd_iface *iface, const u8 *addr)
return;
os_memcpy(info->addr, addr, ETH_ALEN);
os_get_reltime(&info->last_seen);
info->ssi_signal = ssi_signal;
if (iface->num_sta_seen >= iface->conf->track_sta_max_num) {
/* Expire oldest entry to make room for a new one */
@ -717,7 +719,7 @@ void handle_probe_req(struct hostapd_data *hapd,
return;
ie = ((const u8 *) mgmt) + IEEE80211_HDRLEN;
if (hapd->iconf->track_sta_max_num)
sta_track_add(hapd->iface, mgmt->sa);
sta_track_add(hapd->iface, mgmt->sa, ssi_signal);
ie_len = len - IEEE80211_HDRLEN;
for (i = 0; hapd->probereq_cb && i < hapd->num_probereq_cb; i++)