qcacld-3.0: Send connectivity logs only for STA mode
Connectivity management frame logs are sent for SAP mode also but should be sent for STA mode only. Send connectivity/roaming logs only for station mode. Change-Id: Ib9ae7824f7eca61fdce4c2c163a24554e7b2eb36 CRs-Fixed: 3165658
This commit is contained in:

committed by
Madan Koyyalamudi

parent
e5bb379ee3
commit
03337a051c
@@ -356,6 +356,7 @@ struct wlan_cl_osif_cbks {
|
|||||||
/**
|
/**
|
||||||
* struct wlan_connectivity_log_buf_data - Master structure to hold the
|
* struct wlan_connectivity_log_buf_data - Master structure to hold the
|
||||||
* pointers to the ring buffers.
|
* pointers to the ring buffers.
|
||||||
|
* @psoc: Global psoc pointer
|
||||||
* @osif_cbks: OSIF callbacks
|
* @osif_cbks: OSIF callbacks
|
||||||
* @osif_cb_context: Pointer to the context to be passed to OSIF
|
* @osif_cb_context: Pointer to the context to be passed to OSIF
|
||||||
* callback
|
* callback
|
||||||
@@ -372,6 +373,7 @@ struct wlan_cl_osif_cbks {
|
|||||||
* @is_active: If the global buffer is initialized or not
|
* @is_active: If the global buffer is initialized or not
|
||||||
*/
|
*/
|
||||||
struct wlan_connectivity_log_buf_data {
|
struct wlan_connectivity_log_buf_data {
|
||||||
|
struct wlan_objmgr_psoc *psoc;
|
||||||
struct wlan_cl_osif_cbks osif_cbks;
|
struct wlan_cl_osif_cbks osif_cbks;
|
||||||
void *osif_cb_context;
|
void *osif_cb_context;
|
||||||
uint64_t first_record_timestamp_in_last_sec;
|
uint64_t first_record_timestamp_in_last_sec;
|
||||||
@@ -402,12 +404,14 @@ struct wlan_connectivity_log_buf_data {
|
|||||||
/**
|
/**
|
||||||
* wlan_connectivity_logging_start() - Initialize the connectivity/roaming
|
* wlan_connectivity_logging_start() - Initialize the connectivity/roaming
|
||||||
* logging buffer
|
* logging buffer
|
||||||
|
* @psoc: Global psoc pointer
|
||||||
* @osif_cbks: OSIF callbacks
|
* @osif_cbks: OSIF callbacks
|
||||||
* @osif_cbk_context: OSIF callback context argument
|
* @osif_cbk_context: OSIF callback context argument
|
||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
void wlan_connectivity_logging_start(struct wlan_cl_osif_cbks *osif_cbks,
|
void wlan_connectivity_logging_start(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct wlan_cl_osif_cbks *osif_cbks,
|
||||||
void *osif_cb_context);
|
void *osif_cb_context);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -463,7 +467,8 @@ wlan_connectivity_mgmt_event(struct wlan_frame_hdr *mac_hdr,
|
|||||||
enum wlan_main_tag tag);
|
enum wlan_main_tag tag);
|
||||||
#else
|
#else
|
||||||
static inline
|
static inline
|
||||||
void wlan_connectivity_logging_start(struct wlan_cl_osif_cbks *osif_cbks,
|
void wlan_connectivity_logging_start(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct wlan_cl_osif_cbks *osif_cbks,
|
||||||
void *osif_cb_context)
|
void *osif_cb_context)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
@@ -37,7 +37,8 @@ wlan_connectivity_logging_register_callbacks(
|
|||||||
global_cl.osif_cb_context = osif_cb_context;
|
global_cl.osif_cb_context = osif_cb_context;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wlan_connectivity_logging_start(struct wlan_cl_osif_cbks *osif_cbks,
|
void wlan_connectivity_logging_start(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct wlan_cl_osif_cbks *osif_cbks,
|
||||||
void *osif_cb_context)
|
void *osif_cb_context)
|
||||||
{
|
{
|
||||||
global_cl.head = qdf_mem_valloc(sizeof(*global_cl.head) *
|
global_cl.head = qdf_mem_valloc(sizeof(*global_cl.head) *
|
||||||
@@ -47,6 +48,7 @@ void wlan_connectivity_logging_start(struct wlan_cl_osif_cbks *osif_cbks,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
global_cl.psoc = psoc;
|
||||||
global_cl.write_idx = 0;
|
global_cl.write_idx = 0;
|
||||||
global_cl.read_idx = 0;
|
global_cl.read_idx = 0;
|
||||||
|
|
||||||
@@ -69,6 +71,7 @@ void wlan_connectivity_logging_stop(void)
|
|||||||
|
|
||||||
qdf_spin_lock_bh(&global_cl.write_ptr_lock);
|
qdf_spin_lock_bh(&global_cl.write_ptr_lock);
|
||||||
|
|
||||||
|
global_cl.psoc = NULL;
|
||||||
global_cl.osif_cb_context = NULL;
|
global_cl.osif_cb_context = NULL;
|
||||||
global_cl.osif_cbks.wlan_connectivity_log_send_to_usr = NULL;
|
global_cl.osif_cbks.wlan_connectivity_log_send_to_usr = NULL;
|
||||||
|
|
||||||
@@ -147,7 +150,9 @@ static bool wlan_logging_is_queue_empty(void)
|
|||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
wlan_connectivity_log_enqueue(struct wlan_log_record *new_record)
|
wlan_connectivity_log_enqueue(struct wlan_log_record *new_record)
|
||||||
{
|
{
|
||||||
|
struct wlan_objmgr_vdev *vdev;
|
||||||
struct wlan_log_record *write_block;
|
struct wlan_log_record *write_block;
|
||||||
|
enum QDF_OPMODE opmode;
|
||||||
|
|
||||||
if (!new_record) {
|
if (!new_record) {
|
||||||
logging_debug("NULL entry");
|
logging_debug("NULL entry");
|
||||||
@@ -160,6 +165,20 @@ wlan_connectivity_log_enqueue(struct wlan_log_record *new_record)
|
|||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(global_cl.psoc,
|
||||||
|
new_record->vdev_id,
|
||||||
|
WLAN_MLME_OBJMGR_ID);
|
||||||
|
if (!vdev) {
|
||||||
|
logging_debug("invalid vdev:%d", new_record->vdev_id);
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
opmode = wlan_vdev_mlme_get_opmode(vdev);
|
||||||
|
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_OBJMGR_ID);
|
||||||
|
|
||||||
|
if (opmode != QDF_STA_MODE)
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This API writes to the logging buffer if the buffer is not full.
|
* This API writes to the logging buffer if the buffer is not full.
|
||||||
* 1. Acquire the write spinlock.
|
* 1. Acquire the write spinlock.
|
||||||
|
@@ -1240,7 +1240,7 @@ void wlan_hdd_start_connectivity_logging(struct hdd_context *hdd_ctx)
|
|||||||
|
|
||||||
hdd_cb.wlan_connectivity_log_send_to_usr =
|
hdd_cb.wlan_connectivity_log_send_to_usr =
|
||||||
wlan_hdd_send_connectivity_log_to_user;
|
wlan_hdd_send_connectivity_log_to_user;
|
||||||
wlan_connectivity_logging_start(&hdd_cb, hdd_ctx);
|
wlan_connectivity_logging_start(hdd_ctx->psoc, &hdd_cb, hdd_ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wlan_hdd_connectivity_event_connecting(struct hdd_context *hdd_ctx,
|
void wlan_hdd_connectivity_event_connecting(struct hdd_context *hdd_ctx,
|
||||||
|
Reference in New Issue
Block a user