Changeset View
Changeset View
Standalone View
Standalone View
head/sys/net80211/ieee80211_vht.c
Show First 20 Lines • Show All 147 Lines • ▼ Show 20 Lines | ieee80211_vht_vattach(struct ieee80211vap *vap) | ||||
vap->iv_vhtcaps = ic->ic_vhtcaps; | vap->iv_vhtcaps = ic->ic_vhtcaps; | ||||
vap->iv_vhtextcaps = ic->ic_vhtextcaps; | vap->iv_vhtextcaps = ic->ic_vhtextcaps; | ||||
/* XXX assume VHT80 support; should really check vhtcaps */ | /* XXX assume VHT80 support; should really check vhtcaps */ | ||||
vap->iv_flags_vht = | vap->iv_flags_vht = | ||||
IEEE80211_FVHT_VHT | IEEE80211_FVHT_VHT | ||||
| IEEE80211_FVHT_USEVHT40 | | IEEE80211_FVHT_USEVHT40 | ||||
| IEEE80211_FVHT_USEVHT80; | | IEEE80211_FVHT_USEVHT80; | ||||
#if 0 | if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ(vap->iv_vhtcaps)) | ||||
/* XXX TODO: enable VHT80+80, VHT160 capabilities */ | |||||
if (XXX TODO FIXME) | |||||
vap->iv_flags_vht |= IEEE80211_FVHT_USEVHT160; | vap->iv_flags_vht |= IEEE80211_FVHT_USEVHT160; | ||||
if (XXX TODO FIXME) | if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160_80P80MHZ(vap->iv_vhtcaps)) | ||||
vap->iv_flags_vht |= IEEE80211_FVHT_USEVHT80P80; | vap->iv_flags_vht |= IEEE80211_FVHT_USEVHT80P80; | ||||
#endif | |||||
memcpy(&vap->iv_vht_mcsinfo, &ic->ic_vht_mcsinfo, | memcpy(&vap->iv_vht_mcsinfo, &ic->ic_vht_mcsinfo, | ||||
sizeof(struct ieee80211_vht_mcs_info)); | sizeof(struct ieee80211_vht_mcs_info)); | ||||
} | } | ||||
void | void | ||||
ieee80211_vht_vdetach(struct ieee80211vap *vap) | ieee80211_vht_vdetach(struct ieee80211vap *vap) | ||||
{ | { | ||||
Show All 26 Lines | |||||
ieee80211_vht_announce(struct ieee80211com *ic) | ieee80211_vht_announce(struct ieee80211com *ic) | ||||
{ | { | ||||
int i, tx, rx; | int i, tx, rx; | ||||
if (! IEEE80211_CONF_VHT(ic)) | if (! IEEE80211_CONF_VHT(ic)) | ||||
return; | return; | ||||
/* Channel width */ | /* Channel width */ | ||||
ic_printf(ic, "[VHT] Channel Widths: 20MHz, 40MHz, 80MHz"); | ic_printf(ic, "[VHT] Channel Widths: 20MHz, 40MHz, 80MHz%s%s\n", | ||||
if (_IEEE80211_MASKSHIFT(ic->ic_vhtcaps, | (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ(ic->ic_vhtcaps)) ? | ||||
IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= 1) | ", 160MHz" : "", | ||||
printf(" 160MHz"); | (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160_80P80MHZ(ic->ic_vhtcaps)) ? | ||||
if (_IEEE80211_MASKSHIFT(ic->ic_vhtcaps, | ", 80+80MHz" : ""); | ||||
IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) | |||||
printf(" 80+80MHz"); | |||||
printf("\n"); | |||||
/* Features */ | /* Features */ | ||||
ic_printf(ic, "[VHT] Features: %b\n", ic->ic_vhtcaps, | ic_printf(ic, "[VHT] Features: %b\n", ic->ic_vhtcaps, | ||||
IEEE80211_VHTCAP_BITS); | IEEE80211_VHTCAP_BITS); | ||||
/* For now, just 5GHz VHT. Worry about 2GHz VHT later */ | /* For now, just 5GHz VHT. Worry about 2GHz VHT later */ | ||||
for (i = 0; i < 8; i++) { | for (i = 0; i < 8; i++) { | ||||
/* Each stream is 2 bits */ | /* Each stream is 2 bits */ | ||||
tx = (ic->ic_vht_mcsinfo.tx_mcs_map >> (2*i)) & 0x3; | tx = (ic->ic_vht_mcsinfo.tx_mcs_map >> (2*i)) & 0x3; | ||||
▲ Show 20 Lines • Show All 653 Lines • Show Last 20 Lines |