diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2012-02-22 02:10:55 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-27 14:06:35 -0500 |
commit | 5a1e273573d5e4a32aaa82a98a89b3fd711c74f0 (patch) | |
tree | 547222545225a5ce85a529d702e95366e99e51b8 /drivers | |
parent | d68475de9637a476ad8e5870060ccc69a80f2299 (diff) |
ath9k_hw: Use a helper function to get MCI ISR
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_mac.c | 29 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_mci.c | 25 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 1 |
3 files changed, 28 insertions, 27 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mac.c b/drivers/net/wireless/ath/ath9k/ar9003_mac.c index 39cb4829f292..575f36a296f4 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c | |||
@@ -180,7 +180,6 @@ static bool ar9003_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) | |||
180 | u32 mask2 = 0; | 180 | u32 mask2 = 0; |
181 | struct ath9k_hw_capabilities *pCap = &ah->caps; | 181 | struct ath9k_hw_capabilities *pCap = &ah->caps; |
182 | struct ath_common *common = ath9k_hw_common(ah); | 182 | struct ath_common *common = ath9k_hw_common(ah); |
183 | struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; | ||
184 | u32 sync_cause = 0, async_cause; | 183 | u32 sync_cause = 0, async_cause; |
185 | 184 | ||
186 | async_cause = REG_READ(ah, AR_INTR_ASYNC_CAUSE); | 185 | async_cause = REG_READ(ah, AR_INTR_ASYNC_CAUSE); |
@@ -302,32 +301,8 @@ static bool ar9003_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) | |||
302 | ar9003_hw_bb_watchdog_read(ah); | 301 | ar9003_hw_bb_watchdog_read(ah); |
303 | } | 302 | } |
304 | 303 | ||
305 | if (async_cause & AR_INTR_ASYNC_MASK_MCI) { | 304 | if (async_cause & AR_INTR_ASYNC_MASK_MCI) |
306 | u32 raw_intr, rx_msg_intr; | 305 | ar9003_mci_get_isr(ah, masked); |
307 | |||
308 | rx_msg_intr = REG_READ(ah, AR_MCI_INTERRUPT_RX_MSG_RAW); | ||
309 | raw_intr = REG_READ(ah, AR_MCI_INTERRUPT_RAW); | ||
310 | |||
311 | if ((raw_intr == 0xdeadbeef) || (rx_msg_intr == 0xdeadbeef)) | ||
312 | ath_dbg(common, MCI, | ||
313 | "MCI gets 0xdeadbeef during MCI int processing new raw_intr=0x%08x, new rx_msg_raw=0x%08x, raw_intr=0x%08x, rx_msg_raw=0x%08x\n", | ||
314 | raw_intr, rx_msg_intr, mci->raw_intr, | ||
315 | mci->rx_msg_intr); | ||
316 | else { | ||
317 | mci->rx_msg_intr |= rx_msg_intr; | ||
318 | mci->raw_intr |= raw_intr; | ||
319 | *masked |= ATH9K_INT_MCI; | ||
320 | |||
321 | if (rx_msg_intr & AR_MCI_INTERRUPT_RX_MSG_CONT_INFO) | ||
322 | mci->cont_status = | ||
323 | REG_READ(ah, AR_MCI_CONT_STATUS); | ||
324 | |||
325 | REG_WRITE(ah, AR_MCI_INTERRUPT_RX_MSG_RAW, rx_msg_intr); | ||
326 | REG_WRITE(ah, AR_MCI_INTERRUPT_RAW, raw_intr); | ||
327 | ath_dbg(common, MCI, "AR_INTR_SYNC_MCI\n"); | ||
328 | |||
329 | } | ||
330 | } | ||
331 | 306 | ||
332 | if (sync_cause) { | 307 | if (sync_cause) { |
333 | if (sync_cause & AR_INTR_SYNC_RADM_CPL_TIMEOUT) { | 308 | if (sync_cause & AR_INTR_SYNC_RADM_CPL_TIMEOUT) { |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c index 2cd607f9705e..1a01788ec103 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c | |||
@@ -412,6 +412,31 @@ void ar9003_mci_get_interrupt(struct ath_hw *ah, u32 *raw_intr, | |||
412 | } | 412 | } |
413 | EXPORT_SYMBOL(ar9003_mci_get_interrupt); | 413 | EXPORT_SYMBOL(ar9003_mci_get_interrupt); |
414 | 414 | ||
415 | void ar9003_mci_get_isr(struct ath_hw *ah, enum ath9k_int *masked) | ||
416 | { | ||
417 | struct ath_common *common = ath9k_hw_common(ah); | ||
418 | struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; | ||
419 | u32 raw_intr, rx_msg_intr; | ||
420 | |||
421 | rx_msg_intr = REG_READ(ah, AR_MCI_INTERRUPT_RX_MSG_RAW); | ||
422 | raw_intr = REG_READ(ah, AR_MCI_INTERRUPT_RAW); | ||
423 | |||
424 | if ((raw_intr == 0xdeadbeef) || (rx_msg_intr == 0xdeadbeef)) { | ||
425 | ath_dbg(common, MCI, | ||
426 | "MCI gets 0xdeadbeef during int processing\n"); | ||
427 | } else { | ||
428 | mci->rx_msg_intr |= rx_msg_intr; | ||
429 | mci->raw_intr |= raw_intr; | ||
430 | *masked |= ATH9K_INT_MCI; | ||
431 | |||
432 | if (rx_msg_intr & AR_MCI_INTERRUPT_RX_MSG_CONT_INFO) | ||
433 | mci->cont_status = REG_READ(ah, AR_MCI_CONT_STATUS); | ||
434 | |||
435 | REG_WRITE(ah, AR_MCI_INTERRUPT_RX_MSG_RAW, rx_msg_intr); | ||
436 | REG_WRITE(ah, AR_MCI_INTERRUPT_RAW, raw_intr); | ||
437 | } | ||
438 | } | ||
439 | |||
415 | void ar9003_mci_2g5g_changed(struct ath_hw *ah, bool is_2g) | 440 | void ar9003_mci_2g5g_changed(struct ath_hw *ah, bool is_2g) |
416 | { | 441 | { |
417 | struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; | 442 | struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 6a29004a71b0..ebc32d00fecc 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -1231,6 +1231,7 @@ void ar9003_mci_send_lna_transfer(struct ath_hw *ah, bool wait_done); | |||
1231 | void ar9003_mci_sync_bt_state(struct ath_hw *ah); | 1231 | void ar9003_mci_sync_bt_state(struct ath_hw *ah); |
1232 | void ar9003_mci_get_interrupt(struct ath_hw *ah, u32 *raw_intr, | 1232 | void ar9003_mci_get_interrupt(struct ath_hw *ah, u32 *raw_intr, |
1233 | u32 *rx_msg_intr); | 1233 | u32 *rx_msg_intr); |
1234 | void ar9003_mci_get_isr(struct ath_hw *ah, enum ath9k_int *masked); | ||
1234 | 1235 | ||
1235 | #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT | 1236 | #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT |
1236 | static inline enum ath_btcoex_scheme | 1237 | static inline enum ath_btcoex_scheme |