diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2006-06-18 18:39:42 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2006-06-18 18:39:42 +0000 |
commit | b6efe24e3cd0a45a2c3b9be9b804f53c1db0152e (patch) | |
tree | f509d197cf8f8687c2f10f508d445ddaaa8d9534 /sys/net80211/ieee80211.c | |
parent | e6d4b8dbc6221983c325d69573f969a9b074cdc6 (diff) |
Improve 802.11b/g interoperability and move toward better compliance
with IEEE Std 802.11g-2003 standard:
- add ERP Information Element in probe responses and beacons
- keep track of the number of associated non-ERP STAs and non-short slot
time capable STAs in the BSS
- enable use of RTS/CTS or CTS-to-self protection when required by the BSS
- add a ic_updateslot() callback to notify drivers of slot time changes
- cleanup computation of mgmt frames sizes in ieee80211_output.c
- nuke unnecessary <sys/cdefs.h> includes
- remove an unused macro (LOGICALLY_EQUAL) while i'm here
From {free,net}bsd, with additional fixes.
ok brad@, reyk@
Diffstat (limited to 'sys/net80211/ieee80211.c')
-rw-r--r-- | sys/net80211/ieee80211.c | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index 677bac6f42e..2e1c684ec44 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211.c,v 1.16 2006/01/04 06:04:42 canacar Exp $ */ +/* $OpenBSD: ieee80211.c,v 1.17 2006/06/18 18:39:41 damien Exp $ */ /* $NetBSD: ieee80211.c,v 1.19 2004/06/06 05:45:29 dyoung Exp $ */ /*- @@ -33,8 +33,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <sys/cdefs.h> - /* * IEEE 802.11 generic handler */ @@ -80,8 +78,6 @@ struct ieee80211com_head ieee80211com_head = static void ieee80211_setbasicrates(struct ieee80211com *); -#define LOGICALLY_EQUAL(x, y) (!(x) == !(y)) - #if 0 static const char *ieee80211_phymode_name[] = { "auto", /* IEEE80211_MODE_AUTO */ @@ -529,6 +525,12 @@ ieee80211_media_change(struct ifnet *ifp) ic->ic_flags |= IEEE80211_F_IBSSON; break; } + /* + * Yech, slot time may change depending on the + * operating mode so reset it to be sure everything + * is setup appropriately. + */ + ieee80211_reset_erp(ic); error = ENETRESET; } #ifdef notdef @@ -733,28 +735,9 @@ ieee80211_setmode(struct ieee80211com *ic, enum ieee80211_phymode mode) */ ieee80211_reset_scan(ifp); - /* - * Set/reset state flags that influence beacon contents, etc. - * - * XXX what if we have stations already associated??? - * XXX probably not right for autoselect? - * - * Short preamble is not interoperable with legacy .11b - * equipment, so it should not be the default for b or - * mixed b/g networks. -dcy - */ -#if 0 - if (ic->ic_caps & IEEE80211_C_SHPREAMBLE) - ic->ic_flags |= IEEE80211_F_SHPREAMBLE; -#endif - if (mode == IEEE80211_MODE_11G) { - if (ic->ic_caps & IEEE80211_C_SHSLOT) - ic->ic_flags |= IEEE80211_F_SHSLOT; - } else { - ic->ic_flags &= ~IEEE80211_F_SHSLOT; - } - ic->ic_curmode = mode; + ieee80211_reset_erp(ic); /* reset ERP state */ + return 0; #undef N } |