summaryrefslogtreecommitdiff
path: root/sys/dev/ic/ar5xxx.h
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2006-06-05 15:21:44 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2006-06-05 15:21:44 +0000
commit8b1c64a214730681f95b5dc8e97f30f19084ad22 (patch)
treedb20c3846af7b00d24fcb6530a26fea505cdebc1 /sys/dev/ic/ar5xxx.h
parentb365c53bc7d3c5ad10356afb55134dc40a71d75e (diff)
start to sync some changes and fixes from various "openhal" ports of
this driver. thanks for contribution (even if i didn't get much feedback from these projects...). tested by many during c2k6, like aanriot@ and ian@
Diffstat (limited to 'sys/dev/ic/ar5xxx.h')
-rw-r--r--sys/dev/ic/ar5xxx.h123
1 files changed, 118 insertions, 5 deletions
diff --git a/sys/dev/ic/ar5xxx.h b/sys/dev/ic/ar5xxx.h
index b61d4f150b6..65fff657792 100644
--- a/sys/dev/ic/ar5xxx.h
+++ b/sys/dev/ic/ar5xxx.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5xxx.h,v 1.30 2005/12/18 17:59:58 reyk Exp $ */
+/* $OpenBSD: ar5xxx.h,v 1.31 2006/06/05 15:21:43 reyk Exp $ */
/*
* Copyright (c) 2004, 2005 Reyk Floeter <reyk@openbsd.org>
@@ -635,6 +635,7 @@ struct ar5k_gain {
#define AR5K_EEPROM_INFO_BASE 0x00c0
#define AR5K_EEPROM_INFO_MAX \
(0x400 - AR5K_EEPROM_INFO_BASE)
+#define AR5K_EEPROM_INFO_CKSUM 0xffff
#define AR5K_EEPROM_INFO(_n) (AR5K_EEPROM_INFO_BASE + (_n))
#define AR5K_EEPROM_VERSION AR5K_EEPROM_INFO(1)
@@ -1197,6 +1198,7 @@ struct ar5k_srev_name {
{ "5111", AR5K_VERSION_RAD, AR5K_SREV_RAD_5111 }, \
{ "2111", AR5K_VERSION_RAD, AR5K_SREV_RAD_2111 }, \
{ "5112", AR5K_VERSION_RAD, AR5K_SREV_RAD_5112 }, \
+ { "5112a", AR5K_VERSION_RAD, AR5K_SREV_RAD_5112A }, \
{ "2112", AR5K_VERSION_RAD, AR5K_SREV_RAD_2112 }, \
{ "2112a", AR5K_VERSION_RAD, AR5K_SREV_RAD_2112A }, \
{ "xxxx", AR5K_VERSION_RAD, AR5K_SREV_UNKNOWN } \
@@ -1282,7 +1284,7 @@ typedef HAL_BOOL (ar5k_rfgain_t)
*/
#define AR5K_INIT_MODE ( \
- IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM \
+ IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_DYN \
)
#define AR5K_INIT_TX_LATENCY 502
#define AR5K_INIT_USEC 39
@@ -1544,6 +1546,117 @@ struct ar5k_ini_rf {
{ 3, 0x98dc, \
{ 0x00a0c0c0, 0x00a0c0c0, 0x00e0c0c0, 0x00e0c0c0, 0x00e0c0c0 } }, \
{ 6, 0x989c, \
+ { 0x00a00000, 0x00a00000, 0x00a00000, 0x00a00000, 0x00a00000 } }, \
+ { 6, 0x989c, \
+ { 0x000a0000, 0x000a0000, 0x000a0000, 0x000a0000, 0x000a0000 } }, \
+ { 6, 0x989c, \
+ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } }, \
+ { 6, 0x989c, \
+ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } }, \
+ { 6, 0x989c, \
+ { 0x00660000, 0x00660000, 0x00660000, 0x00660000, 0x00660000 } }, \
+ { 6, 0x989c, \
+ { 0x00db0000, 0x00db0000, 0x00db0000, 0x00db0000, 0x00db0000 } }, \
+ { 6, 0x989c, \
+ { 0x00f10000, 0x00f10000, 0x00f10000, 0x00f10000, 0x00f10000 } }, \
+ { 6, 0x989c, \
+ { 0x00120000, 0x00120000, 0x00120000, 0x00120000, 0x00120000 } }, \
+ { 6, 0x989c, \
+ { 0x00120000, 0x00120000, 0x00120000, 0x00120000, 0x00120000 } }, \
+ { 6, 0x989c, \
+ { 0x00730000, 0x00730000, 0x00730000, 0x00730000, 0x00730000 } }, \
+ { 6, 0x989c, \
+ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } }, \
+ { 6, 0x989c, \
+ { 0x000c0000, 0x000c0000, 0x000c0000, 0x000c0000, 0x000c0000 } }, \
+ { 6, 0x989c, \
+ { 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000 } }, \
+ { 6, 0x989c, \
+ { 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000 } }, \
+ { 6, 0x989c, \
+ { 0x008b0000, 0x008b0000, 0x008b0000, 0x008b0000, 0x008b0000 } }, \
+ { 6, 0x989c, \
+ { 0x00600000, 0x00600000, 0x00600000, 0x00600000, 0x00600000 } }, \
+ { 6, 0x989c, \
+ { 0x000c0000, 0x000c0000, 0x000c0000, 0x000c0000, 0x000c0000 } }, \
+ { 6, 0x989c, \
+ { 0x00840000, 0x00840000, 0x00840000, 0x00840000, 0x00840000 } }, \
+ { 6, 0x989c, \
+ { 0x00640000, 0x00640000, 0x00640000, 0x00640000, 0x00640000 } }, \
+ { 6, 0x989c, \
+ { 0x00200000, 0x00200000, 0x00200000, 0x00200000, 0x00200000 } }, \
+ { 6, 0x989c, \
+ { 0x00240000, 0x00240000, 0x00240000, 0x00240000, 0x00240000 } }, \
+ { 6, 0x989c, \
+ { 0x00250000, 0x00250000, 0x00250000, 0x00250000, 0x00250000 } }, \
+ { 6, 0x989c, \
+ { 0x00110000, 0x00110000, 0x00110000, 0x00110000, 0x00110000 } }, \
+ { 6, 0x989c, \
+ { 0x00110000, 0x00110000, 0x00110000, 0x00110000, 0x00110000 } }, \
+ { 6, 0x989c, \
+ { 0x00510000, 0x00510000, 0x00510000, 0x00510000, 0x00510000 } }, \
+ { 6, 0x989c, \
+ { 0x1c040000, 0x1c040000, 0x1c040000, 0x1c040000, 0x1c040000 } }, \
+ { 6, 0x989c, \
+ { 0x000a0000, 0x000a0000, 0x000a0000, 0x000a0000, 0x000a0000 } }, \
+ { 6, 0x989c, \
+ { 0x00a10000, 0x00a10000, 0x00a10000, 0x00a10000, 0x00a10000 } }, \
+ { 6, 0x989c, \
+ { 0x00400000, 0x00400000, 0x00400000, 0x00400000, 0x00400000 } }, \
+ { 6, 0x989c, \
+ { 0x03090000, 0x03090000, 0x03090000, 0x03090000, 0x03090000 } }, \
+ { 6, 0x989c, \
+ { 0x06000000, 0x06000000, 0x06000000, 0x06000000, 0x06000000 } }, \
+ { 6, 0x989c, \
+ { 0x000000b0, 0x000000b0, 0x000000a8, 0x000000a8, 0x000000a8 } }, \
+ { 6, 0x989c, \
+ { 0x0000002e, 0x0000002e, 0x0000002e, 0x0000002e, 0x0000002e } }, \
+ { 6, 0x989c, \
+ { 0x006c4a41, 0x006c4a41, 0x006c4af1, 0x006c4a61, 0x006c4a61 } }, \
+ { 6, 0x989c, \
+ { 0x0050892a, 0x0050892a, 0x0050892b, 0x0050892b, 0x0050892b } }, \
+ { 6, 0x989c, \
+ { 0x00842400, 0x00842400, 0x00842400, 0x00842400, 0x00842400 } }, \
+ { 6, 0x989c, \
+ { 0x00c69200, 0x00c69200, 0x00c69200, 0x00c69200, 0x00c69200 } }, \
+ { 6, 0x98d0, \
+ { 0x0002000c, 0x0002000c, 0x0002000c, 0x0002000c, 0x0002000c } }, \
+ { 7, 0x989c, \
+ { 0x00000094, 0x00000094, 0x00000094, 0x00000094, 0x00000094 } }, \
+ { 7, 0x989c, \
+ { 0x00000091, 0x00000091, 0x00000091, 0x00000091, 0x00000091 } }, \
+ { 7, 0x989c, \
+ { 0x0000000a, 0x0000000a, 0x00000012, 0x00000012, 0x00000012 } }, \
+ { 7, 0x989c, \
+ { 0x00000080, 0x00000080, 0x00000080, 0x00000080, 0x00000080 } }, \
+ { 7, 0x989c, \
+ { 0x000000c1, 0x000000c1, 0x000000c1, 0x000000c1, 0x000000c1 } }, \
+ { 7, 0x989c, \
+ { 0x00000060, 0x00000060, 0x00000060, 0x00000060, 0x00000060 } }, \
+ { 7, 0x989c, \
+ { 0x000000f0, 0x000000f0, 0x000000f0, 0x000000f0, 0x000000f0 } }, \
+ { 7, 0x989c, \
+ { 0x00000022, 0x00000022, 0x00000022, 0x00000022, 0x00000022 } }, \
+ { 7, 0x989c, \
+ { 0x00000092, 0x00000092, 0x00000092, 0x00000092, 0x00000092 } }, \
+ { 7, 0x989c, \
+ { 0x000000d4, 0x000000d4, 0x000000d4, 0x000000d4, 0x000000d4 } }, \
+ { 7, 0x989c, \
+ { 0x000014cc, 0x000014cc, 0x000014cc, 0x000014cc, 0x000014cc } }, \
+ { 7, 0x989c, \
+ { 0x0000048c, 0x0000048c, 0x0000048c, 0x0000048c, 0x0000048c } }, \
+ { 7, 0x98c4, \
+ { 0x00000003, 0x00000003, 0x00000003, 0x00000003, 0x00000003 } }, \
+}
+
+#define AR5K_AR5112A_INI_RF { \
+ { 1, 0x98d4, \
+ { 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020 } }, \
+ { 2, 0x98d0, \
+ { 0x03060408, 0x03070408, 0x03060408, 0x03060408, 0x03070408 } }, \
+ { 3, 0x98dc, \
+ { 0x00a0c0c0, 0x00a0c0c0, 0x00e0c0c0, 0x00e0c0c0, 0x00e0c0c0 } }, \
+ { 6, 0x989c, \
{ 0x0f000000, 0x0f000000, 0x0f000000, 0x0f000000, 0x0f000000 } }, \
{ 6, 0x989c, \
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } }, \
@@ -1580,7 +1693,7 @@ struct ar5k_ini_rf {
{ 6, 0x989c, \
{ 0x000c0000, 0x000c0000, 0x000c0000, 0x000c0000, 0x000c0000 } }, \
{ 6, 0x989c, \
- { 0x02190000, 0x02190000, 0x02190000, 0x02190000, 0x02190000 } }, \
+ { 0x00190000, 0x00190000, 0x00190000, 0x00190000, 0x00190000 } }, \
{ 6, 0x989c, \
{ 0x00240000, 0x00240000, 0x00240000, 0x00240000, 0x00240000 } }, \
{ 6, 0x989c, \
@@ -1604,9 +1717,9 @@ struct ar5k_ini_rf {
{ 6, 0x989c, \
{ 0x31840000, 0x31840000, 0x31840000, 0x31840000, 0x31840000 } }, \
{ 6, 0x989c, \
- { 0x00f20080, 0x00f20080, 0x00f20080, 0x00f20080, 0x00f20080 } }, \
+ { 0x00020080, 0x00020080, 0x00020080, 0x00020080, 0x00020080 } }, \
{ 6, 0x989c, \
- { 0x00070019, 0x00070019, 0x00070019, 0x00070019, 0x00070019 } }, \
+ { 0x00080009, 0x00080009, 0x00080009, 0x00080009, 0x00080009 } }, \
{ 6, 0x989c, \
{ 0x00000003, 0x00000003, 0x00000003, 0x00000003, 0x00000003 } }, \
{ 6, 0x989c, \