hc
2024-05-11 297b60346df8beafee954a0fd7c2d64f33f3b9bc
kernel/drivers/net/wireless/intel/iwlwifi/iwl-fh.h
....@@ -7,7 +7,7 @@
77 *
88 * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
99 * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
10
- * Copyright(c) 2018 Intel Corporation
10
+ * Copyright(c) 2018 - 2020 Intel Corporation
1111 *
1212 * This program is free software; you can redistribute it and/or modify
1313 * it under the terms of version 2 of the GNU General Public License as
....@@ -17,9 +17,6 @@
1717 * WITHOUT ANY WARRANTY; without even the implied warranty of
1818 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1919 * General Public License for more details.
20
- *
21
- * You should have received a copy of the GNU General Public License
22
- * along with this program.
2320 *
2421 * The full GNU General Public License is included in this distribution
2522 * in the file called COPYING.
....@@ -32,7 +29,7 @@
3229 *
3330 * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
3431 * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
35
- * Copyright(c) 2018 Intel Corporation
32
+ * Copyright(c) 2018 - 2020 Intel Corporation
3633 * All rights reserved.
3734 *
3835 * Redistribution and use in source and binary forms, with or without
....@@ -67,6 +64,8 @@
6764
6865 #include <linux/types.h>
6966 #include <linux/bitfield.h>
67
+
68
+#include "iwl-trans.h"
7069
7170 /****************************/
7271 /* Flow Handler Definitions */
....@@ -128,7 +127,7 @@
128127 static inline unsigned int FH_MEM_CBBC_QUEUE(struct iwl_trans *trans,
129128 unsigned int chnl)
130129 {
131
- if (trans->cfg->use_tfh) {
130
+ if (trans->trans_cfg->use_tfh) {
132131 WARN_ON_ONCE(chnl >= 64);
133132 return TFH_TFDQ_CBB_TABLE + 8 * chnl;
134133 }
....@@ -149,7 +148,7 @@
149148 *
150149 * Bits 3:0:
151150 * Define the maximum number of pending read requests.
152
- * Maximum configration value allowed is 0xC
151
+ * Maximum configuration value allowed is 0xC
153152 * Bits 9:8:
154153 * Define the maximum transfer size. (64 / 128 / 256)
155154 * Bit 10:
....@@ -612,10 +611,7 @@
612611 */
613612 #define FH_TX_CHICKEN_BITS_SCD_AUTO_RETRY_EN (0x00000002)
614613
615
-#define MQ_RX_TABLE_SIZE 512
616
-#define MQ_RX_TABLE_MASK (MQ_RX_TABLE_SIZE - 1)
617
-#define MQ_RX_NUM_RBDS (MQ_RX_TABLE_SIZE - 1)
618
-#define RX_POOL_SIZE (MQ_RX_NUM_RBDS + \
614
+#define RX_POOL_SIZE(rbds) ((rbds) - 1 + \
619615 IWL_MAX_RX_HW_QUEUES * \
620616 (RX_CLAIM_REQ_ALLOC - RX_POST_REQ_ALLOC))
621617 /* cb size is the exponent */
....@@ -650,8 +646,7 @@
650646 #define TFD_QUEUE_CB_SIZE(x) (ilog2(x) - 3)
651647 #define TFD_QUEUE_SIZE_BC_DUP (64)
652648 #define TFD_QUEUE_BC_SIZE (TFD_QUEUE_SIZE_MAX + TFD_QUEUE_SIZE_BC_DUP)
653
-#define TFD_QUEUE_BC_SIZE_GEN3 (TFD_QUEUE_SIZE_MAX_GEN3 + \
654
- TFD_QUEUE_SIZE_BC_DUP)
649
+#define TFD_QUEUE_BC_SIZE_GEN3 1024
655650 #define IWL_TX_DMA_MASK DMA_BIT_MASK(36)
656651 #define IWL_NUM_OF_TBS 20
657652 #define IWL_TFH_NUM_TBS 25
....@@ -769,7 +764,7 @@
769764
770765 /**
771766 * struct iwl_gen3_bc_tbl scheduler byte count table gen3
772
- * For 22560 and on:
767
+ * For AX210 and on:
773768 * @tfd_offset: 0-12 - tx command byte count
774769 * 12-13 - number of 64 byte chunks
775770 * 14-16 - reserved