浏览代码

qcacmn: Don't write stop string after CFR stopped

User space needn't stop string if host indicates data by netlink.

Change-Id: I905c2bd53705307cffb3c0911a84edf42908aee1
CRs-Fixed: 3076152
Wu Gao 3 年之前
父节点
当前提交
3ee4d6781e
共有 1 个文件被更改,包括 5 次插入6 次删除
  1. 5 6
      umac/cfr/core/src/cfr_common.c

+ 5 - 6
umac/cfr/core/src/cfr_common.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -511,13 +512,11 @@ QDF_STATUS cfr_stop_indication(struct wlan_objmgr_vdev *vdev)
 		return QDF_STATUS_E_INVAL;
 	}
 
-	if (pa->nl_cb.cfr_nl_cb) {
-		pa->nl_cb.cfr_nl_cb(pa->nl_cb.vdev_id, pa->nl_cb.pid,
-				    (const void *)CFR_STOP_STR,
-				    sizeof(CFR_STOP_STR));
-
+	/* Don't write stop sting if there is valid cfr_nl_cb. Since
+	 * userspace needn't stop event string
+	 */
+	if (pa->nl_cb.cfr_nl_cb)
 		return QDF_STATUS_SUCCESS;
-	}
 
 	status = cfr_streamfs_write(pa, (const void *)CFR_STOP_STR,
 				    sizeof(CFR_STOP_STR));