2010-01-02 16:23:20

by Rafał Miłecki

[permalink] [raw]
Subject: [PATCH] b43: Add new SSB's core id for BCM4328

Finally I've possibility to test my Christmas-gift N-PHY :) b43 didn't really "notice" it, so I needed to write this little patch. Now b43 at least look for firmware for my card.

Does this patch look OK?

This time I post from Opera mail so I hope white-spaces will be fine.

From 9b3ea4f29b038f732aba737323e2f89b275ce1ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
Date: Sat, 2 Jan 2010 16:58:16 +0100
Subject: [PATCH] b43: Add new SSB's core id for BCM4328
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Following line shows my BCM4328 detected on SSB. We didn't include 0x0C rev.
ssb: Core 1 found: IEEE 802.11 (cc 0x812, rev 0x0C, vendor 0x4243)

Signed-off-by: Rafał Miłecki <[email protected]>
---
drivers/net/wireless/b43/main.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 098dda1..3aa45b8 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -110,6 +110,7 @@ static const struct ssb_device_id b43_ssb_tbl[] = {
SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 9),
SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 10),
SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 11),
+ SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 12),
SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 13),
SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 15),
SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 16),
--
1.6.4.2


Attachments:
0001-b43-Add-new-SSB-s-core-id-for-BCM4328.patch (1.23 kB)

2010-01-02 16:48:49

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH] b43: Add new SSB's core id for BCM4328

On 01/02/2010 10:24 AM, Rafał Miłecki wrote:
> Finally I've possibility to test my Christmas-gift N-PHY :) b43 didn't
> really "notice" it, so I needed to write this little patch. Now b43 at
> least look for firmware for my card.
>
> Does this patch look OK?
>
> This time I post from Opera mail so I hope white-spaces will be fine.
>
> From 9b3ea4f29b038f732aba737323e2f89b275ce1ab Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
> Date: Sat, 2 Jan 2010 16:58:16 +0100
> Subject: [PATCH] b43: Add new SSB's core id for BCM4328
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Following line shows my BCM4328 detected on SSB. We didn't include 0x0C
> rev.
> ssb: Core 1 found: IEEE 802.11 (cc 0x812, rev 0x0C, vendor 0x4243)
>
> Signed-off-by: Rafał Miłecki <[email protected]>
> ---
> drivers/net/wireless/b43/main.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/main.c
> b/drivers/net/wireless/b43/main.c
> index 098dda1..3aa45b8 100644
> --- a/drivers/net/wireless/b43/main.c
> +++ b/drivers/net/wireless/b43/main.c
> @@ -110,6 +110,7 @@ static const struct ssb_device_id b43_ssb_tbl[] = {
> SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 9),
> SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 10),
> SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 11),
> + SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 12),
> SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 13),
> SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 15),
> SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 16),

Your tabs have been converted to spaces.

Most of my patches are sent using the mail command; however, I can send them
with Thunderbird using the following steps:

(1) Prepare the mail message with the patch attached.

(2) Save the message and close the open copy.

(3) Go to the "Draft" folder and click on the entry.

(4) The attachment will be listed at the bottom. Highlight that test and copy
into the clipboard.

(5) Click the "Edit" button, paste the attachment text into the message, clear
the attachment entry, and send.

I'm not sure how far you have gotten with the code, but I have been working with
a new driver with version 5.10.56.46. There are a lot of changes from the
4.174... that was previously reverse-engineered.

To answer your question in a later E-mail. You do not need to conditionalize the
core revision entry. If the N PHY code is not turned on, the driver will get an
unsupported PHY message and fail later in an acceptable error.

Larry


2010-01-02 17:21:04

by Rafał Miłecki

[permalink] [raw]
Subject: Re: [PATCH] b43: Add new SSB's core id for BCM4328

White-spaces fixed.

From 9b3ea4f29b038f732aba737323e2f89b275ce1ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
Date: Sat, 2 Jan 2010 16:58:16 +0100
Subject: [PATCH] b43: Add new SSB's core id for BCM4328
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Following line shows my BCM4328 detected on SSB. We didn't include 0x0C rev.
ssb: Core 1 found: IEEE 802.11 (cc 0x812, rev 0x0C, vendor 0x4243)

Signed-off-by: Rafał Miłecki <[email protected]>
---
drivers/net/wireless/b43/main.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 098dda1..3aa45b8 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -110,6 +110,7 @@ static const struct ssb_device_id b43_ssb_tbl[] = {
SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 9),
SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 10),
SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 11),
+ SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 12),
SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 13),
SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 15),
SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 16),
--
1.6.4.2

