From 1fb1f6f918b4a10f443184f2031daaf3fb07038d Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Sat, 14 May 2016 23:42:37 +0000 Subject: [PATCH] [bwn] debugging changes. Now that I have 5g working on PHY-N, that "changing band" message happens quite a bit. Make it a debug log, not an explicit printf. --- sys/dev/bwn/if_bwn.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/dev/bwn/if_bwn.c b/sys/dev/bwn/if_bwn.c index b89d29dc4ff4..ea1698883589 100644 --- a/sys/dev/bwn/if_bwn.c +++ b/sys/dev/bwn/if_bwn.c @@ -1879,6 +1879,8 @@ bwn_init(struct bwn_softc *sc) BWN_ASSERT_LOCKED(sc); + DPRINTF(sc, BWN_DEBUG_RESET, "%s: called\n", __func__); + bzero(sc->sc_bssid, IEEE80211_ADDR_LEN); sc->sc_flags |= BWN_FLAG_NEED_BEACON_TP; sc->sc_filters = 0; @@ -1914,6 +1916,8 @@ bwn_stop(struct bwn_softc *sc) BWN_ASSERT_LOCKED(sc); + DPRINTF(sc, BWN_DEBUG_RESET, "%s: called\n", __func__); + if (mac->mac_status >= BWN_MAC_STATUS_INITED) { /* XXX FIXME opmode not based on VAP */ bwn_set_opmode(mac); @@ -4576,7 +4580,8 @@ bwn_switch_band(struct bwn_softc *sc, struct ieee80211_channel *chan) if (up_dev == sc->sc_curmac && sc->sc_curmac->mac_phy.gmode == gmode) return (0); - device_printf(sc->sc_dev, "switching to %s-GHz band\n", + DPRINTF(sc, BWN_DEBUG_RF | BWN_DEBUG_PHY | BWN_DEBUG_RESET, + "switching to %s-GHz band\n", IEEE80211_IS_CHAN_2GHZ(chan) ? "2" : "5"); down_dev = sc->sc_curmac; @@ -4614,6 +4619,8 @@ static void bwn_rf_turnon(struct bwn_mac *mac) { + DPRINTF(mac->mac_sc, BWN_DEBUG_RESET, "%s: called\n", __func__); + bwn_mac_suspend(mac); mac->mac_phy.rf_onoff(mac, 1); mac->mac_phy.rf_on = 1; @@ -4624,6 +4631,8 @@ static void bwn_rf_turnoff(struct bwn_mac *mac) { + DPRINTF(mac->mac_sc, BWN_DEBUG_RESET, "%s: called\n", __func__); + bwn_mac_suspend(mac); mac->mac_phy.rf_onoff(mac, 0); mac->mac_phy.rf_on = 0;