108 int tx_fifo_id,
int scd_retry);
120 #ifdef CONFIG_IWLEGACY_DEBUG
121 const char *il4965_get_tx_fail_reason(
u32 status);
123 static inline const char *
156 il4965_hw_get_rate(
__le32 rate_n_flags)
174 unsigned int changed_flags,
175 unsigned int *total_flags,
u64 multicast);
196 #define IL4965_EEPROM_IMG_SIZE 1024
203 #define IL49_FIRST_AMPDU_QUEUE 7
207 #define IL49_RTC_INST_LOWER_BOUND (0x000000)
208 #define IL49_RTC_INST_UPPER_BOUND (0x018000)
210 #define IL49_RTC_DATA_LOWER_BOUND (0x800000)
211 #define IL49_RTC_DATA_UPPER_BOUND (0x80A000)
213 #define IL49_RTC_INST_SIZE (IL49_RTC_INST_UPPER_BOUND - \
214 IL49_RTC_INST_LOWER_BOUND)
215 #define IL49_RTC_DATA_SIZE (IL49_RTC_DATA_UPPER_BOUND - \
216 IL49_RTC_DATA_LOWER_BOUND)
218 #define IL49_MAX_INST_SIZE IL49_RTC_INST_SIZE
219 #define IL49_MAX_DATA_SIZE IL49_RTC_DATA_SIZE
222 #define IL49_MAX_BSM_SIZE BSM_SRAM_SIZE
225 il4965_hw_valid_rtc_data_addr(
u32 addr)
264 #define TEMPERATURE_CALIB_KELVIN_OFFSET 8
265 #define TEMPERATURE_CALIB_A_VAL 259
268 #define IL_TX_POWER_TEMPERATURE_MIN (263)
269 #define IL_TX_POWER_TEMPERATURE_MAX (410)
271 #define IL_TX_POWER_TEMPERATURE_OUT_OF_RANGE(t) \
272 ((t) < IL_TX_POWER_TEMPERATURE_MIN || \
273 (t) > IL_TX_POWER_TEMPERATURE_MAX)
508 #define IL_TX_POWER_MIMO_REGULATORY_COMPENSATION (6)
520 #define IL_TX_POWER_CCK_COMPENSATION_B_STEP (9)
521 #define IL_TX_POWER_CCK_COMPENSATION_C_STEP (5)
526 #define TX_POWER_IL_VOLTAGE_CODES_PER_03V (7)
559 #define MIN_TX_GAIN_IDX (0)
560 #define MIN_TX_GAIN_IDX_52GHZ_EXT (-9)
793 #define IL_TX_POWER_DEFAULT_REGULATORY_24 (34)
794 #define IL_TX_POWER_DEFAULT_REGULATORY_52 (34)
795 #define IL_TX_POWER_REGULATORY_MIN (0)
796 #define IL_TX_POWER_REGULATORY_MAX (34)
814 #define IL_TX_POWER_DEFAULT_SATURATION_24 (38)
815 #define IL_TX_POWER_DEFAULT_SATURATION_52 (38)
816 #define IL_TX_POWER_SATURATION_MIN (20)
817 #define IL_TX_POWER_SATURATION_MAX (50)
834 #define CALIB_IL_TX_ATTEN_GR1_FCH 34
835 #define CALIB_IL_TX_ATTEN_GR1_LCH 43
838 #define CALIB_IL_TX_ATTEN_GR2_FCH 44
839 #define CALIB_IL_TX_ATTEN_GR2_LCH 70
842 #define CALIB_IL_TX_ATTEN_GR3_FCH 71
843 #define CALIB_IL_TX_ATTEN_GR3_LCH 124
846 #define CALIB_IL_TX_ATTEN_GR4_FCH 125
847 #define CALIB_IL_TX_ATTEN_GR4_LCH 200
850 #define CALIB_IL_TX_ATTEN_GR5_FCH 1
851 #define CALIB_IL_TX_ATTEN_GR5_LCH 20
884 #define IL49_NUM_FIFOS 7
885 #define IL49_CMD_FIFO_NUM 4
886 #define IL49_NUM_QUEUES 16
887 #define IL49_NUM_AMPDU_QUEUES 8
912 #define IL4965_RTC_INST_LOWER_BOUND (0x000000)
915 #define IL4965_RSSI_OFFSET 44
918 #define PCI_CFG_RETRY_TIMEOUT 0x041
921 #define PCI_CFG_LINK_CTRL_VAL_L0S_EN 0x01
922 #define PCI_CFG_LINK_CTRL_VAL_L1_EN 0x02
924 #define IL4965_DEFAULT_TX_RETRY 15
927 #define IL4965_FIRST_AMPDU_QUEUE 10
936 #ifdef CONFIG_IWLEGACY_DEBUGFS
948 #define FH49_MEM_LOWER_BOUND (0x1000)
949 #define FH49_MEM_UPPER_BOUND (0x2000)
968 #define FH49_KW_MEM_ADDR_REG (FH49_MEM_LOWER_BOUND + 0x97C)
982 #define FH49_MEM_CBBC_LOWER_BOUND (FH49_MEM_LOWER_BOUND + 0x9D0)
983 #define FH49_MEM_CBBC_UPPER_BOUND (FH49_MEM_LOWER_BOUND + 0xA10)
986 #define FH49_MEM_CBBC_QUEUE(x) (FH49_MEM_CBBC_LOWER_BOUND + (x) * 0x4)
1057 #define FH49_MEM_RSCSR_LOWER_BOUND (FH49_MEM_LOWER_BOUND + 0xBC0)
1058 #define FH49_MEM_RSCSR_UPPER_BOUND (FH49_MEM_LOWER_BOUND + 0xC00)
1059 #define FH49_MEM_RSCSR_CHNL0 (FH49_MEM_RSCSR_LOWER_BOUND)
1066 #define FH49_RSCSR_CHNL0_STTS_WPTR_REG (FH49_MEM_RSCSR_CHNL0)
1073 #define FH49_RSCSR_CHNL0_RBDCB_BASE_REG (FH49_MEM_RSCSR_CHNL0 + 0x004)
1081 #define FH49_RSCSR_CHNL0_RBDCB_WPTR_REG (FH49_MEM_RSCSR_CHNL0 + 0x008)
1082 #define FH49_RSCSR_CHNL0_WPTR (FH49_RSCSR_CHNL0_RBDCB_WPTR_REG)
1110 #define FH49_MEM_RCSR_LOWER_BOUND (FH49_MEM_LOWER_BOUND + 0xC00)
1111 #define FH49_MEM_RCSR_UPPER_BOUND (FH49_MEM_LOWER_BOUND + 0xCC0)
1112 #define FH49_MEM_RCSR_CHNL0 (FH49_MEM_RCSR_LOWER_BOUND)
1114 #define FH49_MEM_RCSR_CHNL0_CONFIG_REG (FH49_MEM_RCSR_CHNL0)
1116 #define FH49_RCSR_CHNL0_RX_CONFIG_RB_TIMEOUT_MSK (0x00000FF0)
1117 #define FH49_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_MSK (0x00001000)
1118 #define FH49_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME_MSK (0x00008000)
1119 #define FH49_RCSR_CHNL0_RX_CONFIG_RB_SIZE_MSK (0x00030000)
1120 #define FH49_RCSR_CHNL0_RX_CONFIG_RBDBC_SIZE_MSK (0x00F00000)
1121 #define FH49_RCSR_CHNL0_RX_CONFIG_DMA_CHNL_EN_MSK (0xC0000000)
1123 #define FH49_RCSR_RX_CONFIG_RBDCB_SIZE_POS (20)
1124 #define FH49_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS (4)
1125 #define RX_RB_TIMEOUT (0x10)
1127 #define FH49_RCSR_RX_CONFIG_CHNL_EN_PAUSE_VAL (0x00000000)
1128 #define FH49_RCSR_RX_CONFIG_CHNL_EN_PAUSE_EOF_VAL (0x40000000)
1129 #define FH49_RCSR_RX_CONFIG_CHNL_EN_ENABLE_VAL (0x80000000)
1131 #define FH49_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_4K (0x00000000)
1132 #define FH49_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_8K (0x00010000)
1133 #define FH49_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_12K (0x00020000)
1134 #define FH49_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_16K (0x00030000)
1136 #define FH49_RCSR_CHNL0_RX_IGNORE_RXF_EMPTY (0x00000004)
1137 #define FH49_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_NO_INT_VAL (0x00000000)
1138 #define FH49_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_INT_HOST_VAL (0x00001000)
1153 #define FH49_MEM_RSSR_LOWER_BOUND (FH49_MEM_LOWER_BOUND + 0xC40)
1154 #define FH49_MEM_RSSR_UPPER_BOUND (FH49_MEM_LOWER_BOUND + 0xD00)
1156 #define FH49_MEM_RSSR_SHARED_CTRL_REG (FH49_MEM_RSSR_LOWER_BOUND)
1157 #define FH49_MEM_RSSR_RX_STATUS_REG (FH49_MEM_RSSR_LOWER_BOUND + 0x004)
1158 #define FH49_MEM_RSSR_RX_ENABLE_ERR_IRQ2DRV\
1159 (FH49_MEM_RSSR_LOWER_BOUND + 0x008)
1161 #define FH49_RSSR_CHNL0_RX_STATUS_CHNL_IDLE (0x01000000)
1163 #define FH49_MEM_TFDIB_REG1_ADDR_BITSHIFT 28
1166 #define FH49_MEM_TFDIB_DRAM_ADDR_LSB_MSK (0xFFFFFFFF)
1167 #define FH49_TFDIB_LOWER_BOUND (FH49_MEM_LOWER_BOUND + 0x900)
1168 #define FH49_TFDIB_UPPER_BOUND (FH49_MEM_LOWER_BOUND + 0x958)
1169 #define FH49_TFDIB_CTRL0_REG(_chnl) (FH49_TFDIB_LOWER_BOUND + 0x8 * (_chnl))
1170 #define FH49_TFDIB_CTRL1_REG(_chnl) (FH49_TFDIB_LOWER_BOUND + 0x8 * (_chnl) + 0x4)
1194 #define FH49_TCSR_LOWER_BOUND (FH49_MEM_LOWER_BOUND + 0xD00)
1195 #define FH49_TCSR_UPPER_BOUND (FH49_MEM_LOWER_BOUND + 0xE60)
1198 #define FH49_TCSR_CHNL_NUM (7)
1199 #define FH50_TCSR_CHNL_NUM (8)
1202 #define FH49_TCSR_CHNL_TX_CONFIG_REG(_chnl) \
1203 (FH49_TCSR_LOWER_BOUND + 0x20 * (_chnl))
1204 #define FH49_TCSR_CHNL_TX_CREDIT_REG(_chnl) \
1205 (FH49_TCSR_LOWER_BOUND + 0x20 * (_chnl) + 0x4)
1206 #define FH49_TCSR_CHNL_TX_BUF_STS_REG(_chnl) \
1207 (FH49_TCSR_LOWER_BOUND + 0x20 * (_chnl) + 0x8)
1209 #define FH49_TCSR_TX_CONFIG_REG_VAL_MSG_MODE_TXF (0x00000000)
1210 #define FH49_TCSR_TX_CONFIG_REG_VAL_MSG_MODE_DRV (0x00000001)
1212 #define FH49_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_DISABLE (0x00000000)
1213 #define FH49_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_ENABLE (0x00000008)
1215 #define FH49_TCSR_TX_CONFIG_REG_VAL_CIRQ_HOST_NOINT (0x00000000)
1216 #define FH49_TCSR_TX_CONFIG_REG_VAL_CIRQ_HOST_ENDTFD (0x00100000)
1217 #define FH49_TCSR_TX_CONFIG_REG_VAL_CIRQ_HOST_IFTFD (0x00200000)
1219 #define FH49_TCSR_TX_CONFIG_REG_VAL_CIRQ_RTC_NOINT (0x00000000)
1220 #define FH49_TCSR_TX_CONFIG_REG_VAL_CIRQ_RTC_ENDTFD (0x00400000)
1221 #define FH49_TCSR_TX_CONFIG_REG_VAL_CIRQ_RTC_IFTFD (0x00800000)
1223 #define FH49_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_PAUSE (0x00000000)
1224 #define FH49_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_PAUSE_EOF (0x40000000)
1225 #define FH49_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_ENABLE (0x80000000)
1227 #define FH49_TCSR_CHNL_TX_BUF_STS_REG_VAL_TFDB_EMPTY (0x00000000)
1228 #define FH49_TCSR_CHNL_TX_BUF_STS_REG_VAL_TFDB_WAIT (0x00002000)
1229 #define FH49_TCSR_CHNL_TX_BUF_STS_REG_VAL_TFDB_VALID (0x00000003)
1231 #define FH49_TCSR_CHNL_TX_BUF_STS_REG_POS_TB_NUM (20)
1232 #define FH49_TCSR_CHNL_TX_BUF_STS_REG_POS_TB_IDX (12)
1246 #define FH49_TSSR_LOWER_BOUND (FH49_MEM_LOWER_BOUND + 0xEA0)
1247 #define FH49_TSSR_UPPER_BOUND (FH49_MEM_LOWER_BOUND + 0xEC0)
1249 #define FH49_TSSR_TX_STATUS_REG (FH49_TSSR_LOWER_BOUND + 0x010)
1268 #define FH49_TSSR_TX_ERROR_REG (FH49_TSSR_LOWER_BOUND + 0x018)
1270 #define FH49_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(_chnl) ((1 << (_chnl)) << 16)
1273 #define FH49_SRVC_CHNL (9)
1274 #define FH49_SRVC_LOWER_BOUND (FH49_MEM_LOWER_BOUND + 0x9C8)
1275 #define FH49_SRVC_UPPER_BOUND (FH49_MEM_LOWER_BOUND + 0x9D0)
1276 #define FH49_SRVC_CHNL_SRAM_ADDR_REG(_chnl) \
1277 (FH49_SRVC_LOWER_BOUND + ((_chnl) - 9) * 0x4)
1279 #define FH49_TX_CHICKEN_BITS_REG (FH49_MEM_LOWER_BOUND + 0xE98)
1283 #define FH49_TX_CHICKEN_BITS_SCD_AUTO_RETRY_EN (0x00000002)
1286 #define IL_KW_SIZE 0x1000