diff mbox

[09/12] ath9k_hw: Configure new switch table for AR9565 BTCOEX

Message ID 1350287738-18687-10-git-send-email-rmanohar@qca.qualcomm.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Manoharan, Rajkumar Oct. 15, 2012, 7:55 a.m. UTC
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sujith Manoharan Oct. 15, 2012, 9:26 a.m. UTC | #1
Rajkumar Manoharan wrote:
> Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
> ---
>  drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> index f3784eb..8621e37 100644
> --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> @@ -3601,7 +3601,7 @@ static void ar9003_hw_ant_ctrl_apply(struct ath_hw *ah, bool is2ghz)
>  	 *   7:4 R/W  SWITCH_TABLE_COM_SPDT_WLAN_IDLE
>  	 * SWITCH_TABLE_COM_SPDT_WLAN_IDLE
>  	 */
> -	if (AR_SREV_9462_20_OR_LATER(ah)) {
> +	if (AR_SREV_9462_20_OR_LATER(ah) || AR_SREV_9565(ah)) {
>  		value = ar9003_switch_com_spdt_get(ah, is2ghz);
>  		REG_RMW_FIELD(ah, AR_PHY_GLB_CONTROL,
>  				AR_SWITCH_TABLE_COM_SPDT_ALL, value);

A cleaner way would be to fix the AR_SREV_9462_20_OR_LATER macro to resemble
all the other *_LATER macros (based on the macVersion).

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
Manoharan, Rajkumar Oct. 15, 2012, 9:40 a.m. UTC | #2
On Mon, Oct 15, 2012 at 02:56:36PM +0530, Sujith Manoharan wrote:
> Rajkumar Manoharan wrote:
> > Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
> > ---
> >  drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> > index f3784eb..8621e37 100644
> > --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> > +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> > @@ -3601,7 +3601,7 @@ static void ar9003_hw_ant_ctrl_apply(struct ath_hw *ah, bool is2ghz)
> >  	 *   7:4 R/W  SWITCH_TABLE_COM_SPDT_WLAN_IDLE
> >  	 * SWITCH_TABLE_COM_SPDT_WLAN_IDLE
> >  	 */
> > -	if (AR_SREV_9462_20_OR_LATER(ah)) {
> > +	if (AR_SREV_9462_20_OR_LATER(ah) || AR_SREV_9565(ah)) {
> >  		value = ar9003_switch_com_spdt_get(ah, is2ghz);
> >  		REG_RMW_FIELD(ah, AR_PHY_GLB_CONTROL,
> >  				AR_SWITCH_TABLE_COM_SPDT_ALL, value);
> 
> A cleaner way would be to fix the AR_SREV_9462_20_OR_LATER macro to resemble
> all the other *_LATER macros (based on the macVersion).
>
I hate *_LATER macros. Its always confusing. Since SPDT is applicable only for
9462 & 9565, I remove the _LATER in v2.

-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
Sujith Manoharan Oct. 15, 2012, 9:42 a.m. UTC | #3
Rajkumar Manoharan wrote:
> I hate *_LATER macros. Its always confusing. Since SPDT is applicable only for
> 9462 & 9565, I remove the _LATER in v2.

The macros in ath9k are clean enough - they just check the macVersion.

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
Manoharan, Rajkumar Oct. 15, 2012, 9:50 a.m. UTC | #4
On Mon, Oct 15, 2012 at 03:12:55PM +0530, Sujith Manoharan wrote:
> Rajkumar Manoharan wrote:
> > I hate *_LATER macros. Its always confusing. Since SPDT is applicable only for
> > 9462 & 9565, I remove the _LATER in v2.
> 
> The macros in ath9k are clean enough - they just check the macVersion.
>
I mean AR9462_20_OR_LATER that checks macRev which is different from other *_LATER macros.
So I'll remove AR9462_20_OR_LATER to avoid confusion.

-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 mbox

Patch

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index f3784eb..8621e37 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -3601,7 +3601,7 @@  static void ar9003_hw_ant_ctrl_apply(struct ath_hw *ah, bool is2ghz)
 	 *   7:4 R/W  SWITCH_TABLE_COM_SPDT_WLAN_IDLE
 	 * SWITCH_TABLE_COM_SPDT_WLAN_IDLE
 	 */
-	if (AR_SREV_9462_20_OR_LATER(ah)) {
+	if (AR_SREV_9462_20_OR_LATER(ah) || AR_SREV_9565(ah)) {
 		value = ar9003_switch_com_spdt_get(ah, is2ghz);
 		REG_RMW_FIELD(ah, AR_PHY_GLB_CONTROL,
 				AR_SWITCH_TABLE_COM_SPDT_ALL, value);