Deleted Added
full compact
if_ath.c (251401) if_ath.c (251487)
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 251401 2013-06-05 00:45:19Z adrian $");
31__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath.c 251487 2013-06-07 09:02:02Z 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

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

106#include <dev/ath/if_ath_tx.h>
107#include <dev/ath/if_ath_sysctl.h>
108#include <dev/ath/if_ath_led.h>
109#include <dev/ath/if_ath_keycache.h>
110#include <dev/ath/if_ath_rx.h>
111#include <dev/ath/if_ath_rx_edma.h>
112#include <dev/ath/if_ath_tx_edma.h>
113#include <dev/ath/if_ath_beacon.h>
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

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

106#include <dev/ath/if_ath_tx.h>
107#include <dev/ath/if_ath_sysctl.h>
108#include <dev/ath/if_ath_led.h>
109#include <dev/ath/if_ath_keycache.h>
110#include <dev/ath/if_ath_rx.h>
111#include <dev/ath/if_ath_rx_edma.h>
112#include <dev/ath/if_ath_tx_edma.h>
113#include <dev/ath/if_ath_beacon.h>
114#include <dev/ath/if_ath_btcoex.h>
114#include <dev/ath/if_ath_spectral.h>
115#include <dev/ath/if_athdfs.h>
116
117#ifdef ATH_TX99_DIAG
118#include <dev/ath/ath_tx99/ath_tx99.h>
119#endif
120
121#ifdef ATH_DEBUG_ALQ

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

516 /* Attach spectral module */
517 if (ath_spectral_attach(sc) < 0) {
518 device_printf(sc->sc_dev,
519 "%s: unable to attach spectral\n", __func__);
520 error = EIO;
521 goto bad2;
522 }
523
115#include <dev/ath/if_ath_spectral.h>
116#include <dev/ath/if_athdfs.h>
117
118#ifdef ATH_TX99_DIAG
119#include <dev/ath/ath_tx99/ath_tx99.h>
120#endif
121
122#ifdef ATH_DEBUG_ALQ

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

517 /* Attach spectral module */
518 if (ath_spectral_attach(sc) < 0) {
519 device_printf(sc->sc_dev,
520 "%s: unable to attach spectral\n", __func__);
521 error = EIO;
522 goto bad2;
523 }
524
525 /* Attach bluetooth coexistence module */
526 if (ath_btcoex_attach(sc) < 0) {
527 device_printf(sc->sc_dev,
528 "%s: unable to attach bluetooth coexistence\n", __func__);
529 error = EIO;
530 goto bad2;
531 }
532
524 /* Start DFS processing tasklet */
525 TASK_INIT(&sc->sc_dfstask, 0, ath_dfs_tasklet, sc);
526
527 /* Configure LED state */
528 sc->sc_blinking = 0;
529 sc->sc_ledstate = 1;
530 sc->sc_ledon = 0; /* low true */
531 sc->sc_ledidle = (2700*hz)/1000; /* 2.7sec */

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

1024#ifdef ATH_TX99_DIAG
1025 if (sc->sc_tx99 != NULL)
1026 sc->sc_tx99->detach(sc->sc_tx99);
1027#endif
1028 ath_rate_detach(sc->sc_rc);
1029#ifdef ATH_DEBUG_ALQ
1030 if_ath_alq_tidyup(&sc->sc_alq);
1031#endif
533 /* Start DFS processing tasklet */
534 TASK_INIT(&sc->sc_dfstask, 0, ath_dfs_tasklet, sc);
535
536 /* Configure LED state */
537 sc->sc_blinking = 0;
538 sc->sc_ledstate = 1;
539 sc->sc_ledon = 0; /* low true */
540 sc->sc_ledidle = (2700*hz)/1000; /* 2.7sec */

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

1033#ifdef ATH_TX99_DIAG
1034 if (sc->sc_tx99 != NULL)
1035 sc->sc_tx99->detach(sc->sc_tx99);
1036#endif
1037 ath_rate_detach(sc->sc_rc);
1038#ifdef ATH_DEBUG_ALQ
1039 if_ath_alq_tidyup(&sc->sc_alq);
1040#endif
1041 ath_btcoex_detach(sc);
1032 ath_spectral_detach(sc);
1033 ath_dfs_detach(sc);
1034 ath_desc_free(sc);
1035 ath_txdma_teardown(sc);
1036 ath_rxdma_teardown(sc);
1037 ath_tx_cleanup(sc);
1038 ath_hal_detach(sc->sc_ah); /* NB: sets chip in full sleep */
1039

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

1584
1585 /* Let DFS at it in case it's a DFS channel */
1586 ath_dfs_radar_enable(sc, ic->ic_curchan);
1587
1588 /* Let spectral at in case spectral is enabled */
1589 ath_spectral_enable(sc, ic->ic_curchan);
1590
1591 /*
1042 ath_spectral_detach(sc);
1043 ath_dfs_detach(sc);
1044 ath_desc_free(sc);
1045 ath_txdma_teardown(sc);
1046 ath_rxdma_teardown(sc);
1047 ath_tx_cleanup(sc);
1048 ath_hal_detach(sc->sc_ah); /* NB: sets chip in full sleep */
1049

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

