summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2007-09-05 21:31:32 +0000
committersam <sam@FreeBSD.org>2007-09-05 21:31:32 +0000
commit82a73bb56563ac476ef079169cb642990e0a1cc7 (patch)
treec7c268164c82a154ffedc62c1299e8212a8aa455 /sys
parentfd6b073d62a4ab2b7f54272df8821d91edb0465c (diff)
downloadFreeBSD-src-82a73bb56563ac476ef079169cb642990e0a1cc7.zip
FreeBSD-src-82a73bb56563ac476ef079169cb642990e0a1cc7.tar.gz
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)
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/awi/awi.c4
-rw-r--r--sys/dev/ipw/if_ipw.c1
-rw-r--r--sys/dev/ral/rt2560.c1
-rw-r--r--sys/dev/ral/rt2661.c1
-rw-r--r--sys/dev/wi/if_wi.c2
-rw-r--r--sys/net80211/ieee80211_proto.c17
-rw-r--r--sys/net80211/ieee80211_proto.h7
7 files changed, 30 insertions, 3 deletions
diff --git a/sys/dev/awi/awi.c b/sys/dev/awi/awi.c
index 33f0a90..954a831 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 ec85e31..0be6fca 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 678353a..d799be4 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 533d2c5..fde5738 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 efa7e4a..aa71627 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 4a2b8f9..dd7d478 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 b00c8ec..1a2926a 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))
OpenPOWER on IntegriCloud