PERFORCE change 113832 for review

Sepherosa Ziehau sephe at FreeBSD.org
Thu Feb 1 13:47:35 UTC 2007


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

Change 113832 by sephe at sephe_zealot:sam_wifi on 2007/02/01 13:46:36

	- Don't try joining a BSS if one of its basic rates is not supported
	  by the wireless NIC.  Add comment about it.
	- Nuke tab on blank line.

Affected files ...

.. //depot/projects/wifi/sys/net80211/ieee80211_scan_sta.c#13 edit

Differences ...

==== //depot/projects/wifi/sys/net80211/ieee80211_scan_sta.c#13 (text+ko) ====

@@ -692,7 +692,7 @@
 	const u_int8_t *rs;
 
 	okrate = badrate = fixedrate = 0;
-	
+
 	if (IEEE80211_IS_CHAN_HALF(se->se_chan)) {
 		srs = &ic->ic_sup_half_rates;
 	} else if (IEEE80211_IS_CHAN_QUARTER(se->se_chan)) {
@@ -721,6 +721,15 @@
 					okrate = r;
 				break;
 			}
+
+		if (j == srs->rs_nrates && (rs[i] & IEEE80211_RATE_BASIC)) {
+			/*
+			 * Don't try joining a BSS, if we don't support
+			 * one of its basic rates.
+			 */
+			okrate = 0;
+			goto back;
+		}
 	}
 	if (rs == se->se_rates+2) {
 		/* scan xrates too; sort of an algol68-style for loop */
@@ -728,6 +737,8 @@
 		rs = se->se_xrates+2;
 		goto again;
 	}
+
+back:
 	if (okrate == 0 || ic->ic_fixed_rate != fixedrate)
 		return badrate | IEEE80211_RATE_BASIC;
 	else


More information about the p4-projects mailing list