mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-22 11:17:19 +00:00
[net80211] add syncflags methods for the VHT flags configuration.
I missed this in my last commit. Pointy hat to me.
This commit is contained in:
parent
47312af69a
commit
8e71a4aa83
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=311583
@ -90,6 +90,7 @@ const uint8_t ieee80211broadcastaddr[IEEE80211_ADDR_LEN] =
|
||||
static void ieee80211_syncflag_locked(struct ieee80211com *ic, int flag);
|
||||
static void ieee80211_syncflag_ht_locked(struct ieee80211com *ic, int flag);
|
||||
static void ieee80211_syncflag_ext_locked(struct ieee80211com *ic, int flag);
|
||||
static void ieee80211_syncflag_vht_locked(struct ieee80211com *ic, int flag);
|
||||
static int ieee80211_media_setup(struct ieee80211com *ic,
|
||||
struct ifmedia *media, int caps, int addsta,
|
||||
ifm_change_cb_t media_change, ifm_stat_cb_t media_stat);
|
||||
@ -652,6 +653,12 @@ ieee80211_vap_attach(struct ieee80211vap *vap, ifm_change_cb_t media_change,
|
||||
ieee80211_syncflag_locked(ic, IEEE80211_F_BURST);
|
||||
ieee80211_syncflag_ht_locked(ic, IEEE80211_FHT_HT);
|
||||
ieee80211_syncflag_ht_locked(ic, IEEE80211_FHT_USEHT40);
|
||||
|
||||
ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_VHT);
|
||||
ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT40);
|
||||
ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80);
|
||||
ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80P80);
|
||||
ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT160);
|
||||
IEEE80211_UNLOCK(ic);
|
||||
|
||||
return 1;
|
||||
@ -699,6 +706,13 @@ ieee80211_vap_detach(struct ieee80211vap *vap)
|
||||
ieee80211_syncflag_locked(ic, IEEE80211_F_BURST);
|
||||
ieee80211_syncflag_ht_locked(ic, IEEE80211_FHT_HT);
|
||||
ieee80211_syncflag_ht_locked(ic, IEEE80211_FHT_USEHT40);
|
||||
|
||||
ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_VHT);
|
||||
ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT40);
|
||||
ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80);
|
||||
ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80P80);
|
||||
ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT160);
|
||||
|
||||
/* NB: this handles the bpfdetach done below */
|
||||
ieee80211_syncflag_ext_locked(ic, IEEE80211_FEXT_BPF);
|
||||
if (vap->iv_ifflags & IFF_PROMISC)
|
||||
@ -852,6 +866,46 @@ ieee80211_syncflag_ht(struct ieee80211vap *vap, int flag)
|
||||
IEEE80211_UNLOCK(ic);
|
||||
}
|
||||
|
||||
/*
|
||||
* Synchronize flags_vht bit state in the com structure
|
||||
* according to the state of all vap's. This is used,
|
||||
* for example, to handle state changes via ioctls.
|
||||
*/
|
||||
static void
|
||||
ieee80211_syncflag_vht_locked(struct ieee80211com *ic, int flag)
|
||||
{
|
||||
struct ieee80211vap *vap;
|
||||
int bit;
|
||||
|
||||
IEEE80211_LOCK_ASSERT(ic);
|
||||
|
||||
bit = 0;
|
||||
TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next)
|
||||
if (vap->iv_flags_vht & flag) {
|
||||
bit = 1;
|
||||
break;
|
||||
}
|
||||
if (bit)
|
||||
ic->ic_flags_vht |= flag;
|
||||
else
|
||||
ic->ic_flags_vht &= ~flag;
|
||||
}
|
||||
|
||||
void
|
||||
ieee80211_syncflag_vht(struct ieee80211vap *vap, int flag)
|
||||
{
|
||||
struct ieee80211com *ic = vap->iv_ic;
|
||||
|
||||
IEEE80211_LOCK(ic);
|
||||
if (flag < 0) {
|
||||
flag = -flag;
|
||||
vap->iv_flags_vht &= ~flag;
|
||||
} else
|
||||
vap->iv_flags_vht |= flag;
|
||||
ieee80211_syncflag_vht_locked(ic, flag);
|
||||
IEEE80211_UNLOCK(ic);
|
||||
}
|
||||
|
||||
/*
|
||||
* Synchronize flags_ext bit state in the com structure
|
||||
* according to the state of all vap's. This is used,
|
||||
|
@ -77,6 +77,7 @@ void ieee80211_promisc(struct ieee80211vap *, bool);
|
||||
void ieee80211_allmulti(struct ieee80211vap *, bool);
|
||||
void ieee80211_syncflag(struct ieee80211vap *, int flag);
|
||||
void ieee80211_syncflag_ht(struct ieee80211vap *, int flag);
|
||||
void ieee80211_syncflag_vht(struct ieee80211vap *, int flag);
|
||||
void ieee80211_syncflag_ext(struct ieee80211vap *, int flag);
|
||||
|
||||
#define ieee80211_input(ni, m, rssi, nf) \
|
||||
@ -361,7 +362,8 @@ struct ieee80211_beacon_offsets {
|
||||
uint8_t *bo_csa; /* start of CSA element */
|
||||
uint8_t *bo_quiet; /* start of Quiet element */
|
||||
uint8_t *bo_meshconf; /* start of MESHCONF element */
|
||||
uint8_t *bo_spare[3];
|
||||
uint8_t *bo_vhtinfo; /* start of VHT info element (XXX VHTCAP?) */
|
||||
uint8_t *bo_spare[2];
|
||||
};
|
||||
struct mbuf *ieee80211_beacon_alloc(struct ieee80211_node *);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user