2010-01-02 16:40:07

by Rafał Miłecki

[permalink] [raw]
Subject: Re: [PATCH] b43: Add new SSB's core id for BCM4328

W dniu 2 stycznia 2010 17:26 użytkownik Gábor Stefanik
<[email protected]> napisał:
> 2010/1/2 Rafał Miłecki <[email protected]>:
>> Finally I've possibility to test my Christmas-gift N-PHY :) b43 didn't
>> really "notice" it, so I needed to write this little patch. Now b43 at least
>> look for firmware for my card.
>>
>> Does this patch look OK?
>>
>> This time I post from Opera mail so I hope white-spaces will be fine.
>>
>> From 9b3ea4f29b038f732aba737323e2f89b275ce1ab Mon Sep 17 00:00:00 2001
>> From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
>> Date: Sat, 2 Jan 2010 16:58:16 +0100
>> Subject: [PATCH] b43: Add new SSB's core id for BCM4328
>> MIME-Version: 1.0
>> Content-Type: text/plain; charset=UTF-8
>> Content-Transfer-Encoding: 8bit
>>
>> Following line shows my BCM4328 detected on SSB. We didn't include 0x0C rev.
>> ssb: Core 1 found: IEEE 802.11 (cc 0x812, rev 0x0C, vendor 0x4243)
>>
>> Signed-off-by: Rafał Miłecki <[email protected]>
>> ---
>>  drivers/net/wireless/b43/main.c |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/net/wireless/b43/main.c
>> b/drivers/net/wireless/b43/main.c
>> index 098dda1..3aa45b8 100644
>> --- a/drivers/net/wireless/b43/main.c
>> +++ b/drivers/net/wireless/b43/main.c
>> @@ -110,6 +110,7 @@ static const struct ssb_device_id b43_ssb_tbl[] = {
>>        SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 9),
>>        SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 10),
>>        SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 11),
>> +       SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 12),
>
> Rev.14 is also missing (which AFAIK is used by some LP cards).

Thanks, I'll post patch for that as well. Is adding this 0x0C (==13)
fine in this form? Or maybe we should use ifdef CONFIG_B43_NPHY for
some reason?

--
Rafał

2010-01-02 17:40:57

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH] b43: Add new SSB's core id for BCM4328

On 01/02/2010 10:55 AM, Rafał Miłecki wrote:
> W dniu 2 stycznia 2010 17:48 użytkownik Larry Finger
> <[email protected]> napisał:
>> Your tabs have been converted to spaces.
>>
>> Most of my patches are sent using the mail command; however, I can send them
>> with Thunderbird using the following steps:
>
> Oh great :| I guess I'll just try mail command.
>
>
>> I'm not sure how far you have gotten with the code, but I have been working with
>> a new driver with version 5.10.56.46. There are a lot of changes from the
>> 4.174... that was previously reverse-engineered.
>
> I don't have anything more than posted patches.
>
> What do you suggest about writing next (real) parts? Is that worth
> effort basing code on current RE docs? Maybe some parts only, that
> didn't change? Or should I just wait for update (is anyone working on
> it)?

I have finished the initialization routine found in
http://bcm-v4.sipsolutions.net/802.11/PHY/Init/N. I still have 6 or 8 of the
routines called to prepare and some of the others to check, but you could at
least code the main routine with dummy stubs for the called routines..

You should check with Gabor regarding PHY and radio register names.

Larry

2010-01-02 16:44:20

by Gábor Stefanik

[permalink] [raw]
Subject: Re: [PATCH] b43: Add new SSB's core id for BCM4328

