diff mbox

b43: Add LP-PHY firmware loading support

Message ID 4A854FDF.5020208@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Gábor Stefanik Aug. 14, 2009, 11:51 a.m. UTC
Add support for loading LP-PHY firmware to b43_try_request_fw.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
---
For anyone hoping that the channel switch patches will make their LP card work - this is also definitely required.

Mark, this doesn't fix your problem specifically, but it will be needed after your problem is fixed.

 drivers/net/wireless/b43/main.c |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

Comments

Mark Huijgen Aug. 14, 2009, 12:11 p.m. UTC | #1
Missing break in initval case switches, see below.

Gábor Stefanik wrote:
> Add support for loading LP-PHY firmware to b43_try_request_fw.
>
> Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
> ---
> For anyone hoping that the channel switch patches will make their LP card work - this is also definitely required.
>
> Mark, this doesn't fix your problem specifically, but it will be needed after your problem is fixed.
>
>  drivers/net/wireless/b43/main.c |   24 +++++++++++++++++++++++-
>  1 files changed, 23 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
> index fbcbe4f..1e657fe 100644
> --- a/drivers/net/wireless/b43/main.c
> +++ b/drivers/net/wireless/b43/main.c
> @@ -2062,8 +2062,12 @@ static int b43_try_request_fw(struct b43_request_fw_context *ctx)
>  		filename = "ucode5";
>  	else if ((rev >= 11) && (rev <= 12))
>  		filename = "ucode11";
> -	else if (rev >= 13)
> +	else if (rev == 13)
>  		filename = "ucode13";
> +	else if (rev == 14)
> +		filename = "ucode14";
> +	else if (rev >= 15)
> +		filename = "ucode15";
>  	else
>  		goto err_no_ucode;
>  	err = b43_do_request_fw(ctx, filename, &fw->ucode);
> @@ -2111,6 +2115,15 @@ static int b43_try_request_fw(struct b43_request_fw_context *ctx)
>  		else
>  			goto err_no_initvals;
>  		break;
> +	case B43_PHYTYPE_LP:
> +		if (rev == 13)
> +			filename = "lp0initvals13";
> +		else if (rev == 14)
> +			filename = "lp0initvals14";
> +		else if (rev >= 15)
> +			filename = "lp0initvals15";
> +		else
> +			goto err_no_initvals;
>   
break;
>  	default:
>  		goto err_no_initvals;
>  	}
> @@ -2145,6 +2158,15 @@ static int b43_try_request_fw(struct b43_request_fw_context *ctx)
>  		else
>  			goto err_no_initvals;
>  		break;
> +	case B43_PHYTYPE_LP:
> +		if (rev == 13)
> +			filename = "lp0bsinitvals13";
> +		else if (rev == 14)
> +			filename = "lp0bsinitvals14";
> +		else if (rev >= 15)
> +			filename = "lp0bsinitvals15";
> +		else
> +			goto err_no_initvals;
>   
break;
>  	default:
>  		goto err_no_initvals;
>  	}
>   

--
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
Larry Finger Aug. 14, 2009, 1 p.m. UTC | #2
Gábor Stefanik wrote:
> Add support for loading LP-PHY firmware to b43_try_request_fw.
> 
> Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
> ---
> For anyone hoping that the channel switch patches will make their LP
> card work - this is also definitely required.
> 
> Mark, this doesn't fix your problem specifically, but it will be needed
> after your problem is fixed.
> 
> drivers/net/wireless/b43/main.c |   24 +++++++++++++++++++++++-
> 1 files changed, 23 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/wireless/b43/main.c
> b/drivers/net/wireless/b43/main.c
> index fbcbe4f..1e657fe 100644
> --- a/drivers/net/wireless/b43/main.c
> +++ b/drivers/net/wireless/b43/main.c
> @@ -2062,8 +2062,12 @@ static int b43_try_request_fw(struct
> b43_request_fw_context *ctx)
>         filename = "ucode5";
>     else if ((rev >= 11) && (rev <= 12))
>         filename = "ucode11";
> -    else if (rev >= 13)
> +    else if (rev == 13)
>         filename = "ucode13";
> +    else if (rev == 14)
> +        filename = "ucode14";
> +    else if (rev >= 15)
> +        filename = "ucode15";

As shown by http://bcm-v4.sipsolutions.net/802.11/Init/Firmware, one
should also have "ucode16".

>     else
>         goto err_no_ucode;
>     err = b43_do_request_fw(ctx, filename, &fw->ucode);
> @@ -2111,6 +2115,15 @@ static int b43_try_request_fw(struct
> b43_request_fw_context *ctx)
>         else
>             goto err_no_initvals;
>         break;
> +    case B43_PHYTYPE_LP:
> +        if (rev == 13)
> +            filename = "lp0initvals13";
> +        else if (rev == 14)
> +            filename = "lp0initvals14";
> +        else if (rev >= 15)
> +            filename = "lp0initvals15";
> +        else

