diff options
author | Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> | 2011-11-30 00:11:21 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-30 15:08:48 -0500 |
commit | 4421d30ffa4b4271b48d8f1e8c7bd65186bf2cd5 (patch) | |
tree | 33d5cd5ca11867f3f477f27152cf97d23959e86a /drivers/net/wireless/ath/ath9k/ar9003_mac.c | |
parent | e35848134ccbd74fa8162d3b00461e189f913dfc (diff) |
ath9k_hw: check for MCI interrupt in get_isr
check for the condition of MCI interrupt being triggered and
appropriately obtain the values of MCI_INTERRUPT_RX_MSG_RAW and
MCI_INTERRUPT_RAW
Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar9003_mac.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_mac.c | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mac.c b/drivers/net/wireless/ath/ath9k/ar9003_mac.c index ccde784a842..95587e36ab9 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c | |||
@@ -175,15 +175,47 @@ static bool ar9003_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) | |||
175 | u32 isr = 0; | 175 | u32 isr = 0; |
176 | u32 mask2 = 0; | 176 | u32 mask2 = 0; |
177 | struct ath9k_hw_capabilities *pCap = &ah->caps; | 177 | struct ath9k_hw_capabilities *pCap = &ah->caps; |
178 | u32 sync_cause = 0; | ||
179 | struct ath_common *common = ath9k_hw_common(ah); | 178 | struct ath_common *common = ath9k_hw_common(ah); |
179 | struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; | ||
180 | u32 sync_cause = 0, async_cause; | ||
180 | 181 | ||
181 | if (REG_READ(ah, AR_INTR_ASYNC_CAUSE) & AR_INTR_MAC_IRQ) { | 182 | async_cause = REG_READ(ah, AR_INTR_ASYNC_CAUSE); |
183 | |||
184 | if (async_cause & (AR_INTR_MAC_IRQ | AR_INTR_ASYNC_MASK_MCI)) { | ||
182 | if ((REG_READ(ah, AR_RTC_STATUS) & AR_RTC_STATUS_M) | 185 | if ((REG_READ(ah, AR_RTC_STATUS) & AR_RTC_STATUS_M) |
183 | == AR_RTC_STATUS_ON) | 186 | == AR_RTC_STATUS_ON) |
184 | isr = REG_READ(ah, AR_ISR); | 187 | isr = REG_READ(ah, AR_ISR); |
185 | } | 188 | } |
186 | 189 | ||
190 | if (async_cause & AR_INTR_ASYNC_MASK_MCI) { | ||
191 | u32 raw_intr, rx_msg_intr; | ||
192 | |||
193 | rx_msg_intr = REG_READ(ah, AR_MCI_INTERRUPT_RX_MSG_RAW); | ||
194 | raw_intr = REG_READ(ah, AR_MCI_INTERRUPT_RAW); | ||
195 | |||
196 | if ((raw_intr == 0xdeadbeef) || (rx_msg_intr == 0xdeadbeef)) | ||
197 | ath_dbg(common, ATH_DBG_MCI, | ||
198 | "MCI gets 0xdeadbeef during MCI int processing" | ||
199 | "new raw_intr=0x%08x, new rx_msg_raw=0x%08x, " | ||
200 | "raw_intr=0x%08x, rx_msg_raw=0x%08x\n", | ||
201 | raw_intr, rx_msg_intr, mci->raw_intr, | ||
202 | mci->rx_msg_intr); | ||
203 | else { | ||
204 | mci->rx_msg_intr |= rx_msg_intr; | ||
205 | mci->raw_intr |= raw_intr; | ||
206 | *masked |= ATH9K_INT_MCI; | ||
207 | |||
208 | if (rx_msg_intr & AR_MCI_INTERRUPT_RX_MSG_CONT_INFO) | ||
209 | mci->cont_status = | ||
210 | REG_READ(ah, AR_MCI_CONT_STATUS); | ||
211 | |||
212 | REG_WRITE(ah, AR_MCI_INTERRUPT_RX_MSG_RAW, rx_msg_intr); | ||
213 | REG_WRITE(ah, AR_MCI_INTERRUPT_RAW, raw_intr); | ||
214 | ath_dbg(common, ATH_DBG_MCI, "AR_INTR_SYNC_MCI\n"); | ||
215 | |||
216 | } | ||
217 | } | ||
218 | |||
187 | sync_cause = REG_READ(ah, AR_INTR_SYNC_CAUSE) & AR_INTR_SYNC_DEFAULT; | 219 | sync_cause = REG_READ(ah, AR_INTR_SYNC_CAUSE) & AR_INTR_SYNC_DEFAULT; |
188 | 220 | ||
189 | *masked = 0; | 221 | *masked = 0; |