Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a4fd7c0 authored by Wu Gao's avatar Wu Gao Committed by Madan Koyyalamudi
Browse files

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
parent 9fbee433
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
/*
 * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
 * 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
@@ -510,13 +511,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));