qcacld-3.0: Enhance mlme_twt_is_command_in_progress() to return active_cmd

Currently, mlme_twt_is_command_in_progress() function checks if the given
command is in progress or not. For inputs like WLAN_TWT_ANY, if this function
returns true then from the current logs, its not known which
active command in progress.

Hence for better debugging, enhance this function to return active command.

Change-Id: Ibc5c5babb042408b0e8988fe229d344ed98bfff3
CRs-Fixed: 2920494
This commit is contained in:
Srinivas Girigowda
2021-04-09 14:57:28 -07:00
committed by snandini
parent fb9aa31f27
commit 8703e09f92
5 changed files with 57 additions and 33 deletions

View File

@@ -217,11 +217,13 @@ ucfg_mlme_is_twt_setup_in_progress(struct wlan_objmgr_psoc *psoc,
}
/**
* ucfg_mlme_twt_is_command_in_progress() - Get TWT command in progress
* ucfg_mlme_twt_is_command_in_progress() - Check if given command is in
* progress
* @psoc: Pointer to global PSOC object
* @peer_mac: Global peer mac address
* @dialog_id: TWT session dialog id
* @cmd: TWT command
* @active_cmd: Fill active command in this output parameter
*
* Return: True if given command is in progress
*/
@@ -230,9 +232,11 @@ static inline bool
ucfg_mlme_twt_is_command_in_progress(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *peer_mac,
uint8_t dialog_id,
enum wlan_twt_commands cmd)
enum wlan_twt_commands cmd,
enum wlan_twt_commands *active_cmd)
{
return mlme_twt_is_command_in_progress(psoc, peer_mac, dialog_id, cmd);
return mlme_twt_is_command_in_progress(psoc, peer_mac, dialog_id,
cmd, active_cmd);
}
static inline QDF_STATUS
@@ -520,7 +524,8 @@ static inline bool
ucfg_mlme_twt_is_command_in_progress(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *peer_mac,
uint8_t dialog_id,
enum wlan_twt_commands cmd)
enum wlan_twt_commands cmd,
enum wlan_twt_commands *active_cmd)
{
return false;
}