linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ath9k_hw: Fix possible OOB array indexing in gen_timer_index[] on 64-bit
@ 2009-11-13  9:02 Vasanthakumar Thiagarajan
  2009-11-13  9:02 ` [PATCH 2/2] ath9k_hw: Fix AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB and its shift value in 0x4054 Vasanthakumar Thiagarajan
  0 siblings, 1 reply; 6+ messages in thread
From: Vasanthakumar Thiagarajan @ 2009-11-13  9:02 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Luis.Rodriguez, Jouni.Malinen, ath9k-devel

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
---
 drivers/net/wireless/ath/ath9k/hw.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 6d3e314..abaa2f0 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -432,7 +432,7 @@ struct ath9k_hw_version {
  * Using de Bruijin sequence to to look up 1's index in a 32 bit number
  * debruijn32 = 0000 0111 0111 1100 1011 0101 0011 0001
  */
-#define debruijn32 0x077CB531UL
+#define debruijn32 0x077CB531U
 
 struct ath_gen_timer_configuration {
 	u32 next_addr;
-- 
1.5.5.1


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

* [PATCH 2/2] ath9k_hw: Fix AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB and its shift value in 0x4054
  2009-11-13  9:02 [PATCH 1/2] ath9k_hw: Fix possible OOB array indexing in gen_timer_index[] on 64-bit Vasanthakumar Thiagarajan
@ 2009-11-13  9:02 ` Vasanthakumar Thiagarajan
  2009-11-13 17:14   ` Luis R. Rodriguez
  0 siblings, 1 reply; 6+ messages in thread
From: Vasanthakumar Thiagarajan @ 2009-11-13  9:02 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Luis.Rodriguez, Jouni.Malinen, ath9k-devel

The bit value of AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB is wrong, it should
be 0x400 and the number of bits to be right shifted is 10. Having this
wrong value in 0x4054 sometimes affects bt quality on btcoex environment.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
---
 drivers/net/wireless/ath/ath9k/reg.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h
index 061e12c..49ec25f 100644
--- a/drivers/net/wireless/ath/ath9k/reg.h
+++ b/drivers/net/wireless/ath/ath9k/reg.h
@@ -971,10 +971,10 @@ enum {
 #define AR_GPIO_INPUT_EN_VAL_BT_ACTIVE_S         4
 #define AR_GPIO_INPUT_EN_VAL_RFSILENT_DEF        0x00000080
 #define AR_GPIO_INPUT_EN_VAL_RFSILENT_DEF_S      7
+#define AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB      0x00000400
+#define AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB_S    10
 #define AR_GPIO_INPUT_EN_VAL_BT_ACTIVE_BB        0x00001000
 #define AR_GPIO_INPUT_EN_VAL_BT_ACTIVE_BB_S      12
-#define AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB      0x00001000
-#define AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB_S    1
 #define AR_GPIO_INPUT_EN_VAL_RFSILENT_BB         0x00008000
 #define AR_GPIO_INPUT_EN_VAL_RFSILENT_BB_S       15
 #define AR_GPIO_RTC_RESET_OVERRIDE_ENABLE        0x00010000
-- 
1.5.5.1


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

* Re: [PATCH 2/2] ath9k_hw: Fix AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB and its shift value in 0x4054
  2009-11-13  9:02 ` [PATCH 2/2] ath9k_hw: Fix AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB and its shift value in 0x4054 Vasanthakumar Thiagarajan
@ 2009-11-13 17:14   ` Luis R. Rodriguez
  2009-11-16  7:20     ` Vasanthakumar Thiagarajan
  0 siblings, 1 reply; 6+ messages in thread
From: Luis R. Rodriguez @ 2009-11-13 17:14 UTC (permalink / raw)
  To: Vasanth Thiagarajan
  Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	Luis Rodriguez, Jouni Malinen, ath9k-devel@lists.ath9k.org

On Fri, Nov 13, 2009 at 01:02:40AM -0800, Vasanth Thiagarajan wrote:
> The bit value of AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB is wrong, it should
> be 0x400 and the number of bits to be right shifted is 10. Having this
> wrong value in 0x4054 sometimes affects bt quality on btcoex environment.
> 
> Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>

These both seem small enough and reasonable for stable fixes no?
Although I didn't get the impact of the first one..

  Luis

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

* Re: [PATCH 2/2] ath9k_hw: Fix AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB and its shift value in 0x4054
  2009-11-13 17:14   ` Luis R. Rodriguez
@ 2009-11-16  7:20     ` Vasanthakumar Thiagarajan
  2009-11-16 15:36       ` Luis R. Rodriguez
  0 siblings, 1 reply; 6+ messages in thread
From: Vasanthakumar Thiagarajan @ 2009-11-16  7:20 UTC (permalink / raw)
  To: Luis Rodriguez
  Cc: Vasanth Thiagarajan, linville@tuxdriver.com,
	linux-wireless@vger.kernel.org, Jouni Malinen,
	ath9k-devel@lists.ath9k.org

On Fri, Nov 13, 2009 at 10:44:38PM +0530, Luis Rodriguez wrote:
> On Fri, Nov 13, 2009 at 01:02:40AM -0800, Vasanth Thiagarajan wrote:
> > The bit value of AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB is wrong, it should
> > be 0x400 and the number of bits to be right shifted is 10. Having this
> > wrong value in 0x4054 sometimes affects bt quality on btcoex environment.
> >
> > Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
> 
> These both seem small enough and reasonable for stable fixes no?

yeah, I'll resend them CC'ing stable.

> Although I didn't get the impact of the first one..

debruijn32 (0x077CB531UL) is used to find the index of the geric timer
which generated the interrupt. On a 64-bit environment, 0x077CB531UL
will result in indexing more than 32 in gen_timer_index[] which has
memory allocated only for 32 u32.

Vasanth
 

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

* Re: [PATCH 2/2] ath9k_hw: Fix AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB and its shift value in 0x4054
  2009-11-16  7:20     ` Vasanthakumar Thiagarajan
