From 5bb0a54fddc947478a527a3dc5055bf4ef50ec44 Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Mon, 8 Jul 2019 17:44:26 +0530 Subject: [PATCH] qcacld-3.0: Correct logic to send an auto-resume indication to userspace Driver sends the auto-resume flag to user space in the following two scenarios in order to specify that the driver will automatically resume reporting beacon or not: Scenario 1: In the case of Disconnection Driver should not set an auto-resume flag QCA_WLAN_VENDOR_ATTR_BEACON_REPORTING_AUTO_RESUMES in subsequent QCA_WLAN_VENDOR_BEACON_REPORTING_OP_PAUSE event irrespective of do_not_resume flag is present in the recent QCA_WLAN_VENDOR_BEACON_REPORTING_OP_START command. Scenario 2: In the case of Scan Driver should send QCA_WLAN_VENDOR_ATTR_BEACON_REPORTING_AUTO_RESUMES in subsequent QCA_WLAN_VENDOR_BEACON_REPORTING_OP_PAUSE event only if do_not_resume flag is set in the recent QCA_WLAN_VENDOR_BEACON_REPORTING_OP_START command. Currently, there is a possibility to send an auto-resume flag to userspace in case of disconnection also, which is not as per the expectation of userspace from the host. Change-Id: I94cc7dc699b874422d0cf14cd4144c82adb4c2ac CRs-Fixed: 2485792 --- core/hdd/src/wlan_hdd_bcn_recv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_bcn_recv.c b/core/hdd/src/wlan_hdd_bcn_recv.c index 3267259a43842..e16de6e8cb75b 100644 --- a/core/hdd/src/wlan_hdd_bcn_recv.c +++ b/core/hdd/src/wlan_hdd_bcn_recv.c @@ -492,7 +492,7 @@ void hdd_beacon_recv_pause_indication(hdd_handle_t hdd_handle, * the QCA_WLAN_VENDOR_ATTR_BEACON_REPORTING_AUTO_RESUMES shall not be * set by the driver. */ - if (!is_disconnected || !do_not_resume) + if (!is_disconnected && !do_not_resume) if (nla_put_flag(vendor_event, QCA_WLAN_VENDOR_ATTR_BEACON_REPORTING_AUTO_RESUMES)) { hdd_err("QCA_WLAN_VENDOR_ATTR put fail");