Browse Source

qcacld-3.0: Call cnss_wlan_enable() for QCN7605 USB

Call cnss_wlan_enable() for QCN7605 USB.

Change-Id: I566e934ee43db0b95dad799cac6731695f62992e
CRs-Fixed: 2269602
Ajit Pal Singh 6 years ago
parent
commit
44273d6464
4 changed files with 41 additions and 2 deletions
  1. 1 1
      core/bmi/src/i_bmi.h
  2. 4 1
      core/pld/src/pld_common.c
  3. 26 0
      core/pld/src/pld_usb.c
  4. 10 0
      core/pld/src/pld_usb.h

+ 1 - 1
core/bmi/src/i_bmi.h

@@ -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

+ 4 - 1
core/pld/src/pld_common.c

@@ -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;

+ 26 - 0
core/pld/src/pld_usb.c

@@ -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 */

+ 10 - 0
core/pld/src/pld_usb.h

@@ -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