qcacld-3.0: Don't Process BEACON_REPORTING OP if Scan is on-going

As per SS’s WIPS requirements, if Host receives beacon recv start
command while processing scan request, HOST should not process
beacon reporting start cmd.

Next start command should get allow only after completion of scan.

After scan completion, supplicant should send a fresh start command
to start BEACON_REPORTING again.

Change-Id: I8b64665b6d019cfab76eefba4f7b11fa7dd2782e
CRs-Fixed: 2578642
This commit is contained in:
Abhinav Kumar 2019-12-03 14:16:17 +05:30 • committed by nshrivas
commit 57925408b6

View file

@ -30,6 +30,7 @@
#include "osif_sync.h"
#include "wlan_hdd_bcn_recv.h"
#include <linux/limits.h>
#include <wlan_hdd_object_manager.h>
#define SET_BIT(value, mask) ((value) |= (1 << (mask)))
@ -312,6 +313,8 @@ static int __wlan_hdd_cfg80211_bcn_rcv_op(struct wiphy *wiphy,
uint32_t bcn_report, nth_value = 1;
int errno;
bool active_report, do_not_resume;
struct wlan_objmgr_vdev *vdev;
enum scm_scan_status scan_req_status;
hdd_enter_dev(dev);
@ -329,6 +332,19 @@ static int __wlan_hdd_cfg80211_bcn_rcv_op(struct wiphy *wiphy,
return -EINVAL;
}
vdev = hdd_objmgr_get_vdev(adapter);
if (!vdev)
return -EINVAL;
scan_req_status = ucfg_scan_get_pdev_status(wlan_vdev_get_pdev(vdev));
wlan_objmgr_vdev_release_ref(vdev, WLAN_OSIF_ID);
if (scan_req_status != SCAN_NOT_IN_PROGRESS) {
hdd_debug("Scan in progress: %d, bcn rpt start OP not allowed",
scan_req_status);
return -EBUSY;
}
errno =
wlan_cfg80211_nla_parse(tb,
QCA_WLAN_VENDOR_ATTR_BEACON_REPORTING_MAX,