[PATCH v3 1/8] initial UHR support
Johannes Berg
johannes at sipsolutions.net
Tue Apr 28 00:41:45 PDT 2026
On Mon, 2026-04-27 at 16:48 +0530, Raja Mani wrote:
>
> > +#ifdef CONFIG_IEEE80211BN
> > + if (hapd->iconf->ieee80211bn && !hapd->conf->disable_11bn) {
>
> Can the above line replaced with hostapd_is_uhr_enabled(hapd) ?
I guess. We still don't have that in our internal version, so evidently
I made an incomplete translation.
> > + if (hapd->iconf->require_uhr && !(sta->flags & WLAN_STA_UHR)) {
> > + hostapd_logger(hapd, sta->addr,
> > + HOSTAPD_MODULE_IEEE80211,
> > + HOSTAPD_LEVEL_INFO,
> > + "Station does not support mandatory UHR PHY - reject association");
> > + /* FIXME - need assignment from spec */
> > + return WLAN_STATUS_DENIED_EHT_NOT_SUPPORTED;
>
> 11bn draft 1.3 has defined the status code 157(DENIED_UHR_NOT_SUPPORTED)
> in section "9.4.1.9 Status Code field". Can this be replaced with that?
Oh, right, should be.
> > @@ -2296,6 +2297,24 @@ static void phy_info_iftype_copy(struct hostapd_hw_modes *mode,
> > nla_data(tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE]),
> > len);
> > }
> > +
> > + if (!tb[NL80211_BAND_IFTYPE_ATTR_UHR_CAP_MAC] ||
> > + !tb[NL80211_BAND_IFTYPE_ATTR_UHR_CAP_PHY])
> > + return;
> > +
> > + uhr_capab->uhr_supported = true;
> > +
> > + if (tb[NL80211_BAND_IFTYPE_ATTR_UHR_CAP_MAC] &&
> > + nla_len(tb[NL80211_BAND_IFTYPE_ATTR_UHR_CAP_MAC]) >= (int)sizeof(uhr_capab->mac))
> > + os_memcpy(uhr_capab->mac,
> > + nla_data(tb[NL80211_BAND_IFTYPE_ATTR_UHR_CAP_MAC]),
> > + sizeof(uhr_capab->mac));
>
> Just to consider minimum possible mac cap size for os_memcpy(),
> Can this be modified like this?
>
> if (tb[NL80211_BAND_IFTYPE_ATTR_UHR_CAP_MAC]) {
> len = nla_len(tb[NL80211_BAND_IFTYPE_ATTR_UHR_CAP_MAC]);
>
> if (len > sizeof(uhr_capab->mac))
> len = sizeof(uhr_capab->mac);
> os_memcpy(uhr_capab->mac,
> nla_data(tb[NL80211_BAND_IFTYPE_ATTR_UHR_CAP_MAC]),
> len);
> }
>
> and in the below hunk as well?
I don't follow. Why?
johannes
More information about the Hostap
mailing list