.. | .. |
---|
7 | 7 | * |
---|
8 | 8 | * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. |
---|
9 | 9 | * Copyright(c) 2015 - 2017 Intel Deutschland GmbH |
---|
10 | | - * Copyright(c) 2018 Intel Corporation |
---|
| 10 | + * Copyright(c) 2018 - 2020 Intel Corporation |
---|
11 | 11 | * |
---|
12 | 12 | * This program is free software; you can redistribute it and/or modify |
---|
13 | 13 | * it under the terms of version 2 of the GNU General Public License as |
---|
.. | .. |
---|
17 | 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
18 | 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
19 | 19 | * 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. |
---|
23 | 20 | * |
---|
24 | 21 | * The full GNU General Public License is included in this distribution |
---|
25 | 22 | * in the file called COPYING. |
---|
.. | .. |
---|
32 | 29 | * |
---|
33 | 30 | * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. |
---|
34 | 31 | * Copyright(c) 2015 - 2017 Intel Deutschland GmbH |
---|
35 | | - * Copyright(c) 2018 Intel Corporation |
---|
| 32 | + * Copyright(c) 2018 - 2020 Intel Corporation |
---|
36 | 33 | * All rights reserved. |
---|
37 | 34 | * |
---|
38 | 35 | * Redistribution and use in source and binary forms, with or without |
---|
.. | .. |
---|
67 | 64 | |
---|
68 | 65 | #include <linux/types.h> |
---|
69 | 66 | #include <linux/bitfield.h> |
---|
| 67 | + |
---|
| 68 | +#include "iwl-trans.h" |
---|
70 | 69 | |
---|
71 | 70 | /****************************/ |
---|
72 | 71 | /* Flow Handler Definitions */ |
---|
.. | .. |
---|
128 | 127 | static inline unsigned int FH_MEM_CBBC_QUEUE(struct iwl_trans *trans, |
---|
129 | 128 | unsigned int chnl) |
---|
130 | 129 | { |
---|
131 | | - if (trans->cfg->use_tfh) { |
---|
| 130 | + if (trans->trans_cfg->use_tfh) { |
---|
132 | 131 | WARN_ON_ONCE(chnl >= 64); |
---|
133 | 132 | return TFH_TFDQ_CBB_TABLE + 8 * chnl; |
---|
134 | 133 | } |
---|
.. | .. |
---|
149 | 148 | * |
---|
150 | 149 | * Bits 3:0: |
---|
151 | 150 | * Define the maximum number of pending read requests. |
---|
152 | | - * Maximum configration value allowed is 0xC |
---|
| 151 | + * Maximum configuration value allowed is 0xC |
---|
153 | 152 | * Bits 9:8: |
---|
154 | 153 | * Define the maximum transfer size. (64 / 128 / 256) |
---|
155 | 154 | * Bit 10: |
---|
.. | .. |
---|
612 | 611 | */ |
---|
613 | 612 | #define FH_TX_CHICKEN_BITS_SCD_AUTO_RETRY_EN (0x00000002) |
---|
614 | 613 | |
---|
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 + \ |
---|
619 | 615 | IWL_MAX_RX_HW_QUEUES * \ |
---|
620 | 616 | (RX_CLAIM_REQ_ALLOC - RX_POST_REQ_ALLOC)) |
---|
621 | 617 | /* cb size is the exponent */ |
---|
.. | .. |
---|
650 | 646 | #define TFD_QUEUE_CB_SIZE(x) (ilog2(x) - 3) |
---|
651 | 647 | #define TFD_QUEUE_SIZE_BC_DUP (64) |
---|
652 | 648 | #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 |
---|
655 | 650 | #define IWL_TX_DMA_MASK DMA_BIT_MASK(36) |
---|
656 | 651 | #define IWL_NUM_OF_TBS 20 |
---|
657 | 652 | #define IWL_TFH_NUM_TBS 25 |
---|
.. | .. |
---|
769 | 764 | |
---|
770 | 765 | /** |
---|
771 | 766 | * struct iwl_gen3_bc_tbl scheduler byte count table gen3 |
---|
772 | | - * For 22560 and on: |
---|
| 767 | + * For AX210 and on: |
---|
773 | 768 | * @tfd_offset: 0-12 - tx command byte count |
---|
774 | 769 | * 12-13 - number of 64 byte chunks |
---|
775 | 770 | * 14-16 - reserved |
---|