2010/1/2 Rafa? Mi?ecki <[email protected]>:
> W dniu 2 stycznia 2010 17:26 u?ytkownik G?bor Stefanik
> <[email protected]> napisa?:
>> 2010/1/2 Rafa? Mi?ecki <[email protected]>:
>>> Finally I've possibility to test my Christmas-gift N-PHY :) b43 didn't
>>> really "notice" it, so I needed to write this little patch. Now b43 at least
>>> look for firmware for my card.
>>>
>>> Does this patch look OK?
>>>
>>> This time I post from Opera mail so I hope white-spaces will be fine.
>>>
>>> From 9b3ea4f29b038f732aba737323e2f89b275ce1ab Mon Sep 17 00:00:00 2001
>>> From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
>>> Date: Sat, 2 Jan 2010 16:58:16 +0100
>>> Subject: [PATCH] b43: Add new SSB's core id for BCM4328
>>> MIME-Version: 1.0
>>> Content-Type: text/plain; charset=UTF-8
>>> Content-Transfer-Encoding: 8bit
>>>
>>> Following line shows my BCM4328 detected on SSB. We didn't include 0x0C rev.
>>> ssb: Core 1 found: IEEE 802.11 (cc 0x812, rev 0x0C, vendor 0x4243)
>>>
>>> Signed-off-by: Rafa? Mi?ecki <[email protected]>
>>> ---
>>> ?drivers/net/wireless/b43/main.c | ? ?1 +
>>> ?1 files changed, 1 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/net/wireless/b43/main.c
>>> b/drivers/net/wireless/b43/main.c
>>> index 098dda1..3aa45b8 100644
>>> --- a/drivers/net/wireless/b43/main.c
>>> +++ b/drivers/net/wireless/b43/main.c
>>> @@ -110,6 +110,7 @@ static const struct ssb_device_id b43_ssb_tbl[] = {
>>> ? ? ? ?SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 9),
>>> ? ? ? ?SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 10),
>>> ? ? ? ?SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 11),
>>> + ? ? ? SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 12),
>>
>> Rev.14 is also missing (which AFAIK is used by some LP cards).
>
> Thanks, I'll post patch for that as well. Is adding this 0x0C (==13)
> fine in this form? Or maybe we should use ifdef CONFIG_B43_NPHY for
> some reason?

I would say it's OK this way (BTW 0x0C == 12); we also didn't put
rev.15 under CONFIG_B43_PHY_LP.

(BTW I'm planning to rename CONFIG_B43_NPHY to CONFIG_B43_PHY_N in
preparation for further PHY types, as well as the ability to only
build certain PHYs as needed if EMBEDDED is set - a kernel for an
LP-PHY SoC might save some space by not building G-PHY code.)

>
> --
> Rafa?
>



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

2010-01-02 16:27:16

by Gábor Stefanik

[permalink] [raw]
Subject: Re: [PATCH] b43: Add new SSB's core id for BCM4328

2010/1/2 Rafał Miłecki <[email protected]>:
> Finally I've possibility to test my Christmas-gift N-PHY :) b43 didn't
> really "notice" it, so I needed to write this little patch. Now b43 at least
> look for firmware for my card.
>
> Does this patch look OK?
>
> This time I post from Opera mail so I hope white-spaces will be fine.
>
> From 9b3ea4f29b038f732aba737323e2f89b275ce1ab Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
> Date: Sat, 2 Jan 2010 16:58:16 +0100
> Subject: [PATCH] b43: Add new SSB's core id for BCM4328
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Following line shows my BCM4328 detected on SSB. We didn't include 0x0C rev.
> ssb: Core 1 found: IEEE 802.11 (cc 0x812, rev 0x0C, vendor 0x4243)
>
> Signed-off-by: Rafał Miłecki <[email protected]>
> ---
>  drivers/net/wireless/b43/main.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/main.c
> b/drivers/net/wireless/b43/main.c
> index 098dda1..3aa45b8 100644
> --- a/drivers/net/wireless/b43/main.c
> +++ b/drivers/net/wireless/b43/main.c
> @@ -110,6 +110,7 @@ static const struct ssb_device_id b43_ssb_tbl[] = {
>        SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 9),
>        SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 10),
>        SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 11),
> +       SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 12),

Rev.14 is also missing (which AFAIK is used by some LP cards).

>        SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 13),
>        SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 15),
>        SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 16),
> --
> 1.6.4.2



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

2010-01-02 16:55:08

by Rafał Miłecki

[permalink] [raw]
Subject: Re: [PATCH] b43: Add new SSB's core id for BCM4328

W dniu 2 stycznia 2010 17:48 użytkownik Larry Finger
<[email protected]> napisał:
> Your tabs have been converted to spaces.
>
> Most of my patches are sent using the mail command; however, I can send them
> with Thunderbird using the following steps:

Oh great :| I guess I'll just try mail command.


> I'm not sure how far you have gotten with the code, but I have been working with
> a new driver with version 5.10.56.46. There are a lot of changes from the
> 4.174... that was previously reverse-engineered.

I don't have anything more than posted patches.