1594
1595 /* Let DFS at it in case it's a DFS channel */
1596 ath_dfs_radar_enable(sc, ic->ic_curchan);
1597
1598 /* Let spectral at in case spectral is enabled */
1599 ath_spectral_enable(sc, ic->ic_curchan);
1600
1601 /*
1602 * Let bluetooth coexistence at in case it's needed for this channel
1603 */
1604 ath_btcoex_enable(sc, ic->ic_curchan);
1605
1606 /*
1592 * If we're doing TDMA, enforce the TXOP limitation for chips that
1593 * support it.
1594 */
1595 if (sc->sc_hasenforcetxop && sc->sc_tdma)
1596 ath_hal_setenforcetxop(sc->sc_ah, 1);
1597 else
1598 ath_hal_setenforcetxop(sc->sc_ah, 0);
1599

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

2040
2041 /* Let DFS at it in case it's a DFS channel */
2042 ath_dfs_radar_enable(sc, ic->ic_curchan);
2043
2044 /* Let spectral at in case spectral is enabled */
2045 ath_spectral_enable(sc, ic->ic_curchan);
2046
2047 /*
1607 * If we're doing TDMA, enforce the TXOP limitation for chips that
1608 * support it.
1609 */
1610 if (sc->sc_hasenforcetxop && sc->sc_tdma)
1611 ath_hal_setenforcetxop(sc->sc_ah, 1);
1612 else
1613 ath_hal_setenforcetxop(sc->sc_ah, 0);
1614

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

2055
2056 /* Let DFS at it in case it's a DFS channel */
2057 ath_dfs_radar_enable(sc, ic->ic_curchan);
2058
2059 /* Let spectral at in case spectral is enabled */
2060 ath_spectral_enable(sc, ic->ic_curchan);
2061
2062 /*
2063 * Let bluetooth coexistence at in case it's needed for this channel
2064 */
2065 ath_btcoex_enable(sc, ic->ic_curchan);
2066
2067 /*
2048 * If we're doing TDMA, enforce the TXOP limitation for chips that
2049 * support it.
2050 */
2051 if (sc->sc_hasenforcetxop && sc->sc_tdma)
2052 ath_hal_setenforcetxop(sc->sc_ah, 1);
2053 else
2054 ath_hal_setenforcetxop(sc->sc_ah, 0);
2055

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

2379
2380 /* Let DFS at it in case it's a DFS channel */
2381 ath_dfs_radar_enable(sc, ic->ic_curchan);
2382
2383 /* Let spectral at in case spectral is enabled */
2384 ath_spectral_enable(sc, ic->ic_curchan);
2385
2386 /*
2068 * If we're doing TDMA, enforce the TXOP limitation for chips that
2069 * support it.
2070 */
2071 if (sc->sc_hasenforcetxop && sc->sc_tdma)
2072 ath_hal_setenforcetxop(sc->sc_ah, 1);
2073 else
2074 ath_hal_setenforcetxop(sc->sc_ah, 0);
2075

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

2399
2400 /* Let DFS at it in case it's a DFS channel */
2401 ath_dfs_radar_enable(sc, ic->ic_curchan);
2402
2403 /* Let spectral at in case spectral is enabled */
2404 ath_spectral_enable(sc, ic->ic_curchan);
2405
2406 /*
2407 * Let bluetooth coexistence at in case it's needed for this channel
2408 */
2409 ath_btcoex_enable(sc, ic->ic_curchan);
2410
2411 /*
2387 * If we're doing TDMA, enforce the TXOP limitation for chips that
2388 * support it.
2389 */
2390 if (sc->sc_hasenforcetxop && sc->sc_tdma)
2391 ath_hal_setenforcetxop(sc->sc_ah, 1);
2392 else
2393 ath_hal_setenforcetxop(sc->sc_ah, 0);
2394

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

4941
4942 /* Let DFS at it in case it's a DFS channel */
4943 ath_dfs_radar_enable(sc, chan);
4944
4945 /* Let spectral at in case spectral is enabled */
4946 ath_spectral_enable(sc, chan);
4947
4948 /*
2412 * If we're doing TDMA, enforce the TXOP limitation for chips that
2413 * support it.
2414 */
2415 if (sc->sc_hasenforcetxop && sc->sc_tdma)
2416 ath_hal_setenforcetxop(sc->sc_ah, 1);
2417 else
2418 ath_hal_setenforcetxop(sc->sc_ah, 0);
2419

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

4966
4967 /* Let DFS at it in case it's a DFS channel */
4968 ath_dfs_radar_enable(sc, chan);
4969
4970 /* Let spectral at in case spectral is enabled */
4971 ath_spectral_enable(sc, chan);
4972
4973 /*
4974 * Let bluetooth coexistence at in case it's needed for this
4975 * channel
4976 */
4977 ath_btcoex_enable(sc, ic->ic_curchan);
4978
4979 /*
4949 * If we're doing TDMA, enforce the TXOP limitation for chips
4950 * that support it.
4951 */
4952 if (sc->sc_hasenforcetxop && sc->sc_tdma)
4953 ath_hal_setenforcetxop(sc->sc_ah, 1);
4954 else
4955 ath_hal_setenforcetxop(sc->sc_ah, 0);
4956

--- 1525 unchanged lines hidden ---
4980 * If we're doing TDMA, enforce the TXOP limitation for chips
4981 * that support it.
4982 */
4983 if (sc->sc_hasenforcetxop && sc->sc_tdma)
4984 ath_hal_setenforcetxop(sc->sc_ah, 1);
4985 else
4986 ath_hal_setenforcetxop(sc->sc_ah, 0);
4987

--- 1525 unchanged lines hidden ---