Same for lp0initvals16.

> +            goto err_no_initvals;
>     default:
>         goto err_no_initvals;
>     }
> @@ -2145,6 +2158,15 @@ static int b43_try_request_fw(struct
> b43_request_fw_context *ctx)
>         else
>             goto err_no_initvals;
>         break;
> +    case B43_PHYTYPE_LP:
> +        if (rev == 13)
> +            filename = "lp0bsinitvals13";
> +        else if (rev == 14)
> +            filename = "lp0bsinitvals14";
> +        else if (rev >= 15)
> +            filename = "lp0bsinitvals15";

and lp0bsinitvals16.

> +        else
> +            goto err_no_initvals;
>     default:
>         goto err_no_initvals;
>     }

Larry
--
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
Gábor Stefanik Aug. 14, 2009, 1:02 p.m. UTC | #3
2009/8/14 Larry Finger <Larry.Finger@lwfinger.net>:
> Gábor Stefanik wrote:
>> Add support for loading LP-PHY firmware to b43_try_request_fw.
>>
>> Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
>> ---
>> For anyone hoping that the channel switch patches will make their LP
>> card work - this is also definitely required.
>>
>> Mark, this doesn't fix your problem specifically, but it will be needed
>> after your problem is fixed.
>>
>> drivers/net/wireless/b43/main.c |   24 +++++++++++++++++++++++-
>> 1 files changed, 23 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/net/wireless/b43/main.c
>> b/drivers/net/wireless/b43/main.c
>> index fbcbe4f..1e657fe 100644
>> --- a/drivers/net/wireless/b43/main.c
>> +++ b/drivers/net/wireless/b43/main.c
>> @@ -2062,8 +2062,12 @@ static int b43_try_request_fw(struct
>> b43_request_fw_context *ctx)
>>         filename = "ucode5";
>>     else if ((rev >= 11) && (rev <= 12))
>>         filename = "ucode11";
>> -    else if (rev >= 13)
>> +    else if (rev == 13)
>>         filename = "ucode13";
>> +    else if (rev == 14)
>> +        filename = "ucode14";
>> +    else if (rev >= 15)
>> +        filename = "ucode15";
>
> As shown by http://bcm-v4.sipsolutions.net/802.11/Init/Firmware, one
> should also have "ucode16".
>
>>     else
>>         goto err_no_ucode;
>>     err = b43_do_request_fw(ctx, filename, &fw->ucode);
>> @@ -2111,6 +2115,15 @@ static int b43_try_request_fw(struct
>> b43_request_fw_context *ctx)
>>         else
>>             goto err_no_initvals;
>>         break;
>> +    case B43_PHYTYPE_LP:
>> +        if (rev == 13)
>> +            filename = "lp0initvals13";
>> +        else if (rev == 14)
>> +            filename = "lp0initvals14";
>> +        else if (rev >= 15)
>> +            filename = "lp0initvals15";
>> +        else
>
> Same for lp0initvals16.
>
>> +            goto err_no_initvals;
>>     default:
>>         goto err_no_initvals;
>>     }
>> @@ -2145,6 +2158,15 @@ static int b43_try_request_fw(struct
>> b43_request_fw_context *ctx)
>>         else
>>             goto err_no_initvals;
>>         break;
>> +    case B43_PHYTYPE_LP:
>> +        if (rev == 13)
>> +            filename = "lp0bsinitvals13";
>> +        else if (rev == 14)
>> +            filename = "lp0bsinitvals14";
>> +        else if (rev >= 15)
>> +            filename = "lp0bsinitvals15";
>
> and lp0bsinitvals16.
>
>> +        else
>> +            goto err_no_initvals;
>>     default:
>>         goto err_no_initvals;
>>     }
>
> Larry
>

Is rev.16 firmware available anywhere?
Larry Finger Aug. 14, 2009, 1:10 p.m. UTC | #4
Gábor Stefanik wrote:
> 
> Is rev.16 firmware available anywhere?
> 

finger@larrylap:~/wireless-testing> ls /lib/firmware/b43
a0b0bsinitvals4.fw   a0g1bsinitvals5.fw   b0g0initvals13.fw
lp0initvals13.fw    n0initvals16.fw        ucode15.fw
a0b0gsinitvals5.fw   a0g1bsinitvals9.fw   b0g0initvals13.fw_save
lp0initvals14.fw    pcm4.fw                ucode16.fw
a0g0bsinitvals4.fw   a0g1initvals13.fw    b0g0initvals4.fw
lp0initvals15.fw    pcm5.fw                ucode4.fw
a0g0bsinitvals5.fw   a0g1initvals5.fw     b0g0initvals5.fw
lp0initvals16.fw    sslpn0bsinitvals16.fw  ucode5.fw
a0g0bsinitvals9.fw   a0g1initvals9.fw     b0g0initvals9.fw
n0absinitvals11.fw  sslpn0initvals16.fw    ucode9.fw
a0g0initvals4.fw     b0g0bsinitvals13.fw  lp0bsinitvals13.fw
n0absinitvals13.fw  ucode11.fw
a0g0initvals5.fw     b0g0bsinitvals4.fw   lp0bsinitvals14.fw
n0bsinitvals11.fw   ucode13.fw
a0g0initvals9.fw     b0g0bsinitvals5.fw   lp0bsinitvals15.fw
n0bsinitvals16.fw   ucode13.fw_save
a0g1bsinitvals13.fw  b0g0bsinitvals9.fw   lp0bsinitvals16.fw
n0initvals11.fw     ucode14.fw

