Deleted Added
full compact
if_ath.c (240899) if_ath.c (241170)
1/*-
2 * Copyright (c) 2002-2009 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

--- 14 unchanged lines hidden (view full) ---

23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27 * THE POSSIBILITY OF SUCH DAMAGES.
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2002-2009 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

--- 14 unchanged lines hidden (view full) ---

23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27 * THE POSSIBILITY OF SUCH DAMAGES.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath.c 240899 2012-09-24 20:35:56Z adrian $");
31__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath.c 241170 2012-10-03 23:23:45Z adrian $");
32
33/*
34 * Driver for the Atheros Wireless LAN controller.
35 *
36 * This software is derived from work of Atsushi Onoe; his contribution
37 * is greatly appreciated.
38 */
39

--- 154 unchanged lines hidden (view full) ---

194static int ath_getchannels(struct ath_softc *);
195
196static int ath_rate_setup(struct ath_softc *, u_int mode);
197static void ath_setcurmode(struct ath_softc *, enum ieee80211_phymode);
198
199static void ath_announce(struct ath_softc *);
200
201static void ath_dfs_tasklet(void *, int);
32
33/*
34 * Driver for the Atheros Wireless LAN controller.
35 *
36 * This software is derived from work of Atsushi Onoe; his contribution
37 * is greatly appreciated.
38 */
39

--- 154 unchanged lines hidden (view full) ---

194static int ath_getchannels(struct ath_softc *);
195
196static int ath_rate_setup(struct ath_softc *, u_int mode);
197static void ath_setcurmode(struct ath_softc *, enum ieee80211_phymode);
198
199static void ath_announce(struct ath_softc *);
200
201static void ath_dfs_tasklet(void *, int);
202static void ath_node_powersave(struct ieee80211_node *, int);
202
203#ifdef IEEE80211_SUPPORT_TDMA
204#include <dev/ath/if_ath_tdma.h>
205#endif
206
207SYSCTL_DECL(_hw_ath);
208
209/* XXX validate sysctl values */

--- 923 unchanged lines hidden (view full) ---

1133 vap->iv_recv_mgmt = ath_recv_mgmt;
1134 vap->iv_reset = ath_reset_vap;
1135 vap->iv_update_beacon = ath_beacon_update;
1136 avp->av_newstate = vap->iv_newstate;
1137 vap->iv_newstate = ath_newstate;
1138 avp->av_bmiss = vap->iv_bmiss;
1139 vap->iv_bmiss = ath_bmiss_vap;
1140
203
204#ifdef IEEE80211_SUPPORT_TDMA
205#include <dev/ath/if_ath_tdma.h>
206#endif
207
208SYSCTL_DECL(_hw_ath);
209
210/* XXX validate sysctl values */

--- 923 unchanged lines hidden (view full) ---

1134 vap->iv_recv_mgmt = ath_recv_mgmt;
1135 vap->iv_reset = ath_reset_vap;
1136 vap->iv_update_beacon = ath_beacon_update;
1137 avp->av_newstate = vap->iv_newstate;
1138 vap->iv_newstate = ath_newstate;
1139 avp->av_bmiss = vap->iv_bmiss;
1140 vap->iv_bmiss = ath_bmiss_vap;
1141
1142 avp->av_node_ps = vap->iv_node_ps;
1143 vap->iv_node_ps = ath_node_powersave;
1144
1141 /* Set default parameters */
1142
1143 /*
1144 * Anything earlier than some AR9300 series MACs don't
1145 * support a smaller MPDU density.
1146 */
1147 vap->iv_ampdu_density = IEEE80211_HTCAP_MPDUDENSITY_8;
1148 /*

--- 4181 unchanged lines hidden (view full) ---

5330 * XXX channel!
5331 */
5332 IEEE80211_LOCK(ic);
5333 ieee80211_dfs_notify_radar(ic, sc->sc_curchan);
5334 IEEE80211_UNLOCK(ic);
5335 }
5336}
5337
1145 /* Set default parameters */
1146
1147 /*
1148 * Anything earlier than some AR9300 series MACs don't
1149 * support a smaller MPDU density.
1150 */
1151 vap->iv_ampdu_density = IEEE80211_HTCAP_MPDUDENSITY_8;
1152 /*

--- 4181 unchanged lines hidden (view full) ---

5334 * XXX channel!
5335 */
5336 IEEE80211_LOCK(ic);
5337 ieee80211_dfs_notify_radar(ic, sc->sc_curchan);
5338 IEEE80211_UNLOCK(ic);
5339 }
5340}
5341
5342/*
5343 * Enable/disable power save. This must be called with
5344 * no TX driver locks currently held, so it should only
5345 * be called from the RX path (which doesn't hold any
5346 * TX driver locks.)
5347 */
5348static void
5349ath_node_powersave(struct ieee80211_node *ni, int enable)
5350{
5351 struct ath_node *an = ATH_NODE(ni);
5352 struct ieee80211com *ic = ni->ni_ic;
5353 struct ath_softc *sc = ic->ic_ifp->if_softc;
5354 struct ath_vap *avp = ATH_VAP(ni->ni_vap);
5355
5356 ATH_NODE_UNLOCK_ASSERT(an);
5357 /* XXX and no TXQ locks should be held here */
5358
5359 DPRINTF(sc, ATH_DEBUG_NODE_PWRSAVE, "%s: ni=%p, enable=%d\n",
5360 __func__, ni, enable);
5361
5362 /* Suspend or resume software queue handling */
5363 if (enable)
5364 ath_tx_node_sleep(sc, an);
5365 else
5366 ath_tx_node_wakeup(sc, an);
5367
5368 /* Update net80211 state */
5369 avp->av_node_ps(ni, enable);
5370}
5371
5372
5338MODULE_VERSION(if_ath, 1);
5339MODULE_DEPEND(if_ath, wlan, 1, 1, 1); /* 802.11 media layer */
5340#if defined(IEEE80211_ALQ) || defined(AH_DEBUG_ALQ)
5341MODULE_DEPEND(if_ath, alq, 1, 1, 1);
5342#endif
5373MODULE_VERSION(if_ath, 1);
5374MODULE_DEPEND(if_ath, wlan, 1, 1, 1); /* 802.11 media layer */
5375#if defined(IEEE80211_ALQ) || defined(AH_DEBUG_ALQ)
5376MODULE_DEPEND(if_ath, alq, 1, 1, 1);
5377#endif