[net80211] add FVHT flags for channel widths.
The 11n code uses these bits for both configuration /and/ controlling the channel width on softmac chips - it uses it to find the widest width for all VAPs (eg a HT20 vap and a HT40 vap) to know what to configure the ic_curchan. For fullmac devices it isn't /as/ important, as each virtual device exposed by the firmware will likely have its own configuration and the firmware figures out what to do to enable it.
This commit is contained in:
parent
efda3f5684
commit
02527029a5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=311574
@ -653,8 +653,12 @@ MALLOC_DECLARE(M_80211_VAP);
|
||||
#define IEEE80211_FVEN_BITS "\20"
|
||||
|
||||
#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_USEVHT80P80 0x000000008 /* CONF: Use VHT 80+80 */
|
||||
#define IEEE80211_FVHT_USEVHT160 0x000000010 /* CONF: Use VHT160 */
|
||||
#define IEEE80211_VFHT_BITS \
|
||||
"\20\1VHT"
|
||||
"\20\1VHT\2VHT40\3VHT80\4VHT80P80\5VHT160"
|
||||
|
||||
int ic_printf(struct ieee80211com *, const char *, ...) __printflike(2, 3);
|
||||
void ieee80211_ifattach(struct ieee80211com *);
|
||||
@ -829,6 +833,27 @@ ieee80211_htchanflags(const struct ieee80211_channel *c)
|
||||
IEEE80211_IS_CHAN_HT(c) ? IEEE80211_FHT_HT : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Calculate VHT channel promotion flags for a channel.
|
||||
* XXX belongs in ieee80211_vht.h but needs IEEE80211_FVHT_*
|
||||
*/
|
||||
static __inline int
|
||||
ieee80211_vhtchanflags(const struct ieee80211_channel *c)
|
||||
{
|
||||
|
||||
if (IEEE80211_IS_CHAN_VHT160(c))
|
||||
return IEEE80211_FVHT_USEVHT160;
|
||||
if (IEEE80211_IS_CHAN_VHT80_80(c))
|
||||
return IEEE80211_FVHT_USEVHT80P80;
|
||||
if (IEEE80211_IS_CHAN_VHT80(c))
|
||||
return IEEE80211_FVHT_USEVHT80;
|
||||
if (IEEE80211_IS_CHAN_VHT40(c))
|
||||
return IEEE80211_FVHT_USEVHT40;
|
||||
if (IEEE80211_IS_CHAN_VHT(c))
|
||||
return IEEE80211_FVHT_VHT;
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Fetch the current TX power (cap) for the given node.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user