b43-dev.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] b43: N-PHY: fix infinite-loop-typo
@ 2010-10-22 15:43 Rafał Miłecki
  2010-10-22 15:43 ` [PATCH 2/5] b43: N-PHY: fix 2055 radio init Rafał Miłecki
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Rafał Miłecki @ 2010-10-22 15:43 UTC (permalink / raw)
  To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki

Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
 drivers/net/wireless/b43/phy_n.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index dfec549..e0f2d12 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -2964,7 +2964,7 @@ static int b43_nphy_rev2_cal_rx_iq(struct b43_wldev *dev,
 					(2 - i));
 		}
 
-		for (j = 0; i < 4; j++) {
+		for (j = 0; j < 4; j++) {
 			if (j < 3) {
 				cur_lna = lna[j];
 				cur_hpf1 = hpf1[j];
-- 
1.7.1

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

* [PATCH 2/5] b43: N-PHY: fix 2055 radio init
  2010-10-22 15:43 [PATCH 1/5] b43: N-PHY: fix infinite-loop-typo Rafał Miłecki
@ 2010-10-22 15:43 ` Rafał Miłecki
  2010-10-22 15:43 ` [PATCH 3/5] b43: define known SPROM boardflags2 bits Rafał Miłecki
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Rafał Miłecki @ 2010-10-22 15:43 UTC (permalink / raw)
  To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki

Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
 drivers/net/wireless/b43/radio_2055.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/b43/radio_2055.c b/drivers/net/wireless/b43/radio_2055.c
index 1b53165..0d67715 100644
--- a/drivers/net/wireless/b43/radio_2055.c
+++ b/drivers/net/wireless/b43/radio_2055.c
@@ -244,7 +244,7 @@ static const struct b2055_inittab_entry b2055_inittab [] = {
   [0xCB]			= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },
   [0xCC]			= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },
   [B2055_C1_LNA_GAINBST]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },
-  [0xCE]			= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },
+  [0xCE]			= { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, },
   [0xCF]			= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },
   [0xD0]			= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },
   [0xD1]			= { .ghz5 = 0x0018, .ghz2 = 0x0018, NOUPLOAD, },
@@ -256,7 +256,7 @@ static const struct b2055_inittab_entry b2055_inittab [] = {
   [0xD7]			= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },
   [0xD8]			= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },
   [B2055_C2_LNA_GAINBST]	= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },
-  [0xDA]			= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },
+  [0xDA]			= { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, },
   [0xDB]			= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },
   [0xDC]			= { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, },
   [0xDD]			= { .ghz5 = 0x0018, .ghz2 = 0x0018, NOUPLOAD, },
@@ -1299,7 +1299,7 @@ void b2055_upload_inittab(struct b43_wldev *dev,
 			  bool ghz5, bool ignore_uploadflag)
 {
 	const struct b2055_inittab_entry *e;
-	unsigned int i;
+	unsigned int i, writes = 0;
 	u16 value;
 
 	for (i = 0; i < ARRAY_SIZE(b2055_inittab); i++) {
@@ -1312,6 +1312,8 @@ void b2055_upload_inittab(struct b43_wldev *dev,
 			else
 				value = e->ghz2;
 			b43_radio_write16(dev, i, value);
+			if (++writes % 4 == 0)
+				b43_read32(dev, B43_MMIO_MACCTL); /* flush */
 		}
 	}
 }
-- 
1.7.1

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

* [PATCH 3/5] b43: define known SPROM boardflags2 bits
  2010-10-22 15:43 [PATCH 1/5] b43: N-PHY: fix infinite-loop-typo Rafał Miłecki
  2010-10-22 15:43 ` [PATCH 2/5] b43: N-PHY: fix 2055 radio init Rafał Miłecki
@ 2010-10-22 15:43 ` Rafał Miłecki
  2010-10-22 19:41   ` Gábor Stefanik
  2010-10-22 15:43 ` [PATCH 4/5] b43: N-PHY: determine usage of radio regulatory workaround correctly Rafał Miłecki
  2010-10-22 15:43 ` [PATCH 5/5] b43: N-PHY: improve 2055 radio initialization Rafał Miłecki
  3 siblings, 1 reply; 8+ messages in thread
From: Rafał Miłecki @ 2010-10-22 15:43 UTC (permalink / raw)
  To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki

Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
 drivers/net/wireless/b43/b43.h |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
