diff options
author | sam <sam@FreeBSD.org> | 2006-12-28 01:31:26 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2006-12-28 01:31:26 +0000 |
commit | 18aaf4be3dec3bfa11e22a16ed4eddd62018c3b5 (patch) | |
tree | 8b227e79f6d39e0b1d01f50cb7e48bd30dab4798 /sys/net80211 | |
parent | ebf5b23a3edb6547310e4447c0471415648dfa1d (diff) | |
download | FreeBSD-src-18aaf4be3dec3bfa11e22a16ed4eddd62018c3b5.zip FreeBSD-src-18aaf4be3dec3bfa11e22a16ed4eddd62018c3b5.tar.gz |
o unbreak rate set defaulting
o mark 11g mode support on finding 11g or pure 11g (OFDM-only)
channels; was requiring pure 11g which caused some contortions
in drivers that manually setup their channel lists
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index f832b21..9615ba7 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -143,10 +143,9 @@ ieee80211_default_reset(struct ifnet *ifp) static void ieee80211_chan_init(struct ieee80211com *ic) { -#define RATESDEFINED(m) \ - ((ic->ic_modecaps & (1<<m)) && ic->ic_sup_rates[m].rs_nrates != 0) #define DEFAULTRATES(m, def) do { \ - if (!RATESDEFINED(m)) ic->ic_sup_rates[m] = def; \ + if ((ic->ic_modecaps & (1<<m)) && ic->ic_sup_rates[m].rs_nrates == 0) \ + ic->ic_sup_rates[m] = def; \ } while (0) struct ifnet *ifp = ic->ic_ifp; struct ieee80211_channel *c; @@ -175,7 +174,7 @@ ieee80211_chan_init(struct ieee80211com *ic) ic->ic_modecaps |= 1<<IEEE80211_MODE_11A; if (IEEE80211_IS_CHAN_B(c)) ic->ic_modecaps |= 1<<IEEE80211_MODE_11B; - if (IEEE80211_IS_CHAN_PUREG(c)) + if (IEEE80211_IS_CHAN_ANYG(c)) ic->ic_modecaps |= 1<<IEEE80211_MODE_11G; if (IEEE80211_IS_CHAN_FHSS(c)) ic->ic_modecaps |= 1<<IEEE80211_MODE_FH; @@ -202,7 +201,6 @@ ieee80211_chan_init(struct ieee80211com *ic) */ (void) ieee80211_setmode(ic, IEEE80211_MODE_AUTO); #undef DEFAULTRATES -#undef RATESDEFINED } void |