What do you suggest about writing next (real) parts? Is that worth
effort basing code on current RE docs? Maybe some parts only, that
didn't change? Or should I just wait for update (is anyone working on
it)?


> To answer your question in a later E-mail. You do not need to conditionalize the
> core revision entry. If the N PHY code is not turned on, the driver will get an
> unsupported PHY message and fail later in an acceptable error.

One more confirmation :) Thanks.


--
Rafał

2010-01-02 16:48:58

by Rafał Miłecki

[permalink] [raw]
Subject: Re: [PATCH] b43: Add new SSB's core id for BCM4328

W dniu 2 stycznia 2010 17:43 użytkownik Gábor Stefanik
<[email protected]> napisał:
> 2010/1/2 Rafał Miłecki <[email protected]>:
>> W dniu 2 stycznia 2010 17:26 użytkownik Gábor Stefanik
>> <[email protected]> napisał:
>>> 2010/1/2 Rafał Miłecki <[email protected]>:
>>>> Finally I've possibility to test my Christmas-gift N-PHY :) b43 didn't
>>>> really "notice" it, so I needed to write this little patch. Now b43 at least
>>>> look for firmware for my card.
>>>>
>>>> Does this patch look OK?
>>>>
>>>> This time I post from Opera mail so I hope white-spaces will be fine.
>>>>
>>>> From 9b3ea4f29b038f732aba737323e2f89b275ce1ab Mon Sep 17 00:00:00 2001
>>>> From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
>>>> Date: Sat, 2 Jan 2010 16:58:16 +0100
>>>> Subject: [PATCH] b43: Add new SSB's core id for BCM4328
>>>> MIME-Version: 1.0
>>>> Content-Type: text/plain; charset=UTF-8
>>>> Content-Transfer-Encoding: 8bit
>>>>
>>>> Following line shows my BCM4328 detected on SSB. We didn't include 0x0C rev.
>>>> ssb: Core 1 found: IEEE 802.11 (cc 0x812, rev 0x0C, vendor 0x4243)
>>>>
>>>> Signed-off-by: Rafał Miłecki <[email protected]>
>>>> ---
>>>>  drivers/net/wireless/b43/main.c |    1 +
>>>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/drivers/net/wireless/b43/main.c
>>>> b/drivers/net/wireless/b43/main.c
>>>> index 098dda1..3aa45b8 100644
>>>> --- a/drivers/net/wireless/b43/main.c
>>>> +++ b/drivers/net/wireless/b43/main.c
>>>> @@ -110,6 +110,7 @@ static const struct ssb_device_id b43_ssb_tbl[] = {
>>>>        SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 9),
>>>>        SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 10),
>>>>        SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 11),
>>>> +       SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 12),
>>>
>>> Rev.14 is also missing (which AFAIK is used by some LP cards).
>>
>> Thanks, I'll post patch for that as well. Is adding this 0x0C (==13)
>> fine in this form? Or maybe we should use ifdef CONFIG_B43_NPHY for
>> some reason?
>
> I would say it's OK this way (BTW 0x0C == 12); we also didn't put
> rev.15 under CONFIG_B43_PHY_LP.

OK, thanks. And of course I've meant 0x0C == 12 :) After applying this
patch b43 won't try to init N-PHY device until CONFIG_B43_NPHY is set.
So I believe this patch is fine, thanks for sharing opinion :)


> (BTW I'm planning to rename CONFIG_B43_NPHY to CONFIG_B43_PHY_N in
> preparation for further PHY types, as well as the ability to only
> build certain PHYs as needed if EMBEDDED is set - a kernel for an
> LP-PHY SoC might save some space by not building G-PHY code.)

Heh, I was planning to do that :) OK, I'll focus on other stuff,
waiting for your patch :)

--
Rafał

2010-01-02 17:46:48

by Michael Büsch

[permalink] [raw]
Subject: Re: [PATCH] b43: Add new SSB's core id for BCM4328

On Saturday 02 January 2010 17:26:55 Gábor Stefanik wrote:
> > @@ -110,6 +110,7 @@ static const struct ssb_device_id b43_ssb_tbl[] = {
> >        SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 9),
> >        SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 10),
> >        SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 11),
> > +       SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 12),
>
> Rev.14 is also missing (which AFAIK is used by some LP cards).

"AFAIK" doesn't count.
We only add IDs for cards that do actually exist in reality.
So do you have such a card or a report by someone owning one?

--
Greetings, Michael.