Эх сурвалжийг харах

qcacld-3.0: Add support to enable WLAN HW

As part of protected dynamic interface control feature,
if the user space disables WiFi, then the platform driver
disables the WLAN HW as well. Until the user enables WiFi,
the WLAN HW stays disabled.

So, add support to enable the WLAN HW, when the WiFi is
enabled by user space.

Change-Id: If6b90ae57c4471f4c613ead8310fd0a7ada818f3
CRs-Fixed: 3215335
Aditya Kodukula 2 жил өмнө
parent
commit
e92560b70c

+ 1 - 1
Kbuild

@@ -4410,7 +4410,7 @@ cppflags-y += -DHW_TX_DELAY_STATS_ENABLE
 endif
 
 #Flags to enable/disable Dynamic WLAN interface control feature
-cppflags-$(CONFIG_WLAN_DYNAMIC_IFACE_CTRL) += -DFEATURE_WLAN_DYNAMIC_IFACE_CTRL
+cppflags-$(CONFIG_CNSS_HW_SECURE_DISABLE) += -DFEATURE_CNSS_HW_SECURE_DISABLE
 
 KBUILD_CPPFLAGS += $(cppflags-y)
 

+ 1 - 1
core/hdd/inc/wlan_hdd_main.h

@@ -1992,7 +1992,7 @@ struct hdd_rtpm_tput_policy_context {
 };
 #endif
 
-#ifdef FEATURE_WLAN_DYNAMIC_IFACE_CTRL
+#ifdef FEATURE_CNSS_HW_SECURE_DISABLE
 /**
  * hdd_get_wlan_driver_status() - get status of soft driver unload
  *

+ 7 - 1
core/hdd/src/wlan_hdd_main.c

@@ -17762,7 +17762,7 @@ static int hdd_validate_wlan_string(const char __user *user_buf)
 	return -EINVAL;
 }
 
-#ifdef FEATURE_WLAN_DYNAMIC_IFACE_CTRL
+#ifdef FEATURE_CNSS_HW_SECURE_DISABLE
 #define WIFI_DISABLE_SLEEP (10)
 #define WIFI_DISABLE_MAX_RETRY_ATTEMPTS (10)
 static bool g_soft_unload;
@@ -17774,6 +17774,12 @@ bool hdd_get_wlan_driver_status(void)
 
 static int hdd_wlan_soft_driver_load(void)
 {
+	if (!cds_is_driver_loaded()) {
+		pr_info("Enabling CNSS WLAN HW\n");
+		cnss_wlan_hw_enable();
+		return 0;
+	}
+
 	if (!g_soft_unload) {
 		pr_info("Enabling WiFi\n");
 		return -EINVAL;