Deleted Added
full compact
if_ath.c (188783) if_ath.c (188968)
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 188783 2009-02-19 05:22:40Z sam $");
31__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath.c 188968 2009-02-23 23:41:12Z sam $");
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

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

7262}
7263
7264/*
7265 * Announce various information on device/driver attach.
7266 */
7267static void
7268ath_announce(struct ath_softc *sc)
7269{
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

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

7262}
7263
7264/*
7265 * Announce various information on device/driver attach.
7266 */
7267static void
7268ath_announce(struct ath_softc *sc)
7269{
7270#define HAL_MODE_DUALBAND (HAL_MODE_11A|HAL_MODE_11B)
7271 struct ifnet *ifp = sc->sc_ifp;
7272 struct ath_hal *ah = sc->sc_ah;
7270 struct ifnet *ifp = sc->sc_ifp;
7271 struct ath_hal *ah = sc->sc_ah;
7273 u_int modes;
7274
7272
7275 if_printf(ifp, "mac %d.%d phy %d.%d",
7276 ah->ah_macVersion, ah->ah_macRev,
7277 ah->ah_phyRev >> 4, ah->ah_phyRev & 0xf);
7278 /*
7279 * Print radio revision(s). We check the wireless modes
7280 * to avoid falsely printing revs for inoperable parts.
7281 * Dual-band radio revs are returned in the 5Ghz rev number.
7282 */
7283 modes = ath_hal_getwirelessmodes(ah);
7284 if ((modes & HAL_MODE_DUALBAND) == HAL_MODE_DUALBAND) {
7285 if (ah->ah_analog5GhzRev && ah->ah_analog2GhzRev)
7286 printf(" 5ghz radio %d.%d 2ghz radio %d.%d",
7287 ah->ah_analog5GhzRev >> 4,
7288 ah->ah_analog5GhzRev & 0xf,
7289 ah->ah_analog2GhzRev >> 4,
7290 ah->ah_analog2GhzRev & 0xf);
7291 else
7292 printf(" radio %d.%d", ah->ah_analog5GhzRev >> 4,
7293 ah->ah_analog5GhzRev & 0xf);
7294 } else
7295 printf(" radio %d.%d", ah->ah_analog5GhzRev >> 4,
7296 ah->ah_analog5GhzRev & 0xf);
7297 printf("\n");
7273 if_printf(ifp, "AR%s mac %d.%d RF%s phy %d.%d\n",
7274 ath_hal_mac_name(ah), ah->ah_macVersion, ah->ah_macRev,
7275 ath_hal_rf_name(ah), ah->ah_phyRev >> 4, ah->ah_phyRev & 0xf);
7298 if (bootverbose) {
7299 int i;
7300 for (i = 0; i <= WME_AC_VO; i++) {
7301 struct ath_txq *txq = sc->sc_ac2q[i];
7302 if_printf(ifp, "Use hw queue %u for %s traffic\n",
7303 txq->axq_qnum, ieee80211_wme_acnames[i]);
7304 }
7305 if_printf(ifp, "Use hw queue %u for CAB traffic\n",
7306 sc->sc_cabq->axq_qnum);
7307 if_printf(ifp, "Use hw queue %u for beacons\n", sc->sc_bhalq);
7308 }
7309 if (ath_rxbuf != ATH_RXBUF)
7310 if_printf(ifp, "using %u rx buffers\n", ath_rxbuf);
7311 if (ath_txbuf != ATH_TXBUF)
7312 if_printf(ifp, "using %u tx buffers\n", ath_txbuf);
7276 if (bootverbose) {
7277 int i;
7278 for (i = 0; i <= WME_AC_VO; i++) {
7279 struct ath_txq *txq = sc->sc_ac2q[i];
7280 if_printf(ifp, "Use hw queue %u for %s traffic\n",
7281 txq->axq_qnum, ieee80211_wme_acnames[i]);
7282 }
7283 if_printf(ifp, "Use hw queue %u for CAB traffic\n",
7284 sc->sc_cabq->axq_qnum);
7285 if_printf(ifp, "Use hw queue %u for beacons\n", sc->sc_bhalq);
7286 }
7287 if (ath_rxbuf != ATH_RXBUF)
7288 if_printf(ifp, "using %u rx buffers\n", ath_rxbuf);
7289 if (ath_txbuf != ATH_TXBUF)
7290 if_printf(ifp, "using %u tx buffers\n", ath_txbuf);
7313#undef HAL_MODE_DUALBAND
7314}
7315
7316#ifdef ATH_SUPPORT_TDMA
7317static __inline uint32_t
7318ath_hal_getnexttbtt(struct ath_hal *ah)
7319{
7320#define AR_TIMER0 0x8028
7321 return OS_REG_READ(ah, AR_TIMER0);

--- 354 unchanged lines hidden ---
7291}
7292
7293#ifdef ATH_SUPPORT_TDMA
7294static __inline uint32_t
7295ath_hal_getnexttbtt(struct ath_hal *ah)
7296{
7297#define AR_TIMER0 0x8028
7298 return OS_REG_READ(ah, AR_TIMER0);

--- 354 unchanged lines hidden ---