o add 802.11 state machine states for DFS and client-side power save
o fixup drivers to ignore new states Reviewed by: avatar (?) Approved by: re (blanket wireless)
This commit is contained in:
parent
dc60433061
commit
14fb6b8fe2
@ -1919,6 +1919,8 @@ awi_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
|
||||
else
|
||||
awi_drvstate(sc, AWI_DRV_INFASSOC);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (nstate == IEEE80211_S_INIT) {
|
||||
@ -1954,6 +1956,8 @@ awi_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
|
||||
case IEEE80211_S_SCAN:
|
||||
/* scan next */
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (ic->ic_flags & IEEE80211_F_ASCAN)
|
||||
newmode = AWI_SCAN_ACTIVE;
|
||||
|
@ -839,6 +839,7 @@ ipw_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
|
||||
case IEEE80211_S_SCAN:
|
||||
case IEEE80211_S_AUTH:
|
||||
case IEEE80211_S_ASSOC:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -807,6 +807,7 @@ rt2560_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
|
||||
case IEEE80211_S_SCAN:
|
||||
case IEEE80211_S_AUTH:
|
||||
case IEEE80211_S_ASSOC:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -821,6 +821,7 @@ rt2661_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
|
||||
case IEEE80211_S_SCAN:
|
||||
case IEEE80211_S_AUTH:
|
||||
case IEEE80211_S_ASSOC:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -3009,6 +3009,8 @@ wi_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
|
||||
memcpy(ni->ni_essid, ssid.wi_ssid, ni->ni_esslen);
|
||||
}
|
||||
return (*sc->sc_newstate)(ic, nstate, arg);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -78,7 +78,10 @@ const char *ieee80211_state_name[IEEE80211_S_MAX] = {
|
||||
"SCAN", /* IEEE80211_S_SCAN */
|
||||
"AUTH", /* IEEE80211_S_AUTH */
|
||||
"ASSOC", /* IEEE80211_S_ASSOC */
|
||||
"RUN" /* IEEE80211_S_RUN */
|
||||
"CAC", /* IEEE80211_S_CAC */
|
||||
"RUN", /* IEEE80211_S_RUN */
|
||||
"CSA", /* IEEE80211_S_CSA */
|
||||
"SLEEP", /* IEEE80211_S_SLEEP */
|
||||
};
|
||||
const char *ieee80211_wme_acnames[] = {
|
||||
"WME_AC_BE",
|
||||
@ -1143,6 +1146,8 @@ ieee80211_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg
|
||||
break;
|
||||
case IEEE80211_S_AUTH:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (ostate != IEEE80211_S_INIT) {
|
||||
/* NB: optimize INIT -> INIT case */
|
||||
@ -1215,6 +1220,8 @@ ieee80211_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg
|
||||
goto createibss;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case IEEE80211_S_AUTH:
|
||||
@ -1257,6 +1264,8 @@ ieee80211_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case IEEE80211_S_ASSOC:
|
||||
@ -1282,6 +1291,8 @@ ieee80211_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg
|
||||
IEEE80211_FC0_SUBTYPE_ASSOC_REQ, 0);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case IEEE80211_S_RUN:
|
||||
@ -1337,6 +1348,8 @@ ieee80211_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg
|
||||
}
|
||||
if_start(ifp); /* XXX not authorized yet */
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (ostate != IEEE80211_S_RUN &&
|
||||
ic->ic_opmode == IEEE80211_M_STA &&
|
||||
@ -1377,6 +1390,8 @@ ieee80211_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg
|
||||
callout_reset(&ic->ic_inact, IEEE80211_INACT_WAIT*hz,
|
||||
ieee80211_node_timeout, ic);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -37,9 +37,12 @@ enum ieee80211_state {
|
||||
IEEE80211_S_SCAN = 1, /* scanning */
|
||||
IEEE80211_S_AUTH = 2, /* try to authenticate */
|
||||
IEEE80211_S_ASSOC = 3, /* try to assoc */
|
||||
IEEE80211_S_RUN = 4, /* associated */
|
||||
IEEE80211_S_CAC = 4, /* doing channel availability check */
|
||||
IEEE80211_S_RUN = 5, /* operational (e.g. associated) */
|
||||
IEEE80211_S_CSA = 6, /* channel switch announce pending */
|
||||
IEEE80211_S_SLEEP = 7, /* power save */
|
||||
};
|
||||
#define IEEE80211_S_MAX (IEEE80211_S_RUN+1)
|
||||
#define IEEE80211_S_MAX (IEEE80211_S_SLEEP+1)
|
||||
|
||||
#define IEEE80211_SEND_MGMT(_ic,_ni,_type,_arg) \
|
||||
((*(_ic)->ic_send_mgmt)(_ic, _ni, _type, _arg))
|
||||
|
Loading…
Reference in New Issue
Block a user