index 72821c4..9aad2ca 100644
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -153,6 +153,19 @@
 #define B43_BFH_FEM_BT			0x0040	/* has FEM and switch to share antenna
 						 * with bluetooth */
 
+/* SPROM boardflags2_lo values */
+#define B43_BFL2_RXBB_INT_REG_DIS	0x0001	/* external RX BB regulator present */
+#define B43_BFL2_APLL_WAR		0x0002	/* alternative A-band PLL settings implemented */
+#define B43_BFL2_TXPWRCTRL_EN 		0x0004	/* permits enabling TX Power Control */
+#define B43_BFL2_2X4_DIV		0x0008	/* 2x4 diversity switch */
+#define B43_BFL2_5G_PWRGAIN		0x0010	/* supports 5G band power gain */
+#define B43_BFL2_PCIEWAR_OVR		0x0020	/* overrides ASPM and Clkreq settings */
+#define B43_BFL2_CAESERS_BRD		0x0040	/* is Caesers board (unused) */
+#define B43_BFL2_BTC3WIRE		0x0080	/* used 3-wire bluetooth coexist */
+#define B43_BFL2_SKWRKFEM_BRD		0x0100	/* 4321mcm93 uses Skyworks FEM */
+#define B43_BFL2_SPUR_WAR		0x0200	/* has a workaround for clock-harmonic spurs */
+#define B43_BFL2_GPLL_WAR		0x0400	/* altenative G-band PLL settings implemented */
+
 /* GPIO register offset, in both ChipCommon and PCI core. */
 #define B43_GPIO_CONTROL		0x6c
 
-- 
1.7.1

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

* [PATCH 4/5] b43: N-PHY: determine usage of radio regulatory workaround correctly
  2010-10-22 15:43 [PATCH 1/5] b43: N-PHY: fix infinite-loop-typo Rafał Miłecki
  2010-10-22 15:43 ` [PATCH 2/5] b43: N-PHY: fix 2055 radio init Rafał Miłecki
  2010-10-22 15:43 ` [PATCH 3/5] b43: define known SPROM boardflags2 bits Rafał Miłecki
@ 2010-10-22 15:43 ` Rafał Miłecki
  2010-10-22 15:43 ` [PATCH 5/5] b43: N-PHY: improve 2055 radio initialization Rafał Miłecki
  3 siblings, 0 replies; 8+ messages in thread
From: Rafał Miłecki @ 2010-10-22 15:43 UTC (permalink / raw)
  To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki

Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
 drivers/net/wireless/b43/phy_n.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index e0f2d12..c22dbfb 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -191,7 +191,8 @@ static void b43_radio_init2055_post(struct b43_wldev *dev)
 				binfo->type != 0x46D ||
 				binfo->rev < 0x41);
 	else
