[PATCH v2 5/7] initial UHR support

Johannes Berg johannes at sipsolutions.net
Thu Mar 19 02:31:18 PDT 2026


On Thu, 2026-03-19 at 14:47 +0530, Raja Mani wrote:
> 
> > +size_t hostapd_eid_uhr_capab_len(struct hostapd_data *hapd,
> > +				 enum ieee80211_op_mode opmode)
> > +{
> > +	struct hostapd_hw_modes *mode;
> > +	struct uhr_capabilities *uhr_cap;
> > +
> > +	mode = hapd->iface->current_mode;
> > +	if (!mode)
> > +		return 0;
> > +
> > +	uhr_cap = &mode->uhr_capab[opmode];
> > +	if (!uhr_cap->uhr_supported)
> > +		return 0;
> > +
> > +	return 6;
> 
> I hope, 6 bytes refers to mac(5 bytes) + phy(1 bytes). Don't we have
> to include addtional 3 byte here (or) in the caller to accomodate header
> (eid (1 byte), len(1 byte), ext eid(1 byte) ?

Hmm, yes, I guess it should indeed.

> > +u8 * hostapd_eid_uhr_operation(struct hostapd_data *hapd, u8 *eid, bool beacon)
> > +{
> > +	struct ieee80211_uhr_operation *oper;
> > +	u8 *pos = eid;
> > +
> > +	if (!hapd->iface->current_mode)
> > +		return eid;
> > +
> > +	*pos++ = WLAN_EID_EXTENSION;
> > +	*pos++ = 1 + sizeof(*oper);
> > +	*pos++ = WLAN_EID_EXT_UHR_OPERATION;
> > +
> > +	oper = (void *) pos;
> 
> Any specific reason for using 'void *' conversion instead of 'struct
> ieee80211_uhr_operation *' ?

Not really, less to type? If you're not using AI ;-)

> >   	struct eht_capabilities eht_capab[IEEE80211_MODE_NUM];
> > +
> > +	/**
> > +	 * uhr_capab - UHR (IEEE 802.11bb) capabilities
> 
> s/802.11bb/802.11bn

Oops, thanks.

I guess since these are trivial fixes I'm not going to repost
immediately.

johannes



More information about the Hostap mailing list