qcacld-3.0: Get wlan op mode from vdev for pktlog
To avoid using qcacld code in cmn, when getting wlan op mode, using op mode info from vdev rather adapter. Change-Id: If8432aae12800884e3a4567d99319afcdfa9d1f5 CRs-Fixed: 2412315
This commit is contained in:
@@ -1541,9 +1541,9 @@ void ol_rx_pkt_dump_call(
|
|||||||
ol_txrx_pdev_handle pdev;
|
ol_txrx_pdev_handle pdev;
|
||||||
struct ol_txrx_peer_t *peer = NULL;
|
struct ol_txrx_peer_t *peer = NULL;
|
||||||
ol_txrx_pktdump_cb packetdump_cb;
|
ol_txrx_pktdump_cb packetdump_cb;
|
||||||
|
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||||
|
|
||||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||||
|
|
||||||
if (!pdev) {
|
if (!pdev) {
|
||||||
ol_txrx_err("pdev is NULL");
|
ol_txrx_err("pdev is NULL");
|
||||||
return;
|
return;
|
||||||
@@ -1556,8 +1556,10 @@ void ol_rx_pkt_dump_call(
|
|||||||
}
|
}
|
||||||
|
|
||||||
packetdump_cb = pdev->ol_rx_packetdump_cb;
|
packetdump_cb = pdev->ol_rx_packetdump_cb;
|
||||||
if (packetdump_cb)
|
if (packetdump_cb &&
|
||||||
packetdump_cb(msdu, status, peer->vdev->vdev_id, RX_DATA_PKT);
|
wlan_op_mode_sta == peer->vdev->opmode)
|
||||||
|
packetdump_cb(soc, (struct cdp_vdev *)peer->vdev,
|
||||||
|
msdu, status, RX_DATA_PKT);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -759,7 +759,10 @@ ol_tx_completion_handler(ol_txrx_pdev_handle pdev,
|
|||||||
struct ol_tx_desc_t *tx_desc;
|
struct ol_tx_desc_t *tx_desc;
|
||||||
uint32_t byte_cnt = 0;
|
uint32_t byte_cnt = 0;
|
||||||
qdf_nbuf_t netbuf;
|
qdf_nbuf_t netbuf;
|
||||||
|
#if !defined(REMOVE_PKT_LOG)
|
||||||
ol_txrx_pktdump_cb packetdump_cb;
|
ol_txrx_pktdump_cb packetdump_cb;
|
||||||
|
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||||
|
#endif
|
||||||
uint32_t is_tx_desc_freed = 0;
|
uint32_t is_tx_desc_freed = 0;
|
||||||
struct htt_tx_compl_ind_append_tx_tstamp *txtstamp_list = NULL;
|
struct htt_tx_compl_ind_append_tx_tstamp *txtstamp_list = NULL;
|
||||||
u_int32_t *msg_word = (u_int32_t *)msg;
|
u_int32_t *msg_word = (u_int32_t *)msg;
|
||||||
@@ -810,12 +813,15 @@ ol_tx_completion_handler(ol_txrx_pdev_handle pdev,
|
|||||||
status);
|
status);
|
||||||
ol_tx_update_ack_count(tx_desc, status);
|
ol_tx_update_ack_count(tx_desc, status);
|
||||||
|
|
||||||
|
#if !defined(REMOVE_PKT_LOG)
|
||||||
if (tx_desc->pkt_type != OL_TX_FRM_TSO) {
|
if (tx_desc->pkt_type != OL_TX_FRM_TSO) {
|
||||||
packetdump_cb = pdev->ol_tx_packetdump_cb;
|
packetdump_cb = pdev->ol_tx_packetdump_cb;
|
||||||
if (packetdump_cb)
|
if (packetdump_cb)
|
||||||
packetdump_cb(netbuf, status,
|
packetdump_cb(soc,
|
||||||
tx_desc->vdev_id, TX_DATA_PKT);
|
(struct cdp_vdev *)tx_desc->vdev,
|
||||||
|
netbuf, status, TX_DATA_PKT);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
DPTRACE(qdf_dp_trace_ptr(netbuf,
|
DPTRACE(qdf_dp_trace_ptr(netbuf,
|
||||||
QDF_DP_TRACE_FREE_PACKET_PTR_RECORD,
|
QDF_DP_TRACE_FREE_PACKET_PTR_RECORD,
|
||||||
@@ -1032,7 +1038,10 @@ ol_tx_single_completion_handler(ol_txrx_pdev_handle pdev,
|
|||||||
{
|
{
|
||||||
struct ol_tx_desc_t *tx_desc;
|
struct ol_tx_desc_t *tx_desc;
|
||||||
qdf_nbuf_t netbuf;
|
qdf_nbuf_t netbuf;
|
||||||
|
#if !defined(REMOVE_PKT_LOG)
|
||||||
ol_txrx_pktdump_cb packetdump_cb;
|
ol_txrx_pktdump_cb packetdump_cb;
|
||||||
|
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||||
|
#endif
|
||||||
|
|
||||||
tx_desc = ol_tx_desc_find_check(pdev, tx_desc_id);
|
tx_desc = ol_tx_desc_find_check(pdev, tx_desc_id);
|
||||||
if (tx_desc == NULL) {
|
if (tx_desc == NULL) {
|
||||||
@@ -1047,10 +1056,12 @@ ol_tx_single_completion_handler(ol_txrx_pdev_handle pdev,
|
|||||||
/* Do one shot statistics */
|
/* Do one shot statistics */
|
||||||
TXRX_STATS_UPDATE_TX_STATS(pdev, status, 1, qdf_nbuf_len(netbuf));
|
TXRX_STATS_UPDATE_TX_STATS(pdev, status, 1, qdf_nbuf_len(netbuf));
|
||||||
|
|
||||||
|
#if !defined(REMOVE_PKT_LOG)
|
||||||
packetdump_cb = pdev->ol_tx_packetdump_cb;
|
packetdump_cb = pdev->ol_tx_packetdump_cb;
|
||||||
if (packetdump_cb)
|
if (packetdump_cb)
|
||||||
packetdump_cb(netbuf, status,
|
packetdump_cb(soc, (struct cdp_vdev *)tx_desc->vdev,
|
||||||
tx_desc->vdev->vdev_id, TX_MGMT_PKT);
|
netbuf, status, TX_MGMT_PKT);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (OL_TX_DESC_NO_REFS(tx_desc)) {
|
if (OL_TX_DESC_NO_REFS(tx_desc)) {
|
||||||
ol_tx_desc_frame_free_nonstd(pdev, tx_desc,
|
ol_tx_desc_frame_free_nonstd(pdev, tx_desc,
|
||||||
|
@@ -425,8 +425,6 @@
|
|||||||
|
|
||||||
typedef void (*txFailIndCallback)(uint8_t *peer_mac, uint8_t seqNo);
|
typedef void (*txFailIndCallback)(uint8_t *peer_mac, uint8_t seqNo);
|
||||||
|
|
||||||
typedef void (*tp_wma_packetdump_cb)(qdf_nbuf_t netbuf,
|
|
||||||
uint8_t status, uint8_t vdev_id, uint8_t type);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enum wma_rx_exec_ctx - wma rx execution context
|
* enum wma_rx_exec_ctx - wma rx execution context
|
||||||
@@ -1212,8 +1210,8 @@ typedef struct {
|
|||||||
bool fw_timeout_crash;
|
bool fw_timeout_crash;
|
||||||
bool sub_20_support;
|
bool sub_20_support;
|
||||||
bool is_dfs_offloaded;
|
bool is_dfs_offloaded;
|
||||||
tp_wma_packetdump_cb wma_mgmt_tx_packetdump_cb;
|
ol_txrx_pktdump_cb wma_mgmt_tx_packetdump_cb;
|
||||||
tp_wma_packetdump_cb wma_mgmt_rx_packetdump_cb;
|
ol_txrx_pktdump_cb wma_mgmt_rx_packetdump_cb;
|
||||||
bool rcpi_enabled;
|
bool rcpi_enabled;
|
||||||
tSirLLStatsResults *link_stats_results;
|
tSirLLStatsResults *link_stats_results;
|
||||||
uint64_t tx_fail_cnt;
|
uint64_t tx_fail_cnt;
|
||||||
@@ -1958,8 +1956,8 @@ QDF_STATUS wma_start_oem_data_req(tp_wma_handle wma_handle,
|
|||||||
QDF_STATUS wma_enable_disable_caevent_ind(tp_wma_handle wma_handle,
|
QDF_STATUS wma_enable_disable_caevent_ind(tp_wma_handle wma_handle,
|
||||||
uint8_t val);
|
uint8_t val);
|
||||||
void wma_register_packetdump_callback(
|
void wma_register_packetdump_callback(
|
||||||
tp_wma_packetdump_cb wma_mgmt_tx_packetdump_cb,
|
ol_txrx_pktdump_cb wma_mgmt_tx_packetdump_cb,
|
||||||
tp_wma_packetdump_cb wma_mgmt_rx_packetdump_cb);
|
ol_txrx_pktdump_cb wma_mgmt_rx_packetdump_cb);
|
||||||
void wma_deregister_packetdump_callback(void);
|
void wma_deregister_packetdump_callback(void);
|
||||||
void wma_update_sta_inactivity_timeout(tp_wma_handle wma,
|
void wma_update_sta_inactivity_timeout(tp_wma_handle wma,
|
||||||
struct sme_sta_inactivity_timeout *sta_inactivity_timer);
|
struct sme_sta_inactivity_timeout *sta_inactivity_timer);
|
||||||
|
@@ -3248,9 +3248,13 @@ static int wma_process_mgmt_tx_completion(tp_wma_handle wma_handle,
|
|||||||
{
|
{
|
||||||
struct wlan_objmgr_pdev *pdev;
|
struct wlan_objmgr_pdev *pdev;
|
||||||
qdf_nbuf_t buf = NULL;
|
qdf_nbuf_t buf = NULL;
|
||||||
uint8_t vdev_id = 0;
|
|
||||||
QDF_STATUS ret;
|
QDF_STATUS ret;
|
||||||
tp_wma_packetdump_cb packetdump_cb;
|
#if !defined(REMOVE_PKT_LOG)
|
||||||
|
uint8_t vdev_id = 0;
|
||||||
|
struct cdp_vdev *txrx_vdev;
|
||||||
|
ol_txrx_pktdump_cb packetdump_cb;
|
||||||
|
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (wma_handle == NULL) {
|
if (wma_handle == NULL) {
|
||||||
WMA_LOGE("%s: wma handle is NULL", __func__);
|
WMA_LOGE("%s: wma handle is NULL", __func__);
|
||||||
@@ -3267,15 +3271,19 @@ static int wma_process_mgmt_tx_completion(tp_wma_handle wma_handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
buf = mgmt_txrx_get_nbuf(pdev, desc_id);
|
buf = mgmt_txrx_get_nbuf(pdev, desc_id);
|
||||||
vdev_id = mgmt_txrx_get_vdev_id(pdev, desc_id);
|
|
||||||
|
|
||||||
if (buf)
|
if (buf)
|
||||||
wma_mgmt_unmap_buf(wma_handle, buf);
|
wma_mgmt_unmap_buf(wma_handle, buf);
|
||||||
|
|
||||||
|
#if !defined(REMOVE_PKT_LOG)
|
||||||
|
vdev_id = mgmt_txrx_get_vdev_id(pdev, desc_id);
|
||||||
|
txrx_vdev = wma_find_vdev_by_id(wma_handle, vdev_id);
|
||||||
packetdump_cb = wma_handle->wma_mgmt_tx_packetdump_cb;
|
packetdump_cb = wma_handle->wma_mgmt_tx_packetdump_cb;
|
||||||
if (packetdump_cb)
|
if (packetdump_cb)
|
||||||
packetdump_cb(buf, QDF_STATUS_SUCCESS,
|
packetdump_cb(soc, txrx_vdev,
|
||||||
vdev_id, TX_MGMT_PKT);
|
buf, QDF_STATUS_SUCCESS, TX_MGMT_PKT);
|
||||||
|
#endif
|
||||||
|
|
||||||
ret = mgmt_txrx_tx_completion_handler(pdev, desc_id, status, NULL);
|
ret = mgmt_txrx_tx_completion_handler(pdev, desc_id, status, NULL);
|
||||||
|
|
||||||
@@ -4028,7 +4036,11 @@ int wma_form_rx_packet(qdf_nbuf_t buf,
|
|||||||
int status;
|
int status;
|
||||||
tp_wma_handle wma_handle = (tp_wma_handle)
|
tp_wma_handle wma_handle = (tp_wma_handle)
|
||||||
cds_get_context(QDF_MODULE_ID_WMA);
|
cds_get_context(QDF_MODULE_ID_WMA);
|
||||||
tp_wma_packetdump_cb packetdump_cb;
|
#if !defined(REMOVE_PKT_LOG)
|
||||||
|
ol_txrx_pktdump_cb packetdump_cb;
|
||||||
|
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||||
|
struct cdp_vdev *txrx_vdev;
|
||||||
|
#endif
|
||||||
static uint8_t limit_prints_invalid_len = RATE_LIMIT - 1;
|
static uint8_t limit_prints_invalid_len = RATE_LIMIT - 1;
|
||||||
static uint8_t limit_prints_load_unload = RATE_LIMIT - 1;
|
static uint8_t limit_prints_load_unload = RATE_LIMIT - 1;
|
||||||
static uint8_t limit_prints_recovery = RATE_LIMIT - 1;
|
static uint8_t limit_prints_recovery = RATE_LIMIT - 1;
|
||||||
@@ -4199,13 +4211,16 @@ int wma_form_rx_packet(qdf_nbuf_t buf,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(REMOVE_PKT_LOG)
|
||||||
packetdump_cb = wma_handle->wma_mgmt_rx_packetdump_cb;
|
packetdump_cb = wma_handle->wma_mgmt_rx_packetdump_cb;
|
||||||
|
txrx_vdev = wma_find_vdev_by_id(wma_handle,
|
||||||
|
rx_pkt->pkt_meta.session_id);
|
||||||
if ((mgt_type == IEEE80211_FC0_TYPE_MGT &&
|
if ((mgt_type == IEEE80211_FC0_TYPE_MGT &&
|
||||||
mgt_subtype != MGMT_SUBTYPE_BEACON) &&
|
mgt_subtype != MGMT_SUBTYPE_BEACON) &&
|
||||||
packetdump_cb)
|
packetdump_cb)
|
||||||
packetdump_cb(rx_pkt->pkt_buf, QDF_STATUS_SUCCESS,
|
packetdump_cb(soc, txrx_vdev, rx_pkt->pkt_buf,
|
||||||
rx_pkt->pkt_meta.session_id, RX_MGMT_PKT);
|
QDF_STATUS_SUCCESS, RX_MGMT_PKT);
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4453,8 +4468,8 @@ QDF_STATUS wma_register_mgmt_frm_client(void)
|
|||||||
/**
|
/**
|
||||||
* wma_register_packetdump_callback() - stores tx and rx mgmt packet dump
|
* wma_register_packetdump_callback() - stores tx and rx mgmt packet dump
|
||||||
* callback handler
|
* callback handler
|
||||||
* @wma_mgmt_tx_packetdump_cb: tx mgmt packetdump cb
|
* @tx_cb: tx mgmt packetdump cb
|
||||||
* @wma_mgmt_rx_packetdump_cb: rx mgmt packetdump cb
|
* @rx_cb: rx mgmt packetdump cb
|
||||||
*
|
*
|
||||||
* This function is used to store tx and rx mgmt. packet dump callback
|
* This function is used to store tx and rx mgmt. packet dump callback
|
||||||
*
|
*
|
||||||
@@ -4462,8 +4477,8 @@ QDF_STATUS wma_register_mgmt_frm_client(void)
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void wma_register_packetdump_callback(
|
void wma_register_packetdump_callback(
|
||||||
tp_wma_packetdump_cb wma_mgmt_tx_packetdump_cb,
|
ol_txrx_pktdump_cb tx_cb,
|
||||||
tp_wma_packetdump_cb wma_mgmt_rx_packetdump_cb)
|
ol_txrx_pktdump_cb rx_cb)
|
||||||
{
|
{
|
||||||
tp_wma_handle wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
tp_wma_handle wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
||||||
|
|
||||||
@@ -4472,8 +4487,8 @@ void wma_register_packetdump_callback(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
wma_handle->wma_mgmt_tx_packetdump_cb = wma_mgmt_tx_packetdump_cb;
|
wma_handle->wma_mgmt_tx_packetdump_cb = tx_cb;
|
||||||
wma_handle->wma_mgmt_rx_packetdump_cb = wma_mgmt_rx_packetdump_cb;
|
wma_handle->wma_mgmt_rx_packetdump_cb = rx_cb;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user