Source-Changes-HG archive

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

[src/trunk]: src/sys/net80211 The IEEE80211_F_ flag prefix was used for both ...



details:   https://anonhg.NetBSD.org/src/rev/805aabe0c5d6
branches:  trunk
changeset: 783855:805aabe0c5d6
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jan 10 17:40:10 2013 +0000

description:
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.

diffstat:

 sys/net80211/ieee80211_input.c |  16 ++++++++--------
 sys/net80211/ieee80211_node.c  |  12 ++++++------
 sys/net80211/ieee80211_proto.c |  18 +++++++++---------
 sys/net80211/ieee80211_proto.h |  10 +++++-----
 4 files changed, 28 insertions(+), 28 deletions(-)

diffs (202 lines):

diff -r 5e6b83c85f08 -r 805aabe0c5d6 sys/net80211/ieee80211_input.c
--- a/sys/net80211/ieee80211_input.c    Thu Jan 10 17:38:10 2013 +0000
+++ b/sys/net80211/ieee80211_input.c    Thu Jan 10 17:40:10 2013 +0000
@@ -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 @@
                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 @@
                        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_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",
diff -r 5e6b83c85f08 -r 805aabe0c5d6 sys/net80211/ieee80211_node.c
--- a/sys/net80211/ieee80211_node.c     Thu Jan 10 17:38:10 2013 +0000
+++ b/sys/net80211/ieee80211_node.c     Thu Jan 10 17:40:10 2013 +0000
@@ -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 @@
                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 @@
                 * 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 @@
        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 @@
 
        /* 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);
diff -r 5e6b83c85f08 -r 805aabe0c5d6 sys/net80211/ieee80211_proto.c
--- a/sys/net80211/ieee80211_proto.c    Thu Jan 10 17:38:10 2013 +0000
+++ b/sys/net80211/ieee80211_proto.c    Thu Jan 10 17:40:10 2013 +0000
@@ -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 @@
         * 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 @@
                }
                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 @@
                                ignore++;
                        }
                }
-               if (flags & IEEE80211_F_DODEL) {
+               if (flags & IEEE80211_R_DODEL) {
                        /*
                         * Delete unacceptable rates.
                         */
@@ -439,7 +439,7 @@
                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);
diff -r 5e6b83c85f08 -r 805aabe0c5d6 sys/net80211/ieee80211_proto.h
--- a/sys/net80211/ieee80211_proto.h    Thu Jan 10 17:38:10 2013 +0000
+++ b/sys/net80211/ieee80211_proto.h    Thu Jan 10 17:40:10 2013 +0000
@@ -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 @@
 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);
 
 /*



Home | Main Index | Thread Index | Old Index