hostapd: Save RM enabled capability of station
Save RM enabled capability element of an associating station if radio measurement is supported in its capability field. Signed-off-by: David Spinadel <david.spinadel@intel.com>
This commit is contained in:
parent
2572df34b2
commit
629e1804da
4 changed files with 20 additions and 1 deletions
|
@ -1749,6 +1749,12 @@ static u16 check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
ap_copy_sta_supp_op_classes(sta, elems.supp_op_classes,
|
ap_copy_sta_supp_op_classes(sta, elems.supp_op_classes,
|
||||||
elems.supp_op_classes_len);
|
elems.supp_op_classes_len);
|
||||||
|
|
||||||
|
if ((sta->capability & WLAN_CAPABILITY_RADIO_MEASUREMENT) &&
|
||||||
|
elems.rrm_enabled &&
|
||||||
|
elems.rrm_enabled_len >= sizeof(sta->rrm_enabled_capa))
|
||||||
|
os_memcpy(sta->rrm_enabled_capa, elems.rrm_enabled,
|
||||||
|
sizeof(sta->rrm_enabled_capa));
|
||||||
|
|
||||||
return WLAN_STATUS_SUCCESS;
|
return WLAN_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2094,6 +2100,12 @@ static void handle_assoc(struct hostapd_data *hapd,
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_MBO */
|
#endif /* CONFIG_MBO */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* sta->capability is used in check_assoc_ies() for RRM enabled
|
||||||
|
* capability element.
|
||||||
|
*/
|
||||||
|
sta->capability = capab_info;
|
||||||
|
|
||||||
/* followed by SSID and Supported rates; and HT capabilities if 802.11n
|
/* followed by SSID and Supported rates; and HT capabilities if 802.11n
|
||||||
* is used */
|
* is used */
|
||||||
resp = check_assoc_ies(hapd, sta, pos, left, reassoc);
|
resp = check_assoc_ies(hapd, sta, pos, left, reassoc);
|
||||||
|
@ -2107,7 +2119,6 @@ static void handle_assoc(struct hostapd_data *hapd,
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
sta->capability = capab_info;
|
|
||||||
sta->listen_interval = listen_interval;
|
sta->listen_interval = listen_interval;
|
||||||
|
|
||||||
if (hapd->iface->current_mode->mode == HOSTAPD_MODE_IEEE80211G)
|
if (hapd->iface->current_mode->mode == HOSTAPD_MODE_IEEE80211G)
|
||||||
|
|
|
@ -202,6 +202,8 @@ struct sta_info {
|
||||||
|
|
||||||
u8 *supp_op_classes; /* Supported Operating Classes element, if
|
u8 *supp_op_classes; /* Supported Operating Classes element, if
|
||||||
* received, starting from the Length field */
|
* received, starting from the Length field */
|
||||||
|
|
||||||
|
u8 rrm_enabled_capa[5];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -375,6 +375,10 @@ ParseRes ieee802_11_parse_elems(const u8 *start, size_t len,
|
||||||
elems->supp_op_classes = pos;
|
elems->supp_op_classes = pos;
|
||||||
elems->supp_op_classes_len = elen;
|
elems->supp_op_classes_len = elen;
|
||||||
break;
|
break;
|
||||||
|
case WLAN_EID_RRM_ENABLED_CAPABILITIES:
|
||||||
|
elems->rrm_enabled = pos;
|
||||||
|
elems->rrm_enabled_len = elen;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
unknown++;
|
unknown++;
|
||||||
if (!show_errors)
|
if (!show_errors)
|
||||||
|
|
|
@ -63,6 +63,7 @@ struct ieee802_11_elems {
|
||||||
const u8 *mic;
|
const u8 *mic;
|
||||||
const u8 *pref_freq_list;
|
const u8 *pref_freq_list;
|
||||||
const u8 *supp_op_classes;
|
const u8 *supp_op_classes;
|
||||||
|
const u8 *rrm_enabled;
|
||||||
|
|
||||||
u8 ssid_len;
|
u8 ssid_len;
|
||||||
u8 supp_rates_len;
|
u8 supp_rates_len;
|
||||||
|
@ -94,6 +95,7 @@ struct ieee802_11_elems {
|
||||||
u8 mic_len;
|
u8 mic_len;
|
||||||
u8 pref_freq_list_len;
|
u8 pref_freq_list_len;
|
||||||
u8 supp_op_classes_len;
|
u8 supp_op_classes_len;
|
||||||
|
u8 rrm_enabled_len;
|
||||||
|
|
||||||
struct mb_ies_info mb_ies;
|
struct mb_ies_info mb_ies;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue