PCI: Add helpers to manage pci_dev->irq and pci_dev->irq_managed
[linux-2.6/btrfs-unstable.git] / drivers / staging / rtl8188eu / hal / mac_cfg.c
blobfebc83a5adb874318b89383abce87b8681752828
1 /******************************************************************************
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19 ******************************************************************************/
21 #include "odm_precomp.h"
22 #include "phy.h"
23 #include <rtw_iol.h>
25 /* MAC_REG.TXT */
27 static u32 array_MAC_REG_8188E[] = {
28 0x026, 0x00000041,
29 0x027, 0x00000035,
30 0x428, 0x0000000A,
31 0x429, 0x00000010,
32 0x430, 0x00000000,
33 0x431, 0x00000001,
34 0x432, 0x00000002,
35 0x433, 0x00000004,
36 0x434, 0x00000005,
37 0x435, 0x00000006,
38 0x436, 0x00000007,
39 0x437, 0x00000008,
40 0x438, 0x00000000,
41 0x439, 0x00000000,
42 0x43A, 0x00000001,
43 0x43B, 0x00000002,
44 0x43C, 0x00000004,
45 0x43D, 0x00000005,
46 0x43E, 0x00000006,
47 0x43F, 0x00000007,
48 0x440, 0x0000005D,
49 0x441, 0x00000001,
50 0x442, 0x00000000,
51 0x444, 0x00000015,
52 0x445, 0x000000F0,
53 0x446, 0x0000000F,
54 0x447, 0x00000000,
55 0x458, 0x00000041,
56 0x459, 0x000000A8,
57 0x45A, 0x00000072,
58 0x45B, 0x000000B9,
59 0x460, 0x00000066,
60 0x461, 0x00000066,
61 0x480, 0x00000008,
62 0x4C8, 0x000000FF,
63 0x4C9, 0x00000008,
64 0x4CC, 0x000000FF,
65 0x4CD, 0x000000FF,
66 0x4CE, 0x00000001,
67 0x4D3, 0x00000001,
68 0x500, 0x00000026,
69 0x501, 0x000000A2,
70 0x502, 0x0000002F,
71 0x503, 0x00000000,
72 0x504, 0x00000028,
73 0x505, 0x000000A3,
74 0x506, 0x0000005E,
75 0x507, 0x00000000,
76 0x508, 0x0000002B,
77 0x509, 0x000000A4,
78 0x50A, 0x0000005E,
79 0x50B, 0x00000000,
80 0x50C, 0x0000004F,
81 0x50D, 0x000000A4,
82 0x50E, 0x00000000,
83 0x50F, 0x00000000,
84 0x512, 0x0000001C,
85 0x514, 0x0000000A,
86 0x516, 0x0000000A,
87 0x525, 0x0000004F,
88 0x550, 0x00000010,
89 0x551, 0x00000010,
90 0x559, 0x00000002,
91 0x55D, 0x000000FF,
92 0x605, 0x00000030,
93 0x608, 0x0000000E,
94 0x609, 0x0000002A,
95 0x620, 0x000000FF,
96 0x621, 0x000000FF,
97 0x622, 0x000000FF,
98 0x623, 0x000000FF,
99 0x624, 0x000000FF,
100 0x625, 0x000000FF,
101 0x626, 0x000000FF,
102 0x627, 0x000000FF,
103 0x652, 0x00000020,
104 0x63C, 0x0000000A,
105 0x63D, 0x0000000A,
106 0x63E, 0x0000000E,
107 0x63F, 0x0000000E,
108 0x640, 0x00000040,
109 0x66E, 0x00000005,
110 0x700, 0x00000021,
111 0x701, 0x00000043,
112 0x702, 0x00000065,
113 0x703, 0x00000087,
114 0x708, 0x00000021,
115 0x709, 0x00000043,
116 0x70A, 0x00000065,
117 0x70B, 0x00000087,
120 bool rtl88eu_phy_mac_config(struct adapter *adapt)
122 u32 i;
123 u32 arraylength;
124 u32 *ptrarray;
126 arraylength = sizeof(array_MAC_REG_8188E)/sizeof(u32);
127 ptrarray = array_MAC_REG_8188E;
129 for (i = 0; i < arraylength; i = i + 2)
130 usb_write8(adapt, ptrarray[i], (u8)ptrarray[i + 1]);
132 usb_write8(adapt, REG_MAX_AGGR_NUM, MAX_AGGR_NUM);
133 return true;