18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * Copyright (c) 2008-2009 Atheros Communications Inc.
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * Permission to use, copy, modify, and/or distribute this software for any
58c2ecf20Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above
68c2ecf20Sopenharmony_ci * copyright notice and this permission notice appear in all copies.
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
98c2ecf20Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
108c2ecf20Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
118c2ecf20Sopenharmony_ci * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
128c2ecf20Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
138c2ecf20Sopenharmony_ci * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
148c2ecf20Sopenharmony_ci * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
158c2ecf20Sopenharmony_ci */
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci#ifndef ATH_REGISTERS_H
188c2ecf20Sopenharmony_ci#define ATH_REGISTERS_H
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci#define AR_MIBC			0x0040
218c2ecf20Sopenharmony_ci#define AR_MIBC_COW		0x00000001
228c2ecf20Sopenharmony_ci#define AR_MIBC_FMC		0x00000002
238c2ecf20Sopenharmony_ci#define AR_MIBC_CMC		0x00000004
248c2ecf20Sopenharmony_ci#define AR_MIBC_MCS		0x00000008
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci#define AR_STA_ID0		0x8000
278c2ecf20Sopenharmony_ci#define AR_STA_ID1		0x8004
288c2ecf20Sopenharmony_ci#define AR_STA_ID1_SADH_MASK	0x0000ffff
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci/*
318c2ecf20Sopenharmony_ci * BSSID mask registers. See ath_hw_set_bssid_mask()
328c2ecf20Sopenharmony_ci * for detailed documentation about these registers.
338c2ecf20Sopenharmony_ci */
348c2ecf20Sopenharmony_ci#define AR_BSSMSKL		0x80e0
358c2ecf20Sopenharmony_ci#define AR_BSSMSKU		0x80e4
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci#define AR_TFCNT		0x80ec
388c2ecf20Sopenharmony_ci#define AR_RFCNT		0x80f0
398c2ecf20Sopenharmony_ci#define AR_RCCNT		0x80f4
408c2ecf20Sopenharmony_ci#define AR_CCCNT		0x80f8
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci#define AR_KEYTABLE_0           0x8800
438c2ecf20Sopenharmony_ci#define AR_KEYTABLE(_n)         (AR_KEYTABLE_0 + ((_n)*32))
448c2ecf20Sopenharmony_ci#define AR_KEY_CACHE_SIZE       128
458c2ecf20Sopenharmony_ci#define AR_RSVD_KEYTABLE_ENTRIES 4
468c2ecf20Sopenharmony_ci#define AR_KEY_TYPE             0x00000007
478c2ecf20Sopenharmony_ci#define AR_KEYTABLE_TYPE_40     0x00000000
488c2ecf20Sopenharmony_ci#define AR_KEYTABLE_TYPE_104    0x00000001
498c2ecf20Sopenharmony_ci#define AR_KEYTABLE_TYPE_128    0x00000003
508c2ecf20Sopenharmony_ci#define AR_KEYTABLE_TYPE_TKIP   0x00000004
518c2ecf20Sopenharmony_ci#define AR_KEYTABLE_TYPE_AES    0x00000005
528c2ecf20Sopenharmony_ci#define AR_KEYTABLE_TYPE_CCM    0x00000006
538c2ecf20Sopenharmony_ci#define AR_KEYTABLE_TYPE_CLR    0x00000007
548c2ecf20Sopenharmony_ci#define AR_KEYTABLE_ANT         0x00000008
558c2ecf20Sopenharmony_ci#define AR_KEYTABLE_VALID       0x00008000
568c2ecf20Sopenharmony_ci#define AR_KEYTABLE_KEY0(_n)    (AR_KEYTABLE(_n) + 0)
578c2ecf20Sopenharmony_ci#define AR_KEYTABLE_KEY1(_n)    (AR_KEYTABLE(_n) + 4)
588c2ecf20Sopenharmony_ci#define AR_KEYTABLE_KEY2(_n)    (AR_KEYTABLE(_n) + 8)
598c2ecf20Sopenharmony_ci#define AR_KEYTABLE_KEY3(_n)    (AR_KEYTABLE(_n) + 12)
608c2ecf20Sopenharmony_ci#define AR_KEYTABLE_KEY4(_n)    (AR_KEYTABLE(_n) + 16)
618c2ecf20Sopenharmony_ci#define AR_KEYTABLE_TYPE(_n)    (AR_KEYTABLE(_n) + 20)
628c2ecf20Sopenharmony_ci#define AR_KEYTABLE_MAC0(_n)    (AR_KEYTABLE(_n) + 24)
638c2ecf20Sopenharmony_ci#define AR_KEYTABLE_MAC1(_n)    (AR_KEYTABLE(_n) + 28)
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ci#endif /* ATH_REGISTERS_H */
66