On Friday 26 January 2007 14:51, Matthew Garrett wrote:
> The dscape driver requires v4 firmware, while the mainline driver
> prefers v3. Giving the two different names makes it easier to support
> parallel installation. This patches fwcutter to dump v4 firmware with a
> different name - the second patch alters the dscape driver to request
> it.
NACK.
Learn about "fwpostfix" module parameter.
Besides that, this patch is buggy.
> Signed-off-by: Matthew Garrett <[EMAIL PROTECTED]>
>
> ---
>
> diff -urp bcm43xx-fwcutter-006/fwcutter.c bcm43xx-fwcutter-006.new/fwcutter.c
> --- bcm43xx-fwcutter-006/fwcutter.c 2006-12-08 21:00:28.000000000 +0000
> +++ bcm43xx-fwcutter-006.new/fwcutter.c 2007-01-26 13:42:08.000000000
> +0000
> @@ -28,6 +28,7 @@
>
> static struct cmdline_args cmdargs;
> int big_endian_cpu;
> +int v4_firmware;
>
> static void write_little_endian(FILE *f, byte *buffer, int len, uint8_t
> flags)
> {
> @@ -110,11 +111,18 @@ static void write_iv(uint8_t flags, uint
> ivnum = 0;
> }
>
> - snprintf(ivfilename, sizeof(ivfilename),
> - "%s/bcm43xx_initval%02d%s.fw",
> - cmdargs.target_dir,
> - ivnum,
> - cmdargs.postfix);
> + if (v4_firmware)
> + snprintf(ivfilename, sizeof(ivfilename),
> + "%s/bcm43xx_v4_initval%02d%s.fw",
> + cmdargs.target_dir,
> + ivnum,
> + cmdargs.postfix);
> + else
> + snprintf(ivfilename, sizeof(ivfilename),
> + "%s/bcm43xx_initval%02d%s.fw",
> + cmdargs.target_dir,
> + ivnum,
> + cmdargs.postfix);
>
> /* don't extract initval 0 */
> if ( ivnum == 0 ) {
> @@ -289,16 +297,27 @@ static void extract_fw(uint8_t fwtype, u
> case FIRMWARE_UCODE_5:
> case FIRMWARE_UCODE_11:
> case FIRMWARE_UCODE_13:
> - snprintf(outfile, sizeof(outfile), "bcm43xx_microcode%i%s.fw",
> - fwtype - FIRMWARE_UCODE_OFFSET, cmdargs.postfix);
> + if (v4_firmware)
> + snprintf(outfile, sizeof(outfile),
> "bcm43xx_v4_microcode%i%s.fw",
> + fwtype - FIRMWARE_UCODE_OFFSET,
> cmdargs.postfix);
> + else
> + snprintf(outfile, sizeof(outfile),
> "bcm43xx_microcode%i%s.fw",
> + fwtype - FIRMWARE_UCODE_OFFSET,
> cmdargs.postfix);
> break;
> case FIRMWARE_PCM_4:
> case FIRMWARE_PCM_5:
> - snprintf(outfile, sizeof(outfile), "bcm43xx_pcm%i%s.fw",
> - fwtype, cmdargs.postfix);
> + if (v4_firmware)
> + snprintf(outfile, sizeof(outfile),
> "bcm43xx_v4_pcm%i%s.fw",
> + fwtype, cmdargs.postfix);
> + else
> + snprintf(outfile, sizeof(outfile),
> "bcm43xx_pcm%i%s.fw",
> + fwtype, cmdargs.postfix);
> break;
> default:
> - snprintf(outfile, sizeof(outfile), "bcm43xx_unknown.fw");
> + if (v4_firmware)
> + snprintf(outfile, sizeof(outfile),
> "bcm43xx_v4_unknown.fw");
> + else
> + snprintf(outfile, sizeof(outfile),
> "bcm43xx_unknown.fw");
> }
>
> if (length > 0) {
> @@ -577,6 +596,7 @@ static const struct file * find_file(FIL
> "(wireless-dev kernel tree). If you
> don't know what \n"
> "this warning is about, use a 3.xx.xx.xx
> driver version \n"
> "instead to extract the firmware.\n");
> + v4_firmware = 1;
> }
> printf("\n filename : %s\n", files[i].name);
> printf(" version : %s\n", files[i].version);
>
--
Greetings Michael.
_______________________________________________
Bcm43xx-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev