From 0db1178fa91c04b4d542f3ce235e895a7cbdf30d Mon Sep 17 00:00:00 2001 From: nonaka Date: Sun, 16 Feb 2014 08:17:43 +0000 Subject: [PATCH] Use INFRA not ADHOC when opmode is M_STA. --- sys/dev/usb/if_urtwn.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/dev/usb/if_urtwn.c b/sys/dev/usb/if_urtwn.c index 5165339b3dc0..87eb8048c58a 100644 --- a/sys/dev/usb/if_urtwn.c +++ b/sys/dev/usb/if_urtwn.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_urtwn.c,v 1.26 2014/02/14 04:17:41 christos Exp $ */ +/* $NetBSD: if_urtwn.c,v 1.27 2014/02/16 08:17:43 nonaka Exp $ */ /* $OpenBSD: if_urtwn.c,v 1.20 2011/11/26 06:39:33 ckuethe Exp $ */ /*- @@ -22,7 +22,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.26 2014/02/14 04:17:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.27 2014/02/16 08:17:43 nonaka Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1768,7 +1768,9 @@ urtwn_newstate_cb(struct urtwn_softc *sc, void *arg) /* Enable TSF synchronization. */ urtwn_tsf_sync_enable(sc); - /*FALLTHROUGH*/ + + msr |= R92C_MSR_INFRA; + break; default: msr |= R92C_MSR_ADHOC; break; @@ -1786,6 +1788,7 @@ urtwn_newstate_cb(struct urtwn_softc *sc, void *arg) urtwn_write_4(sc, R92C_TCR, reg); reg |= 0x01; urtwn_write_4(sc, R92C_TCR, reg); + msr |= R92C_MSR_AP; break; }