diff options
author | Joe Perches <joe@perches.com> | 2010-12-02 22:12:37 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-07 16:34:48 -0500 |
commit | 226afe68fdbd1aa3680158aca0a3631cbd019626 (patch) | |
tree | 89e31323c0798493b9d0b3ec32df33fc21d82bf6 /drivers/net/wireless/ath/ath9k/xmit.c | |
parent | 3800276a40751539a920ef8e0537ef2e19126799 (diff) |
ath: Convert ath_print to ath_dbg
Remove ath/debug.h and the includes of these files.
Coalesce long formats.
Correct a few misspellings and missing "\n"s from these logging messages.
Remove unnecessary trailing space before a newline.
Remove ARRAY_SIZE casts, use printf type %zu
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/xmit.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 54 |
1 files changed, 25 insertions, 29 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index d26449c91d5f..16d83d0c0959 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -1285,8 +1285,8 @@ static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq, | |||
1285 | 1285 | ||
1286 | bf = list_first_entry(head, struct ath_buf, list); | 1286 | bf = list_first_entry(head, struct ath_buf, list); |
1287 | 1287 | ||
1288 | ath_print(common, ATH_DBG_QUEUE, | 1288 | ath_dbg(common, ATH_DBG_QUEUE, |
1289 | "qnum: %d, txq depth: %d\n", txq->axq_qnum, txq->axq_depth); | 1289 | "qnum: %d, txq depth: %d\n", txq->axq_qnum, txq->axq_depth); |
1290 | 1290 | ||
1291 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) { | 1291 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) { |
1292 | if (txq->axq_depth >= ATH_TXFIFO_DEPTH) { | 1292 | if (txq->axq_depth >= ATH_TXFIFO_DEPTH) { |
@@ -1294,32 +1294,29 @@ static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq, | |||
1294 | return; | 1294 | return; |
1295 | } | 1295 | } |
1296 | if (!list_empty(&txq->txq_fifo[txq->txq_headidx])) | 1296 | if (!list_empty(&txq->txq_fifo[txq->txq_headidx])) |
1297 | ath_print(common, ATH_DBG_XMIT, | 1297 | ath_dbg(common, ATH_DBG_XMIT, |
1298 | "Initializing tx fifo %d which " | 1298 | "Initializing tx fifo %d which is non-empty\n", |
1299 | "is non-empty\n", | 1299 | txq->txq_headidx); |
1300 | txq->txq_headidx); | ||
1301 | INIT_LIST_HEAD(&txq->txq_fifo[txq->txq_headidx]); | 1300 | INIT_LIST_HEAD(&txq->txq_fifo[txq->txq_headidx]); |
1302 | list_splice_init(head, &txq->txq_fifo[txq->txq_headidx]); | 1301 | list_splice_init(head, &txq->txq_fifo[txq->txq_headidx]); |
1303 | INCR(txq->txq_headidx, ATH_TXFIFO_DEPTH); | 1302 | INCR(txq->txq_headidx, ATH_TXFIFO_DEPTH); |
1304 | ath9k_hw_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); | 1303 | ath9k_hw_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); |
1305 | ath_print(common, ATH_DBG_XMIT, | 1304 | ath_dbg(common, ATH_DBG_XMIT, "TXDP[%u] = %llx (%p)\n", |
1306 | "TXDP[%u] = %llx (%p)\n", | 1305 | txq->axq_qnum, ito64(bf->bf_daddr), bf->bf_desc); |
1307 | txq->axq_qnum, ito64(bf->bf_daddr), bf->bf_desc); | ||
1308 | } else { | 1306 | } else { |
1309 | list_splice_tail_init(head, &txq->axq_q); | 1307 | list_splice_tail_init(head, &txq->axq_q); |
1310 | 1308 | ||
1311 | if (txq->axq_link == NULL) { | 1309 | if (txq->axq_link == NULL) { |
1312 | ath9k_hw_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); | 1310 | ath9k_hw_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); |
1313 | ath_print(common, ATH_DBG_XMIT, | 1311 | ath_dbg(common, ATH_DBG_XMIT, "TXDP[%u] = %llx (%p)\n", |
1314 | "TXDP[%u] = %llx (%p)\n", | 1312 | txq->axq_qnum, ito64(bf->bf_daddr), |
1315 | txq->axq_qnum, ito64(bf->bf_daddr), | 1313 | bf->bf_desc); |
1316 | bf->bf_desc); | ||
1317 | } else { | 1314 | } else { |
1318 | *txq->axq_link = bf->bf_daddr; | 1315 | *txq->axq_link = bf->bf_daddr; |
1319 | ath_print(common, ATH_DBG_XMIT, | 1316 | ath_dbg(common, ATH_DBG_XMIT, |
1320 | "link[%u] (%p)=%llx (%p)\n", | 1317 | "link[%u] (%p)=%llx (%p)\n", |
1321 | txq->axq_qnum, txq->axq_link, | 1318 | txq->axq_qnum, txq->axq_link, |
1322 | ito64(bf->bf_daddr), bf->bf_desc); | 1319 | ito64(bf->bf_daddr), bf->bf_desc); |
1323 | } | 1320 | } |
1324 | ath9k_hw_get_desc_link(ah, bf->bf_lastbf->bf_desc, | 1321 | ath9k_hw_get_desc_link(ah, bf->bf_lastbf->bf_desc, |
1325 | &txq->axq_link); | 1322 | &txq->axq_link); |
@@ -1646,7 +1643,7 @@ static struct ath_buf *ath_tx_setup_buffer(struct ieee80211_hw *hw, | |||
1646 | 1643 | ||
1647 | bf = ath_tx_get_buffer(sc); | 1644 | bf = ath_tx_get_buffer(sc); |
1648 | if (!bf) { | 1645 | if (!bf) { |
1649 | ath_print(common, ATH_DBG_XMIT, "TX buffers are full\n"); | 1646 | ath_dbg(common, ATH_DBG_XMIT, "TX buffers are full\n"); |
1650 | return NULL; | 1647 | return NULL; |
1651 | } | 1648 | } |
1652 | 1649 | ||
@@ -1809,7 +1806,7 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb, | |||
1809 | struct ieee80211_hdr * hdr = (struct ieee80211_hdr *)skb->data; | 1806 | struct ieee80211_hdr * hdr = (struct ieee80211_hdr *)skb->data; |
1810 | int q, padpos, padsize; | 1807 | int q, padpos, padsize; |
1811 | 1808 | ||
1812 | ath_print(common, ATH_DBG_XMIT, "TX complete: skb: %p\n", skb); | 1809 | ath_dbg(common, ATH_DBG_XMIT, "TX complete: skb: %p\n", skb); |
1813 | 1810 | ||
1814 | if (aphy) | 1811 | if (aphy) |
1815 | hw = aphy->hw; | 1812 | hw = aphy->hw; |
@@ -1835,9 +1832,8 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb, | |||
1835 | 1832 | ||
1836 | if (sc->ps_flags & PS_WAIT_FOR_TX_ACK) { | 1833 | if (sc->ps_flags & PS_WAIT_FOR_TX_ACK) { |
1837 | sc->ps_flags &= ~PS_WAIT_FOR_TX_ACK; | 1834 | sc->ps_flags &= ~PS_WAIT_FOR_TX_ACK; |
1838 | ath_print(common, ATH_DBG_PS, | 1835 | ath_dbg(common, ATH_DBG_PS, |
1839 | "Going back to sleep after having " | 1836 | "Going back to sleep after having received TX status (0x%lx)\n", |
1840 | "received TX status (0x%lx)\n", | ||
1841 | sc->ps_flags & (PS_WAIT_FOR_BEACON | | 1837 | sc->ps_flags & (PS_WAIT_FOR_BEACON | |
1842 | PS_WAIT_FOR_CAB | | 1838 | PS_WAIT_FOR_CAB | |
1843 | PS_WAIT_FOR_PSPOLL_DATA | | 1839 | PS_WAIT_FOR_PSPOLL_DATA | |
@@ -1986,9 +1982,9 @@ static void ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq) | |||
1986 | int status; | 1982 | int status; |
1987 | int qnum; | 1983 | int qnum; |
1988 | 1984 | ||
1989 | ath_print(common, ATH_DBG_QUEUE, "tx queue %d (%x), link %p\n", | 1985 | ath_dbg(common, ATH_DBG_QUEUE, "tx queue %d (%x), link %p\n", |
1990 | txq->axq_qnum, ath9k_hw_gettxbuf(sc->sc_ah, txq->axq_qnum), | 1986 | txq->axq_qnum, ath9k_hw_gettxbuf(sc->sc_ah, txq->axq_qnum), |
1991 | txq->axq_link); | 1987 | txq->axq_link); |
1992 | 1988 | ||
1993 | for (;;) { | 1989 | for (;;) { |
1994 | spin_lock_bh(&txq->axq_lock); | 1990 | spin_lock_bh(&txq->axq_lock); |
@@ -2103,8 +2099,8 @@ static void ath_tx_complete_poll_work(struct work_struct *work) | |||
2103 | } | 2099 | } |
2104 | 2100 | ||
2105 | if (needreset) { | 2101 | if (needreset) { |
2106 | ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_RESET, | 2102 | ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_RESET, |
2107 | "tx hung, resetting the chip\n"); | 2103 | "tx hung, resetting the chip\n"); |
2108 | ath9k_ps_wakeup(sc); | 2104 | ath9k_ps_wakeup(sc); |
2109 | ath_reset(sc, true); | 2105 | ath_reset(sc, true); |
2110 | ath9k_ps_restore(sc); | 2106 | ath9k_ps_restore(sc); |
@@ -2146,8 +2142,8 @@ void ath_tx_edma_tasklet(struct ath_softc *sc) | |||
2146 | if (status == -EINPROGRESS) | 2142 | if (status == -EINPROGRESS) |
2147 | break; | 2143 | break; |
2148 | if (status == -EIO) { | 2144 | if (status == -EIO) { |
2149 | ath_print(common, ATH_DBG_XMIT, | 2145 | ath_dbg(common, ATH_DBG_XMIT, |
2150 | "Error processing tx status\n"); | 2146 | "Error processing tx status\n"); |
2151 | break; | 2147 | break; |
2152 | } | 2148 | } |
2153 | 2149 | ||