qcacmn: Add support for scan and MLME synchronization

Reject scan request, if any VDEV is in START/DFS_CAC/SUSPEND states.

Change-Id: I1047ba510df5ae5debd1e3d5c8a064a57af65fbf
CRs-Fixed: 2384163
This commit is contained in:
Srinivas Pitla
2018-12-05 18:08:20 +05:30
zatwierdzone przez nshrivas
rodzic cdf3813a9c
commit 1ff074ce30
11 zmienionych plików z 208 dodań i 5 usunięć

Wyświetl plik

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2019 The Linux Foundation. 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
@@ -285,4 +285,17 @@ void
wlan_util_stats_get_rssi(bool db2dbm_enabled, int32_t bcn_snr, int32_t dat_snr,
int8_t *rssi);
/**
* wlan_util_is_pdev_scan_allowed() - Check for vdev is allowed to scan
* @pdev: pdev pointer
* @dbg_id: module id
*
* Iterates through all vdevs, checks if any VDEV is not either in S_INIT or in
* S_UP state
*
* Return: QDF_STATUS_SUCCESS,if scan is allowed, otherwise QDF_STATUS_E_FAILURE
*/
QDF_STATUS wlan_util_is_pdev_scan_allowed(struct wlan_objmgr_pdev *pdev,
wlan_objmgr_ref_dbgid dbg_id);
#endif /* _WLAN_UTILITY_H_ */

Wyświetl plik

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2019 The Linux Foundation. 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
@@ -462,6 +462,43 @@ QDF_STATUS wlan_util_pdev_vdevs_deschan_match(struct wlan_objmgr_pdev *pdev,
return QDF_STATUS_E_FAILURE;
}
static void wlan_vdev_scan_allowed(struct wlan_objmgr_pdev *pdev, void *object,
void *arg)
{
struct wlan_objmgr_vdev *vdev = (struct wlan_objmgr_vdev *)object;
uint8_t *flag = (uint8_t *)arg;
wlan_vdev_obj_lock(vdev);
if (wlan_vdev_mlme_is_scan_allowed(vdev) != QDF_STATUS_SUCCESS)
*flag = 1;
wlan_vdev_obj_unlock(vdev);
}
QDF_STATUS wlan_util_is_pdev_scan_allowed(struct wlan_objmgr_pdev *pdev,
wlan_objmgr_ref_dbgid dbg_id)
{
uint8_t flag = 0;
if (!pdev)
return QDF_STATUS_E_INVAL;
wlan_objmgr_pdev_iterate_obj_list(pdev, WLAN_VDEV_OP,
wlan_vdev_scan_allowed,
&flag, 0, dbg_id);
if (flag == 1)
return QDF_STATUS_E_FAILURE;
return QDF_STATUS_SUCCESS;
}
#else
QDF_STATUS wlan_util_is_pdev_scan_allowed(struct wlan_objmgr_pdev *pdev,
wlan_objmgr_ref_dbgid dbg_id)
{
return QDF_STATUS_SUCCESS;
}
#endif
void