1 /*
2 * Copyright 2017 Gary Mills
3 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
4 * Use is subject to license terms.
5 * Copyright (c) 2018, Joyent, Inc.
6 */
7
8 /*
9 * Copyright (c) 2007, 2008
10 * Damien Bergamini <damien.bergamini@free.fr>
11 *
12 * Permission to use, copy, modify, and distribute this software for any
13 * purpose with or without fee is hereby granted, provided that the above
14 * copyright notice and this permission notice appear in all copies.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
17 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
18 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
19 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
20 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
21 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
22 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 */
24
25 /*
56
57 #define RT2860_DBG_80211 (1 << 0)
58 #define RT2860_DBG_DMA (1 << 1)
59 #define RT2860_DBG_EEPROM (1 << 2)
60 #define RT2860_DBG_FW (1 << 3)
61 #define RT2860_DBG_HW (1 << 4)
62 #define RT2860_DBG_INTR (1 << 5)
63 #define RT2860_DBG_RX (1 << 6)
64 #define RT2860_DBG_SCAN (1 << 7)
65 #define RT2860_DBG_TX (1 << 8)
66 #define RT2860_DBG_RADIO (1 << 9)
67 #define RT2860_DBG_RESUME (1 << 10)
68 #define RT2860_DBG_MSG (1 << 11)
69
70 uint32_t rt2860_dbg_flags = 0x0;
71
72 #ifdef DEBUG
73 #define RWN_DEBUG \
74 rt2860_debug
75 #else
76 #define RWN_DEBUG
77 #endif
78
79 static void *rt2860_soft_state_p = NULL;
80 static uint8_t rt2860_fw_bin [] = {
81 #include "fw-rt2860/rt2860.ucode"
82 };
83
84 static const struct ieee80211_rateset rt2860_rateset_11b =
85 { 4, { 2, 4, 11, 22 } };
86
87 static const struct ieee80211_rateset rt2860_rateset_11g =
88 { 12, { 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108 } };
89
90 static const struct {
91 uint32_t reg;
92 uint32_t val;
93 } rt2860_def_mac[] = {
94 RT2860_DEF_MAC
95 };
96
|
1 /*
2 * Copyright 2017 Gary Mills
3 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
4 * Use is subject to license terms.
5 * Copyright 2019 Joyent, Inc.
6 */
7
8 /*
9 * Copyright (c) 2007, 2008
10 * Damien Bergamini <damien.bergamini@free.fr>
11 *
12 * Permission to use, copy, modify, and distribute this software for any
13 * purpose with or without fee is hereby granted, provided that the above
14 * copyright notice and this permission notice appear in all copies.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
17 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
18 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
19 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
20 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
21 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
22 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 */
24
25 /*
56
57 #define RT2860_DBG_80211 (1 << 0)
58 #define RT2860_DBG_DMA (1 << 1)
59 #define RT2860_DBG_EEPROM (1 << 2)
60 #define RT2860_DBG_FW (1 << 3)
61 #define RT2860_DBG_HW (1 << 4)
62 #define RT2860_DBG_INTR (1 << 5)
63 #define RT2860_DBG_RX (1 << 6)
64 #define RT2860_DBG_SCAN (1 << 7)
65 #define RT2860_DBG_TX (1 << 8)
66 #define RT2860_DBG_RADIO (1 << 9)
67 #define RT2860_DBG_RESUME (1 << 10)
68 #define RT2860_DBG_MSG (1 << 11)
69
70 uint32_t rt2860_dbg_flags = 0x0;
71
72 #ifdef DEBUG
73 #define RWN_DEBUG \
74 rt2860_debug
75 #else
76 #define RWN_DEBUG(...) (void)(0)
77 #endif
78
79 static void *rt2860_soft_state_p = NULL;
80 static uint8_t rt2860_fw_bin [] = {
81 #include "fw-rt2860/rt2860.ucode"
82 };
83
84 static const struct ieee80211_rateset rt2860_rateset_11b =
85 { 4, { 2, 4, 11, 22 } };
86
87 static const struct ieee80211_rateset rt2860_rateset_11g =
88 { 12, { 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108 } };
89
90 static const struct {
91 uint32_t reg;
92 uint32_t val;
93 } rt2860_def_mac[] = {
94 RT2860_DEF_MAC
95 };
96
|