qcacld-3.0: Add INI to enable/disable BTM offload for HS-2.0

Some solutions may not have HS-2.0 certification and there is
no need to forward the BTM frame to wpa_supplicant in such
solutions. Let firmware handle the frame in such cases by
enabling btm_offload so that it doesn't wakeup the host.
Firmware may roam to another AP upon BTM reception.

To enable/disable BTM offload add hs20_btm_offload_disable INI.
If this INI is enable BTM offload will be disable and if INI
is disable BTM offload will be enabled.

Change-Id: Id6e18404cc3a12a23b213c0f858c943715285932
CRs-Fixed: 3718776
Tento commit je obsažen v:
Vinod Kumar Myadam
2024-01-29 18:22:03 +05:30
odevzdal Ravindra Konda
rodič 25b2403ff6
revize fd0e3bbfe8
6 změnil soubory, kde provedl 67 přidání a 4 odebrání

Zobrazit soubor

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. 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
@@ -3297,6 +3297,31 @@
CFG_VALUE_OR_DEFAULT, \
"Roam information cache number in wlan driver")
/*
* <ini>
* hs20_btm_offload_disable - To enable/disable BTM offload
* @Min: 0
* @Max: 1
* @Default: 1
*
* This ini is used to enable/disable BTM offload for Hotspot 2.0.
* Some solutions may not have Hotspot 2.0 certification
* and there is no need to forward the BTM frame to wpa_supplicant,
* in such solutions Let firmware handle the frame, in such cases by
* enabling btm_offload so that it doesn't wakeup the host.
* Firmware may roam to another AP upon BTM reception.
*
* Related: LFR
*
* Usage: External
*
* </ini>
*/
#define CFG_HS_20_BTM_OFFLOAD_DISABLE CFG_INI_BOOL( \
"hs20_btm_offload_disable", \
true, \
"To Enable/disable BTM offload for hotspot 2.0")
#define CFG_LFR_ALL \
CFG(CFG_LFR_MAWC_ROAM_ENABLED) \
CFG(CFG_LFR_MAWC_ROAM_TRAFFIC_THRESHOLD) \
@@ -3398,6 +3423,7 @@
ROAM_REASON_VSIE_ALL \
CFG(CFG_LFR_BEACONLOSS_TIMEOUT_ON_WAKEUP) \
CFG(CFG_LFR_BEACONLOSS_TIMEOUT_ON_SLEEP) \
CFG(CFG_LFR3_ROAM_INFO_STATS_NUM)
CFG(CFG_LFR3_ROAM_INFO_STATS_NUM) \
CFG(CFG_HS_20_BTM_OFFLOAD_DISABLE)
#endif /* CFG_MLME_LFR_H__ */

Zobrazit soubor

@@ -4956,4 +4956,15 @@ wlan_mlme_get_ap_oper_ch_width(struct wlan_objmgr_vdev *vdev);
QDF_STATUS
wlan_mlme_send_csa_event_status_ind(struct wlan_objmgr_vdev *vdev,
uint8_t csa_status);
/**
* wlan_mlme_is_hs_20_btm_offload_disabled() - Get BTM offload is enable/disable
* @psoc: pointer to psoc object
* @val: Pointer to the value which will be filled for the caller
*
* Return: QDF Status
*/
QDF_STATUS
wlan_mlme_is_hs_20_btm_offload_disabled(struct wlan_objmgr_psoc *psoc,
bool *val);
#endif /* _WLAN_MLME_API_H_ */

Zobrazit soubor

@@ -2089,6 +2089,8 @@ struct fw_scan_channels {
* only on prior discovery of any 6 GHz support in the environment.
* @disconnect_on_nud_roam_invoke_fail: indicate whether disconnect ap when
* roam invoke fail on nud.
* @hs20_btm_offload_disable: indicate whether btm offload is enable/disable
* for Hotspot 2.0
*/
struct wlan_mlme_lfr_cfg {
bool mawc_roam_enabled;
@@ -2217,6 +2219,7 @@ struct wlan_mlme_lfr_cfg {
uint8_t exclude_rm_partial_scan_freq;
uint8_t roam_full_scan_6ghz_on_disc;
bool disconnect_on_nud_roam_invoke_fail;
bool hs20_btm_offload_disable;
};
/**

Zobrazit soubor

@@ -8346,3 +8346,21 @@ rel_pdev:
return status;
}
#endif
QDF_STATUS
wlan_mlme_is_hs_20_btm_offload_disabled(struct wlan_objmgr_psoc *psoc,
bool *val)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj;
mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj) {
*val = cfg_default(CFG_HS_20_BTM_OFFLOAD_DISABLE);
return QDF_STATUS_E_INVAL;
}
*val = mlme_obj->cfg.lfr.hs20_btm_offload_disable;
return QDF_STATUS_SUCCESS;
}