ath9k_hw: increase tx status ring buffer size
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>
Fri, 23 Dec 2011 15:57:02 +0000 (21:27 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 4 Jan 2012 19:30:46 +0000 (14:30 -0500)
AR9003 chips read tx status from ring buffer whose max number of
status descriptor is mininal compared to max number of tx buffers.
On a stress condition, it can be easily overflown which might cause
false tx hung detection. Though increasing number of max status
descriptors consumes more memory, it helps to avoid false positive
chip resets.

Cc: Paul Stewart <pstew@google.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ar9003_mac.c
drivers/net/wireless/ath/ath9k/ar9003_mac.h
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/hw.h

index 4a315155d779fd90232a17343cf349e6ba3d64dc..88c81c5706b249a0e08a25c28217775463dd53dc 100644 (file)
@@ -583,7 +583,7 @@ void ath9k_hw_reset_txstatus_ring(struct ath_hw *ah)
 
 void ath9k_hw_setup_statusring(struct ath_hw *ah, void *ts_start,
                               u32 ts_paddr_start,
-                              u8 size)
+                              u16 size)
 {
 
        ah->ts_paddr_start = ts_paddr_start;
index c50449387bf163144a0ad8491296ca87cc08dfc8..e203b51e968bfbee59888697d733a59a5031e742 100644 (file)
@@ -118,5 +118,5 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah,
 void ath9k_hw_reset_txstatus_ring(struct ath_hw *ah);
 void ath9k_hw_setup_statusring(struct ath_hw *ah, void *ts_start,
                               u32 ts_paddr_start,
-                              u8 size);
+                              u16 size);
 #endif
index 95276e914c1b7c2f1448c705026762dacfdbc8c1..b30e9fc6433f0b8c947ce4029ef7037d11fd7486 100644 (file)
@@ -97,7 +97,7 @@ enum buffer_type {
 #define bf_isampdu(bf)         (bf->bf_state.bf_type & BUF_AMPDU)
 #define bf_isaggr(bf)          (bf->bf_state.bf_type & BUF_AGGR)
 
-#define ATH_TXSTATUS_RING_SIZE 64
+#define ATH_TXSTATUS_RING_SIZE 512
 
 #define        DS2PHYS(_dd, _ds)                                               \
        ((_dd)->dd_desc_paddr + ((caddr_t)(_ds) - (caddr_t)(_dd)->dd_desc))
index 48205c2960b56b185775306c55c3fb449d3f6a2c..6a29004a71b0864afe06f6c5a4b82b77f8c3d050 100644 (file)
@@ -1016,7 +1016,7 @@ struct ath_hw {
        u32 ts_paddr_start;
        u32 ts_paddr_end;
        u16 ts_tail;
-       u8 ts_size;
+       u16 ts_size;
 
        u32 bb_watchdog_last_status;
        u32 bb_watchdog_timeout_ms; /* in ms, 0 to disable */