FILS: Move phy index determination to new function
Move the phy index determination for FILS discovery frames to a new function without changing the functionality. HE support is mandatory for operating in the 6 GHz band hence the phy index will always be set to FD_CAP_PHY_INDEX_HE for this band. Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
This commit is contained in:
parent
015af1beea
commit
24e0938b37
1 changed files with 21 additions and 16 deletions
|
@ -1375,9 +1375,28 @@ void sta_track_del(struct hostapd_sta_info *info)
|
||||||
|
|
||||||
#ifdef CONFIG_FILS
|
#ifdef CONFIG_FILS
|
||||||
|
|
||||||
|
static u16 hostapd_gen_fils_discovery_phy_index(struct hostapd_data *hapd)
|
||||||
|
{
|
||||||
|
#ifdef CONFIG_IEEE80211AX
|
||||||
|
if (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax)
|
||||||
|
return FD_CAP_PHY_INDEX_HE;
|
||||||
|
#endif /* CONFIG_IEEE80211AX */
|
||||||
|
|
||||||
|
#ifdef CONFIG_IEEE80211AC
|
||||||
|
if (hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac)
|
||||||
|
return FD_CAP_PHY_INDEX_VHT;
|
||||||
|
#endif /* CONFIG_IEEE80211AC */
|
||||||
|
|
||||||
|
if (hapd->iconf->ieee80211n && !hapd->conf->disable_11n)
|
||||||
|
return FD_CAP_PHY_INDEX_HT;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static u16 hostapd_fils_discovery_cap(struct hostapd_data *hapd)
|
static u16 hostapd_fils_discovery_cap(struct hostapd_data *hapd)
|
||||||
{
|
{
|
||||||
u16 cap_info, phy_index = 0;
|
u16 cap_info, phy_index;
|
||||||
u8 chwidth = FD_CAP_BSS_CHWIDTH_20, mcs_nss_size = 4;
|
u8 chwidth = FD_CAP_BSS_CHWIDTH_20, mcs_nss_size = 4;
|
||||||
struct hostapd_hw_modes *mode = hapd->iface->current_mode;
|
struct hostapd_hw_modes *mode = hapd->iface->current_mode;
|
||||||
|
|
||||||
|
@ -1386,8 +1405,6 @@ static u16 hostapd_fils_discovery_cap(struct hostapd_data *hapd)
|
||||||
cap_info |= FD_CAP_PRIVACY;
|
cap_info |= FD_CAP_PRIVACY;
|
||||||
|
|
||||||
if (is_6ghz_op_class(hapd->iconf->op_class)) {
|
if (is_6ghz_op_class(hapd->iconf->op_class)) {
|
||||||
phy_index = FD_CAP_PHY_INDEX_HE;
|
|
||||||
|
|
||||||
switch (hapd->iconf->op_class) {
|
switch (hapd->iconf->op_class) {
|
||||||
case 137:
|
case 137:
|
||||||
chwidth = FD_CAP_BSS_CHWIDTH_320;
|
chwidth = FD_CAP_BSS_CHWIDTH_320;
|
||||||
|
@ -1427,21 +1444,9 @@ static u16 hostapd_fils_discovery_cap(struct hostapd_data *hapd)
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_IEEE80211AX
|
|
||||||
if (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax)
|
|
||||||
phy_index = FD_CAP_PHY_INDEX_HE;
|
|
||||||
#endif /* CONFIG_IEEE80211AX */
|
|
||||||
#ifdef CONFIG_IEEE80211AC
|
|
||||||
if (!phy_index &&
|
|
||||||
hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac)
|
|
||||||
phy_index = FD_CAP_PHY_INDEX_VHT;
|
|
||||||
#endif /* CONFIG_IEEE80211AC */
|
|
||||||
if (!phy_index &&
|
|
||||||
hapd->iconf->ieee80211n && !hapd->conf->disable_11n)
|
|
||||||
phy_index = FD_CAP_PHY_INDEX_HT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
phy_index = hostapd_gen_fils_discovery_phy_index(hapd);
|
||||||
cap_info |= phy_index << FD_CAP_PHY_INDEX_SHIFT;
|
cap_info |= phy_index << FD_CAP_PHY_INDEX_SHIFT;
|
||||||
cap_info |= chwidth << FD_CAP_BSS_CHWIDTH_SHIFT;
|
cap_info |= chwidth << FD_CAP_BSS_CHWIDTH_SHIFT;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue