ath9k_hw: Fix invalid MCI GPM index access/caching
authorMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Tue, 4 Sep 2012 14:03:32 +0000 (19:33 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 11 Sep 2012 19:13:51 +0000 (15:13 -0400)
commit90be994cd0d70fbe4a97b144806db6cfa497392c
tree2f9dc3d536d905d055a8007dd20f217c5fdfd1db
parentaf2c8ffe56133928355d1d51978b35115ffbbc2a
ath9k_hw: Fix invalid MCI GPM index access/caching

There is a possibility that AR_MCI_GPM_1 register can
return 0xdeadbeef and this results in caching of invalid
GPM index in ar9003_mci_is_gpm_valid. Ensure we
have appropriate checks to avoid this.

Cc: xijin luo <xijin@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ar9003_mci.c