I installed my firmware using openSUSE's script called
/usr/sbin/install_bcm43xx_firmware, which uses the driver file
broadcom-wl-4.150.10.5.tar.bz2, and rev 16 firmware is there.

Larry



--
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
Gábor Stefanik Aug. 14, 2009, 3:26 p.m. UTC | #5
(Restored CCs.)

2009/8/14 Larry Finger <Larry.Finger@lwfinger.net>:
> Gábor Stefanik wrote:
>>
>> On http://bu3sch.de/gitweb?p=b43-tools.git;a=blob;f=fwcutter/fwcutter_list.h;hb=HEAD,
>> it doesn't look like v4.150.10.5 contains rev16 - there is one version
>> that does have it, but the link to that file is dead.
>
> The rev 16 firmware definitely is in driver 4.174.64.19, but not in
> 4.150.10.5. I'll have to figure out where I got it, and what
> modifications are needed in fwcutter to make it available.
>
> I suggest that you do the mods to the firmware loading. If Broadcom
> has it in their driver, there must be hardware that needs it.
>
> Larry

I would say that's a goal for later - the FIFO sizes are different, so
it would clearly need more work than just loading the firmware  to
support rev16 devices.
Michael Buesch Aug. 14, 2009, 8:17 p.m. UTC | #6
On Friday 14 August 2009 13:51:59 Gábor Stefanik wrote:
> Add support for loading LP-PHY firmware to b43_try_request_fw.
> 
> Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>

ack
Gábor Stefanik Aug. 14, 2009, 8:20 p.m. UTC | #7
2009/8/14 Michael Buesch <mb@bu3sch.de>:
> On Friday 14 August 2009 13:51:59 Gábor Stefanik wrote:
>> Add support for loading LP-PHY firmware to b43_try_request_fw.
>>
>> Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
>
> ack
> --
> Greetings, Michael.
>

This version is broken - ack "v3 this time really" instead.
Michael Buesch Aug. 14, 2009, 8:41 p.m. UTC | #8
On Friday 14 August 2009 22:20:55 Gábor Stefanik wrote:
> 2009/8/14 Michael Buesch <mb@bu3sch.de>:
> > On Friday 14 August 2009 13:51:59 Gábor Stefanik wrote:
> >> Add support for loading LP-PHY firmware to b43_try_request_fw.
> >>
> >> Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
> >
> > ack
> > --
> > Greetings, Michael.
> >
> 
> This version is broken - ack "v3 this time really" instead.
> 

yeah whatever
diff mbox

Patch

diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index fbcbe4f..1e657fe 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -2062,8 +2062,12 @@  static int b43_try_request_fw(struct b43_request_fw_context *ctx)
 		filename = "ucode5";
 	else if ((rev >= 11) && (rev <= 12))
 		filename = "ucode11";
-	else if (rev >= 13)
+	else if (rev == 13)
 		filename = "ucode13";
+	else if (rev == 14)
+		filename = "ucode14";
+	else if (rev >= 15)
+		filename = "ucode15";
 	else
 		goto err_no_ucode;
 	err = b43_do_request_fw(ctx, filename, &fw->ucode);
@@ -2111,6 +2115,15 @@  static int b43_try_request_fw(struct b43_request_fw_context *ctx)
 		else
 			goto err_no_initvals;
 		break;
+	case B43_PHYTYPE_LP:
+		if (rev == 13)
+			filename = "lp0initvals13";
+		else if (rev == 14)
+			filename = "lp0initvals14";
+		else if (rev >= 15)
+			filename = "lp0initvals15";
+		else
+			goto err_no_initvals;
 	default:
 		goto err_no_initvals;
 	}
@@ -2145,6 +2158,15 @@  static int b43_try_request_fw(struct b43_request_fw_context *ctx)
 		else
 			goto err_no_initvals;
 		break;
+	case B43_PHYTYPE_LP:
+		if (rev == 13)
+			filename = "lp0bsinitvals13";
+		else if (rev == 14)
+			filename = "lp0bsinitvals14";
+		else if (rev >= 15)
+			filename = "lp0bsinitvals15";
+		else
+			goto err_no_initvals;
 	default:
 		goto err_no_initvals;
 	}