The IEEE80211_F_ flag prefix was used for both the flags in ieee80211_var.h
and for the rates in ieee80211_proto.h; rename the rate bits as _R_ to avoid confusion.
This commit is contained in:
parent
7f088f1423
commit
9782767422
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ieee80211_input.c,v 1.72 2011/12/31 20:41:58 christos Exp $ */
|
||||
/* $NetBSD: ieee80211_input.c,v 1.73 2013/01/10 17:40:10 christos Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2001 Atsushi Onoe
|
||||
* Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
|
||||
|
@ -36,7 +36,7 @@
|
|||
__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.81 2005/08/10 16:22:29 sam Exp $");
|
||||
#endif
|
||||
#ifdef __NetBSD__
|
||||
__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.72 2011/12/31 20:41:58 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.73 2013/01/10 17:40:10 christos Exp $");
|
||||
#endif
|
||||
|
||||
#include "opt_inet.h"
|
||||
|
@ -2168,8 +2168,8 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0,
|
|||
ni->ni_rssi = rssi;
|
||||
ni->ni_rstamp = rstamp;
|
||||
rate = ieee80211_setup_rates(ni, rates, xrates,
|
||||
IEEE80211_F_DOSORT | IEEE80211_F_DOFRATE
|
||||
| IEEE80211_F_DONEGO | IEEE80211_F_DODEL);
|
||||
IEEE80211_R_DOSORT | IEEE80211_R_DOFRATE
|
||||
| IEEE80211_R_DONEGO | IEEE80211_R_DODEL);
|
||||
if (rate & IEEE80211_RATE_BASIC) {
|
||||
IEEE80211_DISCARD(ic, IEEE80211_MSG_XRATE,
|
||||
wh, ieee80211_mgt_subtype_name[subtype >>
|
||||
|
@ -2398,8 +2398,8 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0,
|
|||
return;
|
||||
}
|
||||
rate = ieee80211_setup_rates(ni, rates, xrates,
|
||||
IEEE80211_F_DOSORT | IEEE80211_F_DOFRATE |
|
||||
IEEE80211_F_DONEGO | IEEE80211_F_DODEL);
|
||||
IEEE80211_R_DOSORT | IEEE80211_R_DOFRATE |
|
||||
IEEE80211_R_DONEGO | IEEE80211_R_DODEL);
|
||||
/*
|
||||
* If constrained to 11g-only stations reject an
|
||||
* 11b-only station. We cheat a bit here by looking
|
||||
|
@ -2519,8 +2519,8 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0,
|
|||
|
||||
IEEE80211_VERIFY_ELEMENT(rates, IEEE80211_RATE_MAXSIZE);
|
||||
rate = ieee80211_setup_rates(ni, rates, xrates,
|
||||
IEEE80211_F_DOSORT | IEEE80211_F_DOFRATE |
|
||||
IEEE80211_F_DONEGO | IEEE80211_F_DODEL);
|
||||
IEEE80211_R_DOSORT | IEEE80211_R_DOFRATE |
|
||||
IEEE80211_R_DONEGO | IEEE80211_R_DODEL);
|
||||
if (rate & IEEE80211_RATE_BASIC) {
|
||||
IEEE80211_DPRINTF(ic, IEEE80211_MSG_ASSOC,
|
||||
"[%s] %sassoc failed (rate set mismatch)\n",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ieee80211_node.c,v 1.63 2009/01/03 03:43:23 yamt Exp $ */
|
||||
/* $NetBSD: ieee80211_node.c,v 1.64 2013/01/10 17:40:10 christos Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2001 Atsushi Onoe
|
||||
* Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
|
||||
|
@ -36,7 +36,7 @@
|
|||
__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_node.c,v 1.65 2005/08/13 17:50:21 sam Exp $");
|
||||
#endif
|
||||
#ifdef __NetBSD__
|
||||
__KERNEL_RCSID(0, "$NetBSD: ieee80211_node.c,v 1.63 2009/01/03 03:43:23 yamt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ieee80211_node.c,v 1.64 2013/01/10 17:40:10 christos Exp $");
|
||||
#endif
|
||||
|
||||
#include "opt_inet.h"
|
||||
|
@ -526,7 +526,7 @@ ieee80211_match_bss(struct ieee80211com *ic, struct ieee80211_node *ni)
|
|||
if (ni->ni_capinfo & IEEE80211_CAPINFO_PRIVACY)
|
||||
fail |= 0x04;
|
||||
}
|
||||
rate = ieee80211_fix_rate(ni, IEEE80211_F_DONEGO | IEEE80211_F_DOFRATE);
|
||||
rate = ieee80211_fix_rate(ni, IEEE80211_R_DONEGO | IEEE80211_R_DOFRATE);
|
||||
if (rate & IEEE80211_RATE_BASIC)
|
||||
fail |= 0x08;
|
||||
if (ic->ic_des_esslen != 0 &&
|
||||
|
@ -820,7 +820,7 @@ ieee80211_sta_join(struct ieee80211com *ic, struct ieee80211_node *selbs)
|
|||
* Delete unusable rates; we've already checked
|
||||
* that the negotiated rate set is acceptable.
|
||||
*/
|
||||
ieee80211_fix_rate(selbs, IEEE80211_F_DODEL);
|
||||
ieee80211_fix_rate(selbs, IEEE80211_R_DODEL);
|
||||
/*
|
||||
* Fillin the neighbor table; it will already
|
||||
* exist if we are simply switching mastership.
|
||||
|
@ -1306,7 +1306,7 @@ ieee80211_add_scan(struct ieee80211com *ic,
|
|||
saveie(&ni->ni_wpa_ie, sp->wpa);
|
||||
|
||||
/* NB: must be after ni_chan is setup */
|
||||
ieee80211_setup_rates(ni, sp->rates, sp->xrates, IEEE80211_F_DOSORT);
|
||||
ieee80211_setup_rates(ni, sp->rates, sp->xrates, IEEE80211_R_DOSORT);
|
||||
|
||||
if (!newnode)
|
||||
ieee80211_free_node(ni);
|
||||
|
@ -1336,7 +1336,7 @@ ieee80211_init_neighbor(struct ieee80211com *ic, struct ieee80211_node *ni,
|
|||
|
||||
/* NB: must be after ni_chan is setup */
|
||||
ieee80211_setup_rates(ni, sp->rates, sp->xrates,
|
||||
IEEE80211_F_DODEL | IEEE80211_F_DONEGO | IEEE80211_F_DOSORT);
|
||||
IEEE80211_R_DODEL | IEEE80211_R_DONEGO | IEEE80211_R_DOSORT);
|
||||
|
||||
if (ic->ic_newassoc != NULL)
|
||||
ic->ic_newassoc(ni, isnew);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ieee80211_proto.c,v 1.29 2008/01/13 13:01:12 degroote Exp $ */
|
||||
/* $NetBSD: ieee80211_proto.c,v 1.30 2013/01/10 17:40:10 christos Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2001 Atsushi Onoe
|
||||
* Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
|
||||
|
@ -36,7 +36,7 @@
|
|||
__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_proto.c,v 1.23 2005/08/10 16:22:29 sam Exp $");
|
||||
#endif
|
||||
#ifdef __NetBSD__
|
||||
__KERNEL_RCSID(0, "$NetBSD: ieee80211_proto.c,v 1.29 2008/01/13 13:01:12 degroote Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ieee80211_proto.c,v 1.30 2013/01/10 17:40:10 christos Exp $");
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -356,16 +356,16 @@ ieee80211_fix_rate(struct ieee80211_node *ni, int flags)
|
|||
* If the fixed rate check was requested but no
|
||||
* fixed has been defined then just remove it.
|
||||
*/
|
||||
if ((flags & IEEE80211_F_DOFRATE) &&
|
||||
if ((flags & IEEE80211_R_DOFRATE) &&
|
||||
ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE)
|
||||
flags &= ~IEEE80211_F_DOFRATE;
|
||||
flags &= ~IEEE80211_R_DOFRATE;
|
||||
error = 0;
|
||||
okrate = badrate = fixedrate = 0;
|
||||
srs = &ic->ic_sup_rates[ieee80211_chan2mode(ic, ni->ni_chan)];
|
||||
nrs = &ni->ni_rates;
|
||||
for (i = 0; i < nrs->rs_nrates; ) {
|
||||
ignore = 0;
|
||||
if (flags & IEEE80211_F_DOSORT) {
|
||||
if (flags & IEEE80211_R_DOSORT) {
|
||||
/*
|
||||
* Sort rates.
|
||||
*/
|
||||
|
@ -379,14 +379,14 @@ ieee80211_fix_rate(struct ieee80211_node *ni, int flags)
|
|||
}
|
||||
r = nrs->rs_rates[i] & IEEE80211_RATE_VAL;
|
||||
badrate = r;
|
||||
if (flags & IEEE80211_F_DOFRATE) {
|
||||
if (flags & IEEE80211_R_DOFRATE) {
|
||||
/*
|
||||
* Check any fixed rate is included.
|
||||
*/
|
||||
if (r == RV(srs->rs_rates[ic->ic_fixed_rate]))
|
||||
fixedrate = r;
|
||||
}
|
||||
if (flags & IEEE80211_F_DONEGO) {
|
||||
if (flags & IEEE80211_R_DONEGO) {
|
||||
/*
|
||||
* Check against supported rates.
|
||||
*/
|
||||
|
@ -420,7 +420,7 @@ ieee80211_fix_rate(struct ieee80211_node *ni, int flags)
|
|||
ignore++;
|
||||
}
|
||||
}
|
||||
if (flags & IEEE80211_F_DODEL) {
|
||||
if (flags & IEEE80211_R_DODEL) {
|
||||
/*
|
||||
* Delete unacceptable rates.
|
||||
*/
|
||||
|
@ -439,7 +439,7 @@ ieee80211_fix_rate(struct ieee80211_node *ni, int flags)
|
|||
i++;
|
||||
}
|
||||
if (okrate == 0 || error != 0 ||
|
||||
((flags & IEEE80211_F_DOFRATE) && fixedrate == 0))
|
||||
((flags & IEEE80211_R_DOFRATE) && fixedrate == 0))
|
||||
return badrate | IEEE80211_RATE_BASIC;
|
||||
else
|
||||
return RV(okrate);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ieee80211_proto.h,v 1.18 2011/02/21 23:50:08 jmcneill Exp $ */
|
||||
/* $NetBSD: ieee80211_proto.h,v 1.19 2013/01/10 17:40:10 christos Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2001 Atsushi Onoe
|
||||
* Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
|
||||
|
@ -176,10 +176,10 @@ void ieee80211_aclator_unregister(const struct ieee80211_aclator *);
|
|||
const struct ieee80211_aclator *ieee80211_aclator_get(const char *name);
|
||||
|
||||
/* flags for ieee80211_fix_rate() */
|
||||
#define IEEE80211_F_DOSORT 0x00000001 /* sort rate list */
|
||||
#define IEEE80211_F_DOFRATE 0x00000002 /* use fixed rate */
|
||||
#define IEEE80211_F_DONEGO 0x00000004 /* calc negotiated rate */
|
||||
#define IEEE80211_F_DODEL 0x00000008 /* delete ignore rate */
|
||||
#define IEEE80211_R_DOSORT 0x00000001 /* sort rate list */
|
||||
#define IEEE80211_R_DOFRATE 0x00000002 /* use fixed rate */
|
||||
#define IEEE80211_R_DONEGO 0x00000004 /* calc negotiated rate */
|
||||
#define IEEE80211_R_DODEL 0x00000008 /* delete ignore rate */
|
||||
int ieee80211_fix_rate(struct ieee80211_node *, int);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue