[PATCH wireless-next v3] wifi: mac80211: Add eMLSR/eMLMR action frame parsing support

Johannes Berg johannes at sipsolutions.net
Wed Jan 28 03:50:01 PST 2026


I probably missed this the last time already:

> +	if ((control & IEEE80211_EML_CTRL_EMLSR_MODE) ||
> +	    (control & IEEE80211_EML_CTRL_EMLMR_MODE)) {
> +		eml_params.link_bitmap = get_unaligned_le16(ptr);
> +		if (eml_params.link_bitmap &&

Surely 0 is an invalid bitmap? To disable it, you send a frame without
IEEE80211_EML_CTRL_EMLSR_MODE or IEEE80211_EML_CTRL_EMLMR_MODE set, so I
don't see how an empty bitmap would be valid?

> +		    !(eml_params.link_bitmap & sdata->vif.active_links))

That's the wrong check, I think? It only checks that you have any
overlap, but we need all bits to be valid, i.e. only

		(link_bitmap & active_links) == link_bitmap

is valid, no?

> +			return;
> +	}
> +
> +	if (drv_set_eml_op_mode(sdata, &sta->sta, &eml_params))
> +		return;
> +
> +	ieee80211_send_eml_op_mode_notif(sdata, mgmt, opt_len);

IMHO it would make more sense to pass "ptr, opt_len" rather than "mgmt,
opt_len", since that's just what gets copied and then the callee doesn't
need to dig it out.

johannes



More information about the Linux-mediatek mailing list