Re: Intel 2220BG in NB6_BETA
Frank Wille <[email protected]> Mon, 19 Mar 2012 10:13:13 +0100
| Newsgroups | gmane.os.netbsd.current,gmane.os.netbsd.ports.sandpoint |
|---|---|
| Organization | Privates Internet Ostwestfalen/Lippe |
| Message-ID | <[email protected]> |
On Sun, 18 Mar 2012 16:21:27 -0400 Thor Lancelot Simon <[email protected]> wrote: > On Sun, Mar 18, 2012 at 05:24:12PM +0900, Toru Nishimura wrote: > > I would like to help from -current user(s) who use Intel Pro > > Wireless 2200BG. A person who recently tried it with PPC NAS has > > been experiencing the following trouble. > > Byte order problem reading in the firmware? The wrong-firmware-length > message is strongly suggestive of this. Correct. I had a look into the ipw2200-bss.fw file. Its header ist defined as: struct iwi_firmware_hdr { uint32_t version; /* version stamp */ uint32_t bsize; /* size of boot image */ uint32_t usize; /* size of ucode image */ uint32_t fsize; /* size of firmware image */ } __packed; And the image sizes in the hexdump definitely look little-endian to me: 00000000 01 00 03 00 40 19 00 00 7e 3f 00 00 e4 91 02 00 |....@...~?......| Unfortunately if_iwi.c doesn't care for the endianess: if (size < sizeof(struct iwi_firmware_hdr) + hdr->bsize + hdr->usize + hdr->fsize) { aprint_error_dev(sc->sc_dev, "image '%s' too small\n", sc->sc_fwname); [...] A few lines later it uses the correct "le32toh(hdr->version)" for the version, though. :) This should be fixed! -- Frank Wille