summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/cnss/cnss-wlan.txt2
-rw-r--r--drivers/net/wireless/cnss/cnss_pci.c13
2 files changed, 15 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/cnss/cnss-wlan.txt b/Documentation/devicetree/bindings/cnss/cnss-wlan.txt
index 101be70d33b2..6d63d1123f4c 100644
--- a/Documentation/devicetree/bindings/cnss/cnss-wlan.txt
+++ b/Documentation/devicetree/bindings/cnss/cnss-wlan.txt
@@ -42,6 +42,8 @@ Optional properties:
- reg-names: Names of the memory regions defined in reg entry
- wlan-bootstrap-gpio: WLAN_BOOTSTRAP GPIO signal specified by QCA6174
which should be drived depending on platforms
+ - qcom,is-dual-wifi-enabled: Boolean property to control wlan enable(wlan-en)
+ gpio on dual-wifi platforms.
Example:
diff --git a/drivers/net/wireless/cnss/cnss_pci.c b/drivers/net/wireless/cnss/cnss_pci.c
index c1a6c2dea8ce..efe0e7ad43d0 100644
--- a/drivers/net/wireless/cnss/cnss_pci.c
+++ b/drivers/net/wireless/cnss/cnss_pci.c
@@ -223,6 +223,10 @@ struct index_file {
u8 file_name[13];
};
+struct cnss_dual_wifi {
+ bool is_dual_wifi_enabled;
+};
+
/**
* struct wlan_mac_addr - Structure to hold WLAN MAC Address
* @mac_addr: MAC address
@@ -300,6 +304,7 @@ static struct cnss_data {
int wlan_bootstrap_gpio;
atomic_t auto_suspended;
bool monitor_wake_intr;
+ struct cnss_dual_wifi dual_wifi_info;
} *penv;
static unsigned int pcie_link_down_panic;
@@ -576,6 +581,11 @@ static void cnss_wlan_gpio_set(struct cnss_wlan_gpio_info *info, bool state)
return;
}
+ if (state == WLAN_EN_LOW && penv->dual_wifi_info.is_dual_wifi_enabled) {
+ pr_debug("%s Dual WiFi enabled\n", __func__);
+ return;
+ }
+
gpio_set_value(info->num, state);
info->state = state;
@@ -2899,6 +2909,9 @@ static int cnss_probe(struct platform_device *pdev)
penv->subsys_handle = subsystem_get(penv->subsysdesc.name);
+ if (of_property_read_bool(dev->of_node, "qcom,is-dual-wifi-enabled"))
+ penv->dual_wifi_info.is_dual_wifi_enabled = true;
+
if (of_property_read_u32(dev->of_node, "qcom,wlan-ramdump-dynamic",
&ramdump_size) == 0) {
penv->ramdump_addr = dma_alloc_coherent(&pdev->dev,