Delete ieee80211_setbasicrates(). It's buggy, and we drivers can get
along fine without it.
This commit is contained in:
parent
221f2e33dd
commit
da20ddcdb7
|
@ -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 @@ static struct ieee80211_list ieee80211_list =
|
|||
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 @@ ieee80211_ifattach(struct ieee80211com *ic)
|
|||
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)
|
||||
|
@ -808,41 +805,6 @@ const struct ieee80211_rateset ieee80211_std_rateset_11b =
|
|||
const struct ieee80211_rateset ieee80211_std_rateset_11g =
|
||||
{ 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
|
||||
|
|
Loading…
Reference in New Issue