From owner-svn-src-head@freebsd.org Sun Sep 13 04:12:52 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB7CEA0181C; Sun, 13 Sep 2015 04:12:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFAB81722; Sun, 13 Sep 2015 04:12:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8D4Cqie025124; Sun, 13 Sep 2015 04:12:52 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8D4Cqk4025123; Sun, 13 Sep 2015 04:12:52 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509130412.t8D4Cqk4025123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 13 Sep 2015 04:12:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287740 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Sep 2015 04:12:53 -0000 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__);