@ 2009-11-16 15:36       ` Luis R. Rodriguez
  0 siblings, 0 replies; 6+ messages in thread
From: Luis R. Rodriguez @ 2009-11-16 15:36 UTC (permalink / raw)
  To: Vasanth Thiagarajan
  Cc: Luis Rodriguez, linville@tuxdriver.com,
	linux-wireless@vger.kernel.org, Jouni Malinen,
	ath9k-devel@lists.ath9k.org

On Sun, Nov 15, 2009 at 11:20:07PM -0800, Vasanth Thiagarajan wrote:
> On Fri, Nov 13, 2009 at 10:44:38PM +0530, Luis Rodriguez wrote:
> > On Fri, Nov 13, 2009 at 01:02:40AM -0800, Vasanth Thiagarajan wrote:
> > > The bit value of AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB is wrong, it should
> > > be 0x400 and the number of bits to be right shifted is 10. Having this
> > > wrong value in 0x4054 sometimes affects bt quality on btcoex environment.
> > >
> > > Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
> >
> > These both seem small enough and reasonable for stable fixes no?
> 
> yeah, I'll resend them CC'ing stable.
> 
> > Although I didn't get the impact of the first one..
> 
> debruijn32 (0x077CB531UL) is used to find the index of the geric timer
> which generated the interrupt. On a 64-bit environment, 0x077CB531UL
> will result in indexing more than 32 in gen_timer_index[] which has
> memory allocated only for 32 u32.

Can this be added to the commit log?

  Luis

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

* [PATCH 2/2] ath9k_hw: Fix AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB and its shift value in 0x4054
  2009-12-23  8:24 [PATCH 1/2] ath9k_hw: Fix possible OOB array indexing in gen_timer_index[] on 64-bit vasanth
@ 2009-12-23  8:24 ` vasanth
  0 siblings, 0 replies; 6+ messages in thread
From: vasanth @ 2009-12-23  8:24 UTC (permalink / raw)
  To: greg, stable; +Cc: linux-wireless, Vasanthakumar Thiagarajan

From: Vasanthakumar Thiagarajan <vasanth@atheros.com>

commit c37919bfe0a5c1bee9a31701a31e05a2f8840936 upstream

The bit value of AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB is wrong, it should
be 0x400 and the number of bits to be right shifted is 10. Having this
wrong value in 0x4054 sometimes affects bt quality on btcoex environment.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
---
 drivers/net/wireless/ath/ath9k/reg.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h
index d83b77f..c0d7e65 100644
--- a/drivers/net/wireless/ath/ath9k/reg.h
+++ b/drivers/net/wireless/ath/ath9k/reg.h
@@ -969,10 +969,10 @@ enum {
 #define AR_GPIO_INPUT_EN_VAL_BT_ACTIVE_S         4
 #define AR_GPIO_INPUT_EN_VAL_RFSILENT_DEF        0x00000080
 #define AR_GPIO_INPUT_EN_VAL_RFSILENT_DEF_S      7
+#define AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB      0x00000400
+#define AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB_S    10
 #define AR_GPIO_INPUT_EN_VAL_BT_ACTIVE_BB        0x00001000
 #define AR_GPIO_INPUT_EN_VAL_BT_ACTIVE_BB_S      12
-#define AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB      0x00001000
-#define AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB_S    1
 #define AR_GPIO_INPUT_EN_VAL_RFSILENT_BB         0x00008000
 #define AR_GPIO_INPUT_EN_VAL_RFSILENT_BB_S       15
 #define AR_GPIO_RTC_RESET_OVERRIDE_ENABLE        0x00010000
-- 
1.5.5.1


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

end of thread, other threads:[~2009-12-23  8:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-13  9:02 [PATCH 1/2] ath9k_hw: Fix possible OOB array indexing in gen_timer_index[] on 64-bit Vasanthakumar Thiagarajan
2009-11-13  9:02 ` [PATCH 2/2] ath9k_hw: Fix AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB and its shift value in 0x4054 Vasanthakumar Thiagarajan
2009-11-13 17:14   ` Luis R. Rodriguez
2009-11-16  7:20     ` Vasanthakumar Thiagarajan
2009-11-16 15:36       ` Luis R. Rodriguez
  -- strict thread matches above, loose matches on Subject: below --
2009-12-23  8:24 [PATCH 1/2] ath9k_hw: Fix possible OOB array indexing in gen_timer_index[] on 64-bit vasanth
2009-12-23  8:24 ` [PATCH 2/2] ath9k_hw: Fix AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB and its shift value in 0x4054 vasanth

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).