瀏覽代碼

qcacld-3.0: Send NDI create rsp to userspace after NDI state is set

Currently, driver creates the NDI upon userspace request and sends
NDI-create-response to userspace. But internal NDI state is set
after sending this response. This leads to a race condition when
userspace sends NDI delete while driver is still setting driver
internal state for NDI create.
So, send NDI create response to userspace only after completion
of driver internal processing.

Change-Id: Ic651fd4f6dfab17c48c4f65b6e5d49c4d08cbe16
CRs-Fixed: 2966549
Srinivas Dasari 3 年之前
父節點
當前提交
1663527e35
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      os_if/nan/src/os_if_nan.c

+ 2 - 2
os_if/nan/src/os_if_nan.c

@@ -1981,15 +1981,15 @@ static void os_if_ndp_iface_create_rsp_handler(struct wlan_objmgr_psoc *psoc,
 	osif_debug("transaction id: %u status code: %u Reason: %u",
 		   create_transaction_id, create_status, create_reason);
 
-	cfg80211_vendor_event(vendor_event, GFP_KERNEL);
-
 	if (!create_fail) {
 		/* update txrx queues and register self sta */
 		cb_obj.drv_ndi_create_rsp_handler(wlan_vdev_get_id(vdev),
 						  ndi_rsp);
+		cfg80211_vendor_event(vendor_event, GFP_KERNEL);
 	} else {
 		osif_err("NDI interface creation failed with reason %d",
 			 create_reason);
+		cfg80211_vendor_event(vendor_event, GFP_KERNEL);
 		goto close_ndi;
 	}