qcacmn: Add support to get feature set info

Based on the new requirement, add support to get requested
feature set info from different feature components.

Change-Id: I75c5a3062312b1124d21d1ae429a7c5a18d9f2d0
CRs-Fixed: 3262867
此提交包含在:
Ashish Kumar Dhanotiya
2022-07-26 15:16:20 +05:30
提交者 Madan Koyyalamudi
父節點 086f192c0a
當前提交 99694b6f53
共有 3 個檔案被更改,包括 74 行新增0 行删除

查看文件

@@ -29,6 +29,18 @@
#include <wlan_objmgr_vdev_obj.h>
#include "../../core/src/wlan_scan_main.h"
#ifdef FEATURE_SET
/**
* wlan_scan_get_feature_info() - Get scan feature set info
* @psoc: pointer to psoc object
* @scan_feature_set: feature set info which needs to be filled
*
* Return: none
*/
void wlan_scan_get_feature_info(struct wlan_objmgr_psoc *psoc,
struct wlan_scan_features *scan_feature_set);
#endif
/**
* wlan_scan_cfg_set_active_2g_dwelltime() - API to set scan active 2g dwelltime
* @psoc: pointer to psoc object

查看文件

@@ -1652,4 +1652,16 @@ enum trim_channel_list {
TRIM_CHANNEL_LIST_5G,
TRIM_CHANNEL_LIST_24G,
};
#ifdef FEATURE_SET
/**
* wlan_scan_features - Scan feature set structure
* @pno_in_unassoc_state: is pno supported in unassoc state
* @pno_in_assoc_state: is pno supported in assoc state
*/
struct wlan_scan_features {
bool pno_in_unassoc_state;
bool pno_in_assoc_state;
};
#endif
#endif

查看文件

@@ -653,3 +653,53 @@ bool wlan_scan_cfg_skip_6g_and_indoor_freq(struct wlan_objmgr_psoc *psoc)
return scan_obj->scan_def.skip_6g_and_indoor_freq;
}
#ifdef FEATURE_SET
/**
* wlan_scan_get_pno_scan_support() - Check if pno scan support is enabled
* @psoc: pointer to psoc object
*
* Return: pno scan_support_enabled flag
*/
static bool wlan_scan_get_pno_scan_support(struct wlan_objmgr_psoc *psoc)
{
struct wlan_scan_obj *scan_obj;
scan_obj = wlan_psoc_get_scan_obj(psoc);
if (!scan_obj) {
scm_err("NULL scan obj");
return cfg_default(CFG_PNO_SCAN_SUPPORT);
}
return scan_obj->pno_cfg.scan_support_enabled;
}
/**
* wlan_scan_is_connected_scan_enabled() - API to get scan enabled after connect
* @psoc: pointer to psoc object
*
* Return: value.
*/
static bool wlan_scan_is_connected_scan_enabled(struct wlan_objmgr_psoc *psoc)
{
struct wlan_scan_obj *scan_obj;
scan_obj = wlan_psoc_get_scan_obj(psoc);
if (!scan_obj) {
scm_err("Failed to get scan object");
return cfg_default(CFG_ENABLE_CONNECTED_SCAN);
}
return scan_obj->scan_def.enable_connected_scan;
}
void wlan_scan_get_feature_info(struct wlan_objmgr_psoc *psoc,
struct wlan_scan_features *scan_feature_set)
{
scan_feature_set->pno_in_unassoc_state =
wlan_scan_get_pno_scan_support(psoc);
if (scan_feature_set->pno_in_unassoc_state)
scan_feature_set->pno_in_assoc_state =
wlan_scan_is_connected_scan_enabled(psoc);
}
#endif