summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_input.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2009-06-04 15:57:38 +0000
committersam <sam@FreeBSD.org>2009-06-04 15:57:38 +0000
commite673d3b5e90d6ec6fe0c6bca82c4b813b1af6e3d (patch)
tree0087ddfa0d20ea5694d61834bf30fbd8cf190b9f /sys/net80211/ieee80211_input.c
parent981682577c61c5ffe81deb34e9b9b1f0658c7fb0 (diff)
downloadFreeBSD-src-e673d3b5e90d6ec6fe0c6bca82c4b813b1af6e3d.zip
FreeBSD-src-e673d3b5e90d6ec6fe0c6bca82c4b813b1af6e3d.tar.gz
o station mode channel switch support
o IEEE80211_IOC_CHANSWITCH fixups: - restrict to hostap vaps - return EOPNOTSUPP instead of EINVAL when applied to !hostap vap or to a vap w/o 11h enabled - interpret count of 0 to mean cancel the current CSA Reviewed by: rpaulo, avatar
Diffstat (limited to 'sys/net80211/ieee80211_input.c')
-rw-r--r--sys/net80211/ieee80211_input.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c
index 53c2285..ad3fab4 100644
--- a/sys/net80211/ieee80211_input.c
+++ b/sys/net80211/ieee80211_input.c
@@ -475,6 +475,7 @@ ieee80211_parse_beacon(struct ieee80211_node *ni, struct mbuf *m,
* [tlv] ssid
* [tlv] supported rates
* [tlv] country information
+ * [tlv] channel switch announcement (CSA)
* [tlv] parameter set (FH/DS)
* [tlv] erp information
* [tlv] extended supported rates
@@ -508,6 +509,9 @@ ieee80211_parse_beacon(struct ieee80211_node *ni, struct mbuf *m,
case IEEE80211_ELEMID_COUNTRY:
scan->country = frm;
break;
+ case IEEE80211_ELEMID_CSA:
+ scan->csa = frm;
+ break;
case IEEE80211_ELEMID_FHPARMS:
if (ic->ic_phytype == IEEE80211_T_FH) {
scan->fhdwell = LE_READ_2(&frm[2]);
@@ -642,6 +646,14 @@ ieee80211_parse_beacon(struct ieee80211_node *ni, struct mbuf *m,
IEEE80211_VERIFY_LENGTH(scan->country[1], 3 * sizeof(uint8_t),
scan->country = NULL);
}
+ if (scan->csa != NULL) {
+ /*
+ * Validate Channel Switch Announcement; this must
+ * be the correct length or we toss the frame.
+ */
+ IEEE80211_VERIFY_LENGTH(scan->csa[1], 3 * sizeof(uint8_t),
+ scan->status |= IEEE80211_BPARSE_CSA_INVALID);
+ }
/*
* Process HT ie's. This is complicated by our
* accepting both the standard ie's and the pre-draft
OpenPOWER on IntegriCloud