Skip to content

Commit

Permalink
net80211/ifconfig: swap IEEE80211_FVHT_USEVHT160 and 80P80
Browse files Browse the repository at this point in the history
ieee80211_setupcurchan() compares the flags in a greater than manner.
In this case VHT160 should be > VHT80P80 as it is preferable.
Swap the two flags and add a comment to note this.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	adrian
Differential Revision: https://reviews.freebsd.org/D48976

(cherry picked from commit 8f2e5b6ef32304ce340b91057b1eb4b191dbeac1)
  • Loading branch information
Bjoern A. Zeeb authored and fichtner committed Feb 25, 2025
1 parent accbbd1 commit e47898e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sbin/ifconfig/ifieee80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@
#define IEEE80211_FVHT_VHT 0x000000001 /* CONF: VHT supported */
#define IEEE80211_FVHT_USEVHT40 0x000000002 /* CONF: Use VHT40 */
#define IEEE80211_FVHT_USEVHT80 0x000000004 /* CONF: Use VHT80 */
#define IEEE80211_FVHT_USEVHT160 0x000000008 /* CONF: Use VHT160 */
#define IEEE80211_FVHT_USEVHT80P80 0x000000010 /* CONF: Use VHT 80+80 */
#define IEEE80211_FVHT_USEVHT80P80 0x000000008 /* CONF: Use VHT 80+80 */
#define IEEE80211_FVHT_USEVHT160 0x000000010 /* CONF: Use VHT160 */
#define IEEE80211_FVHT_STBC_TX 0x00000020 /* CONF: STBC tx enabled */
#define IEEE80211_FVHT_STBC_RX 0x00000040 /* CONF: STBC rx enabled */
#endif
Expand Down
8 changes: 6 additions & 2 deletions sys/net80211/ieee80211_var.h
Original file line number Diff line number Diff line change
Expand Up @@ -728,11 +728,15 @@ MALLOC_DECLARE(M_80211_VAP);

#define IEEE80211_FVEN_BITS "\20"

/*
* These flags are compared in ieee80211_setupcurchan().
* Thus 160 should be > 80P80.
*/
#define IEEE80211_FVHT_VHT 0x000000001 /* CONF: VHT supported */
#define IEEE80211_FVHT_USEVHT40 0x000000002 /* CONF: Use VHT40 */
#define IEEE80211_FVHT_USEVHT80 0x000000004 /* CONF: Use VHT80 */
#define IEEE80211_FVHT_USEVHT160 0x000000008 /* CONF: Use VHT160 */
#define IEEE80211_FVHT_USEVHT80P80 0x000000010 /* CONF: Use VHT 80+80 */
#define IEEE80211_FVHT_USEVHT80P80 0x000000008 /* CONF: Use VHT 80+80 */
#define IEEE80211_FVHT_USEVHT160 0x000000010 /* CONF: Use VHT160 */
#define IEEE80211_FVHT_STBC_TX 0x00000020 /* CONF: STBC tx enabled */
#define IEEE80211_FVHT_STBC_RX 0x00000040 /* CONF: STBC rx enabled */

Expand Down

0 comments on commit e47898e

Please sign in to comment.