Bug 274156 - ic->ic_vhtcaps check in ieee80211_setupcurchan
Summary: ic->ic_vhtcaps check in ieee80211_setupcurchan
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: wireless (show other bugs)
Version: 13.2-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-wireless (Nobody)
URL:
Keywords:
Depends on:
Blocks: 283171
  Show dependency treegraph
 
Reported: 2023-09-29 12:45 UTC by Mikhail Pchelin
Modified: 2024-12-07 01:00 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Pchelin freebsd_committer freebsd_triage 2023-09-29 12:45:26 UTC
https://github.com/freebsd/freebsd-src/blob/main/sys/net80211/ieee80211_node.c#L807

this code checks ic->ic_vhtcaps and proceeds only if it's non-zero, but I wasn't able to find any mandatory non-zero vht caps, which must be always present, IEEE80211_VHTCAP_MAX_MPDU_LENGTH_3895, which is the "default" is zero itself and doesn't influence the variable

this means that if a driver doesn't set the variable to at least something non-zero (for example non-default ampdu) - it will never get connected with 11ac, although it can be capable of doing it

code snippet:

	/*
	 * VHT promotion - this will at least promote to VHT20/40
	 * based on what HT has done; it may further promote the
	 * channel to VHT80 or above.
	 */
	if (ic->ic_vhtcaps != 0) {
		int flags = getvhtadjustflags(ic);
		if (flags > ieee80211_vhtchanflags(c))
			c = ieee80211_vht_adjust_channel(ic, c, flags);
	}
Comment 1 Bjoern A. Zeeb freebsd_committer freebsd_triage 2023-09-30 08:38:26 UTC
There's more to fix for VHT.
I have changes to bits in ieee80211_vht.c as well queued in a branch.
I'll drop you and email out of band.