PERFORCE change 134235 for review
Sam Leffler
sam at FreeBSD.org
Sun Jan 27 12:30:00 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=134235
Change 134235 by sam at sam_ebb on 2008/01/27 20:29:58
fix handling of DWDS vaps when remote ap goes away (e.g. on
channel change); we usually cannot re-create the vap state
because the peer ap is not present; reflect this through the
error code returned by wds_newstate, drivers must check the
return status and do the right thing
Affected files ...
.. //depot/projects/vap/sys/net80211/ieee80211_wds.c#5 edit
Differences ...
==== //depot/projects/vap/sys/net80211/ieee80211_wds.c#5 (text+ko) ====
@@ -95,7 +95,7 @@
vap->iv_opdetach = wds_vdetach;
}
-static void
+static int
ieee80211_create_wds(struct ieee80211vap *vap, struct ieee80211_channel *chan)
{
struct ieee80211com *ic = vap->iv_ic;
@@ -214,6 +214,7 @@
ieee80211_input(ni, m, rssi, noise, ni->ni_rstamp);
}
}
+ return (ni == NULL ? ENOENT : 0);
}
/*
@@ -390,6 +391,7 @@
struct ieee80211com *ic = vap->iv_ic;
struct ieee80211_node *ni;
enum ieee80211_state ostate;
+ int error;
IEEE80211_LOCK_ASSERT(ic);
@@ -403,6 +405,7 @@
ni = vap->iv_bss; /* NB: no reference held */
if (vap->iv_flags_ext & IEEE80211_FEXT_SWBMISS)
callout_stop(&vap->iv_swbmiss);
+ error = 0;
switch (nstate) {
case IEEE80211_S_INIT:
switch (ostate) {
@@ -432,13 +435,13 @@
* Already have a channel; bypass the scan
* and startup immediately.
*/
- ieee80211_create_wds(vap, ic->ic_curchan);
+ error = ieee80211_create_wds(vap, ic->ic_curchan);
}
break;
default:
break;
}
- return 0;
+ return error;
}
/*
More information about the p4-projects
mailing list