18c2ecf20Sopenharmony_ci/* @file mwifiex_pcie.h 28c2ecf20Sopenharmony_ci * 38c2ecf20Sopenharmony_ci * @brief This file contains definitions for PCI-E interface. 48c2ecf20Sopenharmony_ci * driver. 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Copyright 2011-2020 NXP 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * This software file (the "File") is distributed by NXP 98c2ecf20Sopenharmony_ci * under the terms of the GNU General Public License Version 2, June 1991 108c2ecf20Sopenharmony_ci * (the "License"). You may use, redistribute and/or modify this File in 118c2ecf20Sopenharmony_ci * accordance with the terms and conditions of the License, a copy of which 128c2ecf20Sopenharmony_ci * is available by writing to the Free Software Foundation, Inc., 138c2ecf20Sopenharmony_ci * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the 148c2ecf20Sopenharmony_ci * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. 158c2ecf20Sopenharmony_ci * 168c2ecf20Sopenharmony_ci * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE 178c2ecf20Sopenharmony_ci * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE 188c2ecf20Sopenharmony_ci * ARE EXPRESSLY DISCLAIMED. The License provides additional details about 198c2ecf20Sopenharmony_ci * this warranty disclaimer. 208c2ecf20Sopenharmony_ci */ 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#ifndef _MWIFIEX_PCIE_H 238c2ecf20Sopenharmony_ci#define _MWIFIEX_PCIE_H 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci#include <linux/completion.h> 268c2ecf20Sopenharmony_ci#include <linux/pci.h> 278c2ecf20Sopenharmony_ci#include <linux/interrupt.h> 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci#include "decl.h" 308c2ecf20Sopenharmony_ci#include "main.h" 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci#define PCIE8766_DEFAULT_FW_NAME "mrvl/pcie8766_uapsta.bin" 338c2ecf20Sopenharmony_ci#define PCIE8897_DEFAULT_FW_NAME "mrvl/pcie8897_uapsta.bin" 348c2ecf20Sopenharmony_ci#define PCIE8897_A0_FW_NAME "mrvl/pcie8897_uapsta_a0.bin" 358c2ecf20Sopenharmony_ci#define PCIE8897_B0_FW_NAME "mrvl/pcie8897_uapsta.bin" 368c2ecf20Sopenharmony_ci#define PCIEUART8997_FW_NAME_V4 "mrvl/pcieuart8997_combo_v4.bin" 378c2ecf20Sopenharmony_ci#define PCIEUSB8997_FW_NAME_V4 "mrvl/pcieusb8997_combo_v4.bin" 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci#define PCIE_VENDOR_ID_MARVELL (0x11ab) 408c2ecf20Sopenharmony_ci#define PCIE_VENDOR_ID_V2_MARVELL (0x1b4b) 418c2ecf20Sopenharmony_ci#define PCIE_DEVICE_ID_MARVELL_88W8766P (0x2b30) 428c2ecf20Sopenharmony_ci#define PCIE_DEVICE_ID_MARVELL_88W8897 (0x2b38) 438c2ecf20Sopenharmony_ci#define PCIE_DEVICE_ID_MARVELL_88W8997 (0x2b42) 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci#define PCIE8897_A0 0x1100 468c2ecf20Sopenharmony_ci#define PCIE8897_B0 0x1200 478c2ecf20Sopenharmony_ci#define PCIE8997_A0 0x10 488c2ecf20Sopenharmony_ci#define PCIE8997_A1 0x11 498c2ecf20Sopenharmony_ci#define CHIP_VER_PCIEUART 0x3 508c2ecf20Sopenharmony_ci#define CHIP_MAGIC_VALUE 0x24 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci/* Constants for Buffer Descriptor (BD) rings */ 538c2ecf20Sopenharmony_ci#define MWIFIEX_MAX_TXRX_BD 0x20 548c2ecf20Sopenharmony_ci#define MWIFIEX_TXBD_MASK 0x3F 558c2ecf20Sopenharmony_ci#define MWIFIEX_RXBD_MASK 0x3F 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci#define MWIFIEX_MAX_EVT_BD 0x08 588c2ecf20Sopenharmony_ci#define MWIFIEX_EVTBD_MASK 0x0f 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci/* PCIE INTERNAL REGISTERS */ 618c2ecf20Sopenharmony_ci#define PCIE_SCRATCH_0_REG 0xC10 628c2ecf20Sopenharmony_ci#define PCIE_SCRATCH_1_REG 0xC14 638c2ecf20Sopenharmony_ci#define PCIE_CPU_INT_EVENT 0xC18 648c2ecf20Sopenharmony_ci#define PCIE_CPU_INT_STATUS 0xC1C 658c2ecf20Sopenharmony_ci#define PCIE_HOST_INT_STATUS 0xC30 668c2ecf20Sopenharmony_ci#define PCIE_HOST_INT_MASK 0xC34 678c2ecf20Sopenharmony_ci#define PCIE_HOST_INT_STATUS_MASK 0xC3C 688c2ecf20Sopenharmony_ci#define PCIE_SCRATCH_2_REG 0xC40 698c2ecf20Sopenharmony_ci#define PCIE_SCRATCH_3_REG 0xC44 708c2ecf20Sopenharmony_ci#define PCIE_SCRATCH_4_REG 0xCD0 718c2ecf20Sopenharmony_ci#define PCIE_SCRATCH_5_REG 0xCD4 728c2ecf20Sopenharmony_ci#define PCIE_SCRATCH_6_REG 0xCD8 738c2ecf20Sopenharmony_ci#define PCIE_SCRATCH_7_REG 0xCDC 748c2ecf20Sopenharmony_ci#define PCIE_SCRATCH_8_REG 0xCE0 758c2ecf20Sopenharmony_ci#define PCIE_SCRATCH_9_REG 0xCE4 768c2ecf20Sopenharmony_ci#define PCIE_SCRATCH_10_REG 0xCE8 778c2ecf20Sopenharmony_ci#define PCIE_SCRATCH_11_REG 0xCEC 788c2ecf20Sopenharmony_ci#define PCIE_SCRATCH_12_REG 0xCF0 798c2ecf20Sopenharmony_ci#define PCIE_SCRATCH_13_REG 0xCF4 808c2ecf20Sopenharmony_ci#define PCIE_SCRATCH_14_REG 0xCF8 818c2ecf20Sopenharmony_ci#define PCIE_SCRATCH_15_REG 0xCFC 828c2ecf20Sopenharmony_ci#define PCIE_RD_DATA_PTR_Q0_Q1 0xC08C 838c2ecf20Sopenharmony_ci#define PCIE_WR_DATA_PTR_Q0_Q1 0xC05C 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ci#define CPU_INTR_DNLD_RDY BIT(0) 868c2ecf20Sopenharmony_ci#define CPU_INTR_DOOR_BELL BIT(1) 878c2ecf20Sopenharmony_ci#define CPU_INTR_SLEEP_CFM_DONE BIT(2) 888c2ecf20Sopenharmony_ci#define CPU_INTR_RESET BIT(3) 898c2ecf20Sopenharmony_ci#define CPU_INTR_EVENT_DONE BIT(5) 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ci#define HOST_INTR_DNLD_DONE BIT(0) 928c2ecf20Sopenharmony_ci#define HOST_INTR_UPLD_RDY BIT(1) 938c2ecf20Sopenharmony_ci#define HOST_INTR_CMD_DONE BIT(2) 948c2ecf20Sopenharmony_ci#define HOST_INTR_EVENT_RDY BIT(3) 958c2ecf20Sopenharmony_ci#define HOST_INTR_MASK (HOST_INTR_DNLD_DONE | \ 968c2ecf20Sopenharmony_ci HOST_INTR_UPLD_RDY | \ 978c2ecf20Sopenharmony_ci HOST_INTR_CMD_DONE | \ 988c2ecf20Sopenharmony_ci HOST_INTR_EVENT_RDY) 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ci#define MWIFIEX_BD_FLAG_ROLLOVER_IND BIT(7) 1018c2ecf20Sopenharmony_ci#define MWIFIEX_BD_FLAG_FIRST_DESC BIT(0) 1028c2ecf20Sopenharmony_ci#define MWIFIEX_BD_FLAG_LAST_DESC BIT(1) 1038c2ecf20Sopenharmony_ci#define MWIFIEX_BD_FLAG_SOP BIT(0) 1048c2ecf20Sopenharmony_ci#define MWIFIEX_BD_FLAG_EOP BIT(1) 1058c2ecf20Sopenharmony_ci#define MWIFIEX_BD_FLAG_XS_SOP BIT(2) 1068c2ecf20Sopenharmony_ci#define MWIFIEX_BD_FLAG_XS_EOP BIT(3) 1078c2ecf20Sopenharmony_ci#define MWIFIEX_BD_FLAG_EVT_ROLLOVER_IND BIT(7) 1088c2ecf20Sopenharmony_ci#define MWIFIEX_BD_FLAG_RX_ROLLOVER_IND BIT(10) 1098c2ecf20Sopenharmony_ci#define MWIFIEX_BD_FLAG_TX_START_PTR BIT(16) 1108c2ecf20Sopenharmony_ci#define MWIFIEX_BD_FLAG_TX_ROLLOVER_IND BIT(26) 1118c2ecf20Sopenharmony_ci 1128c2ecf20Sopenharmony_ci/* Max retry number of command write */ 1138c2ecf20Sopenharmony_ci#define MAX_WRITE_IOMEM_RETRY 2 1148c2ecf20Sopenharmony_ci/* Define PCIE block size for firmware download */ 1158c2ecf20Sopenharmony_ci#define MWIFIEX_PCIE_BLOCK_SIZE_FW_DNLD 256 1168c2ecf20Sopenharmony_ci/* FW awake cookie after FW ready */ 1178c2ecf20Sopenharmony_ci#define FW_AWAKE_COOKIE (0xAA55AA55) 1188c2ecf20Sopenharmony_ci#define MWIFIEX_DEF_SLEEP_COOKIE 0xBEEFBEEF 1198c2ecf20Sopenharmony_ci#define MWIFIEX_SLEEP_COOKIE_SIZE 4 1208c2ecf20Sopenharmony_ci#define MWIFIEX_MAX_DELAY_COUNT 100 1218c2ecf20Sopenharmony_ci 1228c2ecf20Sopenharmony_ci#define MWIFIEX_PCIE_FLR_HAPPENS 0xFEDCBABA 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_cistruct mwifiex_pcie_card_reg { 1258c2ecf20Sopenharmony_ci u16 cmd_addr_lo; 1268c2ecf20Sopenharmony_ci u16 cmd_addr_hi; 1278c2ecf20Sopenharmony_ci u16 fw_status; 1288c2ecf20Sopenharmony_ci u16 cmd_size; 1298c2ecf20Sopenharmony_ci u16 cmdrsp_addr_lo; 1308c2ecf20Sopenharmony_ci u16 cmdrsp_addr_hi; 1318c2ecf20Sopenharmony_ci u16 tx_rdptr; 1328c2ecf20Sopenharmony_ci u16 tx_wrptr; 1338c2ecf20Sopenharmony_ci u16 rx_rdptr; 1348c2ecf20Sopenharmony_ci u16 rx_wrptr; 1358c2ecf20Sopenharmony_ci u16 evt_rdptr; 1368c2ecf20Sopenharmony_ci u16 evt_wrptr; 1378c2ecf20Sopenharmony_ci u16 drv_rdy; 1388c2ecf20Sopenharmony_ci u16 tx_start_ptr; 1398c2ecf20Sopenharmony_ci u32 tx_mask; 1408c2ecf20Sopenharmony_ci u32 tx_wrap_mask; 1418c2ecf20Sopenharmony_ci u32 rx_mask; 1428c2ecf20Sopenharmony_ci u32 rx_wrap_mask; 1438c2ecf20Sopenharmony_ci u32 tx_rollover_ind; 1448c2ecf20Sopenharmony_ci u32 rx_rollover_ind; 1458c2ecf20Sopenharmony_ci u32 evt_rollover_ind; 1468c2ecf20Sopenharmony_ci u8 ring_flag_sop; 1478c2ecf20Sopenharmony_ci u8 ring_flag_eop; 1488c2ecf20Sopenharmony_ci u8 ring_flag_xs_sop; 1498c2ecf20Sopenharmony_ci u8 ring_flag_xs_eop; 1508c2ecf20Sopenharmony_ci u32 ring_tx_start_ptr; 1518c2ecf20Sopenharmony_ci u8 pfu_enabled; 1528c2ecf20Sopenharmony_ci u8 sleep_cookie; 1538c2ecf20Sopenharmony_ci u16 fw_dump_ctrl; 1548c2ecf20Sopenharmony_ci u16 fw_dump_start; 1558c2ecf20Sopenharmony_ci u16 fw_dump_end; 1568c2ecf20Sopenharmony_ci u8 fw_dump_host_ready; 1578c2ecf20Sopenharmony_ci u8 fw_dump_read_done; 1588c2ecf20Sopenharmony_ci u8 msix_support; 1598c2ecf20Sopenharmony_ci}; 1608c2ecf20Sopenharmony_ci 1618c2ecf20Sopenharmony_cistruct mwifiex_pcie_device { 1628c2ecf20Sopenharmony_ci const struct mwifiex_pcie_card_reg *reg; 1638c2ecf20Sopenharmony_ci u16 blksz_fw_dl; 1648c2ecf20Sopenharmony_ci u16 tx_buf_size; 1658c2ecf20Sopenharmony_ci bool can_dump_fw; 1668c2ecf20Sopenharmony_ci struct memory_type_mapping *mem_type_mapping_tbl; 1678c2ecf20Sopenharmony_ci u8 num_mem_types; 1688c2ecf20Sopenharmony_ci bool can_ext_scan; 1698c2ecf20Sopenharmony_ci}; 1708c2ecf20Sopenharmony_ci 1718c2ecf20Sopenharmony_cistruct mwifiex_evt_buf_desc { 1728c2ecf20Sopenharmony_ci u64 paddr; 1738c2ecf20Sopenharmony_ci u16 len; 1748c2ecf20Sopenharmony_ci u16 flags; 1758c2ecf20Sopenharmony_ci} __packed; 1768c2ecf20Sopenharmony_ci 1778c2ecf20Sopenharmony_cistruct mwifiex_pcie_buf_desc { 1788c2ecf20Sopenharmony_ci u64 paddr; 1798c2ecf20Sopenharmony_ci u16 len; 1808c2ecf20Sopenharmony_ci u16 flags; 1818c2ecf20Sopenharmony_ci} __packed; 1828c2ecf20Sopenharmony_ci 1838c2ecf20Sopenharmony_cistruct mwifiex_pfu_buf_desc { 1848c2ecf20Sopenharmony_ci u16 flags; 1858c2ecf20Sopenharmony_ci u16 offset; 1868c2ecf20Sopenharmony_ci u16 frag_len; 1878c2ecf20Sopenharmony_ci u16 len; 1888c2ecf20Sopenharmony_ci u64 paddr; 1898c2ecf20Sopenharmony_ci u32 reserved; 1908c2ecf20Sopenharmony_ci} __packed; 1918c2ecf20Sopenharmony_ci 1928c2ecf20Sopenharmony_ci#define MWIFIEX_NUM_MSIX_VECTORS 4 1938c2ecf20Sopenharmony_ci 1948c2ecf20Sopenharmony_cistruct mwifiex_msix_context { 1958c2ecf20Sopenharmony_ci struct pci_dev *dev; 1968c2ecf20Sopenharmony_ci u16 msg_id; 1978c2ecf20Sopenharmony_ci}; 1988c2ecf20Sopenharmony_ci 1998c2ecf20Sopenharmony_cistruct pcie_service_card { 2008c2ecf20Sopenharmony_ci struct pci_dev *dev; 2018c2ecf20Sopenharmony_ci struct mwifiex_adapter *adapter; 2028c2ecf20Sopenharmony_ci struct mwifiex_pcie_device pcie; 2038c2ecf20Sopenharmony_ci struct completion fw_done; 2048c2ecf20Sopenharmony_ci 2058c2ecf20Sopenharmony_ci u8 txbd_flush; 2068c2ecf20Sopenharmony_ci u32 txbd_wrptr; 2078c2ecf20Sopenharmony_ci u32 txbd_rdptr; 2088c2ecf20Sopenharmony_ci u32 txbd_ring_size; 2098c2ecf20Sopenharmony_ci u8 *txbd_ring_vbase; 2108c2ecf20Sopenharmony_ci dma_addr_t txbd_ring_pbase; 2118c2ecf20Sopenharmony_ci void *txbd_ring[MWIFIEX_MAX_TXRX_BD]; 2128c2ecf20Sopenharmony_ci struct sk_buff *tx_buf_list[MWIFIEX_MAX_TXRX_BD]; 2138c2ecf20Sopenharmony_ci 2148c2ecf20Sopenharmony_ci u32 rxbd_wrptr; 2158c2ecf20Sopenharmony_ci u32 rxbd_rdptr; 2168c2ecf20Sopenharmony_ci u32 rxbd_ring_size; 2178c2ecf20Sopenharmony_ci u8 *rxbd_ring_vbase; 2188c2ecf20Sopenharmony_ci dma_addr_t rxbd_ring_pbase; 2198c2ecf20Sopenharmony_ci void *rxbd_ring[MWIFIEX_MAX_TXRX_BD]; 2208c2ecf20Sopenharmony_ci struct sk_buff *rx_buf_list[MWIFIEX_MAX_TXRX_BD]; 2218c2ecf20Sopenharmony_ci 2228c2ecf20Sopenharmony_ci u32 evtbd_wrptr; 2238c2ecf20Sopenharmony_ci u32 evtbd_rdptr; 2248c2ecf20Sopenharmony_ci u32 evtbd_ring_size; 2258c2ecf20Sopenharmony_ci u8 *evtbd_ring_vbase; 2268c2ecf20Sopenharmony_ci dma_addr_t evtbd_ring_pbase; 2278c2ecf20Sopenharmony_ci void *evtbd_ring[MWIFIEX_MAX_EVT_BD]; 2288c2ecf20Sopenharmony_ci struct sk_buff *evt_buf_list[MWIFIEX_MAX_EVT_BD]; 2298c2ecf20Sopenharmony_ci 2308c2ecf20Sopenharmony_ci struct sk_buff *cmd_buf; 2318c2ecf20Sopenharmony_ci struct sk_buff *cmdrsp_buf; 2328c2ecf20Sopenharmony_ci u8 *sleep_cookie_vbase; 2338c2ecf20Sopenharmony_ci dma_addr_t sleep_cookie_pbase; 2348c2ecf20Sopenharmony_ci void __iomem *pci_mmap; 2358c2ecf20Sopenharmony_ci void __iomem *pci_mmap1; 2368c2ecf20Sopenharmony_ci int msi_enable; 2378c2ecf20Sopenharmony_ci int msix_enable; 2388c2ecf20Sopenharmony_ci#ifdef CONFIG_PCI 2398c2ecf20Sopenharmony_ci struct msix_entry msix_entries[MWIFIEX_NUM_MSIX_VECTORS]; 2408c2ecf20Sopenharmony_ci#endif 2418c2ecf20Sopenharmony_ci struct mwifiex_msix_context msix_ctx[MWIFIEX_NUM_MSIX_VECTORS]; 2428c2ecf20Sopenharmony_ci struct mwifiex_msix_context share_irq_ctx; 2438c2ecf20Sopenharmony_ci struct work_struct work; 2448c2ecf20Sopenharmony_ci unsigned long work_flags; 2458c2ecf20Sopenharmony_ci 2468c2ecf20Sopenharmony_ci bool pci_reset_ongoing; 2478c2ecf20Sopenharmony_ci}; 2488c2ecf20Sopenharmony_ci 2498c2ecf20Sopenharmony_cistatic inline int 2508c2ecf20Sopenharmony_cimwifiex_pcie_txbd_empty(struct pcie_service_card *card, u32 rdptr) 2518c2ecf20Sopenharmony_ci{ 2528c2ecf20Sopenharmony_ci const struct mwifiex_pcie_card_reg *reg = card->pcie.reg; 2538c2ecf20Sopenharmony_ci 2548c2ecf20Sopenharmony_ci switch (card->dev->device) { 2558c2ecf20Sopenharmony_ci case PCIE_DEVICE_ID_MARVELL_88W8766P: 2568c2ecf20Sopenharmony_ci if (((card->txbd_wrptr & reg->tx_mask) == 2578c2ecf20Sopenharmony_ci (rdptr & reg->tx_mask)) && 2588c2ecf20Sopenharmony_ci ((card->txbd_wrptr & reg->tx_rollover_ind) != 2598c2ecf20Sopenharmony_ci (rdptr & reg->tx_rollover_ind))) 2608c2ecf20Sopenharmony_ci return 1; 2618c2ecf20Sopenharmony_ci break; 2628c2ecf20Sopenharmony_ci case PCIE_DEVICE_ID_MARVELL_88W8897: 2638c2ecf20Sopenharmony_ci case PCIE_DEVICE_ID_MARVELL_88W8997: 2648c2ecf20Sopenharmony_ci if (((card->txbd_wrptr & reg->tx_mask) == 2658c2ecf20Sopenharmony_ci (rdptr & reg->tx_mask)) && 2668c2ecf20Sopenharmony_ci ((card->txbd_wrptr & reg->tx_rollover_ind) == 2678c2ecf20Sopenharmony_ci (rdptr & reg->tx_rollover_ind))) 2688c2ecf20Sopenharmony_ci return 1; 2698c2ecf20Sopenharmony_ci break; 2708c2ecf20Sopenharmony_ci } 2718c2ecf20Sopenharmony_ci 2728c2ecf20Sopenharmony_ci return 0; 2738c2ecf20Sopenharmony_ci} 2748c2ecf20Sopenharmony_ci 2758c2ecf20Sopenharmony_cistatic inline int 2768c2ecf20Sopenharmony_cimwifiex_pcie_txbd_not_full(struct pcie_service_card *card) 2778c2ecf20Sopenharmony_ci{ 2788c2ecf20Sopenharmony_ci const struct mwifiex_pcie_card_reg *reg = card->pcie.reg; 2798c2ecf20Sopenharmony_ci 2808c2ecf20Sopenharmony_ci switch (card->dev->device) { 2818c2ecf20Sopenharmony_ci case PCIE_DEVICE_ID_MARVELL_88W8766P: 2828c2ecf20Sopenharmony_ci if (((card->txbd_wrptr & reg->tx_mask) != 2838c2ecf20Sopenharmony_ci (card->txbd_rdptr & reg->tx_mask)) || 2848c2ecf20Sopenharmony_ci ((card->txbd_wrptr & reg->tx_rollover_ind) != 2858c2ecf20Sopenharmony_ci (card->txbd_rdptr & reg->tx_rollover_ind))) 2868c2ecf20Sopenharmony_ci return 1; 2878c2ecf20Sopenharmony_ci break; 2888c2ecf20Sopenharmony_ci case PCIE_DEVICE_ID_MARVELL_88W8897: 2898c2ecf20Sopenharmony_ci case PCIE_DEVICE_ID_MARVELL_88W8997: 2908c2ecf20Sopenharmony_ci if (((card->txbd_wrptr & reg->tx_mask) != 2918c2ecf20Sopenharmony_ci (card->txbd_rdptr & reg->tx_mask)) || 2928c2ecf20Sopenharmony_ci ((card->txbd_wrptr & reg->tx_rollover_ind) == 2938c2ecf20Sopenharmony_ci (card->txbd_rdptr & reg->tx_rollover_ind))) 2948c2ecf20Sopenharmony_ci return 1; 2958c2ecf20Sopenharmony_ci break; 2968c2ecf20Sopenharmony_ci } 2978c2ecf20Sopenharmony_ci 2988c2ecf20Sopenharmony_ci return 0; 2998c2ecf20Sopenharmony_ci} 3008c2ecf20Sopenharmony_ci 3018c2ecf20Sopenharmony_ci#endif /* _MWIFIEX_PCIE_H */ 302