Message ID | 1350287738-18687-6-git-send-email-rmanohar@qca.qualcomm.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Rajkumar Manoharan wrote: > Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> > --- > drivers/net/wireless/ath/ath9k/ar9003_mci.c | 11 ++++++++++- > drivers/net/wireless/ath/ath9k/reg.h | 3 +++ > 2 files changed, 13 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c > index c46d8f1..466ac8da 100644 > --- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c > +++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c > @@ -938,6 +938,9 @@ int ar9003_mci_reset(struct ath_hw *ah, bool en_int, bool is_2g, > mci->ready = true; > ar9003_mci_prep_interface(ah); > > + if (AR_SREV_9565(ah)) > + REG_RMW_FIELD(ah, AR_MCI_DBG_CNT_CTRL, > + AR_MCI_DBG_CNT_CTRL_ENABLE, 0); > if (en_int) > ar9003_mci_enable_interrupt(ah); > > @@ -1179,13 +1182,19 @@ int ar9003_mci_setup(struct ath_hw *ah, u32 gpm_addr, void *gpm_buf, > u16 len, u32 sched_addr) > { > struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; > + int ret; > > mci->gpm_addr = gpm_addr; > mci->gpm_buf = gpm_buf; > mci->gpm_len = len; > mci->sched_addr = sched_addr; > > - return ar9003_mci_reset(ah, true, true, true); > + ret = ar9003_mci_reset(ah, true, true, true); > + > + if (AR_SREV_9565(ah)) > + REG_RMW_FIELD(ah, AR_MCI_DBG_CNT_CTRL, > + AR_MCI_DBG_CNT_CTRL_ENABLE, 0); > + return ret; Why do this is two different places, when reset() is actually called from setup() ? Sujith -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Oct 15, 2012 at 02:50:10PM +0530, Sujith Manoharan wrote: > Rajkumar Manoharan wrote: > > Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> > > --- > > drivers/net/wireless/ath/ath9k/ar9003_mci.c | 11 ++++++++++- > > drivers/net/wireless/ath/ath9k/reg.h | 3 +++ > > 2 files changed, 13 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c > > index c46d8f1..466ac8da 100644 > > --- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c > > +++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c > > @@ -938,6 +938,9 @@ int ar9003_mci_reset(struct ath_hw *ah, bool en_int, bool is_2g, > > mci->ready = true; > > ar9003_mci_prep_interface(ah); > > > > + if (AR_SREV_9565(ah)) > > + REG_RMW_FIELD(ah, AR_MCI_DBG_CNT_CTRL, > > + AR_MCI_DBG_CNT_CTRL_ENABLE, 0); > > if (en_int) > > ar9003_mci_enable_interrupt(ah); > > > > @@ -1179,13 +1182,19 @@ int ar9003_mci_setup(struct ath_hw *ah, u32 gpm_addr, void *gpm_buf, > > u16 len, u32 sched_addr) > > { > > struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; > > + int ret; > > > > mci->gpm_addr = gpm_addr; > > mci->gpm_buf = gpm_buf; > > mci->gpm_len = len; > > mci->sched_addr = sched_addr; > > > > - return ar9003_mci_reset(ah, true, true, true); > > + ret = ar9003_mci_reset(ah, true, true, true); > > + > > + if (AR_SREV_9565(ah)) > > + REG_RMW_FIELD(ah, AR_MCI_DBG_CNT_CTRL, > > + AR_MCI_DBG_CNT_CTRL_ENABLE, 0); > > + return ret; > > Why do this is two different places, when reset() is actually called from > setup() ? > Oops. Thanks -Rajkumar -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c index c46d8f1..466ac8da 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c @@ -938,6 +938,9 @@ int ar9003_mci_reset(struct ath_hw *ah, bool en_int, bool is_2g, mci->ready = true; ar9003_mci_prep_interface(ah); + if (AR_SREV_9565(ah)) + REG_RMW_FIELD(ah, AR_MCI_DBG_CNT_CTRL, + AR_MCI_DBG_CNT_CTRL_ENABLE, 0); if (en_int) ar9003_mci_enable_interrupt(ah); @@ -1179,13 +1182,19 @@ int ar9003_mci_setup(struct ath_hw *ah, u32 gpm_addr, void *gpm_buf, u16 len, u32 sched_addr) { struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; + int ret; mci->gpm_addr = gpm_addr; mci->gpm_buf = gpm_buf; mci->gpm_len = len; mci->sched_addr = sched_addr; - return ar9003_mci_reset(ah, true, true, true); + ret = ar9003_mci_reset(ah, true, true, true); + + if (AR_SREV_9565(ah)) + REG_RMW_FIELD(ah, AR_MCI_DBG_CNT_CTRL, + AR_MCI_DBG_CNT_CTRL_ENABLE, 0); + return ret; } EXPORT_SYMBOL(ar9003_mci_setup); diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h index c7a9ea7..8f40dba 100644 --- a/drivers/net/wireless/ath/ath9k/reg.h +++ b/drivers/net/wireless/ath/ath9k/reg.h @@ -2363,5 +2363,8 @@ enum { #define AR_MCI_MISC 0x1a74 #define AR_MCI_MISC_HW_FIX_EN 0x00000001 #define AR_MCI_MISC_HW_FIX_EN_S 0 +#define AR_MCI_DBG_CNT_CTRL 0x1a78 +#define AR_MCI_DBG_CNT_CTRL_ENABLE 0x00000001 +#define AR_MCI_DBG_CNT_CTRL_ENABLE_S 0 #endif
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> --- drivers/net/wireless/ath/ath9k/ar9003_mci.c | 11 ++++++++++- drivers/net/wireless/ath/ath9k/reg.h | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-)