linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath9k_hw: remove unnecessary parts of the AR9380 SREV check
@ 2011-04-08 18:49 Felix Fietkau
  2011-04-08 22:48 ` Gábor Stefanik
  0 siblings, 1 reply; 3+ messages in thread
From: Felix Fietkau @ 2011-04-08 18:49 UTC (permalink / raw)
  To: linux-wireless; +Cc: linville, lrodriguez

Older versions have not been sold and the driver does not explicitly
check for them anyway, so we can simply ignore the macRev here.
Reduces ath9k_hw size on mips by more than 2 KB.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
 drivers/net/wireless/ath/ath9k/reg.h |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h
index 693d543..2fbbe88 100644
--- a/drivers/net/wireless/ath/ath9k/reg.h
+++ b/drivers/net/wireless/ath/ath9k/reg.h
@@ -858,9 +858,7 @@
 #define AR_SREV_9300(_ah) \
 	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9300))
 #define AR_SREV_9300_20_OR_LATER(_ah) \
-	(((_ah)->hw_version.macVersion > AR_SREV_VERSION_9300) || \
-	 (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9300) && \
-	  ((_ah)->hw_version.macRev >= AR_SREV_REVISION_9300_20)))
+	((_ah)->hw_version.macVersion >= AR_SREV_VERSION_9300)
 
 #define AR_SREV_9485(_ah) \
 	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9485))
-- 
1.7.3.2


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

* Re: [PATCH] ath9k_hw: remove unnecessary parts of the AR9380 SREV check
  2011-04-08 18:49 [PATCH] ath9k_hw: remove unnecessary parts of the AR9380 SREV check Felix Fietkau
@ 2011-04-08 22:48 ` Gábor Stefanik
  2011-04-08 22:56   ` Felix Fietkau
  0 siblings, 1 reply; 3+ messages in thread
From: Gábor Stefanik @ 2011-04-08 22:48 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless, linville, lrodriguez

On Fri, Apr 8, 2011 at 8:49 PM, Felix Fietkau <nbd@openwrt.org> wrote:
> Older versions have not been sold and the driver does not explicitly
> check for them anyway, so we can simply ignore the macRev here.
> Reduces ath9k_hw size on mips by more than 2 KB.
>
> Signed-off-by: Felix Fietkau <nbd@openwrt.org>
> ---
>  drivers/net/wireless/ath/ath9k/reg.h |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h
> index 693d543..2fbbe88 100644
> --- a/drivers/net/wireless/ath/ath9k/reg.h
> +++ b/drivers/net/wireless/ath/ath9k/reg.h
> @@ -858,9 +858,7 @@
>  #define AR_SREV_9300(_ah) \
>        (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9300))
>  #define AR_SREV_9300_20_OR_LATER(_ah) \
> -       (((_ah)->hw_version.macVersion > AR_SREV_VERSION_9300) || \
> -        (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9300) && \
> -         ((_ah)->hw_version.macRev >= AR_SREV_REVISION_9300_20)))
> +       ((_ah)->hw_version.macVersion >= AR_SREV_VERSION_9300)

Shouldn't this entire check be removed and replaced with AR_SREV_9300
everywhere? (BTW, the definition of AR_SREV_9300 has superfluous
parentheses around it.)

>
>  #define AR_SREV_9485(_ah) \
>        (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9485))
> --
> 1.7.3.2
>
> --
> 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
>



-- 
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)

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

* Re: [PATCH] ath9k_hw: remove unnecessary parts of the AR9380 SREV check
  2011-04-08 22:48 ` Gábor Stefanik
@ 2011-04-08 22:56   ` Felix Fietkau
  0 siblings, 0 replies; 3+ messages in thread
From: Felix Fietkau @ 2011-04-08 22:56 UTC (permalink / raw)
  To: Gábor Stefanik; +Cc: linux-wireless, linville, lrodriguez

On 2011-04-09 12:48 AM, Gábor Stefanik wrote:
> On Fri, Apr 8, 2011 at 8:49 PM, Felix Fietkau<nbd@openwrt.org>  wrote:
>>  Older versions have not been sold and the driver does not explicitly
>>  check for them anyway, so we can simply ignore the macRev here.
>>  Reduces ath9k_hw size on mips by more than 2 KB.
>>
>>  Signed-off-by: Felix Fietkau<nbd@openwrt.org>
>>  ---
>>    drivers/net/wireless/ath/ath9k/reg.h |    4 +---
>>    1 files changed, 1 insertions(+), 3 deletions(-)
>>
>>  diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h
>>  index 693d543..2fbbe88 100644
>>  --- a/drivers/net/wireless/ath/ath9k/reg.h
>>  +++ b/drivers/net/wireless/ath/ath9k/reg.h
>>  @@ -858,9 +858,7 @@
>>    #define AR_SREV_9300(_ah) \
>>          (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9300))
>>    #define AR_SREV_9300_20_OR_LATER(_ah) \
>>  -       (((_ah)->hw_version.macVersion>  AR_SREV_VERSION_9300) || \
>>  -        (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9300)&&  \
>>  -         ((_ah)->hw_version.macRev>= AR_SREV_REVISION_9300_20)))
>>  +       ((_ah)->hw_version.macVersion>= AR_SREV_VERSION_9300)
>
> Shouldn't this entire check be removed and replaced with AR_SREV_9300
> everywhere? (BTW, the definition of AR_SREV_9300 has superfluous
> parentheses around it.)
Yes, I was planning on making a patch for that later, because the AR9300 
SREV checks aren't the only ones that need cleaning, almost all of the 
other chip types are affected as well.
I prefer to keep the change that affects the generated code separate 
from that.

- Felix

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

end of thread, other threads:[~2011-04-08 22:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-08 18:49 [PATCH] ath9k_hw: remove unnecessary parts of the AR9380 SREV check Felix Fietkau
2011-04-08 22:48 ` Gábor Stefanik
2011-04-08 22:56   ` Felix Fietkau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).