Changeset View
Changeset View
Standalone View
Standalone View
sys/net80211/ieee80211_vht.c
Show First 20 Lines • Show All 791 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
struct ieee80211_channel * | struct ieee80211_channel * | ||||
ieee80211_vht_adjust_channel(struct ieee80211com *ic, | ieee80211_vht_adjust_channel(struct ieee80211com *ic, | ||||
struct ieee80211_channel *chan, int flags) | struct ieee80211_channel *chan, int flags) | ||||
{ | { | ||||
struct ieee80211_channel *c; | struct ieee80211_channel *c; | ||||
/* First case - handle channel demotion - if VHT isn't set */ | /* First case - handle channel demotion - if VHT isn't set */ | ||||
if ((flags & IEEE80211_FVHT_VHT) == 0) { | if ((flags & IEEE80211_FVHT_MASK) == 0) { | ||||
#if 0 | #if 0 | ||||
printf("%s: demoting channel %d/0x%08x\n", __func__, | printf("%s: demoting channel %d/0x%08x\n", __func__, | ||||
chan->ic_ieee, chan->ic_flags); | chan->ic_ieee, chan->ic_flags); | ||||
#endif | #endif | ||||
c = ieee80211_find_channel(ic, chan->ic_freq, | c = ieee80211_find_channel(ic, chan->ic_freq, | ||||
chan->ic_flags & ~IEEE80211_CHAN_VHT); | chan->ic_flags & ~IEEE80211_CHAN_VHT); | ||||
if (c == NULL) | if (c == NULL) | ||||
c = chan; | c = chan; | ||||
#if 0 | #if 0 | ||||
printf("%s: .. to %d/0x%08x\n", __func__, | printf("%s: .. to %d/0x%08x\n", __func__, | ||||
c->ic_ieee, c->ic_flags); | c->ic_ieee, c->ic_flags); | ||||
#endif | #endif | ||||
return (c); | return (c); | ||||
} | } | ||||
/* | /* | ||||
* We can upgrade to VHT - attempt to do so | * We can upgrade to VHT - attempt to do so | ||||
* | * | ||||
* Note: we don't clear the HT flags, these are the hints | * Note: we don't clear the HT flags, these are the hints | ||||
* for HT40U/HT40D when selecting VHT40 or larger channels. | * for HT40U/HT40D when selecting VHT40 or larger channels. | ||||
*/ | */ | ||||
/* Start with VHT80 */ | /* Start with VHT80 */ | ||||
emaste: is this comment outdated? | |||||
bzAuthorUnsubmitted Done Inline ActionsYeah, probably from day one this file was committed? bz: Yeah, probably from day one this file was committed? | |||||
adrianUnsubmitted Not Done Inline ActionsI don't THINK it was outdated; the logic was to start by a VHT80 lookup, and since the rest of the channel lookups only happen if c == NULL. I left that there so we could just keep adding new channel lookups above it. I forget when VHT160/80p80 came in. adrian: I don't THINK it was outdated; the logic was to start by a VHT80 lookup, and since the rest of… | |||||
c = NULL; | c = NULL; | ||||
if ((c == NULL) && (flags & IEEE80211_FVHT_USEVHT160)) | if ((c == NULL) && (flags & IEEE80211_FVHT_USEVHT160)) | ||||
c = findvhtchan(ic, chan, IEEE80211_CHAN_VHT80); | c = findvhtchan(ic, chan, IEEE80211_CHAN_VHT160); | ||||
if ((c == NULL) && (flags & IEEE80211_FVHT_USEVHT80P80)) | if ((c == NULL) && (flags & IEEE80211_FVHT_USEVHT80P80)) | ||||
c = findvhtchan(ic, chan, IEEE80211_CHAN_VHT80P80); | c = findvhtchan(ic, chan, IEEE80211_CHAN_VHT80P80); | ||||
if ((c == NULL) && (flags & IEEE80211_FVHT_USEVHT80)) | if ((c == NULL) && (flags & IEEE80211_FVHT_USEVHT80)) | ||||
c = findvhtchan(ic, chan, IEEE80211_CHAN_VHT80); | c = findvhtchan(ic, chan, IEEE80211_CHAN_VHT80); | ||||
if ((c == NULL) && (flags & IEEE80211_FVHT_USEVHT40)) | if ((c == NULL) && (flags & IEEE80211_FVHT_USEVHT40)) | ||||
Show All 34 Lines |
is this comment outdated?