qcacmn: Re-init mlo global shmem in case of recovery

Re-init mlo global shmem region whenever in case of expected
target recovery mode. In case of mode1 recovery assert, need
complete teardown of mlo and clearing out global mlo shared
memory, when asserted SoC is recovered, re-init global shared
memory region again.

Change-Id: I475b08934bdceb78b87d115b79abf45e76633795
CRs-Fixed: 3390199
Dieser Commit ist enthalten in:
Surya Prakash Raajen
2023-01-27 22:01:25 +05:30
committet von Madan Koyyalamudi
Ursprung ee4fb4380c
Commit aad2e9bdb9
3 geänderte Dateien mit 17 neuen und 9 gelöschten Zeilen

Datei anzeigen

@@ -125,21 +125,24 @@ struct wlan_host_mlo_glb_h_shmem_arena_ctx {
* @arena_vaddr: Virtual address of the MLO Global shared memory arena
* @arena_len: Length (in bytes) of the MLO Global shared memory arena
* @grp_id: Id of the required MLO Group
* @recovery: MLO recovery is in progress
*
* Return: QDF_STATUS of operation
*/
QDF_STATUS mlo_glb_h_shmem_arena_ctx_init(void *arena_vaddr,
size_t arena_len,
uint8_t grp_id);
uint8_t grp_id,
uint8_t recovery);
/**
* mlo_glb_h_shmem_arena_ctx_deinit() - De-initialize MLO Global shared memory
* arena context on Host
* @grp_id: Id of the required MLO Group
* @recovery: MLO recovery is in progress
*
* Return: QDF_STATUS of operation
*/
QDF_STATUS mlo_glb_h_shmem_arena_ctx_deinit(uint8_t grp_id);
QDF_STATUS mlo_glb_h_shmem_arena_ctx_deinit(uint8_t grp_id, uint8_t recovery);
#endif
#ifdef WLAN_MLO_GLOBAL_SHMEM_SUPPORT

Datei anzeigen

@@ -823,7 +823,8 @@ static int parse_mlo_glb_h_shmem_arena(
QDF_STATUS mlo_glb_h_shmem_arena_ctx_init(void *arena_vaddr,
size_t arena_len,
uint8_t grp_id)
uint8_t grp_id,
uint8_t recovery)
{
struct wlan_host_mlo_glb_h_shmem_arena_ctx *shmem_arena_ctx;
@@ -837,7 +838,8 @@ QDF_STATUS mlo_glb_h_shmem_arena_ctx_init(void *arena_vaddr,
}
/* We need to initialize only for the first invocation */
if (qdf_atomic_read(&shmem_arena_ctx->init_count))
if ((recovery != MLO_RECOVERY_MODE_1) &&
qdf_atomic_read(&shmem_arena_ctx->init_count))
goto success;
if (parse_mlo_glb_h_shmem_arena(arena_vaddr, arena_len,
@@ -856,7 +858,7 @@ success:
qdf_export_symbol(mlo_glb_h_shmem_arena_ctx_init);
QDF_STATUS mlo_glb_h_shmem_arena_ctx_deinit(uint8_t grp_id)
QDF_STATUS mlo_glb_h_shmem_arena_ctx_deinit(uint8_t grp_id, uint8_t recovery)
{
struct wlan_host_mlo_glb_h_shmem_arena_ctx *shmem_arena_ctx;
@@ -874,8 +876,9 @@ QDF_STATUS mlo_glb_h_shmem_arena_ctx_deinit(uint8_t grp_id)
return QDF_STATUS_E_FAILURE;
}
/* We need to de-initialize only for the last invocation */
if (qdf_atomic_dec_and_test(&shmem_arena_ctx->init_count))
/* We need to de-initialize only for the last invocation */
if ((recovery != MLO_RECOVERY_MODE_1) &&
qdf_atomic_dec_and_test(&shmem_arena_ctx->init_count))
goto success;
free_mlo_glb_rx_reo_per_link_info(

Datei anzeigen

@@ -261,8 +261,10 @@ struct wlan_lmac_if_global_shmem_local_ops {
QDF_STATUS (*init_shmem_arena_ctx)(void *arena_vaddr,
size_t arena_len,
uint8_t grp_id);
QDF_STATUS (*deinit_shmem_arena_ctx)(uint8_t grp_id);
uint8_t grp_id,
uint8_t recovery);
QDF_STATUS (*deinit_shmem_arena_ctx)(uint8_t grp_id,
uint8_t recovery);
void *(*get_crash_reason_address)(uint8_t grp_id,
uint8_t chip_id);
uint8_t (*get_no_of_chips_from_crash_info)(uint8_t grp_id);