Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb move default last, add symbolic mask.
details: https://anonhg.NetBSD.org/src/rev/13686634f0cb
branches: trunk
changeset: 793494:13686634f0cb
user: christos <christos%NetBSD.org@localhost>
date: Sun Feb 16 16:13:37 2014 +0000
description:
move default last, add symbolic mask.
diffstat:
sys/dev/usb/if_urtwn.c | 12 ++++++------
sys/dev/usb/if_urtwnreg.h | 3 ++-
2 files changed, 8 insertions(+), 7 deletions(-)
diffs (64 lines):
diff -r 92e60418b825 -r 13686634f0cb sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c Sun Feb 16 16:10:27 2014 +0000
+++ b/sys/dev/usb/if_urtwn.c Sun Feb 16 16:13:37 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_urtwn.c,v 1.28 2014/02/16 16:10:27 christos Exp $ */
+/* $NetBSD: if_urtwn.c,v 1.29 2014/02/16 16:13:37 christos Exp $ */
/* $OpenBSD: if_urtwn.c,v 1.20 2011/11/26 06:39:33 ckuethe Exp $ */
/*-
@@ -22,7 +22,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.28 2014/02/16 16:10:27 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.29 2014/02/16 16:13:37 christos Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1758,7 +1758,7 @@
urtwn_write_2(sc, R92C_BCN_INTERVAL, ni->ni_intval);
msr = urtwn_read_1(sc, R92C_MSR);
- msr &= 0xfc;
+ msr &= R92C_MSR_MASK;
switch (ic->ic_opmode) {
case IEEE80211_M_STA:
/* Allow Rx from our BSSID only. */
@@ -1771,9 +1771,6 @@
msr |= R92C_MSR_INFRA;
break;
- default:
- msr |= R92C_MSR_ADHOC;
- break;
case IEEE80211_M_HOSTAP:
urtwn_write_2(sc, R92C_BCNTCFG, 0x000f);
@@ -1791,6 +1788,9 @@
msr |= R92C_MSR_AP;
break;
+ default:
+ msr |= R92C_MSR_ADHOC;
+ break;
}
urtwn_write_1(sc, R92C_MSR, msr);
diff -r 92e60418b825 -r 13686634f0cb sys/dev/usb/if_urtwnreg.h
--- a/sys/dev/usb/if_urtwnreg.h Sun Feb 16 16:10:27 2014 +0000
+++ b/sys/dev/usb/if_urtwnreg.h Sun Feb 16 16:13:37 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_urtwnreg.h,v 1.5 2014/02/16 08:18:28 nonaka Exp $ */
+/* $NetBSD: if_urtwnreg.h,v 1.6 2014/02/16 16:13:37 christos Exp $ */
/* $OpenBSD: if_urtwnreg.h,v 1.3 2010/11/16 18:02:59 damien Exp $ */
/*-
@@ -390,6 +390,7 @@
#define R92C_MSR_ADHOC 0x01
#define R92C_MSR_INFRA 0x02
#define R92C_MSR_AP 0x03
+#define R92C_MSR_MASK (~R92C_MSR_AP)
/* Bits for R92C_PBP. */
#define R92C_PBP_PSRX_M 0x0f
Home |
Main Index |
Thread Index |
Old Index