diff options
author | Nick Kossifidis <mick@madwifi.org> | 2008-10-26 14:40:25 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-31 19:02:32 -0400 |
commit | 4c674c60bd567597f1224973712b352f4f474890 (patch) | |
tree | 0838978d789d120c3109a1b14a948a7ad4ff9cd8 /drivers/net/wireless/ath5k/ath5k.h | |
parent | 84fa4f43c418d2eaad06734ea780a74c869f79c3 (diff) |
ath5k: Update interrupt masking code
*Properly get/set all available ISR/IMR values and review common/uncommon bits
*Better handling of per-txq interrupts (we can now resolve what q is generating
each interrupt -this will help in debuging wme later)
*Some minor updates from legacy-hal
*Properly handle RXNOFRM and TXNOFRM interrupt masking (even when we don't set
them on IMR they keep showing up, so we disable them by zeroing AR5K_RXNOFRM
and AR5K_TXNOFRM registers). This doesn't exist on legacy-hal but i've tested
it on various cards and it works fine.
Changes-Licensed-under: ISC
Signed-Off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath5k/ath5k.h')
-rw-r--r-- | drivers/net/wireless/ath5k/ath5k.h | 86 |
1 files changed, 60 insertions, 26 deletions
diff --git a/drivers/net/wireless/ath5k/ath5k.h b/drivers/net/wireless/ath5k/ath5k.h index 53ea439aff48..b11792039911 100644 --- a/drivers/net/wireless/ath5k/ath5k.h +++ b/drivers/net/wireless/ath5k/ath5k.h | |||
@@ -507,11 +507,15 @@ enum ath5k_tx_queue_id { | |||
507 | #define AR5K_TXQ_FLAG_TXEOLINT_ENABLE 0x0004 /* Enable TXEOL interrupt -not used- */ | 507 | #define AR5K_TXQ_FLAG_TXEOLINT_ENABLE 0x0004 /* Enable TXEOL interrupt -not used- */ |
508 | #define AR5K_TXQ_FLAG_TXDESCINT_ENABLE 0x0008 /* Enable TXDESC interrupt -not used- */ | 508 | #define AR5K_TXQ_FLAG_TXDESCINT_ENABLE 0x0008 /* Enable TXDESC interrupt -not used- */ |
509 | #define AR5K_TXQ_FLAG_TXURNINT_ENABLE 0x0010 /* Enable TXURN interrupt */ | 509 | #define AR5K_TXQ_FLAG_TXURNINT_ENABLE 0x0010 /* Enable TXURN interrupt */ |
510 | #define AR5K_TXQ_FLAG_BACKOFF_DISABLE 0x0020 /* Disable random post-backoff */ | 510 | #define AR5K_TXQ_FLAG_CBRORNINT_ENABLE 0x0020 /* Enable CBRORN interrupt */ |
511 | #define AR5K_TXQ_FLAG_RDYTIME_EXP_POLICY_ENABLE 0x0040 /* Enable ready time expiry policy (?)*/ | 511 | #define AR5K_TXQ_FLAG_CBRURNINT_ENABLE 0x0040 /* Enable CBRURN interrupt */ |
512 | #define AR5K_TXQ_FLAG_FRAG_BURST_BACKOFF_ENABLE 0x0080 /* Enable backoff while bursting */ | 512 | #define AR5K_TXQ_FLAG_QTRIGINT_ENABLE 0x0080 /* Enable QTRIG interrupt */ |
513 | #define AR5K_TXQ_FLAG_POST_FR_BKOFF_DIS 0x0100 /* Disable backoff while bursting */ | 513 | #define AR5K_TXQ_FLAG_TXNOFRMINT_ENABLE 0x0100 /* Enable TXNOFRM interrupt */ |
514 | #define AR5K_TXQ_FLAG_COMPRESSION_ENABLE 0x0200 /* Enable hw compression -not implemented-*/ | 514 | #define AR5K_TXQ_FLAG_BACKOFF_DISABLE 0x0200 /* Disable random post-backoff */ |
515 | #define AR5K_TXQ_FLAG_RDYTIME_EXP_POLICY_ENABLE 0x0300 /* Enable ready time expiry policy (?)*/ | ||
516 | #define AR5K_TXQ_FLAG_FRAG_BURST_BACKOFF_ENABLE 0x0800 /* Enable backoff while bursting */ | ||
517 | #define AR5K_TXQ_FLAG_POST_FR_BKOFF_DIS 0x1000 /* Disable backoff while bursting */ | ||
518 | #define AR5K_TXQ_FLAG_COMPRESSION_ENABLE 0x2000 /* Enable hw compression -not implemented-*/ | ||
515 | 519 | ||
516 | /* | 520 | /* |
517 | * A struct to hold tx queue's parameters | 521 | * A struct to hold tx queue's parameters |
@@ -853,7 +857,7 @@ enum ath5k_ant_setting { | |||
853 | * checked. We should do this with ath5k_hw_update_mib_counters() but | 857 | * checked. We should do this with ath5k_hw_update_mib_counters() but |
854 | * it seems we should also then do some noise immunity work. | 858 | * it seems we should also then do some noise immunity work. |
855 | * @AR5K_INT_RXPHY: RX PHY Error | 859 | * @AR5K_INT_RXPHY: RX PHY Error |
856 | * @AR5K_INT_RXKCM: ?? | 860 | * @AR5K_INT_RXKCM: RX Key cache miss |
857 | * @AR5K_INT_SWBA: SoftWare Beacon Alert - indicates its time to send a | 861 | * @AR5K_INT_SWBA: SoftWare Beacon Alert - indicates its time to send a |
858 | * beacon that must be handled in software. The alternative is if you | 862 | * beacon that must be handled in software. The alternative is if you |
859 | * have VEOL support, in that case you let the hardware deal with things. | 863 | * have VEOL support, in that case you let the hardware deal with things. |
@@ -869,7 +873,7 @@ enum ath5k_ant_setting { | |||
869 | * @AR5K_INT_FATAL: Fatal errors were encountered, typically caused by DMA | 873 | * @AR5K_INT_FATAL: Fatal errors were encountered, typically caused by DMA |
870 | * errors. These types of errors we can enable seem to be of type | 874 | * errors. These types of errors we can enable seem to be of type |
871 | * AR5K_SIMR2_MCABT, AR5K_SIMR2_SSERR and AR5K_SIMR2_DPERR. | 875 | * AR5K_SIMR2_MCABT, AR5K_SIMR2_SSERR and AR5K_SIMR2_DPERR. |
872 | * @AR5K_INT_GLOBAL: Seems to be used to clear and set the IER | 876 | * @AR5K_INT_GLOBAL: Used to clear and set the IER |
873 | * @AR5K_INT_NOCARD: signals the card has been removed | 877 | * @AR5K_INT_NOCARD: signals the card has been removed |
874 | * @AR5K_INT_COMMON: common interrupts shared amogst MACs with the same | 878 | * @AR5K_INT_COMMON: common interrupts shared amogst MACs with the same |
875 | * bit value | 879 | * bit value |
@@ -881,36 +885,61 @@ enum ath5k_ant_setting { | |||
881 | * MACs. | 885 | * MACs. |
882 | */ | 886 | */ |
883 | enum ath5k_int { | 887 | enum ath5k_int { |
884 | AR5K_INT_RX = 0x00000001, /* Not common */ | 888 | AR5K_INT_RXOK = 0x00000001, |
885 | AR5K_INT_RXDESC = 0x00000002, | 889 | AR5K_INT_RXDESC = 0x00000002, |
890 | AR5K_INT_RXERR = 0x00000004, | ||
886 | AR5K_INT_RXNOFRM = 0x00000008, | 891 | AR5K_INT_RXNOFRM = 0x00000008, |
887 | AR5K_INT_RXEOL = 0x00000010, | 892 | AR5K_INT_RXEOL = 0x00000010, |
888 | AR5K_INT_RXORN = 0x00000020, | 893 | AR5K_INT_RXORN = 0x00000020, |
889 | AR5K_INT_TX = 0x00000040, /* Not common */ | 894 | AR5K_INT_TXOK = 0x00000040, |
890 | AR5K_INT_TXDESC = 0x00000080, | 895 | AR5K_INT_TXDESC = 0x00000080, |
896 | AR5K_INT_TXERR = 0x00000100, | ||
897 | AR5K_INT_TXNOFRM = 0x00000200, | ||
898 | AR5K_INT_TXEOL = 0x00000400, | ||
891 | AR5K_INT_TXURN = 0x00000800, | 899 | AR5K_INT_TXURN = 0x00000800, |
892 | AR5K_INT_MIB = 0x00001000, | 900 | AR5K_INT_MIB = 0x00001000, |
901 | AR5K_INT_SWI = 0x00002000, | ||
893 | AR5K_INT_RXPHY = 0x00004000, | 902 | AR5K_INT_RXPHY = 0x00004000, |
894 | AR5K_INT_RXKCM = 0x00008000, | 903 | AR5K_INT_RXKCM = 0x00008000, |
895 | AR5K_INT_SWBA = 0x00010000, | 904 | AR5K_INT_SWBA = 0x00010000, |
905 | AR5K_INT_BRSSI = 0x00020000, | ||
896 | AR5K_INT_BMISS = 0x00040000, | 906 | AR5K_INT_BMISS = 0x00040000, |
897 | AR5K_INT_BNR = 0x00100000, /* Not common */ | 907 | AR5K_INT_FATAL = 0x00080000, /* Non common */ |
898 | AR5K_INT_GPIO = 0x01000000, | 908 | AR5K_INT_BNR = 0x00100000, /* Non common */ |
899 | AR5K_INT_FATAL = 0x40000000, /* Not common */ | 909 | AR5K_INT_TIM = 0x00200000, /* Non common */ |
900 | AR5K_INT_GLOBAL = 0x80000000, | 910 | AR5K_INT_DTIM = 0x00400000, /* Non common */ |
901 | 911 | AR5K_INT_DTIM_SYNC = 0x00800000, /* Non common */ | |
902 | AR5K_INT_COMMON = AR5K_INT_RXNOFRM | 912 | AR5K_INT_GPIO = 0x01000000, |
903 | | AR5K_INT_RXDESC | 913 | AR5K_INT_BCN_TIMEOUT = 0x02000000, /* Non common */ |
904 | | AR5K_INT_RXEOL | 914 | AR5K_INT_CAB_TIMEOUT = 0x04000000, /* Non common */ |
905 | | AR5K_INT_RXORN | 915 | AR5K_INT_RX_DOPPLER = 0x08000000, /* Non common */ |
906 | | AR5K_INT_TXURN | 916 | AR5K_INT_QCBRORN = 0x10000000, /* Non common */ |
907 | | AR5K_INT_TXDESC | 917 | AR5K_INT_QCBRURN = 0x20000000, /* Non common */ |
908 | | AR5K_INT_MIB | 918 | AR5K_INT_QTRIG = 0x40000000, /* Non common */ |
909 | | AR5K_INT_RXPHY | 919 | AR5K_INT_GLOBAL = 0x80000000, |
910 | | AR5K_INT_RXKCM | 920 | |
911 | | AR5K_INT_SWBA | 921 | AR5K_INT_COMMON = AR5K_INT_RXOK |
912 | | AR5K_INT_BMISS | 922 | | AR5K_INT_RXDESC |
913 | | AR5K_INT_GPIO, | 923 | | AR5K_INT_RXERR |
924 | | AR5K_INT_RXNOFRM | ||
925 | | AR5K_INT_RXEOL | ||
926 | | AR5K_INT_RXORN | ||
927 | | AR5K_INT_TXOK | ||
928 | | AR5K_INT_TXDESC | ||
929 | | AR5K_INT_TXERR | ||
930 | | AR5K_INT_TXNOFRM | ||
931 | | AR5K_INT_TXEOL | ||
932 | | AR5K_INT_TXURN | ||
933 | | AR5K_INT_MIB | ||
934 | | AR5K_INT_SWI | ||
935 | | AR5K_INT_RXPHY | ||
936 | | AR5K_INT_RXKCM | ||
937 | | AR5K_INT_SWBA | ||
938 | | AR5K_INT_BRSSI | ||
939 | | AR5K_INT_BMISS | ||
940 | | AR5K_INT_GPIO | ||
941 | | AR5K_INT_GLOBAL, | ||
942 | |||
914 | AR5K_INT_NOCARD = 0xffffffff | 943 | AR5K_INT_NOCARD = 0xffffffff |
915 | }; | 944 | }; |
916 | 945 | ||
@@ -1081,6 +1110,11 @@ struct ath5k_hw { | |||
1081 | u32 ah_txq_imr_txurn; | 1110 | u32 ah_txq_imr_txurn; |
1082 | u32 ah_txq_imr_txdesc; | 1111 | u32 ah_txq_imr_txdesc; |
1083 | u32 ah_txq_imr_txeol; | 1112 | u32 ah_txq_imr_txeol; |
1113 | u32 ah_txq_imr_cbrorn; | ||
1114 | u32 ah_txq_imr_cbrurn; | ||
1115 | u32 ah_txq_imr_qtrig; | ||
1116 | u32 ah_txq_imr_nofrm; | ||
1117 | u32 ah_txq_isr; | ||
1084 | u32 *ah_rf_banks; | 1118 | u32 *ah_rf_banks; |
1085 | size_t ah_rf_banks_size; | 1119 | size_t ah_rf_banks_size; |
1086 | struct ath5k_gain ah_gain; | 1120 | struct ath5k_gain ah_gain; |