qcacld-3.0: Set OCV flag in wiphy ext feature
Host checks if firmware advertises Operating channel validation(OCV) support bit in service ready then updates OCV flag in wiphy ext feature. Change-Id: I92f872a07e6f7142e602e6a9e5f5edcecc0aab0b CRs-Fixed: 2880821
This commit is contained in:

committed by
snandini

parent
6ca464369f
commit
e546874794
@@ -836,6 +836,16 @@ QDF_STATUS wlan_mlme_get_oce_sta_enabled_info(struct wlan_objmgr_psoc *psoc,
|
||||
QDF_STATUS wlan_mlme_get_bigtk_support(struct wlan_objmgr_psoc *psoc,
|
||||
bool *value);
|
||||
|
||||
/**
|
||||
* wlan_mlme_get_ocv_support() - Get the OCV support
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: pointer to the value which will be filled for the caller
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS wlan_mlme_get_ocv_support(struct wlan_objmgr_psoc *psoc,
|
||||
bool *value);
|
||||
|
||||
/**
|
||||
* wlan_mlme_get_host_scan_abort_support() - Get support for stop all host
|
||||
* scans service capability.
|
||||
|
@@ -1079,6 +1079,7 @@ struct wlan_mlme_chain_cfg {
|
||||
* supports stop all host scan request type.
|
||||
* @peer_create_conf_support: Peer create confirmation command support
|
||||
* @dual_sta_roam_fw_support: Firmware support for dual sta roaming feature
|
||||
* @ocv_support: FW supports OCV
|
||||
*
|
||||
* Add all the mlme-tgt related capablities here, and the public API would fill
|
||||
* the related capability in the required mlme cfg structure.
|
||||
@@ -1089,6 +1090,7 @@ struct mlme_tgt_caps {
|
||||
bool stop_all_host_scan_support;
|
||||
bool peer_create_conf_support;
|
||||
bool dual_sta_roam_fw_support;
|
||||
bool ocv_support;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1305,6 +1307,7 @@ struct wlan_mlme_ratemask {
|
||||
* @sae_connect_retries: sae connect retry bitmask
|
||||
* @wls_6ghz_capable: wifi location service(WLS) is 6ghz capable
|
||||
* @monitor_mode_concurrency: Monitor mode concurrency supported
|
||||
* @ocv_support: FW supports OCV or not
|
||||
*/
|
||||
struct wlan_mlme_generic {
|
||||
uint32_t band_capability;
|
||||
@@ -1347,6 +1350,7 @@ struct wlan_mlme_generic {
|
||||
uint32_t sae_connect_retries;
|
||||
bool wls_6ghz_capable;
|
||||
enum monitor_mode_concurrency monitor_mode_concurrency;
|
||||
bool ocv_support;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@@ -1766,6 +1766,23 @@ QDF_STATUS ucfg_mlme_get_bigtk_support(struct wlan_objmgr_psoc *psoc,
|
||||
return wlan_mlme_get_bigtk_support(psoc, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_ocv_support() - Get whether ocv is supported or not.
|
||||
*
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: pointer to the value which will be filled for the caller
|
||||
*
|
||||
* Inline UCFG API to be used by HDD/OSIF callers to get the OCV support
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS ucfg_mlme_get_ocv_support(struct wlan_objmgr_psoc *psoc,
|
||||
bool *value)
|
||||
{
|
||||
return wlan_mlme_get_ocv_support(psoc, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_oce_sap_enabled_info() - Get OCE feature enable/disable
|
||||
* info for SAP
|
||||
|
@@ -502,7 +502,7 @@ wlan_mlme_update_cfg_with_tgt_caps(struct wlan_objmgr_psoc *psoc,
|
||||
tgt_caps->stop_all_host_scan_support;
|
||||
mlme_obj->cfg.gen.dual_sta_roam_fw_support =
|
||||
tgt_caps->dual_sta_roam_fw_support;
|
||||
|
||||
mlme_obj->cfg.gen.ocv_support = tgt_caps->ocv_support;
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_11AX
|
||||
@@ -2127,6 +2127,19 @@ QDF_STATUS wlan_mlme_get_bigtk_support(struct wlan_objmgr_psoc *psoc,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_mlme_get_ocv_support(struct wlan_objmgr_psoc *psoc,
|
||||
bool *value)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
|
||||
if (!mlme_obj)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
*value = mlme_obj->cfg.gen.ocv_support;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
bool wlan_mlme_get_host_scan_abort_support(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
|
@@ -15960,6 +15960,19 @@ static void wlan_hdd_cfg80211_set_bigtk_flags(struct wiphy *wiphy)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CFG80211_OCV_CONFIGURATION_SUPPORT) || \
|
||||
(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0))
|
||||
static void wlan_hdd_cfg80211_set_ocv_flags(struct wiphy *wiphy)
|
||||
{
|
||||
wiphy_ext_feature_set(wiphy,
|
||||
NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION);
|
||||
}
|
||||
#else
|
||||
static void wlan_hdd_cfg80211_set_ocv_flags(struct wiphy *wiphy)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CFG80211_SCAN_OCE_CAPABILITY_SUPPORT) || \
|
||||
(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
|
||||
static void wlan_hdd_cfg80211_set_wiphy_oce_scan_flags(struct wiphy *wiphy)
|
||||
@@ -16611,6 +16624,7 @@ void wlan_hdd_update_wiphy(struct hdd_context *hdd_ctx)
|
||||
struct wiphy *wiphy = hdd_ctx->wiphy;
|
||||
uint8_t allow_mcc_go_diff_bi = 0, enable_mcc = 0;
|
||||
bool is_bigtk_supported;
|
||||
bool is_ocv_supported;
|
||||
|
||||
if (!wiphy) {
|
||||
hdd_err("Invalid wiphy");
|
||||
@@ -16642,6 +16656,11 @@ void wlan_hdd_update_wiphy(struct hdd_context *hdd_ctx)
|
||||
if (QDF_IS_STATUS_SUCCESS(status) && is_bigtk_supported)
|
||||
wlan_hdd_cfg80211_set_bigtk_flags(wiphy);
|
||||
|
||||
status = ucfg_mlme_get_ocv_support(hdd_ctx->psoc,
|
||||
&is_ocv_supported);
|
||||
if (QDF_IS_STATUS_SUCCESS(status) && is_ocv_supported)
|
||||
wlan_hdd_cfg80211_set_ocv_flags(wiphy);
|
||||
|
||||
status = ucfg_mlme_get_oce_sta_enabled_info(hdd_ctx->psoc,
|
||||
&is_oce_sta_enabled);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
|
@@ -5356,7 +5356,12 @@ static void wma_update_mlme_related_tgt_caps(struct wlan_objmgr_psoc *psoc,
|
||||
wmi_service_enabled(wmi_handle,
|
||||
wmi_service_dual_sta_roam_support);
|
||||
|
||||
wma_debug("beacon protection support %d", mlme_tgt_cfg.bigtk_support);
|
||||
mlme_tgt_cfg.ocv_support =
|
||||
wmi_service_enabled(wmi_handle,
|
||||
wmi_service_ocv_support);
|
||||
|
||||
wma_debug("beacon protection support %d, ocv support %d",
|
||||
mlme_tgt_cfg.bigtk_support, mlme_tgt_cfg.ocv_support);
|
||||
|
||||
/* Call this at last only after filling all the tgt caps */
|
||||
wlan_mlme_update_cfg_with_tgt_caps(psoc, &mlme_tgt_cfg);
|
||||
|
Reference in New Issue
Block a user