All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] ath9k_hw: Add version/revision macros for AR9565
@ 2012-09-10  3:49 Sujith Manoharan
  2012-09-11 12:42 ` Bala Shanmugam
  0 siblings, 1 reply; 3+ messages in thread
From: Sujith Manoharan @ 2012-09-10  3:49 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

And recognize the device in the init path.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/hw.c  | 7 +++++--
 drivers/net/wireless/ath/ath9k/hw.h  | 1 +
 drivers/net/wireless/ath/ath9k/reg.h | 9 +++++++++
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 48af401..3638626 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -355,7 +355,7 @@ static void ath9k_hw_read_revisions(struct ath_hw *ah)
 			(val & AR_SREV_VERSION2) >> AR_SREV_TYPE2_S;
 		ah->hw_version.macRev = MS(val, AR_SREV_REVISION2);
 
-		if (AR_SREV_9462(ah))
+		if (AR_SREV_9462(ah) || AR_SREV_9565(ah))
 			ah->is_pciexpress = true;
 		else
 			ah->is_pciexpress = (val &
@@ -647,6 +647,7 @@ static int __ath9k_hw_init(struct ath_hw *ah)
 	case AR_SREV_VERSION_9340:
 	case AR_SREV_VERSION_9462:
 	case AR_SREV_VERSION_9550:
+	case AR_SREV_VERSION_9565:
 		break;
 	default:
 		ath_err(common,
@@ -708,7 +709,7 @@ int ath9k_hw_init(struct ath_hw *ah)
 	int ret;
 	struct ath_common *common = ath9k_hw_common(ah);
 
-	/* These are all the AR5008/AR9001/AR9002 hardware family of chipsets */
+	/* These are all the AR5008/AR9001/AR9002/AR9003 hardware family of chipsets */
 	switch (ah->hw_version.devid) {
 	case AR5416_DEVID_PCI:
 	case AR5416_DEVID_PCIE:
@@ -728,6 +729,7 @@ int ath9k_hw_init(struct ath_hw *ah)
 	case AR9300_DEVID_AR9580:
 	case AR9300_DEVID_AR9462:
 	case AR9485_DEVID_AR1111:
+	case AR9300_DEVID_AR9565:
 		break;
 	default:
 		if (common->bus_ops->ath_bus_type == ATH_USB)
@@ -3157,6 +3159,7 @@ static struct {
 	{ AR_SREV_VERSION_9485,         "9485" },
 	{ AR_SREV_VERSION_9462,         "9462" },
 	{ AR_SREV_VERSION_9550,         "9550" },
+	{ AR_SREV_VERSION_9565,         "9565" },
 };
 
 /* For devices with external radios */
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 6599a75..0d17ce0 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -50,6 +50,7 @@
 #define AR9300_DEVID_AR9330	0x0035
 #define AR9300_DEVID_QCA955X	0x0038
 #define AR9485_DEVID_AR1111	0x0037
+#define AR9300_DEVID_AR9565     0x0036
 
 #define AR5416_AR9100_DEVID	0x000b
 
diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h
index 87cac8e..6ca34a4 100644
--- a/drivers/net/wireless/ath/ath9k/reg.h
+++ b/drivers/net/wireless/ath/ath9k/reg.h
@@ -801,6 +801,8 @@
 #define AR_SREV_REVISION_9580_10	4 /* AR9580 1.0 */
 #define AR_SREV_VERSION_9462		0x280
 #define AR_SREV_REVISION_9462_20	2
+#define AR_SREV_VERSION_9565            0x2C0
+#define AR_SREV_REVISION_9565_10        0
 #define AR_SREV_VERSION_9550		0x400
 
 #define AR_SREV_5416(_ah) \
@@ -909,6 +911,13 @@
 	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9462) && \
 	((_ah)->hw_version.macRev >= AR_SREV_REVISION_9462_20))
 
+#define AR_SREV_9565(_ah) \
+	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9565))
+
+#define AR_SREV_9565_10(_ah) \
+	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9565) && \
+	 ((_ah)->hw_version.macRev == AR_SREV_REVISION_9565_10)))
+
 #define AR_SREV_9550(_ah) \
 	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9550))
 
-- 
1.7.12


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/7] ath9k_hw: Add version/revision macros for AR9565
  2012-09-10  3:49 [PATCH 1/7] ath9k_hw: Add version/revision macros for AR9565 Sujith Manoharan
@ 2012-09-11 12:42 ` Bala Shanmugam
  2012-09-11 14:39   ` Sujith Manoharan
  0 siblings, 1 reply; 3+ messages in thread
From: Bala Shanmugam @ 2012-09-11 12:42 UTC (permalink / raw)
  To: Sujith Manoharan; +Cc: linville, linux-wireless

On 09/10/2012 09:19 AM, Sujith Manoharan wrote:
> And recognize the device in the init path.
>
> Signed-off-by: Sujith Manoharan<c_manoha@qca.qualcomm.com>
> ---
>   drivers/net/wireless/ath/ath9k/hw.c  | 7 +++++--
>   drivers/net/wireless/ath/ath9k/hw.h  | 1 +
>   drivers/net/wireless/ath/ath9k/reg.h | 9 +++++++++
>   3 files changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
> index 48af401..3638626 100644
> --- a/drivers/net/wireless/ath/ath9k/hw.c
> +++ b/drivers/net/wireless/ath/ath9k/hw.c
> @@ -355,7 +355,7 @@ static void ath9k_hw_read_revisions(struct ath_hw *ah)
>   			(val&  AR_SREV_VERSION2)>>  AR_SREV_TYPE2_S;
>   		ah->hw_version.macRev = MS(val, AR_SREV_REVISION2);
>
> -		if (AR_SREV_9462(ah))
> +		if (AR_SREV_9462(ah) || AR_SREV_9565(ah))
>   			ah->is_pciexpress = true;
>   		else
>   			ah->is_pciexpress = (val&
> @@ -647,6 +647,7 @@ static int __ath9k_hw_init(struct ath_hw *ah)
>   	case AR_SREV_VERSION_9340:
>   	case AR_SREV_VERSION_9462:
>   	case AR_SREV_VERSION_9550:
> +	case AR_SREV_VERSION_9565:
>   		break;
>   	default:
>   		ath_err(common,
> @@ -708,7 +709,7 @@ int ath9k_hw_init(struct ath_hw *ah)
>   	int ret;
>   	struct ath_common *common = ath9k_hw_common(ah);
>
> -	/* These are all the AR5008/AR9001/AR9002 hardware family of chipsets */
> +	/* These are all the AR5008/AR9001/AR9002/AR9003 hardware family of chipsets */
>   	switch (ah->hw_version.devid) {
>   	case AR5416_DEVID_PCI:
>   	case AR5416_DEVID_PCIE:
> @@ -728,6 +729,7 @@ int ath9k_hw_init(struct ath_hw *ah)
>   	case AR9300_DEVID_AR9580:
>   	case AR9300_DEVID_AR9462:
>   	case AR9485_DEVID_AR1111:
> +	case AR9300_DEVID_AR9565:
>   		break;
>   	default:
>   		if (common->bus_ops->ath_bus_type == ATH_USB)
> @@ -3157,6 +3159,7 @@ static struct {
>   	{ AR_SREV_VERSION_9485,         "9485" },
>   	{ AR_SREV_VERSION_9462,         "9462" },
>   	{ AR_SREV_VERSION_9550,         "9550" },
> +	{ AR_SREV_VERSION_9565,         "9565" },
>   };
>
>   /* For devices with external radios */
> diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
> index 6599a75..0d17ce0 100644
> --- a/drivers/net/wireless/ath/ath9k/hw.h
> +++ b/drivers/net/wireless/ath/ath9k/hw.h
> @@ -50,6 +50,7 @@
>   #define AR9300_DEVID_AR9330	0x0035
>   #define AR9300_DEVID_QCA955X	0x0038
>   #define AR9485_DEVID_AR1111	0x0037
> +#define AR9300_DEVID_AR9565     0x0036
>
>   #define AR5416_AR9100_DEVID	0x000b
>
> diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h
> index 87cac8e..6ca34a4 100644
> --- a/drivers/net/wireless/ath/ath9k/reg.h
> +++ b/drivers/net/wireless/ath/ath9k/reg.h
> @@ -801,6 +801,8 @@
>   #define AR_SREV_REVISION_9580_10	4 /* AR9580 1.0 */
>   #define AR_SREV_VERSION_9462		0x280
>   #define AR_SREV_REVISION_9462_20	2
> +#define AR_SREV_VERSION_9565            0x2C0
> +#define AR_SREV_REVISION_9565_10        0
>   #define AR_SREV_VERSION_9550		0x400
>
>   #define AR_SREV_5416(_ah) \
> @@ -909,6 +911,13 @@
>   	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9462)&&  \
>   	((_ah)->hw_version.macRev>= AR_SREV_REVISION_9462_20))
>
> +#define AR_SREV_9565(_ah) \
> +	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9565))
> +
> +#define AR_SREV_9565_10(_ah) \
> +	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9565)&&  \
> +	 ((_ah)->hw_version.macRev == AR_SREV_REVISION_9565_10)))
> +
There is an extra braces. Please check.
>   #define AR_SREV_9550(_ah) \
>   	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9550))
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/7] ath9k_hw: Add version/revision macros for AR9565
  2012-09-11 12:42 ` Bala Shanmugam
