diff options
author | sam <sam@FreeBSD.org> | 2009-03-24 20:39:08 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2009-03-24 20:39:08 +0000 |
commit | 88b91b235f5ae6e04f407012ae5eb0da3d64facc (patch) | |
tree | 082efe3e253ba758a9687229364efee996a6bfae /sys/net80211/ieee80211_input.c | |
parent | ff1a464cfe436346fa187a3148a6067339e4cd2b (diff) | |
download | FreeBSD-src-88b91b235f5ae6e04f407012ae5eb0da3d64facc.zip FreeBSD-src-88b91b235f5ae6e04f407012ae5eb0da3d64facc.tar.gz |
split Atheros SuperG support out into it's own file that's included only
with a new IEEE80211_SUPPORT_SUPERG option
Diffstat (limited to 'sys/net80211/ieee80211_input.c')
-rw-r--r-- | sys/net80211/ieee80211_input.c | 79 |
1 files changed, 2 insertions, 77 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 4b458df..2134e29d 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -358,73 +358,6 @@ ieee80211_decap1(struct mbuf *m, int *framelen) } /* - * Decap the encapsulated frame pair and dispatch the first - * for delivery. The second frame is returned for delivery - * via the normal path. - */ -struct mbuf * -ieee80211_decap_fastframe(struct ieee80211_node *ni, struct mbuf *m) -{ -#define MS(x,f) (((x) & f) >> f##_S) - struct ieee80211vap *vap = ni->ni_vap; - uint32_t ath; - struct mbuf *n; - int framelen; - - m_copydata(m, 0, sizeof(uint32_t), (caddr_t) &ath); - if (MS(ath, ATH_FF_PROTO) != ATH_FF_PROTO_L2TUNNEL) { - IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY, - ni->ni_macaddr, "fast-frame", - "unsupport tunnel protocol, header 0x%x", ath); - vap->iv_stats.is_ff_badhdr++; - m_freem(m); - return NULL; - } - /* NB: skip header and alignment padding */ - m_adj(m, roundup(sizeof(uint32_t) - 2, 4) + 2); - - vap->iv_stats.is_ff_decap++; - - /* - * Decap the first frame, bust it apart from the - * second and deliver; then decap the second frame - * and return it to the caller for normal delivery. - */ - m = ieee80211_decap1(m, &framelen); - if (m == NULL) { - IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY, - ni->ni_macaddr, "fast-frame", "%s", "first decap failed"); - vap->iv_stats.is_ff_tooshort++; - return NULL; - } - n = m_split(m, framelen, M_NOWAIT); - if (n == NULL) { - IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY, - ni->ni_macaddr, "fast-frame", - "%s", "unable to split encapsulated frames"); - vap->iv_stats.is_ff_split++; - m_freem(m); /* NB: must reclaim */ - return NULL; - } - /* XXX not right for WDS */ - vap->iv_deliver_data(vap, ni, m); /* 1st of pair */ - - /* - * Decap second frame. - */ - m_adj(n, roundup2(framelen, 4) - framelen); /* padding */ - n = ieee80211_decap1(n, &framelen); - if (n == NULL) { - IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY, - ni->ni_macaddr, "fast-frame", "%s", "second decap failed"); - vap->iv_stats.is_ff_tooshort++; - } - /* XXX verify framelen against mbuf contents */ - return n; /* 2nd delivered by caller */ -#undef MS -} - -/* * Install received rate set information in the node's state block. */ int @@ -510,16 +443,6 @@ ieee80211_alloc_challenge(struct ieee80211_node *ni) return (ni->ni_challenge != NULL); } -void -ieee80211_parse_ath(struct ieee80211_node *ni, uint8_t *ie) -{ - const struct ieee80211_ath_ie *ath = - (const struct ieee80211_ath_ie *) ie; - - ni->ni_ath_flags = ath->ath_capability; - ni->ni_ath_defkeyix = LE_READ_2(&ath->ath_defkeyix); -} - /* * Parse a Beacon or ProbeResponse frame and return the * useful information in an ieee80211_scanparams structure. @@ -633,8 +556,10 @@ ieee80211_parse_beacon(struct ieee80211_node *ni, struct mbuf *m, scan->wpa = frm; else if (iswmeparam(frm) || iswmeinfo(frm)) scan->wme = frm; +#ifdef IEEE80211_SUPPORT_SUPERG else if (isatherosoui(frm)) scan->ath = frm; +#endif #ifdef IEEE80211_SUPPORT_TDMA else if (istdmaoui(frm)) scan->tdma = frm; |