short preamble capability is not just for 11g; mark IEEE80211_F_SHPREAMBLE

regardless of the operating mode

Obtained from:	MADWIFI
This commit is contained in:
Sam Leffler 2003-09-14 22:32:18 +00:00
parent ee3f02dee3
commit fba3db9f57

View File

@ -699,15 +699,15 @@ ieee80211_setmode(struct ieee80211com *ic, enum ieee80211_phymode mode)
* XXX what if we have stations already associated??? * XXX what if we have stations already associated???
* XXX probably not right for autoselect? * XXX probably not right for autoselect?
*/ */
if (ic->ic_caps & IEEE80211_C_SHPREAMBLE)
ic->ic_flags |= IEEE80211_F_SHPREAMBLE;
if (mode == IEEE80211_MODE_11G) { if (mode == IEEE80211_MODE_11G) {
if (ic->ic_caps & IEEE80211_C_SHSLOT) if (ic->ic_caps & IEEE80211_C_SHSLOT)
ic->ic_flags |= IEEE80211_F_SHSLOT; ic->ic_flags |= IEEE80211_F_SHSLOT;
if (ic->ic_caps & IEEE80211_C_SHPREAMBLE)
ic->ic_flags |= IEEE80211_F_SHPREAMBLE;
ieee80211_set11gbasicrates(&ic->ic_sup_rates[mode], ieee80211_set11gbasicrates(&ic->ic_sup_rates[mode],
IEEE80211_MODE_11G); IEEE80211_MODE_11G);
} else { } else {
ic->ic_flags &= ~(IEEE80211_F_SHSLOT | IEEE80211_F_SHPREAMBLE); ic->ic_flags &= ~IEEE80211_F_SHSLOT;
} }
ic->ic_curmode = mode; ic->ic_curmode = mode;