Changeset View
Changeset View
Standalone View
Standalone View
sys/net80211/ieee80211_vht.c
| Show First 20 Lines • Show All 986 Lines • ▼ Show 20 Lines | ieee80211_vht_check_tx_vht80(const struct ieee80211_node *ni) | ||||
| struct ieee80211_channel *bss_chan; | struct ieee80211_channel *bss_chan; | ||||
| if (!ieee80211_vht_check_tx_vht(ni)) | if (!ieee80211_vht_check_tx_vht(ni)) | ||||
| return (false); | return (false); | ||||
| vap = ni->ni_vap; | vap = ni->ni_vap; | ||||
| bss_chan = vap->iv_bss->ni_chan; | bss_chan = vap->iv_bss->ni_chan; | ||||
| /* | |||||
| * ni_chw represents 20MHz or 40MHz from the HT | |||||
| * TX width action frame / HT channel negotiation. | |||||
| * If a HT TX width action frame sets it to 20MHz | |||||
| * then reject doing 80MHz. | |||||
| */ | |||||
| return (IEEE80211_IS_CHAN_VHT80(bss_chan) && | return (IEEE80211_IS_CHAN_VHT80(bss_chan) && | ||||
| IEEE80211_IS_CHAN_VHT80(ni->ni_chan) && | IEEE80211_IS_CHAN_VHT80(ni->ni_chan) && | ||||
| (ni->ni_chw == IEEE80211_STA_RX_BW_80)); | (ni->ni_chw != IEEE80211_STA_RX_BW_20)); | ||||
| } | } | ||||
| /* | /* | ||||
| * Return true if VHT 160 rates can be transmitted to the given node. | * Return true if VHT 160 rates can be transmitted to the given node. | ||||
| * | * | ||||
| * This verifies that the BSS is VHT80+80 or VHT160 capable and the current | * This verifies that the BSS is VHT80+80 or VHT160 capable and the current | ||||
| * node channel width is 80+80MHz or 160MHz. | * node channel width is 80+80MHz or 160MHz. | ||||
| */ | */ | ||||
| static bool | static bool | ||||
| ieee80211_vht_check_tx_vht160(const struct ieee80211_node *ni) | ieee80211_vht_check_tx_vht160(const struct ieee80211_node *ni) | ||||
| { | { | ||||
| struct ieee80211vap *vap; | struct ieee80211vap *vap; | ||||
| struct ieee80211_channel *bss_chan; | struct ieee80211_channel *bss_chan; | ||||
| if (!ieee80211_vht_check_tx_vht(ni)) | if (!ieee80211_vht_check_tx_vht(ni)) | ||||
| return (false); | return (false); | ||||
| vap = ni->ni_vap; | vap = ni->ni_vap; | ||||
| bss_chan = vap->iv_bss->ni_chan; | bss_chan = vap->iv_bss->ni_chan; | ||||
| if (ni->ni_chw != IEEE80211_STA_RX_BW_160) | /* | ||||
| * ni_chw represents 20MHz or 40MHz from the HT | |||||
| * TX width action frame / HT channel negotiation. | |||||
| * If a HT TX width action frame sets it to 20MHz | |||||
| * then reject doing 160MHz. | |||||
| */ | |||||
| if (ni->ni_chw == IEEE80211_STA_RX_BW_20) | |||||
| return (false); | return (false); | ||||
| if (IEEE80211_IS_CHAN_VHT160(bss_chan) && | if (IEEE80211_IS_CHAN_VHT160(bss_chan) && | ||||
| IEEE80211_IS_CHAN_VHT160(ni->ni_chan)) | IEEE80211_IS_CHAN_VHT160(ni->ni_chan)) | ||||
| return (true); | return (true); | ||||
| if (IEEE80211_IS_CHAN_VHT80P80(bss_chan) && | if (IEEE80211_IS_CHAN_VHT80P80(bss_chan) && | ||||
| IEEE80211_IS_CHAN_VHT80P80(ni->ni_chan)) | IEEE80211_IS_CHAN_VHT80P80(ni->ni_chan)) | ||||
| ▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines | |||||