diff options
author | sam <sam@FreeBSD.org> | 2009-04-26 21:46:04 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2009-04-26 21:46:04 +0000 |
commit | 4af5d5056bb6ef08f69414227e158a45d7343719 (patch) | |
tree | 9e668ef6901f296b5a298c7f64ea8641d4d3b319 /sys/net80211/ieee80211_hostap.c | |
parent | 3469cff523519709cbaeb40ab2326524ee4f0c11 (diff) | |
download | FreeBSD-src-4af5d5056bb6ef08f69414227e158a45d7343719.zip FreeBSD-src-4af5d5056bb6ef08f69414227e158a45d7343719.tar.gz |
add iv_recv_ctl method to allow hooking rx ctl frame handling
Diffstat (limited to 'sys/net80211/ieee80211_hostap.c')
-rw-r--r-- | sys/net80211/ieee80211_hostap.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index e0d10ec..23f211f 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -72,6 +72,7 @@ static void hostap_deliver_data(struct ieee80211vap *, struct ieee80211_node *, struct mbuf *); static void hostap_recv_mgmt(struct ieee80211_node *, struct mbuf *, int subtype, int rssi, int noise, uint32_t rstamp); +static void hostap_recv_ctl(struct ieee80211_node *, struct mbuf *, int); static void hostap_recv_pspoll(struct ieee80211_node *, struct mbuf *); void @@ -96,6 +97,7 @@ hostap_vattach(struct ieee80211vap *vap) vap->iv_newstate = hostap_newstate; vap->iv_input = hostap_input; vap->iv_recv_mgmt = hostap_recv_mgmt; + vap->iv_recv_ctl = hostap_recv_ctl; vap->iv_opdetach = hostap_vdetach; vap->iv_deliver_data = hostap_deliver_data; } @@ -837,14 +839,7 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, case IEEE80211_FC0_TYPE_CTL: vap->iv_stats.is_rx_ctl++; IEEE80211_NODE_STAT(ni, rx_ctrl); - switch (subtype) { - case IEEE80211_FC0_SUBTYPE_PS_POLL: - hostap_recv_pspoll(ni, m); - break; - case IEEE80211_FC0_SUBTYPE_BAR: - ieee80211_recv_bar(ni, m); - break; - } + vap->iv_recv_ctl(ni, m, subtype); goto out; default: IEEE80211_DISCARD(vap, IEEE80211_MSG_ANY, @@ -2162,6 +2157,19 @@ hostap_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, } } +static void +hostap_recv_ctl(struct ieee80211_node *ni, struct mbuf *m, int subtype) +{ + switch (subtype) { + case IEEE80211_FC0_SUBTYPE_PS_POLL: + hostap_recv_pspoll(ni, m); + break; + case IEEE80211_FC0_SUBTYPE_BAR: + ieee80211_recv_bar(ni, m); + break; + } +} + /* * Process a received ps-poll frame. */ |