Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Don't write WEP keys to the chip unless it is ena...



details:   https://anonhg.NetBSD.org/src/rev/a124d496c908
branches:  trunk
changeset: 582818:a124d496c908
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Thu Jul 07 00:12:22 2005 +0000

description:
Don't write WEP keys to the chip unless it is enabled.

Suspend and restart the transmit/receive engines while writing WEP
keys.

diffstat:

 sys/dev/ic/atw.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r 1433d2092f20 -r a124d496c908 sys/dev/ic/atw.c
--- a/sys/dev/ic/atw.c  Thu Jul 07 00:01:32 2005 +0000
+++ b/sys/dev/ic/atw.c  Thu Jul 07 00:12:22 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atw.c,v 1.88 2005/07/06 23:58:14 dyoung Exp $  */
+/*     $NetBSD: atw.c,v 1.89 2005/07/07 00:12:22 dyoung Exp $  */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atw.c,v 1.88 2005/07/06 23:58:14 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atw.c,v 1.89 2005/07/07 00:12:22 dyoung Exp $");
 
 #include "bpfilter.h"
 
@@ -2213,7 +2213,11 @@
 
        if ((sc->sc_flags & ATWF_WEP_SRAM_VALID) != 0)
                return;
+       if (ATW_IS_ENABLED(sc) == 0)
+               return;
+       atw_idle(sc, ATW_NAR_SR | ATW_NAR_ST);
        atw_write_wep(sc);
+       ATW_WRITE(sc, ATW_NAR, sc->sc_opmode);
 }
 
 /* Write WEP keys from the ieee80211com to the ADM8211's SRAM. */



Home | Main Index | Thread Index | Old Index