qcacld-3.0: Add support for pld_is_fw_down in usb
Add support for pld_is_fw_down in usb case. Change-Id: I2103964c6413734ec4f156fe3058e67984b8e09b CRs-fixed: 2432112
This commit is contained in:

committed by
nshrivas

parent
60a34715cf
commit
1438216e41
@@ -1615,8 +1615,8 @@ int pld_is_qmi_disable(struct device *dev)
|
|||||||
*
|
*
|
||||||
* This API will be called to check if WLAN FW is down or not.
|
* This API will be called to check if WLAN FW is down or not.
|
||||||
*
|
*
|
||||||
* Return: 1 FW is down
|
* Return: 0 FW is not down
|
||||||
* 0 FW is not down
|
* Otherwise FW is down
|
||||||
* Always return 0 for unsupported bus type
|
* Always return 0 for unsupported bus type
|
||||||
*/
|
*/
|
||||||
int pld_is_fw_down(struct device *dev)
|
int pld_is_fw_down(struct device *dev)
|
||||||
@@ -1632,7 +1632,9 @@ int pld_is_fw_down(struct device *dev)
|
|||||||
ret = pld_pcie_is_fw_down(dev);
|
ret = pld_pcie_is_fw_down(dev);
|
||||||
break;
|
break;
|
||||||
case PLD_BUS_TYPE_SDIO:
|
case PLD_BUS_TYPE_SDIO:
|
||||||
|
break;
|
||||||
case PLD_BUS_TYPE_USB:
|
case PLD_BUS_TYPE_USB:
|
||||||
|
ret = pld_usb_is_fw_down(dev);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
pr_err("Invalid device type %d\n", type);
|
pr_err("Invalid device type %d\n", type);
|
||||||
|
@@ -253,6 +253,11 @@ int pld_usb_wlan_enable(struct device *dev, struct pld_wlan_enable_cfg *config,
|
|||||||
return cnss_wlan_enable(dev, &cfg, cnss_mode, host_version);
|
return cnss_wlan_enable(dev, &cfg, cnss_mode, host_version);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int pld_usb_is_fw_down(struct device *dev)
|
||||||
|
{
|
||||||
|
return cnss_usb_is_device_down(dev);
|
||||||
|
}
|
||||||
|
|
||||||
#else /* CONFIG_PLD_USB_CNSS */
|
#else /* CONFIG_PLD_USB_CNSS */
|
||||||
|
|
||||||
struct usb_driver pld_usb_ops = {
|
struct usb_driver pld_usb_ops = {
|
||||||
@@ -317,4 +322,10 @@ int pld_usb_wlan_enable(struct device *dev, struct pld_wlan_enable_cfg *config,
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int pld_usb_is_fw_down(struct device *dev)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_PLD_USB_CNSS */
|
#endif /* CONFIG_PLD_USB_CNSS */
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -26,6 +26,8 @@ void pld_usb_unregister_driver(void);
|
|||||||
int pld_usb_get_ce_id(int irq);
|
int pld_usb_get_ce_id(int irq);
|
||||||
int pld_usb_wlan_enable(struct device *dev, struct pld_wlan_enable_cfg *config,
|
int pld_usb_wlan_enable(struct device *dev, struct pld_wlan_enable_cfg *config,
|
||||||
enum pld_driver_mode mode, const char *host_version);
|
enum pld_driver_mode mode, const char *host_version);
|
||||||
|
int pld_usb_is_fw_down(struct device *dev);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
static inline int pld_usb_register_driver(void)
|
static inline int pld_usb_register_driver(void)
|
||||||
{
|
{
|
||||||
@@ -42,6 +44,12 @@ static inline int pld_usb_wlan_enable(struct device *dev,
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int pld_usb_is_fw_down(struct device *dev)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
|
Reference in New Issue
Block a user