qcacld-3.0: Check the TWT responder capability before enable

TWT responder should be enabled based on the hostapd
configuration and self capability.
But when SAP is started, the TWT concurrency work is
scheduled and its enabling the TWT responder without
checking the hostapd configuration. This causes TWT
responder to be enabled even though the hostapd configuration
disables the responder.

Check the TWT responder configuration from TWT component before
sending enable command for TWT responder

Change-Id: Ia6755299421f00b2a1a69fc2e19fac3d39ab95f6
CRs-Fixed: 3291939
This commit is contained in:
Pragaspathi Thilagaraj
2022-09-16 15:45:19 +05:30
zatwierdzone przez Madan Koyyalamudi
rodzic b8f89f717e
commit 177ccb0f9e
8 zmienionych plików z 157 dodań i 9 usunięć

Wyświetl plik

@@ -66,6 +66,26 @@ QDF_STATUS
wlan_twt_cfg_get_support_requestor(struct wlan_objmgr_psoc *psoc,
bool *val);
/**
* wlan_twt_get_requestor_cfg() - Get requestor TWT configuration
* @psoc: Pointer to psoc object
* @val: Pointer to value
*
* Return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_get_requestor_cfg(struct wlan_objmgr_psoc *psoc, bool *val);
/**
* wlan_twt_get_responder_cfg() - Get TWT responder configuration
* @psoc: Pointer to PSOC object
* @val: Pointer to value
*
* Return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_get_responder_cfg(struct wlan_objmgr_psoc *psoc, bool *val);
#ifdef FEATURE_SET
/**
* wlan_twt_get_feature_info() - Get TWT feature set information
@@ -104,5 +124,17 @@ wlan_twt_cfg_get_support_requestor(struct wlan_objmgr_psoc *psoc,
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS
wlan_twt_get_requestor_cfg(struct wlan_objmgr_psoc *psoc, bool *val)
{
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS
wlan_twt_get_responder_cfg(struct wlan_objmgr_psoc *psoc, bool *val)
{
return QDF_STATUS_SUCCESS;
}
#endif
#endif

Wyświetl plik

@@ -169,6 +169,14 @@ bool ucfg_twt_is_setup_in_progress(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *peer_mac,
uint8_t dialog_id);
/**
* ucfg_twt_cfg_is_twt_enabled() - Get if TWT is enabled
* @psoc: PSOC pointer
*
* Return: True if TWT is enabled
*/
bool ucfg_twt_cfg_is_twt_enabled(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_twt_set_command_in_progress() - Set TWT command is in progress
* @psoc: Pointer to psoc object
@@ -294,6 +302,15 @@ void ucfg_twt_set_work_params(
void ucfg_twt_get_work_params(struct wlan_objmgr_vdev *vdev,
struct twt_work_params *params,
uint32_t *next_action);
/**
* ucfg_twt_cfg_set_responder() - Set TWT responder capability
* @psoc: Pointer to global PSOC object
* @val: pointer to value to be set
*
* Return: QDF_STATUS
*/
QDF_STATUS ucfg_twt_cfg_set_responder(struct wlan_objmgr_psoc *psoc, bool val);
#else
static inline
QDF_STATUS ucfg_twt_psoc_open(struct wlan_objmgr_psoc *psoc)
@@ -399,5 +416,17 @@ ucfg_twt_get_work_params(
uint32_t *next_action)
{
}
static inline
QDF_STATUS ucfg_twt_cfg_set_responder(struct wlan_objmgr_psoc *psoc, bool val)
{
return QDF_STATUS_SUCCESS;
}
static inline
bool ucfg_twt_cfg_is_twt_enabled(struct wlan_objmgr_psoc *psoc)
{
return false;
}
#endif
#endif

Wyświetl plik

@@ -38,6 +38,18 @@ wlan_twt_cfg_get_support_in_11n(struct wlan_objmgr_psoc *psoc, bool *val)
return wlan_twt_cfg_get_support_in_11n_mode(psoc, val);
}
QDF_STATUS
wlan_twt_get_requestor_cfg(struct wlan_objmgr_psoc *psoc, bool *val)
{
return wlan_twt_cfg_get_requestor(psoc, val);
}
QDF_STATUS
wlan_twt_get_responder_cfg(struct wlan_objmgr_psoc *psoc, bool *val)
{
return wlan_twt_cfg_get_responder(psoc, val);
}
QDF_STATUS
wlan_twt_cfg_get_support_requestor(struct wlan_objmgr_psoc *psoc, bool *val)
{

Wyświetl plik

@@ -47,6 +47,12 @@ ucfg_twt_cfg_get_responder(struct wlan_objmgr_psoc *psoc, bool *val)
return wlan_twt_cfg_get_responder(psoc, val);
}
QDF_STATUS
ucfg_twt_cfg_set_responder(struct wlan_objmgr_psoc *psoc, bool val)
{
return wlan_twt_cfg_set_responder(psoc, val);
}
QDF_STATUS
ucfg_twt_setup_req(struct wlan_objmgr_psoc *psoc,
struct twt_add_dialog_param *params,
@@ -107,6 +113,11 @@ bool ucfg_twt_is_setup_in_progress(struct wlan_objmgr_psoc *psoc,
return wlan_twt_is_setup_in_progress(psoc, peer_mac, dialog_id);
}
bool ucfg_twt_cfg_is_twt_enabled(struct wlan_objmgr_psoc *psoc)
{
return wlan_twt_cfg_is_twt_enabled(psoc);
}
QDF_STATUS
ucfg_twt_cfg_get_congestion_timeout(struct wlan_objmgr_psoc *psoc,
uint32_t *val)