diff options
author | Michael Wu <flamingice@sourmilk.net> | 2007-10-14 14:43:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:09:35 -0500 |
commit | f653211197f3841f383fa9757ef8ce182c6cf627 (patch) | |
tree | ba56e1fa09924d1ffab4f825044175291786b58e /drivers/net/wireless/rtl818x.h | |
parent | fa1c114fdaa605496045e56c42d0c8aa4c139e57 (diff) |
Add rtl8180 wireless driver
This patch adds a mac80211 based wireless driver for the rtl8180 and
rtl8185 PCI wireless cards. Also included are some rtl8187 changes
required due to the relationship between that driver and this one.
Michael Wu is primarily responsible for the initial driver and rtl8185
support. Andreas Merello provided the additional rtl8180 support.
Thanks to Jukka Ruohonen for the donating a rtl8185 card! It was very
helpful for the rtl8225z2 code.
The Signed-off-by information below is collected from the individual
patches submitted to wireless-2.6 before merging this driver upstream.
Signed-off-by: Andrea Merello <andreamrl@tiscali.it>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtl818x.h')
-rw-r--r-- | drivers/net/wireless/rtl818x.h | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/drivers/net/wireless/rtl818x.h b/drivers/net/wireless/rtl818x.h index 880d4becae31..1e7d6f8278d7 100644 --- a/drivers/net/wireless/rtl818x.h +++ b/drivers/net/wireless/rtl818x.h | |||
@@ -58,13 +58,17 @@ struct rtl818x_csr { | |||
58 | #define RTL818X_INT_TX_FO (1 << 15) | 58 | #define RTL818X_INT_TX_FO (1 << 15) |
59 | __le32 TX_CONF; | 59 | __le32 TX_CONF; |
60 | #define RTL818X_TX_CONF_LOOPBACK_MAC (1 << 17) | 60 | #define RTL818X_TX_CONF_LOOPBACK_MAC (1 << 17) |
61 | #define RTL818X_TX_CONF_LOOPBACK_CONT (3 << 17) | ||
61 | #define RTL818X_TX_CONF_NO_ICV (1 << 19) | 62 | #define RTL818X_TX_CONF_NO_ICV (1 << 19) |
62 | #define RTL818X_TX_CONF_DISCW (1 << 20) | 63 | #define RTL818X_TX_CONF_DISCW (1 << 20) |
64 | #define RTL818X_TX_CONF_SAT_HWPLCP (1 << 24) | ||
63 | #define RTL818X_TX_CONF_R8180_ABCD (2 << 25) | 65 | #define RTL818X_TX_CONF_R8180_ABCD (2 << 25) |
64 | #define RTL818X_TX_CONF_R8180_F (3 << 25) | 66 | #define RTL818X_TX_CONF_R8180_F (3 << 25) |
65 | #define RTL818X_TX_CONF_R8185_ABC (4 << 25) | 67 | #define RTL818X_TX_CONF_R8185_ABC (4 << 25) |
66 | #define RTL818X_TX_CONF_R8185_D (5 << 25) | 68 | #define RTL818X_TX_CONF_R8185_D (5 << 25) |
67 | #define RTL818X_TX_CONF_HWVER_MASK (7 << 25) | 69 | #define RTL818X_TX_CONF_HWVER_MASK (7 << 25) |
70 | #define RTL818X_TX_CONF_PROBE_DTS (1 << 29) | ||
71 | #define RTL818X_TX_CONF_HW_SEQNUM (1 << 30) | ||
68 | #define RTL818X_TX_CONF_CW_MIN (1 << 31) | 72 | #define RTL818X_TX_CONF_CW_MIN (1 << 31) |
69 | __le32 RX_CONF; | 73 | __le32 RX_CONF; |
70 | #define RTL818X_RX_CONF_MONITOR (1 << 0) | 74 | #define RTL818X_RX_CONF_MONITOR (1 << 0) |
@@ -75,8 +79,12 @@ struct rtl818x_csr { | |||
75 | #define RTL818X_RX_CONF_DATA (1 << 18) | 79 | #define RTL818X_RX_CONF_DATA (1 << 18) |
76 | #define RTL818X_RX_CONF_CTRL (1 << 19) | 80 | #define RTL818X_RX_CONF_CTRL (1 << 19) |
77 | #define RTL818X_RX_CONF_MGMT (1 << 20) | 81 | #define RTL818X_RX_CONF_MGMT (1 << 20) |
82 | #define RTL818X_RX_CONF_ADDR3 (1 << 21) | ||
83 | #define RTL818X_RX_CONF_PM (1 << 22) | ||
78 | #define RTL818X_RX_CONF_BSSID (1 << 23) | 84 | #define RTL818X_RX_CONF_BSSID (1 << 23) |
79 | #define RTL818X_RX_CONF_RX_AUTORESETPHY (1 << 28) | 85 | #define RTL818X_RX_CONF_RX_AUTORESETPHY (1 << 28) |
86 | #define RTL818X_RX_CONF_CSDM1 (1 << 29) | ||
87 | #define RTL818X_RX_CONF_CSDM2 (1 << 30) | ||
80 | #define RTL818X_RX_CONF_ONLYERLPKT (1 << 31) | 88 | #define RTL818X_RX_CONF_ONLYERLPKT (1 << 31) |
81 | __le32 INT_TIMEOUT; | 89 | __le32 INT_TIMEOUT; |
82 | __le32 TBDA; | 90 | __le32 TBDA; |
@@ -92,6 +100,7 @@ struct rtl818x_csr { | |||
92 | u8 CONFIG0; | 100 | u8 CONFIG0; |
93 | u8 CONFIG1; | 101 | u8 CONFIG1; |
94 | u8 CONFIG2; | 102 | u8 CONFIG2; |
103 | #define RTL818X_CONFIG2_ANTENNA_DIV (1 << 6) | ||
95 | __le32 ANAPARAM; | 104 | __le32 ANAPARAM; |
96 | u8 MSR; | 105 | u8 MSR; |
97 | #define RTL818X_MSR_NO_LINK (0 << 2) | 106 | #define RTL818X_MSR_NO_LINK (0 << 2) |
@@ -104,14 +113,17 @@ struct rtl818x_csr { | |||
104 | #define RTL818X_CONFIG4_VCOOFF (1 << 7) | 113 | #define RTL818X_CONFIG4_VCOOFF (1 << 7) |
105 | u8 TESTR; | 114 | u8 TESTR; |
106 | u8 reserved_9[2]; | 115 | u8 reserved_9[2]; |
107 | __le16 PGSELECT; | 116 | u8 PGSELECT; |
117 | u8 SECURITY; | ||
108 | __le32 ANAPARAM2; | 118 | __le32 ANAPARAM2; |
109 | u8 reserved_10[12]; | 119 | u8 reserved_10[12]; |
110 | __le16 BEACON_INTERVAL; | 120 | __le16 BEACON_INTERVAL; |
111 | __le16 ATIM_WND; | 121 | __le16 ATIM_WND; |
112 | __le16 BEACON_INTERVAL_TIME; | 122 | __le16 BEACON_INTERVAL_TIME; |
113 | __le16 ATIMTR_INTERVAL; | 123 | __le16 ATIMTR_INTERVAL; |
114 | u8 reserved_11[4]; | 124 | u8 PHY_DELAY; |
125 | u8 CARRIER_SENSE_COUNTER; | ||
126 | u8 reserved_11[2]; | ||
115 | u8 PHY[4]; | 127 | u8 PHY[4]; |
116 | __le16 RFPinsOutput; | 128 | __le16 RFPinsOutput; |
117 | __le16 RFPinsEnable; | 129 | __le16 RFPinsEnable; |
@@ -149,11 +161,20 @@ struct rtl818x_csr { | |||
149 | u8 RETRY_CTR; | 161 | u8 RETRY_CTR; |
150 | u8 reserved_18[5]; | 162 | u8 reserved_18[5]; |
151 | __le32 RDSAR; | 163 | __le32 RDSAR; |
152 | u8 reserved_19[18]; | 164 | u8 reserved_19[12]; |
153 | u16 TALLY_CNT; | 165 | __le16 FEMR; |
166 | u8 reserved_20[4]; | ||
167 | __le16 TALLY_CNT; | ||
154 | u8 TALLY_SEL; | 168 | u8 TALLY_SEL; |
155 | } __attribute__((packed)); | 169 | } __attribute__((packed)); |
156 | 170 | ||
171 | struct rtl818x_rf_ops { | ||
172 | char *name; | ||
173 | void (*init)(struct ieee80211_hw *); | ||
174 | void (*stop)(struct ieee80211_hw *); | ||
175 | void (*set_chan)(struct ieee80211_hw *, struct ieee80211_conf *); | ||
176 | }; | ||
177 | |||
157 | static const struct ieee80211_rate rtl818x_rates[] = { | 178 | static const struct ieee80211_rate rtl818x_rates[] = { |
158 | { .rate = 10, | 179 | { .rate = 10, |
159 | .val = 0, | 180 | .val = 0, |