ath5k: Add new function to stop rx/tx DMA
Nick Kossifidis
maintainerPATCH 2/30 ath5k: Add new function to stop rx/tx DMA
* Add a new function to stop rx/tx dma and use in when reset starts
Signed-off-by Nick Kossifidis <[email protected]>
--- drivers/net/wireless/ath/ath5k/ath5k.h | 3 +- drivers/net/wireless/ath/ath5k/dma.c | 52 ++++++++++++++++++++++++++++++-- drivers/net/wireless/ath/ath5k/reset.c | 13 +++++--- 3 files changed, 59 insertions(+), 9 deletions(-)
drivers/net/wireless/ath/ath5k/ath5k.h +2 -1
@@ -1180,8 +1180,9 @@ bool ath5k_hw_is_intr_pending(struct ath5k_hw *ah);int ath5k_hw_get_isr (struct ath5k_hw *ah,enum ath5k_int *interrupt_mask);enum ath5k_int ath5k_hw_set_imr (struct ath5k_hw *ah,enum ath5k_int new_mask);void ath5k_hw_update_mib_counters (struct ath5k_hw *ah); -/* Init function */ +/* Init/Stop functions */ void ath5k_hw_dma_init (struct ath5k_hw *ah); +int ath5k_hw_dma_stop (struct ath5k_hw *ah);/* EEPROM access functions */ int ath5k_eeprom_init (struct ath5k_hw *ah);
drivers/net/wireless/ath/ath5k/dma.c +49 -3
73 lines not on this page · raw message
drivers/net/wireless/ath/ath5k/reset.c +8 -5
@@ -823,6 +823,14 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode, mode =0 ;/* +* Stop DMA +* +* Note: If DMA didn't stop continue +* since only a reset will fix it. +*/ +ath5k_hw_dma_stop (ah); + +/* * Save some registers before a reset */ /*DCU/Antenna selection not available on 5210*/
@@ -1015,11 +1023,6 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,*/ ath5k_hw_pcu_init (ah, op_mode, mode); -/* Clear any pending interrupts -* PISR/SISR Not available on 5210 */ -if (ah->ah_version !=AR5K_AR5210 ) -ath5k_hw_reg_write (ah,0xffffffff ,AR5K_PISR ); -/* * Initialize PHY */