if_mwl.c (195171) | if_mwl.c (195377) |
---|---|
1/*- 2 * Copyright (c) 2007-2009 Sam Leffler, Errno Consulting 3 * Copyright (c) 2007-2008 Marvell Semiconductor, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 15 unchanged lines hidden (view full) --- 24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 26 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 28 * THE POSSIBILITY OF SUCH DAMAGES. 29 */ 30 31#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2007-2009 Sam Leffler, Errno Consulting 3 * Copyright (c) 2007-2008 Marvell Semiconductor, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 15 unchanged lines hidden (view full) --- 24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 26 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 28 * THE POSSIBILITY OF SUCH DAMAGES. 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/dev/mwl/if_mwl.c 195171 2009-06-29 18:42:54Z sam $"); | 32__FBSDID("$FreeBSD: head/sys/dev/mwl/if_mwl.c 195377 2009-07-05 17:59:19Z sam $"); |
33 34/* 35 * Driver for the Marvell 88W8363 Wireless LAN controller. 36 */ 37 38#include "opt_inet.h" 39#include "opt_mwl.h" 40 --- 98 unchanged lines hidden (view full) --- 139static void mwl_tx_cleanup(struct mwl_softc *); 140static uint16_t mwl_calcformat(uint8_t rate, const struct ieee80211_node *); 141static int mwl_tx_start(struct mwl_softc *, struct ieee80211_node *, 142 struct mwl_txbuf *, struct mbuf *); 143static void mwl_tx_proc(void *, int); 144static int mwl_chan_set(struct mwl_softc *, struct ieee80211_channel *); 145static void mwl_draintxq(struct mwl_softc *); 146static void mwl_cleartxq(struct mwl_softc *, struct ieee80211vap *); | 33 34/* 35 * Driver for the Marvell 88W8363 Wireless LAN controller. 36 */ 37 38#include "opt_inet.h" 39#include "opt_mwl.h" 40 --- 98 unchanged lines hidden (view full) --- 139static void mwl_tx_cleanup(struct mwl_softc *); 140static uint16_t mwl_calcformat(uint8_t rate, const struct ieee80211_node *); 141static int mwl_tx_start(struct mwl_softc *, struct ieee80211_node *, 142 struct mwl_txbuf *, struct mbuf *); 143static void mwl_tx_proc(void *, int); 144static int mwl_chan_set(struct mwl_softc *, struct ieee80211_channel *); 145static void mwl_draintxq(struct mwl_softc *); 146static void mwl_cleartxq(struct mwl_softc *, struct ieee80211vap *); |
147static void mwl_recv_action(struct ieee80211_node *, | 147static int mwl_recv_action(struct ieee80211_node *, 148 const struct ieee80211_frame *, |
148 const uint8_t *, const uint8_t *); 149static int mwl_addba_request(struct ieee80211_node *, 150 struct ieee80211_tx_ampdu *, int dialogtoken, 151 int baparamset, int batimeout); 152static int mwl_addba_response(struct ieee80211_node *, 153 struct ieee80211_tx_ampdu *, int status, 154 int baparamset, int batimeout); 155static void mwl_addba_stop(struct ieee80211_node *, --- 3495 unchanged lines hidden (view full) --- 3651 bf->bf_node = NULL; 3652 ieee80211_free_node(ni); 3653 } 3654 } 3655 MWL_TXQ_UNLOCK(txq); 3656 } 3657} 3658 | 149 const uint8_t *, const uint8_t *); 150static int mwl_addba_request(struct ieee80211_node *, 151 struct ieee80211_tx_ampdu *, int dialogtoken, 152 int baparamset, int batimeout); 153static int mwl_addba_response(struct ieee80211_node *, 154 struct ieee80211_tx_ampdu *, int status, 155 int baparamset, int batimeout); 156static void mwl_addba_stop(struct ieee80211_node *, --- 3495 unchanged lines hidden (view full) --- 3652 bf->bf_node = NULL; 3653 ieee80211_free_node(ni); 3654 } 3655 } 3656 MWL_TXQ_UNLOCK(txq); 3657 } 3658} 3659 |
3659static void 3660mwl_recv_action(struct ieee80211_node *ni, const uint8_t *frm, const uint8_t *efrm) | 3660static int 3661mwl_recv_action(struct ieee80211_node *ni, const struct ieee80211_frame *wh, 3662 const uint8_t *frm, const uint8_t *efrm) |
3661{ 3662 struct mwl_softc *sc = ni->ni_ic->ic_ifp->if_softc; 3663 const struct ieee80211_action *ia; 3664 3665 ia = (const struct ieee80211_action *) frm; 3666 if (ia->ia_category == IEEE80211_ACTION_CAT_HT && 3667 ia->ia_action == IEEE80211_ACTION_HT_MIMOPWRSAVE) { 3668 const struct ieee80211_action_ht_mimopowersave *mps = 3669 (const struct ieee80211_action_ht_mimopowersave *) ia; 3670 3671 mwl_hal_setmimops(sc->sc_mh, ni->ni_macaddr, 3672 mps->am_control & IEEE80211_A_HT_MIMOPWRSAVE_ENA, 3673 MS(mps->am_control, IEEE80211_A_HT_MIMOPWRSAVE_MODE)); | 3663{ 3664 struct mwl_softc *sc = ni->ni_ic->ic_ifp->if_softc; 3665 const struct ieee80211_action *ia; 3666 3667 ia = (const struct ieee80211_action *) frm; 3668 if (ia->ia_category == IEEE80211_ACTION_CAT_HT && 3669 ia->ia_action == IEEE80211_ACTION_HT_MIMOPWRSAVE) { 3670 const struct ieee80211_action_ht_mimopowersave *mps = 3671 (const struct ieee80211_action_ht_mimopowersave *) ia; 3672 3673 mwl_hal_setmimops(sc->sc_mh, ni->ni_macaddr, 3674 mps->am_control & IEEE80211_A_HT_MIMOPWRSAVE_ENA, 3675 MS(mps->am_control, IEEE80211_A_HT_MIMOPWRSAVE_MODE)); |
3676 return 0; |
|
3674 } else | 3677 } else |
3675 sc->sc_recv_action(ni, frm, efrm); | 3678 return sc->sc_recv_action(ni, wh, frm, efrm); |
3676} 3677 3678static int 3679mwl_addba_request(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, 3680 int dialogtoken, int baparamset, int batimeout) 3681{ 3682 struct mwl_softc *sc = ni->ni_ic->ic_ifp->if_softc; 3683 struct ieee80211vap *vap = ni->ni_vap; --- 1331 unchanged lines hidden --- | 3679} 3680 3681static int 3682mwl_addba_request(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, 3683 int dialogtoken, int baparamset, int batimeout) 3684{ 3685 struct mwl_softc *sc = ni->ni_ic->ic_ifp->if_softc; 3686 struct ieee80211vap *vap = ni->ni_vap; --- 1331 unchanged lines hidden --- |