if_ath.c (148306) | if_ath.c (148307) |
---|---|
1/*- 2 * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 21 unchanged lines hidden (view full) --- 30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 32 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 34 * THE POSSIBILITY OF SUCH DAMAGES. 35 */ 36 37#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 21 unchanged lines hidden (view full) --- 30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 32 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 34 * THE POSSIBILITY OF SUCH DAMAGES. 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath.c 148306 2005-07-22 17:54:40Z sam $"); | 38__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath.c 148307 2005-07-22 17:57:16Z sam $"); |
39 40/* 41 * Driver for the Atheros Wireless LAN controller. 42 * 43 * This software is derived from work of Atsushi Onoe; his contribution 44 * is greatly appreciated. 45 */ 46 --- 109 unchanged lines hidden (view full) --- 156static void ath_draintxq(struct ath_softc *); 157static void ath_stoprecv(struct ath_softc *); 158static int ath_startrecv(struct ath_softc *); 159static void ath_chan_change(struct ath_softc *, struct ieee80211_channel *); 160static void ath_next_scan(void *); 161static void ath_calibrate(void *); 162static int ath_newstate(struct ieee80211com *, enum ieee80211_state, int); 163static void ath_setup_stationkey(struct ieee80211_node *); | 39 40/* 41 * Driver for the Atheros Wireless LAN controller. 42 * 43 * This software is derived from work of Atsushi Onoe; his contribution 44 * is greatly appreciated. 45 */ 46 --- 109 unchanged lines hidden (view full) --- 156static void ath_draintxq(struct ath_softc *); 157static void ath_stoprecv(struct ath_softc *); 158static int ath_startrecv(struct ath_softc *); 159static void ath_chan_change(struct ath_softc *, struct ieee80211_channel *); 160static void ath_next_scan(void *); 161static void ath_calibrate(void *); 162static int ath_newstate(struct ieee80211com *, enum ieee80211_state, int); 163static void ath_setup_stationkey(struct ieee80211_node *); |
164static void ath_newassoc(struct ieee80211com *, 165 struct ieee80211_node *, int); | 164static void ath_newassoc(struct ieee80211_node *, int); |
166static int ath_getchannels(struct ath_softc *, u_int cc, 167 HAL_BOOL outdoor, HAL_BOOL xchanmode); 168static void ath_led_event(struct ath_softc *, int); 169static void ath_update_txpow(struct ath_softc *); 170 171static int ath_rate_setup(struct ath_softc *, u_int mode); 172static void ath_setcurmode(struct ath_softc *, enum ieee80211_phymode); 173 --- 4106 unchanged lines hidden (view full) --- 4280} 4281 4282/* 4283 * Setup driver-specific state for a newly associated node. 4284 * Note that we're called also on a re-associate, the isnew 4285 * param tells us if this is the first time or not. 4286 */ 4287static void | 165static int ath_getchannels(struct ath_softc *, u_int cc, 166 HAL_BOOL outdoor, HAL_BOOL xchanmode); 167static void ath_led_event(struct ath_softc *, int); 168static void ath_update_txpow(struct ath_softc *); 169 170static int ath_rate_setup(struct ath_softc *, u_int mode); 171static void ath_setcurmode(struct ath_softc *, enum ieee80211_phymode); 172 --- 4106 unchanged lines hidden (view full) --- 4279} 4280 4281/* 4282 * Setup driver-specific state for a newly associated node. 4283 * Note that we're called also on a re-associate, the isnew 4284 * param tells us if this is the first time or not. 4285 */ 4286static void |
4288ath_newassoc(struct ieee80211com *ic, struct ieee80211_node *ni, int isnew) | 4287ath_newassoc(struct ieee80211_node *ni, int isnew) |
4289{ | 4288{ |
4289 struct ieee80211com *ic = ni->ni_ic; |
|
4290 struct ath_softc *sc = ic->ic_ifp->if_softc; 4291 4292 ath_rate_newassoc(sc, ATH_NODE(ni), isnew); 4293 if (isnew && 4294 (ic->ic_flags & IEEE80211_F_PRIVACY) == 0 && sc->sc_hasclrkey) { 4295 KASSERT(ni->ni_ucastkey.wk_keyix == IEEE80211_KEYIX_NONE, 4296 ("new assoc with a unicast key already setup (keyix %u)", 4297 ni->ni_ucastkey.wk_keyix)); --- 718 unchanged lines hidden --- | 4290 struct ath_softc *sc = ic->ic_ifp->if_softc; 4291 4292 ath_rate_newassoc(sc, ATH_NODE(ni), isnew); 4293 if (isnew && 4294 (ic->ic_flags & IEEE80211_F_PRIVACY) == 0 && sc->sc_hasclrkey) { 4295 KASSERT(ni->ni_ucastkey.wk_keyix == IEEE80211_KEYIX_NONE, 4296 ("new assoc with a unicast key already setup (keyix %u)", 4297 ni->ni_ucastkey.wk_keyix)); --- 718 unchanged lines hidden --- |