Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net80211 Delete ieee80211_setbasicrates(). It's buggy, ...



details:   https://anonhg.NetBSD.org/src/rev/a3ef4cceec77
branches:  trunk
changeset: 753565:a3ef4cceec77
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Fri Apr 02 03:46:50 2010 +0000

description:
Delete ieee80211_setbasicrates().  It's buggy, and we drivers can get
along fine without it.

diffstat:

 sys/net80211/ieee80211.c |  42 ++----------------------------------------
 1 files changed, 2 insertions(+), 40 deletions(-)

diffs (77 lines):

diff -r 68acb8d1454b -r a3ef4cceec77 sys/net80211/ieee80211.c
--- a/sys/net80211/ieee80211.c  Thu Apr 01 22:23:27 2010 +0000
+++ b/sys/net80211/ieee80211.c  Fri Apr 02 03:46:50 2010 +0000
@@ -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



Home | Main Index | Thread Index | Old Index