Преглед изворни кода

qcacld-3.0: reset the iface_device_opened flag post vdev destroy

Currently before sending a scan done completion is sent to the kernel
the driver checks its internal iface_device_opened flag to make sure
only during the iff_up the driver sends the scan done to userspace.

Whenever a scan is ongoing & interface down is received in the other
context driver aborts the current scan and sends the scan done to
the userspace, This scan is not sent to the userspace because
driver internal flag iface_device_opened is reset 1st resulting in
dropping of the scan request which subsequently fails all the following
scan requests.

Hence reset the driver internal flag once all scan done is notified
and vdev is destroyed.

Change-Id: I764dd0521a25cc8b25c4b38b50ae2ed75b3b1860
CRs-Fixed: 3338151
Arun Kumar Khandavalli пре 2 година
родитељ
комит
df883e7c9f
1 измењених фајлова са 4 додато и 4 уклоњено
  1. 4 4
      core/hdd/src/wlan_hdd_main.c

+ 4 - 4
core/hdd/src/wlan_hdd_main.c

@@ -4744,9 +4744,6 @@ int hdd_stop_no_trans(struct net_device *dev)
 		return -ENODEV;
 	}
 
-	/* Make sure the interface is marked as closed */
-	clear_bit(DEVICE_IFACE_OPENED, &adapter->event_flags);
-
 	mac_handle = hdd_ctx->mac_handle;
 
 	if (!wlan_hdd_is_session_type_monitor(adapter->device_mode) &&
@@ -4781,7 +4778,7 @@ int hdd_stop_no_trans(struct net_device *dev)
 	 * interface (NDI).
 	 */
 	if (WLAN_HDD_IS_NDI(adapter))
-		return 0;
+		goto reset_iface_opened;
 
 	/*
 	 * The interface is marked as down for outside world (aka kernel)
@@ -4801,6 +4798,9 @@ int hdd_stop_no_trans(struct net_device *dev)
 	if (!hdd_is_any_interface_open(hdd_ctx))
 		hdd_psoc_idle_timer_start(hdd_ctx);
 
+reset_iface_opened:
+	/* Make sure the interface is marked as closed */
+	clear_bit(DEVICE_IFACE_OPENED, &adapter->event_flags);
 	hdd_exit();
 
 	return 0;