@ 2012-09-11 14:39   ` Sujith Manoharan
  0 siblings, 0 replies; 3+ messages in thread
From: Sujith Manoharan @ 2012-09-11 14:39 UTC (permalink / raw)
  To: Bala Shanmugam; +Cc: Sujith Manoharan, linville, linux-wireless

Bala Shanmugam wrote:
> > +#define AR_SREV_9565_10(_ah) \
> > +	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9565)&&  \
> > +	 ((_ah)->hw_version.macRev == AR_SREV_REVISION_9565_10)))
> > +
> There is an extra braces. Please check.

Good catch.

An updated patch below.

John, I have also updated the patch-set at:
http://sujith.github.com/patches/wl/wl-ath9k-Sep-11-2012.patch

[PATCH v2] ath9k_hw: Add version/revision macros for AR9565

And recognize the device in the init path.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/hw.c  | 7 +++++--
 drivers/net/wireless/ath/ath9k/hw.h  | 1 +
 drivers/net/wireless/ath/ath9k/reg.h | 9 +++++++++
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 4faf0a3..b9fcb12 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -355,7 +355,7 @@ static void ath9k_hw_read_revisions(struct ath_hw *ah)
 			(val & AR_SREV_VERSION2) >> AR_SREV_TYPE2_S;
 		ah->hw_version.macRev = MS(val, AR_SREV_REVISION2);
 
-		if (AR_SREV_9462(ah))
+		if (AR_SREV_9462(ah) || AR_SREV_9565(ah))
 			ah->is_pciexpress = true;
 		else
 			ah->is_pciexpress = (val &
@@ -647,6 +647,7 @@ static int __ath9k_hw_init(struct ath_hw *ah)
 	case AR_SREV_VERSION_9340:
 	case AR_SREV_VERSION_9462:
 	case AR_SREV_VERSION_9550:
+	case AR_SREV_VERSION_9565:
 		break;
 	default:
 		ath_err(common,
@@ -708,7 +709,7 @@ int ath9k_hw_init(struct ath_hw *ah)
 	int ret;
 	struct ath_common *common = ath9k_hw_common(ah);
 
-	/* These are all the AR5008/AR9001/AR9002 hardware family of chipsets */
+	/* These are all the AR5008/AR9001/AR9002/AR9003 hardware family of chipsets */
 	switch (ah->hw_version.devid) {
 	case AR5416_DEVID_PCI:
 	case AR5416_DEVID_PCIE:
@@ -728,6 +729,7 @@ int ath9k_hw_init(struct ath_hw *ah)
 	case AR9300_DEVID_AR9580:
 	case AR9300_DEVID_AR9462:
 	case AR9485_DEVID_AR1111:
+	case AR9300_DEVID_AR9565:
 		break;
 	default:
 		if (common->bus_ops->ath_bus_type == ATH_USB)
@@ -3153,6 +3155,7 @@ static struct {
 	{ AR_SREV_VERSION_9485,         "9485" },
 	{ AR_SREV_VERSION_9462,         "9462" },
 	{ AR_SREV_VERSION_9550,         "9550" },
+	{ AR_SREV_VERSION_9565,         "9565" },
 };
 
 /* For devices with external radios */
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index de6968f..f0798cc 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -50,6 +50,7 @@
 #define AR9300_DEVID_AR9330	0x0035
 #define AR9300_DEVID_QCA955X	0x0038
 #define AR9485_DEVID_AR1111	0x0037
+#define AR9300_DEVID_AR9565     0x0036
 
 #define AR5416_AR9100_DEVID	0x000b
 
diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h
index 87cac8e..4e6760f 100644
--- a/drivers/net/wireless/ath/ath9k/reg.h
+++ b/drivers/net/wireless/ath/ath9k/reg.h
@@ -801,6 +801,8 @@
 #define AR_SREV_REVISION_9580_10	4 /* AR9580 1.0 */
 #define AR_SREV_VERSION_9462		0x280
 #define AR_SREV_REVISION_9462_20	2
+#define AR_SREV_VERSION_9565            0x2C0
+#define AR_SREV_REVISION_9565_10        0
 #define AR_SREV_VERSION_9550		0x400
 
 #define AR_SREV_5416(_ah) \
@@ -909,6 +911,13 @@
 	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9462) && \
 	((_ah)->hw_version.macRev >= AR_SREV_REVISION_9462_20))
 
+#define AR_SREV_9565(_ah) \
+	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9565))
+
+#define AR_SREV_9565_10(_ah) \
+	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9565) && \
+	 ((_ah)->hw_version.macRev == AR_SREV_REVISION_9565_10))
+
 #define AR_SREV_9550(_ah) \
 	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9550))
 
-- 
1.7.12


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-11 14:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-10  3:49 [PATCH 1/7] ath9k_hw: Add version/revision macros for AR9565 Sujith Manoharan
2012-09-11 12:42 ` Bala Shanmugam
2012-09-11 14:39   ` Sujith Manoharan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.