Module Name: src Committed By: dyoung Date: Fri Apr 2 03:46:50 UTC 2010
Modified Files: src/sys/net80211: ieee80211.c Log Message: Delete ieee80211_setbasicrates(). It's buggy, and we drivers can get along fine without it. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/net80211/ieee80211.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/net80211/ieee80211.c diff -u src/sys/net80211/ieee80211.c:1.51 src/sys/net80211/ieee80211.c:1.52 --- src/sys/net80211/ieee80211.c:1.51 Fri Mar 26 17:18:05 2010 +++ src/sys/net80211/ieee80211.c Fri Apr 2 03:46:50 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ieee80211.c,v 1.51 2010/03/26 17:18:05 dyoung Exp $ */ +/* $NetBSD: ieee80211.c,v 1.52 2010/04/02 03:46:50 dyoung Exp $ */ /*- * Copyright (c) 2001 Atsushi Onoe * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD: src/sys/net80211/ieee80211.c,v 1.22 2005/08/10 16:22:29 sam Exp $"); #endif #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: ieee80211.c,v 1.51 2010/03/26 17:18:05 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee80211.c,v 1.52 2010/04/02 03:46:50 dyoung Exp $"); #endif /* @@ -92,8 +92,6 @@ SLIST_HEAD_INITIALIZER(ieee80211_list); static u_int8_t ieee80211_vapmap[32]; /* enough for 256 */ -static void ieee80211_setbasicrates(struct ieee80211com *); - static void ieee80211_add_vap(struct ieee80211com *ic) { @@ -216,7 +214,6 @@ if (ic->ic_caps & IEEE80211_C_WME) ic->ic_flags |= IEEE80211_F_WME; #endif - ieee80211_setbasicrates(ic); (void) ieee80211_setmode(ic, ic->ic_curmode); if (ic->ic_bintval == 0) @@ -809,41 +806,6 @@ { 12, { 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108 } }; /* - * Mark the basic rates for the 11g rate table based on the - * operating mode. For real 11g we mark all the 11b rates - * and 6, 12, and 24 OFDM. For 11b compatibility we mark only - * 11b rates. There's also a pseudo 11a-mode used to mark only - * the basic OFDM rates. - */ -static void -ieee80211_setbasicrates(struct ieee80211com *ic) -{ - static const struct ieee80211_rateset basic[] = { - { 0, { } }, /* IEEE80211_MODE_AUTO */ - { 3, { 12, 24, 48 } }, /* IEEE80211_MODE_11A */ - { 2, { 2, 4 } }, /* IEEE80211_MODE_11B */ - { 4, { 2, 4, 11, 22 } }, /* IEEE80211_MODE_11G */ - { 0, { } }, /* IEEE80211_MODE_TURBO */ - }; - enum ieee80211_phymode mode; - struct ieee80211_rateset *rs; - int i, j; - - for (mode = 0; mode < IEEE80211_MODE_MAX; mode++) { - rs = &ic->ic_sup_rates[mode]; - for (i = 0; i < rs->rs_nrates; i++) { - rs->rs_rates[i] &= IEEE80211_RATE_VAL; - for (j = 0; j < basic[mode].rs_nrates; j++) { - if (basic[mode].rs_rates[j] != rs->rs_rates[i]) - continue; - rs->rs_rates[i] |= IEEE80211_RATE_BASIC; - break; - } - } - } -} - -/* * Set the current phy mode and recalculate the active channel * set based on the available channels for this mode. Also * select a new default/current channel if the current one is