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

Function ieee80211_setupcurchan

freebsd/net80211/ieee80211_node.c:782–812  ·  view source on GitHub ↗

* Setup the current channel. The request channel may be * promoted if other vap's are operating with HT20/HT40. */

Source from the content-addressed store, hash-verified

780 * promoted if other vap's are operating with HT20/HT40.
781 */
782void
783ieee80211_setupcurchan(struct ieee80211com *ic, struct ieee80211_channel *c)
784{
785 if (ic->ic_htcaps & IEEE80211_HTC_HT) {
786 int flags = gethtadjustflags(ic);
787 /*
788 * Check for channel promotion required to support the
789 * set of running vap's. This assumes we are called
790 * after ni_chan is setup for each vap.
791 */
792 /* XXX VHT? */
793 /* NB: this assumes IEEE80211_FHT_USEHT40 > IEEE80211_FHT_HT */
794 if (flags > ieee80211_htchanflags(c))
795 c = ieee80211_ht_adjust_channel(ic, c, flags);
796 }
797
798 /*
799 * VHT promotion - this will at least promote to VHT20/40
800 * based on what HT has done; it may further promote the
801 * channel to VHT80 or above.
802 */
803 if (ic->ic_vhtcaps != 0) {
804 int flags = getvhtadjustflags(ic);
805 if (flags > ieee80211_vhtchanflags(c))
806 c = ieee80211_vht_adjust_channel(ic, c, flags);
807 }
808
809 ic->ic_bsschan = ic->ic_curchan = c;
810 ic->ic_curmode = ieee80211_chan2mode(ic->ic_curchan);
811 ic->ic_rt = ieee80211_get_ratetable(ic->ic_curchan);
812}
813
814/*
815 * Change the current channel. The channel change is guaranteed to have

Callers 3

ieee80211_setcurchanFunction · 0.85
ieee80211_update_chwFunction · 0.85
scan_endFunction · 0.85

Calls 8

gethtadjustflagsFunction · 0.85
ieee80211_htchanflagsFunction · 0.85
getvhtadjustflagsFunction · 0.85
ieee80211_vhtchanflagsFunction · 0.85
ieee80211_chan2modeFunction · 0.85
ieee80211_get_ratetableFunction · 0.85

Tested by

no test coverage detected