ath9k_hw: check GPM HW write pointer before chip reset
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>
Mon, 11 Jun 2012 06:49:32 +0000 (12:19 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 13 Jun 2012 18:35:53 +0000 (14:35 -0400)
commit3863495b86d8ee8e7e70a328de5b88d555d7305a
tree1d74ca3fbb7774bed9cee07c4162b1ef2e52459b
parent9dd9b0dc1de8031a31b3eaebc6a9c0ab60612026
ath9k_hw: check GPM HW write pointer before chip reset

Both "MAC Warm Reset" and "MCI Reset Rx" will reset GPM HW write_ptr.
We should check software cached write_ptr against HW write_ptr before
reset. Otherwise the pending DMA data will be lost.

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