-		workaround = ((sprom->boardflags_hi & B43_BFH_NOPA) == 0);
+		workaround =
+			!(sprom->boardflags2_lo & B43_BFL2_RXBB_INT_REG_DIS);
 
 	b43_radio_mask(dev, B2055_MASTER1, 0xFFF3);
 	if (workaround) {
-- 
1.7.1

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

* [PATCH 5/5] b43: N-PHY: improve 2055 radio initialization
  2010-10-22 15:43 [PATCH 1/5] b43: N-PHY: fix infinite-loop-typo Rafał Miłecki
                   ` (2 preceding siblings ...)
  2010-10-22 15:43 ` [PATCH 4/5] b43: N-PHY: determine usage of radio regulatory workaround correctly Rafał Miłecki
@ 2010-10-22 15:43 ` Rafał Miłecki
  3 siblings, 0 replies; 8+ messages in thread
From: Rafał Miłecki @ 2010-10-22 15:43 UTC (permalink / raw)
  To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki

1) Upload 5 GHz values when needed.
2) Do not upload all values on first init. Follow wl.

Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
 drivers/net/wireless/b43/phy_n.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index c22dbfb..6facb8a 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -241,10 +241,13 @@ static void b43_radio_init2055_post(struct b43_wldev *dev)
 static void b43_radio_init2055(struct b43_wldev *dev)
 {
 	b43_radio_init2055_pre(dev);
-	if (b43_status(dev) < B43_STAT_INITIALIZED)
-		b2055_upload_inittab(dev, 0, 1);
-	else
-		b2055_upload_inittab(dev, 0/*FIXME on 5ghz band*/, 0);
+	if (b43_status(dev) < B43_STAT_INITIALIZED) {
+		/* Follow wl, not specs. Do not force uploading all regs */
+		b2055_upload_inittab(dev, 0, 0);
+	} else {
+		bool ghz5 = b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ;
+		b2055_upload_inittab(dev, ghz5, 0);
+	}
 	b43_radio_init2055_post(dev);
 }
 
-- 
1.7.1

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

* [PATCH 3/5] b43: define known SPROM boardflags2 bits
  2010-10-22 15:43 ` [PATCH 3/5] b43: define known SPROM boardflags2 bits Rafał Miłecki
@ 2010-10-22 19:41   ` Gábor Stefanik
  2010-10-22 20:08     ` Larry Finger
  0 siblings, 1 reply; 8+ messages in thread
From: Gábor Stefanik @ 2010-10-22 19:41 UTC (permalink / raw)
  To: b43-dev, Larry Finger; +Cc: linux-wireless, John W. Linville

2010/10/22 Rafa? Mi?ecki <zajec5@gmail.com>:
> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
> ---
> ?drivers/net/wireless/b43/b43.h | ? 13 +++++++++++++
> ?1 files changed, 13 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
> index 72821c4..9aad2ca 100644
> --- a/drivers/net/wireless/b43/b43.h
> +++ b/drivers/net/wireless/b43/b43.h
> @@ -153,6 +153,19 @@
> ?#define B43_BFH_FEM_BT ? ? ? ? ? ? ? ? 0x0040 ?/* has FEM and switch to share antenna
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * with bluetooth */
>
> +/* SPROM boardflags2_lo values */
> +#define B43_BFL2_RXBB_INT_REG_DIS ? ? ?0x0001 ?/* external RX BB regulator present */
> +#define B43_BFL2_APLL_WAR ? ? ? ? ? ? ?0x0002 ?/* alternative A-band PLL settings implemented */
> +#define B43_BFL2_TXPWRCTRL_EN ? ? ? ? ?0x0004 ?/* permits enabling TX Power Control */
> +#define B43_BFL2_2X4_DIV ? ? ? ? ? ? ? 0x0008 ?/* 2x4 diversity switch */
> +#define B43_BFL2_5G_PWRGAIN ? ? ? ? ? ?0x0010 ?/* supports 5G band power gain */
> +#define B43_BFL2_PCIEWAR_OVR ? ? ? ? ? 0x0020 ?/* overrides ASPM and Clkreq settings */
> +#define B43_BFL2_CAESERS_BRD ? ? ? ? ? 0x0040 ?/* is Caesers board (unused) */

I'm almost sure this is a typo in the specs.

Larry?

> +#define B43_BFL2_BTC3WIRE ? ? ? ? ? ? ?0x0080 ?/* used 3-wire bluetooth coexist */
> +#define B43_BFL2_SKWRKFEM_BRD ? ? ? ? ?0x0100 ?/* 4321mcm93 uses Skyworks FEM */
> +#define B43_BFL2_SPUR_WAR ? ? ? ? ? ? ?0x0200 ?/* has a workaround for clock-harmonic spurs */
> +#define B43_BFL2_GPLL_WAR ? ? ? ? ? ? ?0x0400 ?/* altenative G-band PLL settings implemented */
> +
> ?/* GPIO register offset, in both ChipCommon and PCI core. */
> ?#define B43_GPIO_CONTROL ? ? ? ? ? ? ? 0x6c
>
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo at 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] 8+ messages in thread

* [PATCH 3/5] b43: define known SPROM boardflags2 bits
  2010-10-22 19:41   ` Gábor Stefanik
@ 2010-10-22 20:08     ` Larry Finger
  2010-10-22 20:42       ` Gábor Stefanik
  0 siblings, 1 reply; 8+ messages in thread
From: Larry Finger @ 2010-10-22 20:08 UTC (permalink / raw)
  To: Gábor Stefanik; +Cc: b43-dev, linux-wireless, John W. Linville

On 10/22/2010 02:41 PM, G?bor Stefanik wrote:
> 2010/10/22 Rafa? Mi?ecki <zajec5@gmail.com>:
>> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
>> ---
>>  drivers/net/wireless/b43/b43.h |   13 +++++++++++++
>>  1 files changed, 13 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
>> index 72821c4..9aad2ca 100644
>> --- a/drivers/net/wireless/b43/b43.h
>> +++ b/drivers/net/wireless/b43/b43.h
>> @@ -153,6 +153,19 @@
>>  #define B43_BFH_FEM_BT                 0x0040  /* has FEM and switch to share antenna
>>                                                 * with bluetooth */
>>
>> +/* SPROM boardflags2_lo values */
>> +#define B43_BFL2_RXBB_INT_REG_DIS      0x0001  /* external RX BB regulator present */
>> +#define B43_BFL2_APLL_WAR              0x0002  /* alternative A-band PLL settings implemented */
>> +#define B43_BFL2_TXPWRCTRL_EN          0x0004  /* permits enabling TX Power Control */
>> +#define B43_BFL2_2X4_DIV               0x0008  /* 2x4 diversity switch */
>> +#define B43_BFL2_5G_PWRGAIN            0x0010  /* supports 5G band power gain */
>> +#define B43_BFL2_PCIEWAR_OVR           0x0020  /* overrides ASPM and Clkreq settings */
>> +#define B43_BFL2_CAESERS_BRD           0x0040  /* is Caesers board (unused) */
> 
> I'm almost sure this is a typo in the specs.
> 
> Larry?

Nope - it is Cae..., not Cea.... Whatever name we use is just a placeholder as
that bit is never used.

Larry

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

* [PATCH 3/5] b43: define known SPROM boardflags2 bits
  2010-10-22 20:08     ` Larry Finger
