Author: adrian
Date: Sun Sep 13 04:12:51 2015
New Revision: 287740
URL: https://svnweb.freebsd.org/changeset/base/287740

Log:
  * fiddle with some more of the debugging output
  * yes, when a "sta disconnect" message comes through we should, like,
    disconnect things.  We're not currently generating beacon miss messages,
    and net80211 isn't disconnecting things via software beacon miss receive.
  
  Tested:
  
  * RTL8712, cut 3, STA mode

Modified:
  head/sys/dev/usb/wlan/if_rsu.c

Modified: head/sys/dev/usb/wlan/if_rsu.c
==============================================================================
--- head/sys/dev/usb/wlan/if_rsu.c      Sun Sep 13 04:05:27 2015        
(r287739)
+++ head/sys/dev/usb/wlan/if_rsu.c      Sun Sep 13 04:12:51 2015        
(r287740)
@@ -888,7 +888,7 @@ rsu_fw_cmd(struct rsu_softc *sc, uint8_t
        /* Copy command payload. */
        memcpy(&cmd[1], buf, len);
 
-       RSU_DPRINTF(sc, RSU_DEBUG_TX,
+       RSU_DPRINTF(sc, RSU_DEBUG_TX | RSU_DEBUG_FWCMD,
            "%s: Tx cmd code=0x%x len=0x%x\n",
            __func__, code, cmdsz);
        data->buflen = xferlen;
@@ -1212,7 +1212,9 @@ rsu_event_join_bss(struct rsu_softc *sc,
        rsp = (struct r92s_event_join_bss *)buf;
        res = (int)le32toh(rsp->join_res);
 
-       DPRINTF("Rx join BSS event len=%d res=%d\n", len, res);
+       RSU_DPRINTF(sc, RSU_DEBUG_STATE | RSU_DEBUG_FWCMD,
+           "%s: Rx join BSS event len=%d res=%d\n",
+           __func__, len, res);
        if (res <= 0) {
                RSU_UNLOCK(sc);
                ieee80211_new_state(vap, IEEE80211_S_SCAN, -1);
@@ -1224,8 +1226,10 @@ rsu_event_join_bss(struct rsu_softc *sc,
                DPRINTF("Assoc ID overflow\n");
                tmp = 1;
        }
-       DPRINTF("associated with %s associd=%d\n",
-           ether_sprintf(rsp->bss.macaddr), tmp);
+       RSU_DPRINTF(sc, RSU_DEBUG_STATE | RSU_DEBUG_FWCMD,
+           "%s: associated with %s associd=%d\n",
+           __func__, ether_sprintf(rsp->bss.macaddr), tmp);
+       /* XXX is this required? What's the top two bits for again? */
        ni->ni_associd = tmp | 0xc000;
        RSU_UNLOCK(sc);
        ieee80211_new_state(vap, IEEE80211_S_RUN,
@@ -1239,7 +1243,7 @@ rsu_rx_event(struct rsu_softc *sc, uint8
        struct ieee80211com *ic = &sc->sc_ic;
        struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
 
-       RSU_DPRINTF(sc, RSU_DEBUG_RX,
+       RSU_DPRINTF(sc, RSU_DEBUG_RX | RSU_DEBUG_FWCMD,
            "%s: Rx event code=%d len=%d\n", __func__, code, len);
        switch (code) {
        case R92S_EVT_SURVEY:
@@ -1266,11 +1270,10 @@ rsu_rx_event(struct rsu_softc *sc, uint8
                if (vap->iv_state == IEEE80211_S_AUTH)
                        rsu_event_join_bss(sc, buf, len);
                break;
-#if 0
-XXX This event is occurring regularly, possibly due to some power saving event
-XXX and disrupts the WLAN traffic. Disable for now.
        case R92S_EVT_DEL_STA:
-               DPRINTF("disassociated from %s\n", ether_sprintf(buf));
+               RSU_DPRINTF(sc, RSU_DEBUG_FWCMD | RSU_DEBUG_STATE,
+                   "%s: disassociated from %s\n", __func__,
+                   ether_sprintf(buf));
                if (vap->iv_state == IEEE80211_S_RUN &&
                    IEEE80211_ADDR_EQ(vap->iv_bss->ni_bssid, buf)) {
                        RSU_UNLOCK(sc);
@@ -1278,7 +1281,6 @@ XXX and disrupts the WLAN traffic. Disab
                        RSU_LOCK(sc);
                }
                break;
-#endif
        case R92S_EVT_WPS_PBC:
                RSU_DPRINTF(sc, RSU_DEBUG_RX | RSU_DEBUG_FWCMD,
                    "%s: WPS PBC pushed.\n", __func__);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to