qcacmn: Handle Umac reset for MLO case
1. Add an API to process trigger_umac_recovery T2H message. 2. Synchronize do_pre_reset, do_post_reset_start, do_post_reset_complete messages for all the SOCs and then process these messages in the host. 3. Synchronize pre_reset_done, post_reset_start_done, post_reset_complete_done for all the SOCs before sending it to FW. 4. Add a new state in host for trigger_umac_recovery message. Ignore back to back trigger_umac_recovery messages received from FW. Change-Id: Id45d326d63e122834090844e83ad6cc7240f96af CRs-Fixed: 3425833
This commit is contained in:

committed by
Madan Koyyalamudi

parent
ff85561570
commit
80d41dc9b4
@@ -267,6 +267,7 @@ static uint8_t dp_soc_ring_if_nss_offloaded(struct dp_soc *soc,
|
||||
enum hal_ring_type ring_type,
|
||||
int ring_num);
|
||||
#ifdef DP_UMAC_HW_RESET_SUPPORT
|
||||
static QDF_STATUS dp_umac_reset_action_trigger_recovery(struct dp_soc *soc);
|
||||
static QDF_STATUS dp_umac_reset_handle_pre_reset(struct dp_soc *soc);
|
||||
static QDF_STATUS dp_umac_reset_handle_post_reset(struct dp_soc *soc);
|
||||
static QDF_STATUS dp_umac_reset_handle_post_reset_complete(struct dp_soc *soc);
|
||||
@@ -2379,18 +2380,6 @@ static inline bool dp_skip_msi_cfg(struct dp_soc *soc, int ring_type)
|
||||
#endif /* DP_CON_MON_MSI_ENABLED */
|
||||
#endif /* DISABLE_MON_RING_MSI_CFG */
|
||||
|
||||
#ifdef DP_UMAC_HW_RESET_SUPPORT
|
||||
static bool dp_check_umac_reset_in_progress(struct dp_soc *soc)
|
||||
{
|
||||
return !!soc->umac_reset_ctx.intr_ctx_bkp;
|
||||
}
|
||||
#else
|
||||
static bool dp_check_umac_reset_in_progress(struct dp_soc *soc)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS dp_srng_init_idx(struct dp_soc *soc, struct dp_srng *srng,
|
||||
int ring_type, int ring_num, int mac_id,
|
||||
uint32_t idx)
|
||||
@@ -6877,6 +6866,10 @@ void dp_soc_txrx_peer_setup(enum wlan_op_mode vdev_opmode, struct dp_soc *soc,
|
||||
#ifdef DP_UMAC_HW_RESET_SUPPORT
|
||||
static void dp_register_umac_reset_handlers(struct dp_soc *soc)
|
||||
{
|
||||
dp_umac_reset_register_rx_action_callback(soc,
|
||||
dp_umac_reset_action_trigger_recovery,
|
||||
UMAC_RESET_ACTION_DO_TRIGGER_RECOVERY);
|
||||
|
||||
dp_umac_reset_register_rx_action_callback(soc,
|
||||
dp_umac_reset_handle_pre_reset, UMAC_RESET_ACTION_DO_PRE_RESET);
|
||||
|
||||
@@ -13680,7 +13673,8 @@ static void dp_restore_interrupt_ring_masks(struct dp_soc *soc)
|
||||
int num_ctxt = wlan_cfg_get_num_contexts(soc->wlan_cfg_ctx);
|
||||
int i;
|
||||
|
||||
qdf_assert_always(intr_bkp);
|
||||
if (!intr_bkp)
|
||||
return;
|
||||
|
||||
for (i = 0; i < num_ctxt; i++) {
|
||||
intr_ctx = &soc->intr_ctx[i];
|
||||
@@ -13892,6 +13886,19 @@ static void dp_reinit_rings(struct dp_soc *soc)
|
||||
dp_soc_srng_init(soc);
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_umac_reset_action_trigger_recovery() - Handle FW Umac recovery trigger
|
||||
* @soc: dp soc handle
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static QDF_STATUS dp_umac_reset_action_trigger_recovery(struct dp_soc *soc)
|
||||
{
|
||||
enum umac_reset_action action = UMAC_RESET_ACTION_DO_TRIGGER_RECOVERY;
|
||||
|
||||
return dp_umac_reset_notify_action_completion(soc, action);
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_umac_reset_handle_pre_reset() - Handle Umac prereset interrupt from FW
|
||||
* @soc: dp soc handle
|
||||
@@ -13975,9 +13982,12 @@ static QDF_STATUS dp_umac_reset_handle_post_reset_complete(struct dp_soc *soc)
|
||||
nbuf_list = nbuf;
|
||||
}
|
||||
|
||||
dp_umac_reset_info("Umac reset done on soc %pK\n prereset : %u us\n"
|
||||
dp_umac_reset_info("Umac reset done on soc %pK\n trigger start : %u us "
|
||||
"trigger done : %u us prereset : %u us\n"
|
||||
"postreset : %u us \n postreset complete: %u us \n",
|
||||
soc,
|
||||
soc->umac_reset_ctx.ts.trigger_done -
|
||||
soc->umac_reset_ctx.ts.trigger_start,
|
||||
soc->umac_reset_ctx.ts.pre_reset_done -
|
||||
soc->umac_reset_ctx.ts.pre_reset_start,
|
||||
soc->umac_reset_ctx.ts.post_reset_done -
|
||||
|
Reference in New Issue
Block a user