Skip to content

Commit

Permalink
Use a newer cnss2 driver
Browse files Browse the repository at this point in the history
  • Loading branch information
liyafe1997 committed Aug 22, 2024
1 parent e8d8d51 commit 0f78a6b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 2 additions & 3 deletions drivers/net/wireless/cnss2/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

#define MAX_NO_OF_MAC_ADDR 4
#define QMI_WLFW_MAX_TIMESTAMP_LEN 32
#define QMI_WLFW_MAX_NUM_MEM_SEG 32
#define QMI_WLFW_MAX_BUILD_ID_LEN 128
#define CNSS_RDDM_TIMEOUT_MS 20000
#define RECOVERY_TIMEOUT 60000
Expand Down Expand Up @@ -379,10 +378,10 @@ struct cnss_plat_data {
char fw_build_id[QMI_WLFW_MAX_BUILD_ID_LEN + 1];
u32 otp_version;
u32 fw_mem_seg_len;
struct cnss_fw_mem fw_mem[QMI_WLFW_MAX_NUM_MEM_SEG];
struct cnss_fw_mem fw_mem[QMI_WLFW_MAX_NUM_MEM_SEG_V01];
struct cnss_fw_mem m3_mem;
u32 qdss_mem_seg_len;
struct cnss_fw_mem qdss_mem[QMI_WLFW_MAX_NUM_MEM_SEG];
struct cnss_fw_mem qdss_mem[QMI_WLFW_MAX_NUM_MEM_SEG_V01];
u32 *qdss_reg;
struct cnss_pin_connect_result pin_result;
struct dentry *root_dentry;
Expand Down
9 changes: 8 additions & 1 deletion drivers/net/wireless/cnss2/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2547,8 +2547,12 @@ int cnss_pci_register_driver_hdlr(struct cnss_pci_data *pci_priv,

int cnss_pci_unregister_driver_hdlr(struct cnss_pci_data *pci_priv)
{
struct cnss_plat_data *plat_priv = pci_priv->plat_priv;
struct cnss_plat_data *plat_priv;

if (!pci_priv)
return -EINVAL;

plat_priv = pci_priv->plat_priv;
set_bit(CNSS_DRIVER_UNLOADING, &plat_priv->driver_state);
cnss_pci_dev_shutdown(pci_priv);
pci_priv->driver_ops = NULL;
Expand Down Expand Up @@ -4929,7 +4933,9 @@ static void cnss_pci_unregister_mhi(struct cnss_pci_data *pci_priv)
if (mhi_ctrl->cntrl_log_buf)
ipc_log_context_destroy(mhi_ctrl->cntrl_log_buf);
kfree(mhi_ctrl->irq);
mhi_ctrl->irq = NULL;
mhi_free_controller(mhi_ctrl);
pci_priv->mhi_ctrl = NULL;
}

static void cnss_pci_config_regs(struct cnss_pci_data *pci_priv)
Expand Down Expand Up @@ -5084,6 +5090,7 @@ static void cnss_pci_remove(struct pci_dev *pci_dev)
struct cnss_plat_data *plat_priv =
cnss_bus_dev_to_plat_priv(&pci_dev->dev);

cnss_pci_unregister_driver_hdlr(pci_priv);
cnss_pci_free_m3_mem(pci_priv);
cnss_pci_free_fw_mem(pci_priv);
cnss_pci_free_qdss_mem(pci_priv);
Expand Down

0 comments on commit 0f78a6b

Please sign in to comment.