PERFORCE change 120584 for review

Andrew Thompson thompsa at FreeBSD.org
Tue May 29 22:04:18 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=120584

Change 120584 by thompsa at thompsa_heff on 2007/05/29 22:03:08

	Grab the associd from the frame. This lets ieee80211_input process the
	beacon frames and will scan the next channel much quicker for a bgscan.
	
	We may want to just pass a full list of channels to scan to the
	firmware as Linux does it.

Affected files ...

.. //depot/projects/wifi/sys/dev/iwi/if_iwi.c#30 edit

Differences ...

==== //depot/projects/wifi/sys/dev/iwi/if_iwi.c#30 (text+ko) ====

@@ -1318,6 +1318,7 @@
 #define	SUBTYPE(wh)	((wh)->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK)
 	const uint8_t *frm, *efrm, *wme;
 	struct ieee80211_node *ni;
+	uint16_t capinfo, status, associd;
 
 	/* NB: +8 for capinfo, status, associd, and first ie */
 	if (!(sizeof(*wh)+8 < len && len < IEEE80211_MAX_LEN) ||
@@ -1334,7 +1335,13 @@
 	 */
 	frm = (const uint8_t *)&wh[1];
 	efrm = ((const uint8_t *) wh) + len;
-	frm += 6;
+
+	capinfo = le16toh(*(const uint16_t *)frm);
+	frm += 2;
+	status = le16toh(*(const uint16_t *)frm);
+	frm += 2;
+	associd = le16toh(*(const uint16_t *)frm);
+	frm += 2;
 
 	wme = NULL;
 	while (frm < efrm) {
@@ -1349,6 +1356,8 @@
 	}
 
 	ni = sc->sc_ic.ic_bss;
+	ni->ni_capinfo = capinfo;
+	ni->ni_associd = associd;
 	if (wme != NULL)
 		ni->ni_flags |= IEEE80211_NODE_QOS;
 	else


More information about the p4-projects mailing list