瀏覽代碼

qcacld-3.0: Fix NDI teardown issue on "ifconfig down" request

This is qcacld-2.0 to qcacld-3.0 propagation.

NAN data session is expected to be available across ifconfig up
and ifconfig down requests from user space. The userspace will
issue ifconfig down when it is done using the interface and will
bring up the interface again if required. NAN data interface
termination is expected to be done only on NDI delete request from
the userspace.

Change-Id: Ib9d7c1719077687bdd7e550404e874406ec50758
CRs-Fixed: 962367
Naveen Rawat 8 年之前
父節點
當前提交
286def5833
共有 1 個文件被更改,包括 20 次插入0 次删除
  1. 20 0
      core/hdd/src/wlan_hdd_main.c

+ 20 - 0
core/hdd/src/wlan_hdd_main.c

@@ -1961,6 +1961,14 @@ static int __hdd_open(struct net_device *dev)
 					     WLAN_CONTROL_PATH);
 	}
 
+	/* Enable carrier and transmit queues for NDI */
+	if (WLAN_HDD_IS_NDI(adapter)) {
+		hdd_notice("Enabling Tx Queues");
+		wlan_hdd_netif_queue_control(adapter,
+			WLAN_START_ALL_NETIF_QUEUE_N_CARRIER,
+			WLAN_CONTROL_PATH);
+	}
+
 	return ret;
 }
 
@@ -2028,6 +2036,18 @@ static int __hdd_stop(struct net_device *dev)
 	wlan_hdd_netif_queue_control(adapter, WLAN_NETIF_TX_DISABLE_N_CARRIER,
 				   WLAN_CONTROL_PATH);
 
+	/*
+	 * NAN data interface is different in some sense. The traffic on NDI is
+	 * bursty in nature and depends on the need to transfer. The service
+	 * layer may down the interface after the usage and up again when
+	 * required. In some sense, the NDI is expected to be available
+	 * (like SAP) iface until NDI delete request is issued by the service
+	 * layer. Skip BSS termination and adapter deletion for NAN Data
+	 * interface (NDI).
+	 */
+	if (WLAN_HDD_IS_NDI(adapter))
+		return 0;
+
 	/*
 	 * The interface is marked as down for outside world (aka kernel)
 	 * But the driver is pretty much alive inside. The driver needs to