aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k/base.c
diff options
context:
space:
mode:
authorBruno Randolf <bruno@thinktube.com>2008-01-22 20:27:51 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-31 22:26:35 -0500
commitbe9b72590c05daf34c2b55cd5b7c68375a4a795b (patch)
treeb14df772e982996effc400fce57268f3547d0bc3 /drivers/net/wireless/ath5k/base.c
parent691ba2346d5b88cec62fe8db0bf336a58a07b926 (diff)
ath5k: debug level improvements
* use only one debug level for beacon debugging: unify ATH5K_DEBUG_BEACON and ATH5K_DEBUG_BEACON_PROC. * remove debug level ATH5K_DEBUG_FATAL. doesn't make sense as a debug level - if it's fatal it should be logged as an error. * fancier printing of debug levels. cat /debugfs/ath5k/phy0/debug. * allow debug levels to be changed by echoing their name into /debugfs/ath5k/phy0/debug. this will toggle the state, when it was off it will be turned on and vice versa. * use copy_from_user() when reading from the debug files. use unsigned int for better optimization. reduce buffer sizes on stack. drivers/net/wireless/ath5k/base.c: Changes-licensed-under: 3-Clause-BSD drivers/net/wireless/ath5k/debug.c: Changes-licensed-under: GPL drivers/net/wireless/ath5k/debug.h: Changes-licensed-under: GPL Signed-off-by: Bruno Randolf <bruno@thinktube.com> Acked-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu> Acked-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/ath5k/base.c')
-rw-r--r--drivers/net/wireless/ath5k/base.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 72bcf321d1c..d6599d21919 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -1980,7 +1980,7 @@ ath5k_beacon_send(struct ath5k_softc *sc)
1980 struct ath5k_buf *bf = sc->bbuf; 1980 struct ath5k_buf *bf = sc->bbuf;
1981 struct ath5k_hw *ah = sc->ah; 1981 struct ath5k_hw *ah = sc->ah;
1982 1982
1983 ATH5K_DBG(sc, ATH5K_DEBUG_BEACON_PROC, "in beacon_send\n"); 1983 ATH5K_DBG_UNLIMIT(sc, ATH5K_DEBUG_BEACON, "in beacon_send\n");
1984 1984
1985 if (unlikely(bf->skb == NULL || sc->opmode == IEEE80211_IF_TYPE_STA || 1985 if (unlikely(bf->skb == NULL || sc->opmode == IEEE80211_IF_TYPE_STA ||
1986 sc->opmode == IEEE80211_IF_TYPE_MNTR)) { 1986 sc->opmode == IEEE80211_IF_TYPE_MNTR)) {
@@ -1996,10 +1996,10 @@ ath5k_beacon_send(struct ath5k_softc *sc)
1996 */ 1996 */
1997 if (unlikely(ath5k_hw_num_tx_pending(ah, sc->bhalq) != 0)) { 1997 if (unlikely(ath5k_hw_num_tx_pending(ah, sc->bhalq) != 0)) {
1998 sc->bmisscount++; 1998 sc->bmisscount++;
1999 ATH5K_DBG(sc, ATH5K_DEBUG_BEACON_PROC, 1999 ATH5K_DBG(sc, ATH5K_DEBUG_BEACON,
2000 "missed %u consecutive beacons\n", sc->bmisscount); 2000 "missed %u consecutive beacons\n", sc->bmisscount);
2001 if (sc->bmisscount > 3) { /* NB: 3 is a guess */ 2001 if (sc->bmisscount > 3) { /* NB: 3 is a guess */
2002 ATH5K_DBG(sc, ATH5K_DEBUG_BEACON_PROC, 2002 ATH5K_DBG(sc, ATH5K_DEBUG_BEACON,
2003 "stuck beacon time (%u missed)\n", 2003 "stuck beacon time (%u missed)\n",
2004 sc->bmisscount); 2004 sc->bmisscount);
2005 tasklet_schedule(&sc->restq); 2005 tasklet_schedule(&sc->restq);
@@ -2007,7 +2007,7 @@ ath5k_beacon_send(struct ath5k_softc *sc)
2007 return; 2007 return;
2008 } 2008 }
2009 if (unlikely(sc->bmisscount != 0)) { 2009 if (unlikely(sc->bmisscount != 0)) {
2010 ATH5K_DBG(sc, ATH5K_DEBUG_BEACON_PROC, 2010 ATH5K_DBG(sc, ATH5K_DEBUG_BEACON,
2011 "resume beacon xmit after %u misses\n", 2011 "resume beacon xmit after %u misses\n",
2012 sc->bmisscount); 2012 sc->bmisscount);
2013 sc->bmisscount = 0; 2013 sc->bmisscount = 0;
@@ -2027,7 +2027,7 @@ ath5k_beacon_send(struct ath5k_softc *sc)
2027 2027
2028 ath5k_hw_put_tx_buf(ah, sc->bhalq, bf->daddr); 2028 ath5k_hw_put_tx_buf(ah, sc->bhalq, bf->daddr);
2029 ath5k_hw_tx_start(ah, sc->bhalq); 2029 ath5k_hw_tx_start(ah, sc->bhalq);
2030 ATH5K_DBG(sc, ATH5K_DEBUG_BEACON_PROC, "TXDP[%u] = %llx (%p)\n", 2030 ATH5K_DBG(sc, ATH5K_DEBUG_BEACON, "TXDP[%u] = %llx (%p)\n",
2031 sc->bhalq, (unsigned long long)bf->daddr, bf->desc); 2031 sc->bhalq, (unsigned long long)bf->daddr, bf->desc);
2032 2032
2033 sc->bsent++; 2033 sc->bsent++;