qcacld-3.0: Fix memory allocation latency in beacon process

This is mirror change for 0f9f01950

Currently if the number of APs in the STA environment
are many, then the STA will receive many beacons, whose
beacon process path can take long time, in the kernel
work queue, hence the other processes have to wait
for them to complete, and may get timeout, if the
the time to process the beaocns is larger than their
process timeout.
Fix is to :-
1. Add rate limit to failure conditions of memory
not allocated
2. Make memory allocation in path of beacon process
atomic.

Change-Id: I488b446c23fd01c993f7dd9bd989867fda2331d8
CRs-Fixed: 2363307
This commit is contained in:
gaurank kathpalia
2018-12-08 08:13:38 +08:00
committed by nshrivas
parent 4426f7852d
commit b3645e79ae
4 changed files with 14 additions and 8 deletions

View File

@@ -44,6 +44,9 @@
QDF_TRACE_WARN(QDF_MODULE_ID_P2P, params)
#define p2p_err(params ...) \
QDF_TRACE_ERROR(QDF_MODULE_ID_P2P, params)
#define p2p_debug_rl(params...) \
QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_P2P, params)
#define p2p_alert(params ...) \
QDF_TRACE_FATAL(QDF_MODULE_ID_P2P, params)

View File

@@ -331,17 +331,17 @@ QDF_STATUS tgt_p2p_mgmt_frame_rx_cb(struct wlan_objmgr_psoc *psoc,
vdev_id = wlan_vdev_get_id(vdev);
}
rx_mgmt_event = qdf_mem_malloc(sizeof(*rx_mgmt_event));
rx_mgmt_event = qdf_mem_malloc_atomic(sizeof(*rx_mgmt_event));
if (!rx_mgmt_event) {
p2p_err("Failed to allocate rx mgmt event");
p2p_debug_rl("Failed to allocate rx mgmt event");
qdf_nbuf_free(buf);
return QDF_STATUS_E_NOMEM;
}
rx_mgmt = qdf_mem_malloc(sizeof(*rx_mgmt) +
rx_mgmt = qdf_mem_malloc_atomic(sizeof(*rx_mgmt) +
mgmt_rx_params->buf_len);
if (!rx_mgmt) {
p2p_err("Failed to allocate rx mgmt frame");
p2p_debug_rl("Failed to allocate rx mgmt frame");
qdf_nbuf_free(buf);
return QDF_STATUS_E_NOMEM;
}

View File

@@ -59,6 +59,9 @@
#define tdls_debug(params...) \
QDF_TRACE_DEBUG(QDF_MODULE_ID_TDLS, params)
#define tdls_debug_rl(params...) \
QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_TDLS, params)
#define tdls_notice(params...) \
QDF_TRACE_INFO(QDF_MODULE_ID_TDLS, params)
#define tdls_warn(params...) \

View File

@@ -289,16 +289,16 @@ QDF_STATUS tgt_tdls_mgmt_frame_process_rx_cb(
vdev_id = wlan_vdev_get_id(vdev);
}
rx_mgmt_event = qdf_mem_malloc(sizeof(*rx_mgmt_event));
rx_mgmt_event = qdf_mem_malloc_atomic(sizeof(*rx_mgmt_event));
if (!rx_mgmt_event) {
tdls_err("Failed to allocate rx mgmt event");
tdls_debug_rl("Failed to allocate rx mgmt event");
return QDF_STATUS_E_NOMEM;
}
rx_mgmt = qdf_mem_malloc(sizeof(*rx_mgmt) +
rx_mgmt = qdf_mem_malloc_atomic(sizeof(*rx_mgmt) +
mgmt_rx_params->buf_len);
if (!rx_mgmt) {
tdls_err("Failed to allocate rx mgmt frame");
tdls_debug_rl("Failed to allocate rx mgmt frame");
qdf_mem_free(rx_mgmt_event);
return QDF_STATUS_E_NOMEM;
}