MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ieee80211_ht_updateparams_final

Function ieee80211_ht_updateparams_final

freebsd/net80211/ieee80211_ht.c:2015–2049  ·  view source on GitHub ↗

* Final part of updating the HT parameters. * * This is called from the STA management path and * the ieee80211_node_join() path. It will take into * account the IEs discovered during scanning and * adjust things accordingly. * * This is done after a call to ieee80211_ht_updateparams() * because it (and the upcoming VHT version of updateparams) * needs to ensure everything is parsed befo

Source from the content-addressed store, hash-verified

2013 * node for us.
2014 */
2015int
2016ieee80211_ht_updateparams_final(struct ieee80211_node *ni,
2017 const uint8_t *htcapie, const uint8_t *htinfoie)
2018{
2019 struct ieee80211vap *vap = ni->ni_vap;
2020 const struct ieee80211_ie_htinfo *htinfo;
2021 int htflags, vhtflags;
2022 int ret = 0;
2023
2024 htinfo = (const struct ieee80211_ie_htinfo *) htinfoie;
2025
2026 htflags = (vap->iv_flags_ht & IEEE80211_FHT_HT) ?
2027 IEEE80211_CHAN_HT20 : 0;
2028
2029 /* NB: honor operating mode constraint */
2030 if ((htinfo->hi_byte1 & IEEE80211_HTINFO_TXWIDTH_2040) &&
2031 (vap->iv_flags_ht & IEEE80211_FHT_USEHT40)) {
2032 if (ni->ni_ht2ndchan == IEEE80211_HTINFO_2NDCHAN_ABOVE)
2033 htflags = IEEE80211_CHAN_HT40U;
2034 else if (ni->ni_ht2ndchan == IEEE80211_HTINFO_2NDCHAN_BELOW)
2035 htflags = IEEE80211_CHAN_HT40D;
2036 }
2037
2038 /*
2039 * VHT flags - do much the same; check whether VHT is available
2040 * and if so, what our ideal channel use would be based on our
2041 * capabilities and the (pre-parsed) VHT info IE.
2042 */
2043 vhtflags = ieee80211_vht_get_vhtflags(ni, htflags);
2044
2045 if (htinfo_update_chw(ni, htflags, vhtflags))
2046 ret = 1;
2047
2048 return (ret);
2049}
2050
2051/*
2052 * Parse and update HT-related state extracted from the HT cap ie

Callers 4

sta_recv_mgmtFunction · 0.85
adhoc_recv_mgmtFunction · 0.85
ieee80211_sta_joinFunction · 0.85
ieee80211_init_neighborFunction · 0.85

Calls 2

htinfo_update_chwFunction · 0.85

Tested by

no test coverage detected