Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 May 2005 03:51:08 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 77275 for review
Message-ID:  <200505220351.j4M3p8Ns007445@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=77275

Change 77275 by sam@sam_ebb on 2005/05/22 03:50:33

	fix two more cases where we need to honor manual roaming:
	RUN -> AUTH and RUN -> ASSOC

Affected files ...

.. //depot/projects/vap/sys/net80211/ieee80211_proto.c#10 edit

Differences ...

==== //depot/projects/vap/sys/net80211/ieee80211_proto.c#10 (text+ko) ====

@@ -1145,8 +1145,9 @@
 	enum ieee80211_state ostate;
 
 	ostate = vap->iv_state;
-	IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE, "%s: %s -> %s\n", __func__,
-		ieee80211_state_name[ostate], ieee80211_state_name[nstate]);
+	IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE, "%s: %s -> %s (arg 0x%x)\n",
+	    __func__, ieee80211_state_name[ostate],
+	    ieee80211_state_name[nstate], arg);
 	vap->iv_state = nstate;			/* state transition */
 	callout_stop(&vap->iv_mgtsend);
 	if (ostate != IEEE80211_S_SCAN)
@@ -1272,7 +1273,6 @@
 		case IEEE80211_S_ASSOC:
 			switch (arg) {
 			case IEEE80211_FC0_SUBTYPE_AUTH:
-				/* ??? */
 				IEEE80211_SEND_MGMT(ni,
 				    IEEE80211_FC0_SUBTYPE_AUTH, 2);
 				break;
@@ -1290,10 +1290,12 @@
 				vap->iv_state = ostate;	/* stay RUN */
 				break;
 			case IEEE80211_FC0_SUBTYPE_DEAUTH:
-				/* try to reauth */
-				IEEE80211_SEND_MGMT(ni,
-				    IEEE80211_FC0_SUBTYPE_AUTH, 1);
 				ieee80211_sta_leave(ni);
+				if (ic->ic_roaming == IEEE80211_ROAMING_AUTO) {
+					/* try to reauth */
+					IEEE80211_SEND_MGMT(ni,
+					    IEEE80211_FC0_SUBTYPE_AUTH, 1);
+				}
 				break;
 			}
 			break;
@@ -1315,11 +1317,13 @@
 			    IEEE80211_FC0_SUBTYPE_ASSOC_REQ, 0);
 			break;
 		case IEEE80211_S_RUN:
-			/* NB: caller specifies ASSOC/REASSOC with arg */
-			IEEE80211_SEND_MGMT(ni, arg ?
-			    IEEE80211_FC0_SUBTYPE_REASSOC_REQ :
-			    IEEE80211_FC0_SUBTYPE_ASSOC_REQ, 0);
 			ieee80211_sta_leave(ni);
+			if (ic->ic_roaming == IEEE80211_ROAMING_AUTO) {
+				/* NB: caller specifies ASSOC/REASSOC by arg */
+				IEEE80211_SEND_MGMT(ni, arg ?
+				    IEEE80211_FC0_SUBTYPE_REASSOC_REQ :
+				    IEEE80211_FC0_SUBTYPE_ASSOC_REQ, 0);
+			}
 			break;
 		}
 		break;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200505220351.j4M3p8Ns007445>