From edf89f716262ec28b66e3ba8f49c4a1c11ff0f4c Mon Sep 17 00:00:00 2001 From: sam Date: Sun, 5 Jul 2009 17:59:19 +0000 Subject: Revamp 802.11 action frame handling: o add a new facility for components to register send+recv handlers o ieee80211_send_action and ieee80211_recv_action now use the registered handlers to dispatch operations o rev ieee80211_send_action api to enable passing arbitrary data o rev ieee80211_recv_action api to pass the 802.11 frame header as it may be difficult to locate o update existing IEEE80211_ACTION_CAT_BA and IEEE80211_ACTION_CAT_HT handling o update mwl for api rev Reviewed by: rpaulo Approved by: re (kensmith) --- sys/dev/mwl/if_mwl.c | 11 +++++++---- sys/dev/mwl/if_mwlvar.h | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c index ca3c96c..dbbdca7 100644 --- a/sys/dev/mwl/if_mwl.c +++ b/sys/dev/mwl/if_mwl.c @@ -144,7 +144,8 @@ static void mwl_tx_proc(void *, int); static int mwl_chan_set(struct mwl_softc *, struct ieee80211_channel *); static void mwl_draintxq(struct mwl_softc *); static void mwl_cleartxq(struct mwl_softc *, struct ieee80211vap *); -static void mwl_recv_action(struct ieee80211_node *, +static int mwl_recv_action(struct ieee80211_node *, + const struct ieee80211_frame *, const uint8_t *, const uint8_t *); static int mwl_addba_request(struct ieee80211_node *, struct ieee80211_tx_ampdu *, int dialogtoken, @@ -3656,8 +3657,9 @@ mwl_cleartxq(struct mwl_softc *sc, struct ieee80211vap *vap) } } -static void -mwl_recv_action(struct ieee80211_node *ni, const uint8_t *frm, const uint8_t *efrm) +static int +mwl_recv_action(struct ieee80211_node *ni, const struct ieee80211_frame *wh, + const uint8_t *frm, const uint8_t *efrm) { struct mwl_softc *sc = ni->ni_ic->ic_ifp->if_softc; const struct ieee80211_action *ia; @@ -3671,8 +3673,9 @@ mwl_recv_action(struct ieee80211_node *ni, const uint8_t *frm, const uint8_t *ef mwl_hal_setmimops(sc->sc_mh, ni->ni_macaddr, mps->am_control & IEEE80211_A_HT_MIMOPWRSAVE_ENA, MS(mps->am_control, IEEE80211_A_HT_MIMOPWRSAVE_MODE)); + return 0; } else - sc->sc_recv_action(ni, frm, efrm); + return sc->sc_recv_action(ni, wh, frm, efrm); } static int diff --git a/sys/dev/mwl/if_mwlvar.h b/sys/dev/mwl/if_mwlvar.h index 182321a..d69285d 100644 --- a/sys/dev/mwl/if_mwlvar.h +++ b/sys/dev/mwl/if_mwlvar.h @@ -289,7 +289,8 @@ struct mwl_softc { enum ieee80211_state, int); void (*sc_node_cleanup)(struct ieee80211_node *); void (*sc_node_drain)(struct ieee80211_node *); - void (*sc_recv_action)(struct ieee80211_node *, + int (*sc_recv_action)(struct ieee80211_node *, + const struct ieee80211_frame *, const uint8_t *, const uint8_t *); int (*sc_addba_request)(struct ieee80211_node *, struct ieee80211_tx_ampdu *, -- cgit v1.1