@ 2010-10-22 20:42       ` Gábor Stefanik
  0 siblings, 0 replies; 8+ messages in thread
From: Gábor Stefanik @ 2010-10-22 20:42 UTC (permalink / raw)
  To: Larry Finger; +Cc: b43-dev, linux-wireless, John W. Linville

2010/10/22 Larry Finger <Larry.Finger@lwfinger.net>:
> On 10/22/2010 02:41 PM, G?bor Stefanik wrote:
>> 2010/10/22 Rafa? Mi?ecki <zajec5@gmail.com>:
>>> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
>>> ---
>>> ?drivers/net/wireless/b43/b43.h | ? 13 +++++++++++++
>>> ?1 files changed, 13 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
>>> index 72821c4..9aad2ca 100644
>>> --- a/drivers/net/wireless/b43/b43.h
>>> +++ b/drivers/net/wireless/b43/b43.h
>>> @@ -153,6 +153,19 @@
>>> ?#define B43_BFH_FEM_BT ? ? ? ? ? ? ? ? 0x0040 ?/* has FEM and switch to share antenna
>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * with bluetooth */
>>>
>>> +/* SPROM boardflags2_lo values */
>>> +#define B43_BFL2_RXBB_INT_REG_DIS ? ? ?0x0001 ?/* external RX BB regulator present */
>>> +#define B43_BFL2_APLL_WAR ? ? ? ? ? ? ?0x0002 ?/* alternative A-band PLL settings implemented */
>>> +#define B43_BFL2_TXPWRCTRL_EN ? ? ? ? ?0x0004 ?/* permits enabling TX Power Control */
>>> +#define B43_BFL2_2X4_DIV ? ? ? ? ? ? ? 0x0008 ?/* 2x4 diversity switch */
>>> +#define B43_BFL2_5G_PWRGAIN ? ? ? ? ? ?0x0010 ?/* supports 5G band power gain */
>>> +#define B43_BFL2_PCIEWAR_OVR ? ? ? ? ? 0x0020 ?/* overrides ASPM and Clkreq settings */
>>> +#define B43_BFL2_CAESERS_BRD ? ? ? ? ? 0x0040 ?/* is Caesers board (unused) */
>>
>> I'm almost sure this is a typo in the specs.
>>
>> Larry?
>
> Nope - it is Cae..., not Cea.... Whatever name we use is just a placeholder as
> that bit is never used.

No, I mean the "ser" part.

>
> Larry
>
>



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

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

end of thread, other threads:[~2010-10-22 20:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-22 15:43 [PATCH 1/5] b43: N-PHY: fix infinite-loop-typo Rafał Miłecki
2010-10-22 15:43 ` [PATCH 2/5] b43: N-PHY: fix 2055 radio init Rafał Miłecki
2010-10-22 15:43 ` [PATCH 3/5] b43: define known SPROM boardflags2 bits Rafał Miłecki
2010-10-22 19:41   ` Gábor Stefanik
2010-10-22 20:08     ` Larry Finger
2010-10-22 20:42       ` Gábor Stefanik
2010-10-22 15:43 ` [PATCH 4/5] b43: N-PHY: determine usage of radio regulatory workaround correctly Rafał Miłecki
2010-10-22 15:43 ` [PATCH 5/5] b43: N-PHY: improve 2055 radio initialization Rafał Miłecki

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