summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Huang <wilhuang@codeaurora.org>2019-01-18 17:36:57 +0800
committerWill Huang <wilhuang@codeaurora.org>2019-01-21 14:45:56 +0800
commit2dc96e8f32538006c44dabfaa43dadbb4728e1a1 (patch)
treee640d5a87539918930c38e3ce6ffc1f8d357f38c
parente5c0af54a75eb8d881d4eda0d07942b9ad7fb95a (diff)
qcacld-2.0: Add reset resume rather than cold reset target
Re-direct .reset_resume to .resume routine, while target support reset_resume now. The behavior can be configured by CONFIG_USB_RESET_RESUME_PERSISTENCE, and by default is cold reset as original. Change-Id: Ia01b2aebd807d4f466e645b61393c4d52f9fd118 CRs-Fixed: 2366232
-rw-r--r--CORE/SERVICES/HIF/USB/if_usb.c11
-rw-r--r--Kbuild4
2 files changed, 14 insertions, 1 deletions
diff --git a/CORE/SERVICES/HIF/USB/if_usb.c b/CORE/SERVICES/HIF/USB/if_usb.c
index 2aadfc2ea2db..455f4041724c 100644
--- a/CORE/SERVICES/HIF/USB/if_usb.c
+++ b/CORE/SERVICES/HIF/USB/if_usb.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016, 2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2016, 2018-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -434,6 +434,7 @@ static int hif_usb_resume(struct usb_interface *interface)
return 0;
}
+#ifndef USB_RESET_RESUME_PERSISTENCE
static int hif_usb_reset_resume(struct usb_interface *intf)
{
HIF_DEVICE_USB *device = usb_get_intfdata(intf);
@@ -444,6 +445,14 @@ static int hif_usb_reset_resume(struct usb_interface *intf)
printk("Exit:%s,Line:%d \n\r", __func__,__LINE__);
return 0;
}
+#else
+static int hif_usb_reset_resume(struct usb_interface *intf)
+{
+ printk("Enter:%s,Line:%d \n\r", __func__,__LINE__);
+ hif_usb_resume(intf);
+ printk("Exit:%s,Line:%d \n\r", __func__,__LINE__);
+}
+#endif
static struct usb_device_id hif_usb_id_table[] = {
{USB_DEVICE_AND_INTERFACE_INFO(VENDOR_ATHR, 0x9378, 0xFF, 0xFF, 0xFF)},
diff --git a/Kbuild b/Kbuild
index d5bb345973ce..6bfd93dfe6b0 100644
--- a/Kbuild
+++ b/Kbuild
@@ -1716,6 +1716,10 @@ CDEFINES += -DWLAN_FEATURE_WOW_PULSE
CDEFINES += -DFEATURE_PBM_MAGIC_WOW
endif
+ifeq ($(CONFIG_USB_RESET_RESUME_PERSISTENCE), y)
+CDEFINES += -DUSB_RESET_RESUME_PERSISTENCE
+endif
+
ifeq ($(CONFIG_WLAN_FEATURE_NAN_DATAPATH),y)
CDEFINES += -DWLAN_FEATURE_NAN_DATAPATH
endif