Source-Changes-HG archive

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

[src-draft/trunk]: src/sys/dev/pci Update iwn for ic/if split. iwn parent is...



details:   https://anonhg.NetBSD.org/src-all/rev/9e67542a187f
branches:  trunk
changeset: 950674:9e67542a187f
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Fri Oct 09 17:22:42 2020 +1100

description:
Update iwn for ic/if split.  iwn parent is now the same as rtwn/iwm.

diffstat:

 sys/dev/pci/if_iwn.c    |  21 +++++++++++++++++----
 sys/dev/pci/if_iwnvar.h |   1 +
 2 files changed, 18 insertions(+), 4 deletions(-)

diffs (72 lines):

diff -r 64578ef6e2b5 -r 9e67542a187f sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c      Fri Oct 09 17:14:42 2020 +1100
+++ b/sys/dev/pci/if_iwn.c      Fri Oct 09 17:22:42 2020 +1100
@@ -231,7 +231,7 @@
                    struct ieee80211_node *, int);
 static void    iwn_start(struct ifnet *);
 static void    iwn_watchdog(struct ifnet *);
-static int     iwn_ioctl(struct ifnet *, u_long, void *);
+//static int   iwn_ioctl(struct ifnet *, u_long, void *);
 static int     iwn_cmd(struct iwn_softc *, int, const void *, int, int);
 static int     iwn4965_add_node(struct iwn_softc *, struct iwn_node_info *,
                    int);
@@ -874,10 +874,21 @@
 iwn_parent(struct ieee80211com *ic)
 {
        struct iwn_softc *sc __unused = ic->ic_softc;
-
+       bool startall = false;
+
+       if (ic->ic_nrunning > 0) {
+               if ((sc->sc_flags & IWN_FLAG_STARTED) == 0) {
+                       sc->sc_flags |= IWN_FLAG_STARTED;
+                       startall = true;
+               } else {
+                       /* update filters or whatever */
+               }
+       }
+
+       if (startall)
+               ieee80211_start_all(ic);
        DPRINTFN(DBG_FN, ("%s: %s\n",device_xname(sc->sc_dev), __func__));
 
-       /* Not sure what to do here yet. */
 } 
 
 static struct ieee80211vap *
@@ -909,7 +920,7 @@
 
        ifp = vap->iv_ifp;
        ifp->if_init = iwn_init;
-       ifp->if_ioctl = iwn_ioctl;
+       //ifp->if_ioctl = iwn_ioctl;
        ifp->if_start = iwn_start;
        // ifp->if_watchdog = i_watchdog;  NNN
        ifp->if_extflags |= IFEF_MPSAFE;
@@ -3722,6 +3733,7 @@
 //     ieee80211_watchdog(&sc->sc_ic);
 }
 
+#if 0
 static int
 iwn_ioctl(struct ifnet *ifp, u_long cmd, void *data)
 {
@@ -3782,6 +3794,7 @@
        splx(s);
        return error;
 }
+#endif
 
 /*
  * Send a command to the firmware.
diff -r 64578ef6e2b5 -r 9e67542a187f sys/dev/pci/if_iwnvar.h
--- a/sys/dev/pci/if_iwnvar.h   Fri Oct 09 17:14:42 2020 +1100
+++ b/sys/dev/pci/if_iwnvar.h   Fri Oct 09 17:22:42 2020 +1100
@@ -223,6 +223,7 @@
 #define IWN_FLAG_SCANNING_5GHZ (1 << 10)
 #define IWN_FLAG_SCANNING      (IWN_FLAG_SCANNING_2GHZ|IWN_FLAG_SCANNING_5GHZ)
 #define IWN_FLAG_ATTACHED      (1 << 11)
+#define IWN_FLAG_STARTED       (1 << 12)
 
        uint8_t                 hw_type;
 



Home | Main Index | Thread Index | Old Index