summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k
diff options
context:
space:
mode:
authorBala Shanmugam <bkamatch@qca.qualcomm.com>2012-06-18 11:36:58 +0530
committerJohn W. Linville <linville@tuxdriver.com>2012-06-20 15:14:47 -0400
commit305dd09f8ce05cc8a8cce4e790a6d3d02e5c4f1d (patch)
tree7bbb13d62c899fbca9c733d0ab74d456d995b4c1 /drivers/net/wireless/ath/ath9k
parent84b60c144cd32db5ca5185405e9b3f84cac9df9a (diff)
ath9k: fix incorrect profile type manupulation
Two MCI interrupts are generated while adding A2DP and headset profiles with different types and same connection handle. While disconnecting, only one MCI interrupt is generated with last added profile type value for both profiles. While adding second profile type decrement first one. Signed-off-by: Bala Shanmugam <bkamatch@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-rw-r--r--drivers/net/wireless/ath/ath9k/mci.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/mci.c b/drivers/net/wireless/ath/ath9k/mci.c
index 7d34a504d61..c40e568b5c2 100644
--- a/drivers/net/wireless/ath/ath9k/mci.c
+++ b/drivers/net/wireless/ath/ath9k/mci.c
@@ -233,8 +233,21 @@ static void ath_mci_process_profile(struct ath_softc *sc,
struct ath_mci_profile_info *entry = NULL;
entry = ath_mci_find_profile(mci, info);
- if (entry)
+ if (entry) {
+ /*
+ * Two MCI interrupts are generated while connecting to
+ * headset and A2DP profile, but only one MCI interrupt
+ * is generated with last added profile type while disconnecting
+ * both profiles.
+ * So while adding second profile type decrement
+ * the first one.
+ */
+ if (entry->type != info->type) {
+ DEC_PROF(mci, entry);
+ INC_PROF(mci, info);
+ }
memcpy(entry, info, 10);
+ }
if (info->start) {
if (!entry && !ath_mci_add_profile(common, mci, info))