Re: [PATCH]: bcm43xx-d80211: fix hwcrypto issues (mcast)
On Fri, Nov 17, 2006 at 06:46:29PM +1100, Benjamin Herrenschmidt wrote: > On Thu, 2006-11-16 at 15:07 +0100, Michael Buesch wrote: >> This fixes various bcm43xx-d80211 hwcrypto issues, >> which mainly prevented mcast frames from being decrypted properly. >> >> This is mostly a rewrite of the key managing code. >> Note that after this patch v3 firmware is no longer supported. > So what is the solution for Apple machines owner who only get a v3 > firmware from Apple ? I remember you telling me the answer on irc but I > wanted to make it public :-) Some web site we can d/l the windows > updates and extract the FW ? http://bcm43xx.spugna.org/index.php?topic=141.msg517 provides the following links to 4.80.46.0: http://www.i-nz.net/files/perm/AppleAirPortBrcm4311.tar.gz http://www.i-nz.net/files/perm/bcmwl5-win32.tar.gz -- --- Paul "TBBle" Hampson, B.Sc, LPI, MCSE On-hiatus Asian Studies student, ANU The Boss, Bubblesworth Pty Ltd (ABN: 51 095 284 361) [EMAIL PROTECTED] Of course Pacman didn't influence us as kids. If it did, we'd be running around in darkened rooms, popping pills and listening to repetitive music. -- Kristian Wilson, Nintendo, Inc, 1989 License: http://creativecommons.org/licenses/by/2.1/au/ --- pgpdU5wbcGLV6.pgp Description: PGP signature
Re: [PATCH]: bcm43xx-d80211: fix hwcrypto issues (mcast)
On Fri, Nov 17, 2006 at 12:04:42PM +0100, Johannes Berg wrote: > On Fri, 2006-11-17 at 11:35 +0100, Andreas Schwab wrote: > > > Still the same. One of them does not exist, the other one requires > > Javascript! > > Yeah, looks like Martin forgot to put the URLs in the the readme while > he put them into commit messages... The last update for README was quite some time ago. I think that file is a bad way to transport that kind of information. So I'm afraid a lot of links are really out of date now. A better way is probably an open wiki (berlios?). Volunteers and other ideas are always welcome. The comments in the commit messages are more a kind of protocol and not the best link on earth. And if you wait some days the number of mirrors for the latest driver will explode. It would be bad to write the first available link into the README. A download link should be a direct link, a small package, easy to extract and so on. But I'm really not interested in doing that job of a hunter for the perfect download link and try to keep that link up to date. I think it's more important to write support for more driver files instead of doing that surrounding stuff for a few files in a perfect way. Google isn't that complicated these days and it's more up to date than our README. > Support for bcmwl5.sys v4.80.53.0 added. > ftp://downloads.netgear.com/files/wn511b_sw_3_28_3_8_setup.zip > (bcmwl5.sys is renamed to wn511b.sys) > > Support for bcmwl5(64).sys v4.100.15.5 added. > >from the latest Linksys WPC300N driver at > http://www.linksys.com/download/ > It's ucode revision 0x0173, patchlevel 0x0425, 2006-10-04. > > Martin, can you add these to the readme? These are bad examples for adding to README. People aren't prepared well enough to look for renamed bcmwl5.sys files which are packaged twice and they expect direct links, too. ... Martin - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH]: bcm43xx-d80211: fix hwcrypto issues (mcast)
On Fri, Nov 17, 2006 at 11:35:54AM +0100, Andreas Schwab wrote: > Benjamin Herrenschmidt <[EMAIL PROTECTED]> writes: >> Well, the latest "released" version (fwcutter-005) contains a huge list >> of ... v3 URLs :-) Only 2 v4 in there. I'll check SVN. > Still the same. One of them does not exist, the other one requires > Javascript! MacOS X 10.4.8 Update for Intel [1] has AppleAirportBrcm4311 E99AD02FDD7699FA52F0B9153C8411C8 4.80.46.0 big-endian, supported in fwcutter-svn It's a 200MB download for just the one file, but w3m seems to be able to process it OK, so I assume it doesn't require Javascript. [1] http://www.apple.com/support/downloads/macosx1048updateintel.html -- --- Paul "TBBle" Hampson, B.Sc, LPI, MCSE On-hiatus Asian Studies student, ANU The Boss, Bubblesworth Pty Ltd (ABN: 51 095 284 361) [EMAIL PROTECTED] Of course Pacman didn't influence us as kids. If it did, we'd be running around in darkened rooms, popping pills and listening to repetitive music. -- Kristian Wilson, Nintendo, Inc, 1989 License: http://creativecommons.org/licenses/by/2.1/au/ --- pgpkwvBXHFP3Y.pgp Description: PGP signature
Re: [PATCH]: bcm43xx-d80211: fix hwcrypto issues (mcast)
Johannes Berg <[EMAIL PROTECTED]> writes: > Try these: > > Support for bcmwl5.sys v4.80.53.0 added. > ftp://downloads.netgear.com/files/wn511b_sw_3_28_3_8_setup.zip > (bcmwl5.sys is renamed to wn511b.sys) No supported files in there. > Support for bcmwl5(64).sys v4.100.15.5 added. > from the latest Linksys WPC300N driver at > http://www.linksys.com/download/ > It's ucode revision 0x0173, patchlevel 0x0425, 2006-10-04. Requires Javascript. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH]: bcm43xx-d80211: fix hwcrypto issues (mcast)
On Fri, 2006-11-17 at 11:35 +0100, Andreas Schwab wrote: > Still the same. One of them does not exist, the other one requires > Javascript! Yeah, looks like Martin forgot to put the URLs in the the readme while he put them into commit messages... Try these: Support for bcmwl5.sys v4.80.53.0 added. ftp://downloads.netgear.com/files/wn511b_sw_3_28_3_8_setup.zip (bcmwl5.sys is renamed to wn511b.sys) Support for bcmwl5(64).sys v4.100.15.5 added. from the latest Linksys WPC300N driver at http://www.linksys.com/download/ It's ucode revision 0x0173, patchlevel 0x0425, 2006-10-04. Martin, can you add these to the readme? johannes - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH]: bcm43xx-d80211: fix hwcrypto issues (mcast)
Benjamin Herrenschmidt <[EMAIL PROTECTED]> writes: > Well, the latest "released" version (fwcutter-005) contains a huge list > of ... v3 URLs :-) Only 2 v4 in there. I'll check SVN. Still the same. One of them does not exist, the other one requires Javascript! Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH]: bcm43xx-d80211: fix hwcrypto issues (mcast)
Benjamin Herrenschmidt wrote: On Fri, 2006-11-17 at 08:53 +0100, Johannes Berg wrote: On Fri, 2006-11-17 at 18:46 +1100, Benjamin Herrenschmidt wrote: So what is the solution for Apple machines owner who only get a v3 firmware from Apple ? I remember you telling me the answer on irc but I wanted to make it public :-) Some web site we can d/l the windows updates and extract the FW ? Yes, fwcutter comes with a huge list of URLs for both firmware versions (I suppose they'll remove the v3 ones now...) v3 ones are still needed for the softmac version, unless I'm badly drunk... Well, the latest "released" version (fwcutter-005) contains a huge list of ... v3 URLs :-) Only 2 v4 in there. I'll check SVN. There's actually a v4 big-endian firmware in the fwcutter list in SVN, but no URL to fetch it from... It comes from the AppleAirPortBrcm4311 driver. I've no idea where that update comes from, I found a copy on the Internet somewhere. (I think someone posted the file to a message board looking for help with it...) I'm not sure, would it be be bad for me to just stick a copy of it up on a website? If so, I can prolly dig up the place I got it from (I'm sure I bookmarked it at the time) and people can choose their own level of comfort. I have to say it's not clear from the documentation that BE machines like PPC need to use a BE firmware... (If that's not the case, it's not clear that it's not the case either, it just doesn't say either way. ^_^) In fact, given that it's a BE firmware update for Intel-based Macs' bcm cards, I presume the endianess of the firmware doesn't matter? -- Paul Hampson [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH]: bcm43xx-d80211: fix hwcrypto issues (mcast)
On Fri, 2006-11-17 at 08:53 +0100, Johannes Berg wrote: > On Fri, 2006-11-17 at 18:46 +1100, Benjamin Herrenschmidt wrote: > > > So what is the solution for Apple machines owner who only get a v3 > > firmware from Apple ? I remember you telling me the answer on irc but I > > wanted to make it public :-) Some web site we can d/l the windows > > updates and extract the FW ? > > Yes, fwcutter comes with a huge list of URLs for both firmware versions > (I suppose they'll remove the v3 ones now...) Well, the latest "released" version (fwcutter-005) contains a huge list of ... v3 URLs :-) Only 2 v4 in there. I'll check SVN. Cheers, Ben. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH]: bcm43xx-d80211: fix hwcrypto issues (mcast)
On Fri, 2006-11-17 at 18:46 +1100, Benjamin Herrenschmidt wrote: > So what is the solution for Apple machines owner who only get a v3 > firmware from Apple ? I remember you telling me the answer on irc but I > wanted to make it public :-) Some web site we can d/l the windows > updates and extract the FW ? Yes, fwcutter comes with a huge list of URLs for both firmware versions (I suppose they'll remove the v3 ones now...) Also, very new Apple drivers (AppleAirportExpress4311 or something like that) for the PCI-E stuff contains v4 firmware, but I doubt you'd get those drivers with an update. johannes - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH]: bcm43xx-d80211: fix hwcrypto issues (mcast)
On Thu, 2006-11-16 at 15:07 +0100, Michael Buesch wrote: > This fixes various bcm43xx-d80211 hwcrypto issues, > which mainly prevented mcast frames from being decrypted properly. > > This is mostly a rewrite of the key managing code. > Note that after this patch v3 firmware is no longer supported. So what is the solution for Apple machines owner who only get a v3 firmware from Apple ? I remember you telling me the answer on irc but I wanted to make it public :-) Some web site we can d/l the windows updates and extract the FW ? Cheers, Ben. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH]: bcm43xx-d80211: fix hwcrypto issues (mcast)
This fixes various bcm43xx-d80211 hwcrypto issues, which mainly prevented mcast frames from being decrypted properly. This is mostly a rewrite of the key managing code. Note that after this patch v3 firmware is no longer supported. Signed-off-by: Michael Buesch <[EMAIL PROTECTED]> Index: wireless-dev/drivers/net/wireless/d80211/bcm43xx/bcm43xx.h === --- wireless-dev.orig/drivers/net/wireless/d80211/bcm43xx/bcm43xx.h 2006-11-14 16:03:00.0 +0100 +++ wireless-dev/drivers/net/wireless/d80211/bcm43xx/bcm43xx.h 2006-11-14 18:34:14.0 +0100 @@ -620,7 +620,6 @@ struct bcm43xx_stats { struct bcm43xx_key { u8 enabled; - u8 used; u8 algorithm; u8 address[6]; }; Index: wireless-dev/drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c === --- wireless-dev.orig/drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c 2006-11-14 16:03:00.0 +0100 +++ wireless-dev/drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c 2006-11-15 18:58:51.0 +0100 @@ -874,11 +874,12 @@ static void keymac_write(struct bcm43xx_ { u32 addrtmp[2]; + assert(index >= 4 + 4); + memcpy(bcm->key[index].address, addr, 6); /* We have two default TX keys and two default RX keys. * Physical mac 0 is mapped to physical key 8. * So we must adjust the index here. */ - assert(index >= 4 + 4); index -= 8; addrtmp[0] = addr[0]; @@ -912,97 +913,88 @@ static void keymac_write(struct bcm43xx_ } } -static int key_write_common(struct bcm43xx_private *bcm, - u8 index, u8 algorithm, - struct ieee80211_key_conf *keyconf, - const u8 *mac_addr) +static void do_key_write(struct bcm43xx_private *bcm, +u8 index, u8 algorithm, +const u8 *key, size_t key_len, +const u8 *mac_addr) { u8 buf[BCM43xx_SEC_KEYSIZE]; - /* The "index" passed to this function is the -* absolute key table index. -*/ - - if ((index >= bcm->max_nr_keys) || - (keyconf && (keyconf->keylen > BCM43xx_SEC_KEYSIZE))) - return -EINVAL; + assert(index < bcm->max_nr_keys); + assert(key_len <= BCM43xx_SEC_KEYSIZE); memset(buf, 0, sizeof(buf)); - if (mac_addr) + if (index >= 8) keymac_write(bcm, index, buf); /* First zero out mac. */ - if (keyconf) - memcpy(buf, keyconf->key, keyconf->keylen); + memcpy(buf, key, key_len); key_write(bcm, index, algorithm, buf); - if (mac_addr) + if (index >= 8) keymac_write(bcm, index, mac_addr); - bcm->key[index].algorithm = algorithm; - bcm->key[index].used = 1; - bcm->key[index].enabled = 1; - if (mac_addr) - memcpy(bcm->key[index].address, mac_addr, 6); - else - memset(bcm->key[index].address, 0, 6); - return 0; + bcm->key[index].algorithm = algorithm; } -static int bcm43xx_default_key_write(struct bcm43xx_private *bcm, -u8 index, u8 algorithm, -struct ieee80211_key_conf *key) +static int bcm43xx_key_write(struct bcm43xx_private *bcm, +int index, u8 algorithm, +const u8 *key, size_t key_len, +const u8 *mac_addr, +struct ieee80211_key_conf *keyconf) { - int err; + int i; - if (index > 3) + if (key_len > BCM43xx_SEC_KEYSIZE) return -EINVAL; + if (index < 0) { + /* Per station key with associated MAC address. +* Look if it already exists, if yes update, otherwise +* allocate a new key. +*/ + for (i = 8; i < bcm->max_nr_keys; i++) { + if (compare_ether_addr(bcm->key[i].address, mac_addr) == 0) { + /* found existing */ + index = i; + break; + } + } + if (index < 0) { + for (i = 8; i < bcm->max_nr_keys; i++) { + if (!bcm->key[i].enabled) { + /* found empty */ + index = i; + break; + } + } + } + if (index < 0) { + dprintk(KERN_ERR PFX "Out of hw key memory\n"); + return -ENOBUFS; + } + } else + assert(index <= 3); -