mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
qcacld-3.0: Call cnss_wlan_enable() for QCN7605 USB
Call cnss_wlan_enable() for QCN7605 USB. Change-Id: I566e934ee43db0b95dad799cac6731695f62992e CRs-Fixed: 2269602
This commit is contained in:
parent
6c6e81c714
commit
44273d6464
4 changed files with 41 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -342,6 +342,9 @@ int pld_wlan_enable(struct device *dev, struct pld_wlan_enable_cfg *config,
|
|||
break;
|
||||
case PLD_BUS_TYPE_SDIO:
|
||||
break;
|
||||
case PLD_BUS_TYPE_USB:
|
||||
ret = pld_usb_wlan_enable(dev, config, mode, host_version);
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -192,6 +192,26 @@ void pld_usb_unregister_driver(void)
|
|||
pr_info("%s usb_deregister done!\n", __func__);
|
||||
}
|
||||
|
||||
int pld_usb_wlan_enable(struct device *dev, struct pld_wlan_enable_cfg *config,
|
||||
enum pld_driver_mode mode, const char *host_version)
|
||||
{
|
||||
struct cnss_wlan_enable_cfg cfg;
|
||||
enum cnss_driver_mode cnss_mode;
|
||||
|
||||
switch (mode) {
|
||||
case PLD_FTM:
|
||||
cnss_mode = CNSS_FTM;
|
||||
break;
|
||||
case PLD_EPPING:
|
||||
cnss_mode = CNSS_EPPING;
|
||||
break;
|
||||
default:
|
||||
cnss_mode = CNSS_MISSION;
|
||||
break;
|
||||
}
|
||||
return cnss_wlan_enable(dev, &cfg, cnss_mode, host_version);
|
||||
}
|
||||
|
||||
#else /* CONFIG_PLD_USB_CNSS */
|
||||
|
||||
struct usb_driver pld_usb_ops = {
|
||||
|
|
@ -248,4 +268,10 @@ void pld_usb_unregister_driver(void)
|
|||
usb_deregister(&pld_usb_ops);
|
||||
pr_info("%s usb_deregister done!\n", __func__);
|
||||
}
|
||||
|
||||
int pld_usb_wlan_enable(struct device *dev, struct pld_wlan_enable_cfg *config,
|
||||
enum pld_driver_mode mode, const char *host_version)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_PLD_USB_CNSS */
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
int pld_usb_register_driver(void);
|
||||
void pld_usb_unregister_driver(void);
|
||||
int pld_usb_get_ce_id(int irq);
|
||||
int pld_usb_wlan_enable(struct device *dev, struct pld_wlan_enable_cfg *config,
|
||||
enum pld_driver_mode mode, const char *host_version);
|
||||
#else
|
||||
static inline int pld_usb_register_driver(void)
|
||||
{
|
||||
|
|
@ -32,6 +34,14 @@ static inline int pld_usb_register_driver(void)
|
|||
|
||||
static inline void pld_usb_unregister_driver(void)
|
||||
{}
|
||||
|
||||
static inline int pld_usb_wlan_enable(struct device *dev,
|
||||
struct pld_wlan_enable_cfg *config,
|
||||
enum pld_driver_mode mode,
|
||||
const char *host_version)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline int
|
||||
|
|
|
|||
Loading…
Reference in a new issue