#include <linux/iopoll.h>
#include <linux/firmware.h>
#include "decl.h"
#include "ioctl.h"
#include "util.h"
#include "fw.h"
#include "main.h"
#include "wmm.h"
#include "11n.h"
#include "pcie.h"
#include "pcie_quirks.h"
#define PCIE_VERSION …
#define DRV_NAME …
static struct mwifiex_if_ops pcie_ops;
static const struct mwifiex_pcie_card_reg mwifiex_reg_8766 = …;
static const struct mwifiex_pcie_card_reg mwifiex_reg_8897 = …;
static const struct mwifiex_pcie_card_reg mwifiex_reg_8997 = …;
static struct memory_type_mapping mem_type_mapping_tbl_w8897[] = …;
static struct memory_type_mapping mem_type_mapping_tbl_w8997[] = …;
static const struct mwifiex_pcie_device mwifiex_pcie8766 = …;
static const struct mwifiex_pcie_device mwifiex_pcie8897 = …;
static const struct mwifiex_pcie_device mwifiex_pcie8997 = …;
static const struct of_device_id mwifiex_pcie_of_match_table[] __maybe_unused = …;
static int mwifiex_pcie_probe_of(struct device *dev)
{ … }
static void mwifiex_pcie_work(struct work_struct *work);
static int mwifiex_pcie_delete_rxbd_ring(struct mwifiex_adapter *adapter);
static int mwifiex_pcie_delete_evtbd_ring(struct mwifiex_adapter *adapter);
static int
mwifiex_map_pci_memory(struct mwifiex_adapter *adapter, struct sk_buff *skb,
size_t size, int flags)
{ … }
static void mwifiex_unmap_pci_memory(struct mwifiex_adapter *adapter,
struct sk_buff *skb, int flags)
{ … }
static inline void
mwifiex_write_reg(struct mwifiex_adapter *adapter, int reg, u32 data)
{ … }
static inline int
mwifiex_write_reg_rpt(struct mwifiex_adapter *adapter, int reg, u32 data)
{ … }
static int mwifiex_read_reg(struct mwifiex_adapter *adapter, int reg, u32 *data)
{ … }
static int mwifiex_read_reg_byte(struct mwifiex_adapter *adapter,
int reg, u8 *data)
{ … }
static bool mwifiex_pcie_ok_to_access_hw(struct mwifiex_adapter *adapter)
{ … }
#ifdef CONFIG_PM_SLEEP
static int mwifiex_pcie_suspend(struct device *dev)
{ … }
static int mwifiex_pcie_resume(struct device *dev)
{ … }
#endif
static int mwifiex_pcie_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{ … }
static void mwifiex_pcie_remove(struct pci_dev *pdev)
{ … }
static void mwifiex_pcie_shutdown(struct pci_dev *pdev)
{ … }
static void mwifiex_pcie_coredump(struct device *dev)
{ … }
static const struct pci_device_id mwifiex_ids[] = …;
MODULE_DEVICE_TABLE(pci, mwifiex_ids);
static void mwifiex_pcie_reset_prepare(struct pci_dev *pdev)
{ … }
static void mwifiex_pcie_reset_done(struct pci_dev *pdev)
{ … }
static const struct pci_error_handlers mwifiex_pcie_err_handler = …;
#ifdef CONFIG_PM_SLEEP
static SIMPLE_DEV_PM_OPS(mwifiex_pcie_pm_ops, mwifiex_pcie_suspend,
mwifiex_pcie_resume);
#endif
static struct pci_driver mwifiex_pcie = …;
static void mwifiex_pcie_dev_wakeup_delay(struct mwifiex_adapter *adapter)
{ … }
static void mwifiex_delay_for_sleep_cookie(struct mwifiex_adapter *adapter,
u32 max_delay_loop_cnt)
{ … }
#define N_WAKEUP_TRIES_SHORT_INTERVAL …
#define N_WAKEUP_TRIES_LONG_INTERVAL …
static int mwifiex_pm_wakeup_card(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_pm_wakeup_card_complete(struct mwifiex_adapter *adapter)
{ … }
static void mwifiex_pcie_disable_host_int(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_pcie_enable_host_int(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_init_txq_ring(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_init_rxq_ring(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_pcie_init_evt_ring(struct mwifiex_adapter *adapter)
{ … }
static void mwifiex_cleanup_txq_ring(struct mwifiex_adapter *adapter)
{ … }
static void mwifiex_cleanup_rxq_ring(struct mwifiex_adapter *adapter)
{ … }
static void mwifiex_cleanup_evt_ring(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_pcie_create_txbd_ring(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_pcie_delete_txbd_ring(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_pcie_create_rxbd_ring(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_pcie_delete_rxbd_ring(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_pcie_create_evtbd_ring(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_pcie_delete_evtbd_ring(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_pcie_alloc_cmdrsp_buf(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_pcie_delete_cmdrsp_buf(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_pcie_alloc_sleep_cookie_buf(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_pcie_delete_sleep_cookie_buf(struct mwifiex_adapter *adapter)
{ … }
static void mwifiex_clean_pcie_ring_buf(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_pcie_send_data_complete(struct mwifiex_adapter *adapter)
{ … }
static int
mwifiex_pcie_send_data(struct mwifiex_adapter *adapter, struct sk_buff *skb,
struct mwifiex_tx_param *tx_param)
{ … }
static int mwifiex_pcie_process_recv_data(struct mwifiex_adapter *adapter)
{ … }
static int
mwifiex_pcie_send_boot_cmd(struct mwifiex_adapter *adapter, struct sk_buff *skb)
{ … }
static void mwifiex_pcie_init_fw_port(struct mwifiex_adapter *adapter)
{ … }
static int
mwifiex_pcie_send_cmd(struct mwifiex_adapter *adapter, struct sk_buff *skb)
{ … }
static int mwifiex_pcie_process_cmd_complete(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_pcie_cmdrsp_complete(struct mwifiex_adapter *adapter,
struct sk_buff *skb)
{ … }
static int mwifiex_pcie_process_event_ready(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_pcie_event_complete(struct mwifiex_adapter *adapter,
struct sk_buff *skb)
{ … }
static int mwifiex_extract_wifi_fw(struct mwifiex_adapter *adapter,
const void *firmware, u32 firmware_len) { … }
static int mwifiex_prog_fw_w_helper(struct mwifiex_adapter *adapter,
struct mwifiex_fw_image *fw)
{ … }
static int
mwifiex_check_fw_status(struct mwifiex_adapter *adapter, u32 poll_num)
{ … }
static int
mwifiex_check_winner_status(struct mwifiex_adapter *adapter)
{ … }
static void mwifiex_interrupt_status(struct mwifiex_adapter *adapter,
int msg_id)
{ … }
static irqreturn_t mwifiex_pcie_interrupt(int irq, void *context)
{ … }
static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_pcie_host_to_card(struct mwifiex_adapter *adapter, u8 type,
struct sk_buff *skb,
struct mwifiex_tx_param *tx_param)
{ … }
static int
mwifiex_pcie_reg_dump(struct mwifiex_adapter *adapter, char *drv_buf)
{ … }
static enum rdwr_status
mwifiex_pcie_rdwr_firmware(struct mwifiex_adapter *adapter, u8 doneflag)
{ … }
static void mwifiex_pcie_fw_dump(struct mwifiex_adapter *adapter)
{ … }
static void mwifiex_pcie_device_dump_work(struct mwifiex_adapter *adapter)
{ … }
static void mwifiex_pcie_card_reset_work(struct mwifiex_adapter *adapter)
{ … }
static void mwifiex_pcie_work(struct work_struct *work)
{ … }
static void mwifiex_pcie_device_dump(struct mwifiex_adapter *adapter)
{ … }
static void mwifiex_pcie_card_reset(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_pcie_alloc_buffers(struct mwifiex_adapter *adapter)
{ … }
static void mwifiex_pcie_free_buffers(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_init_pcie(struct mwifiex_adapter *adapter)
{ … }
static void mwifiex_cleanup_pcie(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_pcie_request_irq(struct mwifiex_adapter *adapter)
{ … }
static void mwifiex_pcie_get_fw_name(struct mwifiex_adapter *adapter)
{ … }
static int mwifiex_register_dev(struct mwifiex_adapter *adapter)
{ … }
static void mwifiex_unregister_dev(struct mwifiex_adapter *adapter)
{ … }
static void mwifiex_pcie_up_dev(struct mwifiex_adapter *adapter)
{ … }
static void mwifiex_pcie_down_dev(struct mwifiex_adapter *adapter)
{ … }
static struct mwifiex_if_ops pcie_ops = …;
module_pci_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_VERSION(…);
MODULE_LICENSE(…) …;
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);