Date: Mon, 1 Nov 2010 19:04:16 +0000 (UTC) From: Bernhard Schmidt <bschmidt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r214632 - stable/7/sys/dev/iwi Message-ID: <201011011904.oA1J4G2J083119@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bschmidt Date: Mon Nov 1 19:04:16 2010 New Revision: 214632 URL: http://svn.freebsd.org/changeset/base/214632 Log: MFC r214160,214162,214236 r214236 & r214160: The firmware does pad notifications to an even number of bytes (at least the association notification), the included information though always contains an elem block with an odd number of bytes. We handle the last byte as if it might contain a whole elem block, this of course is not true as one byte is not enough to hold a block, we therefore discard the complete frame. The solution here is to subtract one from the actual notification length, this is also what the Linux driver does. With this change the frame ends exactly where the last elem block ends. r214262: The firmware always sets bit 14 and 15, to get the real associd we need to clear those bits. Modified: stable/7/sys/dev/iwi/if_iwi.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/iwi/if_iwi.c ============================================================================== --- stable/7/sys/dev/iwi/if_iwi.c Mon Nov 1 18:18:46 2010 (r214631) +++ stable/7/sys/dev/iwi/if_iwi.c Mon Nov 1 19:04:16 2010 (r214632) @@ -1377,7 +1377,7 @@ iwi_checkforqos(struct iwi_softc *sc, co ni = sc->sc_ic.ic_bss; ni->ni_capinfo = capinfo; - ni->ni_associd = associd; + ni->ni_associd = associd & 0x3fff; if (wme != NULL) ni->ni_flags |= IEEE80211_NODE_QOS; else @@ -1480,7 +1480,7 @@ iwi_notification_intr(struct iwi_softc * IWI_STATE_END(sc, IWI_FW_ASSOCIATING); iwi_checkforqos(sc, (const struct ieee80211_frame *)(assoc+1), - le16toh(notif->len) - sizeof(*assoc)); + le16toh(notif->len) - sizeof(*assoc) - 1); ieee80211_new_state(ic, IEEE80211_S_RUN, -1); break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011011904.oA1J4G2J083119>