mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
qcacld-3.0: Check if gp_sap_ctx is empty after reinit
In SSR, after reinit, there is still memory leak for gp_sap_ctx; As in multi SSR test, memory leak detection is disabled in recovery mode, it is a little late to get the issue moment. Check gp_sap_ctx after stopping all adapter in hdd_is_interface_down_during_ssr. Change-Id: I77708d296fb218ca53ac656f844d02f58e23d241 CRs-Fixed: 2377718
This commit is contained in:
parent
42e263af4d
commit
b5fb05be39
3 changed files with 29 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2019 The Linux Foundation. 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
|
||||
|
|
@ -1378,6 +1378,9 @@ static void hdd_is_interface_down_during_ssr(struct hdd_context *hdd_ctx)
|
|||
adapter = pnext;
|
||||
}
|
||||
|
||||
if (!wlansap_is_gp_sap_ctx_empty())
|
||||
QDF_DEBUG_PANIC("gp_sap_ctx leak");
|
||||
|
||||
hdd_exit();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -799,6 +799,14 @@ bool wlansap_is_channel_in_nol_list(struct sap_context *sap_ctx,
|
|||
uint8_t channelNumber,
|
||||
ePhyChanBondState chanBondState);
|
||||
|
||||
/**
|
||||
* wlansap_is_gp_sap_ctx_empty() - This API checks if gp_sap_ctx
|
||||
* is empty
|
||||
*
|
||||
* Return: TRUE if empty, FALSE otherwise
|
||||
*/
|
||||
bool wlansap_is_gp_sap_ctx_empty(void);
|
||||
|
||||
/**
|
||||
* wlansap_is_channel_leaking_in_nol() - This API checks if channel is leaking
|
||||
* in nol list
|
||||
|
|
|
|||
|
|
@ -369,6 +369,23 @@ bool wlansap_is_channel_in_nol_list(struct sap_context *sap_ctx,
|
|||
chanBondState);
|
||||
}
|
||||
|
||||
bool wlansap_is_gp_sap_ctx_empty(void)
|
||||
{
|
||||
int8_t i;
|
||||
bool is_empty = TRUE;
|
||||
|
||||
qdf_mutex_acquire(&sap_context_lock);
|
||||
for (i = 0; i < SAP_MAX_NUM_SESSION; i++) {
|
||||
if (NULL != gp_sap_ctx[i]) {
|
||||
is_empty = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
qdf_mutex_release(&sap_context_lock);
|
||||
|
||||
return is_empty;
|
||||
}
|
||||
|
||||
static QDF_STATUS wlansap_mark_leaking_channel(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t *leakage_adjusted_lst,
|
||||
uint8_t chan_bw)
|
||||
|
|
|
|||
Loading…
Reference in a new issue