p4-projects@freebsd.org
[Top] [All Lists]

PERFORCE change 133143 for review

Subject: PERFORCE change 133143 for review
From: Sam Leffler
Date: Sat, 12 Jan 2008 23:52:51 GMT
http://perforce.freebsd.org/chv.cgi?CH=133143

Change 133143 by sam@sam_ebb on 2008/01/12 23:52:33

        fix handling of multiple vaps pending in CAC: we don't handle
        this directly in ieee80211_new_state_locked (as for SCAN) so
        we must explicitly walk the vap list; hide the details in a
        new ieee80211_cac_completeswitch (a la ieee80211_csa_completeswitch)

Affected files ...

.. //depot/projects/vap/sys/net80211/ieee80211_dfs.c#3 edit
.. //depot/projects/vap/sys/net80211/ieee80211_proto.c#18 edit
.. //depot/projects/vap/sys/net80211/ieee80211_proto.h#12 edit

Differences ...

==== //depot/projects/vap/sys/net80211/ieee80211_dfs.c#3 (text+ko) ====

@@ -134,7 +134,7 @@
                }
                ieee80211_notify_cac(ic, ic->ic_curchan,
                    IEEE80211_NOTIFY_CAC_EXPIRE);
-               ieee80211_new_state(vap, IEEE80211_S_RUN, 0);
+               ieee80211_cac_completeswitch(vap);
        }
 }
 

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

@@ -1367,6 +1367,31 @@
 }
 
 /*
+ * Complete a DFS CAC started by ieee80211_dfs_cac_start.
+ * We clear state and move all vap's in CAC state to RUN state.
+ */
+void
+ieee80211_cac_completeswitch(struct ieee80211vap *vap0)
+{
+       struct ieee80211com *ic = vap0->iv_ic;
+       struct ieee80211vap *vap;
+
+       IEEE80211_LOCK(ic);
+       /*
+        * Complete CAC state change for lead vap first; then
+        * clock all the other vap's waiting.
+        */
+       KASSERT(vap0->iv_state == IEEE80211_S_CAC,
+           ("wrong state %d", vap0->iv_state));
+       ieee80211_new_state_locked(vap0, IEEE80211_S_RUN, 0);
+
+       TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next)
+               if (vap->iv_state == IEEE80211_S_CAC)
+                       ieee80211_new_state_locked(vap, IEEE80211_S_RUN, 0);
+       IEEE80211_UNLOCK(ic);
+}
+
+/*
  * Force all vap's other than the specified vap to the INIT state
  * and mark them as waiting for a scan to complete.  These vaps
  * will be brought up when the scan completes and the scanning vap

==== //depot/projects/vap/sys/net80211/ieee80211_proto.h#12 (text+ko) ====

@@ -320,6 +320,7 @@
 void   ieee80211_csa_startswitch(struct ieee80211com *,
                struct ieee80211_channel *, int mode, int count);
 void   ieee80211_csa_completeswitch(struct ieee80211com *);
+void   ieee80211_cac_completeswitch(struct ieee80211vap *);
 
 /*
  * Notification methods called from the 802.11 state machine.
_______________________________________________
p4-projects@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/p4-projects
To unsubscribe, send any mail to "p4-projects-unsubscribe@xxxxxxxxxxx"

<Prev in Thread] Current Thread [Next in Thread>
  • PERFORCE change 133143 for review, Sam Leffler <=