qcacmn: Handle TWT enable/disable failure status

When HOST based TWT is triggered from userspace, while disabling
congestion based TWT, disable/enable TWT may fail due to ongoing
roam operations in firmware. These changes return error code EBUSY
in failure case in vendor command context to userspace.

Change-Id: I3da64b6ea4dcf08cf80966cd7639d8945fe46417
CRs-Fixed: 3520189
这个提交包含在:
Sai Pavan Akhil Remella
2023-07-27 00:05:30 +05:30
提交者 Rahul Choudhary
父节点 024eb9d419
当前提交 ef71aa4c26

查看文件

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2023 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 above
@@ -62,6 +62,10 @@ int osif_twt_requestor_enable(struct wlan_objmgr_psoc *psoc,
goto cleanup;
}
twt_en_priv = osif_request_priv(request);
if (twt_en_priv->status != HOST_TWT_ENABLE_STATUS_OK &&
twt_en_priv->status != HOST_TWT_ENABLE_STATUS_ALREADY_ENABLED)
ret = -EBUSY;
cleanup:
osif_request_put(request);
return ret;
@@ -140,6 +144,9 @@ int osif_twt_requestor_disable(struct wlan_objmgr_psoc *psoc,
goto cleanup;
}
twt_en_priv = osif_request_priv(request);
if (twt_en_priv->status != HOST_TWT_DISABLE_STATUS_OK)
ret = -EBUSY;
cleanup:
osif_request_put(request);
return ret;