Source-Changes-HG archive

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

[src/trunk]: src/sys/dev PR/31000: FUKAUMI Naoki: 2 bugs in ral driver:



details:   https://anonhg.NetBSD.org/src/rev/4c10da24e995
branches:  trunk
changeset: 583642:4c10da24e995
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Aug 16 17:02:34 2005 +0000

description:
PR/31000: FUKAUMI Naoki: 2 bugs in ral driver:
- remove driver-private key allocators; use the default one instead
  so wpa keys are handled properly (if_ral.c, if_ural.c rev 1.9)

- remove local mods that snuck into rev 1.6 (if_ral.c rev 1.10)

diffstat:

 sys/dev/ic/ral.c      |  23 ++++-------------------
 sys/dev/usb/if_ural.c |  18 +++---------------
 2 files changed, 7 insertions(+), 34 deletions(-)

diffs (128 lines):

diff -r f9b25089d1c0 -r 4c10da24e995 sys/dev/ic/ral.c
--- a/sys/dev/ic/ral.c  Tue Aug 16 16:33:50 2005 +0000
+++ b/sys/dev/ic/ral.c  Tue Aug 16 17:02:34 2005 +0000
@@ -1,6 +1,6 @@
-/*     $NetBSD: ral.c,v 1.4 2005/07/12 12:13:00 drochner Exp $ */
+/*     $NetBSD: ral.c,v 1.5 2005/08/16 17:02:34 christos Exp $ */
 /*     $OpenBSD: ral.c,v 1.56 2005/07/02 23:14:42 brad Exp $  */
-/*     $FreeBSD: src/sys/dev/ral/if_ral.c,v 1.8 2005/07/08 19:33:42 damien Exp $       */
+/*     $FreeBSD: /a/cvsroot/freebsd.repo/ncvs/src/sys/dev/ral/if_ral.c,v 1.10 2005/07/10 22:25:44 sam Exp $    */
 
 /*-
  * Copyright (c) 2005
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ral.c,v 1.4 2005/07/12 12:13:00 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ral.c,v 1.5 2005/08/16 17:02:34 christos Exp $");
 
 #include "bpfilter.h"
 
@@ -90,8 +90,6 @@
                            struct ral_rx_ring *);
 static struct          ieee80211_node *ral_node_alloc(
                            struct ieee80211_node_table *);
-static int             ral_key_alloc(struct ieee80211com *,
-                           const struct ieee80211_key *);
 static int             ral_media_change(struct ifnet *);
 static void            ral_next_scan(void *);
 static void            ral_iter_func(void *, struct ieee80211_node *);
@@ -452,7 +450,6 @@
        /* override state transition machine */
        sc->sc_newstate = ic->ic_newstate;
        ic->ic_newstate = ral_newstate;
-       ic->ic_crypto.cs_key_alloc = ral_key_alloc;
        ieee80211_media_init(ic, ral_media_change, ieee80211_media_status);
 
 #if NBPFILTER > 0
@@ -814,15 +811,6 @@
 }
 
 static int
-ral_key_alloc(struct ieee80211com *ic, const struct ieee80211_key *k)
-{
-       if (k >= ic->ic_nw_keys && k < &ic->ic_nw_keys[IEEE80211_WEP_NKID])
-               return k - ic->ic_nw_keys;
-
-       return IEEE80211_KEYIX_NONE;
-}
-
-static int
 ral_media_change(struct ifnet *ifp)
 {
        int error;
@@ -881,7 +869,6 @@
 ral_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
 {
        struct ral_softc *sc = ic->ic_ifp->if_softc;
-       struct ifnet *ifp = &sc->sc_if;
        enum ieee80211_state ostate;
        struct mbuf *m;
        int error = 0;
@@ -918,10 +905,8 @@
        case IEEE80211_S_RUN:
                ral_set_chan(sc, ic->ic_bss->ni_chan);
 
-               if (ic->ic_opmode != IEEE80211_M_MONITOR) {
+               if (ic->ic_opmode != IEEE80211_M_MONITOR)
                        ral_set_bssid(sc, ic->ic_bss->ni_bssid);
-                       ral_update_slot(ifp);
-               }
 
                if (ic->ic_opmode == IEEE80211_M_HOSTAP ||
                    ic->ic_opmode == IEEE80211_M_IBSS) {
diff -r f9b25089d1c0 -r 4c10da24e995 sys/dev/usb/if_ural.c
--- a/sys/dev/usb/if_ural.c     Tue Aug 16 16:33:50 2005 +0000
+++ b/sys/dev/usb/if_ural.c     Tue Aug 16 17:02:34 2005 +0000
@@ -1,6 +1,6 @@
-/*     $NetBSD: if_ural.c,v 1.5 2005/07/12 12:51:03 drochner Exp $ */
+/*     $NetBSD: if_ural.c,v 1.6 2005/08/16 17:02:34 christos Exp $ */
 /*     $OpenBSD: if_ral.c,v 1.38 2005/07/07 08:33:22 jsg Exp $  */
-/*     $FreeBSD: src/sys/dev/usb/if_ural.c,v 1.9 2005/07/08 19:19:06 damien Exp $      */
+/*     $FreeBSD: /a/cvsroot/freebsd.repo/ncvs/src/sys/dev/usb/if_ural.c,v 1.10 2005/07/10 00:17:05 sam Exp $   */
 
 /*-
  * Copyright (c) 2005
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ural.c,v 1.5 2005/07/12 12:51:03 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ural.c,v 1.6 2005/08/16 17:02:34 christos Exp $");
 
 #include "bpfilter.h"
 
@@ -114,8 +114,6 @@
 Static void            ural_free_tx_list(struct ural_softc *);
 Static int             ural_alloc_rx_list(struct ural_softc *);
 Static void            ural_free_rx_list(struct ural_softc *);
-Static int             ural_key_alloc(struct ieee80211com *,
-                           const struct ieee80211_key *);
 Static int             ural_media_change(struct ifnet *);
 Static void            ural_next_scan(void *);
 Static void            ural_task(void *);
@@ -487,7 +485,6 @@
        /* override state transition machine */
        sc->sc_newstate = ic->ic_newstate;
        ic->ic_newstate = ural_newstate;
-       ic->ic_crypto.cs_key_alloc = ural_key_alloc;
        ieee80211_media_init(ic, ural_media_change, ieee80211_media_status);
 
 #if NBPFILTER > 0
@@ -681,15 +678,6 @@
 }
 
 Static int
-ural_key_alloc(struct ieee80211com *ic, const struct ieee80211_key *k)
-{
-       if (k >= ic->ic_nw_keys && k < &ic->ic_nw_keys[IEEE80211_WEP_NKID])
-               return k - ic->ic_nw_keys;
-
-       return IEEE80211_KEYIX_NONE;
-}
-
-Static int
 ural_media_change(struct ifnet *ifp)
 {
        int error;



Home | Main Index | Thread Index | Old Index