diff --git a/sys/dev/awi/awi.c b/sys/dev/awi/awi.c index 33f0a906c18b..954a83175db2 100644 --- a/sys/dev/awi/awi.c +++ b/sys/dev/awi/awi.c @@ -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; diff --git a/sys/dev/ipw/if_ipw.c b/sys/dev/ipw/if_ipw.c index ec85e311aa9c..0be6fca4a004 100644 --- a/sys/dev/ipw/if_ipw.c +++ b/sys/dev/ipw/if_ipw.c @@ -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; } diff --git a/sys/dev/ral/rt2560.c b/sys/dev/ral/rt2560.c index 678353a284ae..d799be413091 100644 --- a/sys/dev/ral/rt2560.c +++ b/sys/dev/ral/rt2560.c @@ -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; } diff --git a/sys/dev/ral/rt2661.c b/sys/dev/ral/rt2661.c index 533d2c5b0342..fde5738c47e7 100644 --- a/sys/dev/ral/rt2661.c +++ b/sys/dev/ral/rt2661.c @@ -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; } diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c index efa7e4a26b29..aa716277ae75 100644 --- a/sys/dev/wi/if_wi.c +++ b/sys/dev/wi/if_wi.c @@ -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; } diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c index 4a2b8f929949..dd7d4786913c 100644 --- a/sys/net80211/ieee80211_proto.c +++ b/sys/net80211/ieee80211_proto.c @@ -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; } diff --git a/sys/net80211/ieee80211_proto.h b/sys/net80211/ieee80211_proto.h index b00c8ec83cd4..1a2926a2d06b 100644 --- a/sys/net80211/ieee80211_proto.h +++ b/sys/net80211/ieee80211_proto.h @@ -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))