qcacld-3.0: Stop connectivity logging after stop modules
When wifi is turned off, if the connectivity logging queue is not empty, the wlan logging thread tries to dequeue the record and send the logging event to the userspace. While performing dequeue operation, the records from queue are copied to temporary buffer before read pointer is incremented. There could be a condition where this buffer is allocated in ini domain after stop modules is done and freed in active domain if the wlan_logging thread is preempted during stop modules. So to avoid this domain mismatch, start the queue only if start_modules is done and stop the queue after stop modules to avoid dequeue being done during/after stop modules. Change-Id: Ied8c36b19bc66474d3c4d8f913f3e3dbf9a574a0 CRs-Fixed: 3035644
This commit is contained in:

committad av
Madan Koyyalamudi

förälder
9bb838865c
incheckning
f5c868fc78
@@ -25,14 +25,14 @@
|
||||
|
||||
#ifdef WLAN_FEATURE_CONNECTIVITY_LOGGING
|
||||
/**
|
||||
* wlan_hdd_init_connectivity_logging() - Initialize logging callbacks
|
||||
* wlan_hdd_start_connectivity_logging() - Initialize logging callbacks
|
||||
* and allocate global buffers
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void wlan_hdd_init_connectivity_logging(void);
|
||||
void wlan_hdd_start_connectivity_logging(void);
|
||||
#else
|
||||
static inline
|
||||
void wlan_hdd_init_connectivity_logging(void)
|
||||
void wlan_hdd_start_connectivity_logging(void)
|
||||
{}
|
||||
#endif
|
||||
|
@@ -47,11 +47,11 @@ wlan_hdd_send_connectivity_log_to_user(struct wlan_log_record *rec,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
void wlan_hdd_init_connectivity_logging(void)
|
||||
void wlan_hdd_start_connectivity_logging(void)
|
||||
{
|
||||
struct wlan_cl_hdd_cbks hdd_cb;
|
||||
|
||||
hdd_cb.wlan_connectivity_log_send_to_usr =
|
||||
wlan_hdd_send_connectivity_log_to_user;
|
||||
wlan_connectivity_logging_init(&hdd_cb);
|
||||
wlan_connectivity_logging_start(&hdd_cb);
|
||||
}
|
||||
|
@@ -4446,6 +4446,8 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, bool reinit)
|
||||
hdd_set_hif_init_phase(hif_ctx, false);
|
||||
hdd_hif_set_enable_detection(hif_ctx, true);
|
||||
|
||||
wlan_hdd_start_connectivity_logging();
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -14280,6 +14282,8 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode)
|
||||
epping_close();
|
||||
}
|
||||
|
||||
wlan_connectivity_logging_stop();
|
||||
|
||||
ucfg_ipa_component_config_free();
|
||||
hdd_hif_close(hdd_ctx, hif_ctx);
|
||||
|
||||
@@ -15998,7 +16002,6 @@ int hdd_init(void)
|
||||
hdd_trace_init();
|
||||
hdd_register_debug_callback();
|
||||
wlan_roam_debug_init();
|
||||
wlan_hdd_init_connectivity_logging();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -16012,7 +16015,6 @@ int hdd_init(void)
|
||||
*/
|
||||
void hdd_deinit(void)
|
||||
{
|
||||
wlan_connectivity_logging_deinit();
|
||||
wlan_roam_debug_deinit();
|
||||
|
||||
#ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
|
||||
|
Referens i nytt ärende
Block a user