qcacmn: Add buffer window for umac reset in progress

When the peer delete timer/vdev manager response timer expires, host checks
if the umac reset is in progress. If so, host will retrigger the timer.
It is possible that the umac reset is just completed and either of these
two timers got expired. In this case, host will assert saying that the peer
delete response/vdev manager response is not received from FW. FW may take
a few milliseconds to send the peer delete/vdev manager response to the
host after the umac recovery completes.

Hence, to avoid the crash, check if the umac reset was in progress during
the umac reset buffer window.

Add the below changes as well,
1) INI support to get the umac reset buffer window value.
2) Renamed the API dp_umac_reset_is_inprogress as
   dp_get_umac_reset_in_progress_state to return either
   CDP_UMAC_RESET_IN_PROGRESS or
   CDP_UMAC_RESET_IN_PROGRESS_DURING_BUFFER_WINDOW.

Change-Id: Ie15ef0731bad4b0ed955a479f00e297b7ba10729
CRs-Fixed: 3522665
This commit is contained in:
Shashikala Prabhu
2023-06-28 17:26:35 +05:30
committed by Rahul Choudhary
parent 0d36189af1
commit 7f898dfcc2
9 changed files with 165 additions and 23 deletions

View File

@@ -1408,6 +1408,29 @@ QDF_STATUS cdp_txrx_get_pdev_phyrx_error_mask(ol_txrx_soc_handle soc,
}
#endif
#ifdef DP_UMAC_HW_RESET_SUPPORT
/**
* cdp_get_umac_reset_in_progress_state() - API to get the umac reset in
* progress state
* @soc: opaque soc handle
*
* Return: Umac reset in progress state
*/
static inline enum cdp_umac_reset_state
cdp_get_umac_reset_in_progress_state(ol_txrx_soc_handle soc)
{
if (!soc || !soc->ops) {
dp_cdp_debug("Invalid soc or soc->ops:");
return CDP_UMAC_RESET_INVALID_STATE;
}
if (!soc->ops->ctrl_ops ||
!soc->ops->ctrl_ops->get_umac_reset_in_progress_state)
return CDP_UMAC_RESET_INVALID_STATE;
return soc->ops->ctrl_ops->get_umac_reset_in_progress_state(soc);
}
/**
* cdp_umac_reset_is_inprogress() - API to check if umac reset is in progress
* @soc: opaque soc handle
@@ -1417,18 +1440,23 @@ QDF_STATUS cdp_txrx_get_pdev_phyrx_error_mask(ol_txrx_soc_handle soc,
static inline bool
cdp_umac_reset_is_inprogress(ol_txrx_soc_handle soc)
{
if (!soc || !soc->ops) {
dp_cdp_debug("Invalid Instance:");
QDF_BUG(0);
return false;
}
enum cdp_umac_reset_state state;
if (!soc->ops->ctrl_ops ||
!soc->ops->ctrl_ops->umac_reset_is_inprogress)
return false;
state = cdp_get_umac_reset_in_progress_state(soc);
return soc->ops->ctrl_ops->umac_reset_is_inprogress(soc);
if (state == CDP_UMAC_RESET_IN_PROGRESS ||
state == CDP_UMAC_RESET_IN_PROGRESS_DURING_BUFFER_WINDOW)
return true;
else
return false;
}
#else
static inline bool
cdp_umac_reset_is_inprogress(ol_txrx_soc_handle soc)
{
return false;
}
#endif
#ifdef WLAN_SUPPORT_RX_FISA
static inline