qcacld-3.0: Process pkt_capture APIs based on packet capture mode
Process pkt_capture APIs only if packet capture mode is present. Change-Id: Ibf08e550a829c266fd108c0023c016ab36728589 CRs-Fixed: 2640309
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
a14d64d378
commit
25a77e7f71
@@ -159,10 +159,8 @@ pkt_capture_get_pktcap_mode(struct wlan_objmgr_psoc *psoc)
|
||||
vdev = wlan_objmgr_get_vdev_by_opmode_from_psoc(psoc,
|
||||
QDF_STA_MODE,
|
||||
WLAN_PKT_CAPTURE_ID);
|
||||
if (!vdev) {
|
||||
pkt_capture_err("vdev is NULL");
|
||||
if (!vdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
vdev_priv = pkt_capture_vdev_get_priv(vdev);
|
||||
if (!vdev_priv)
|
||||
|
@@ -201,10 +201,9 @@ pkt_capture_process_mgmt_tx_data(struct wlan_objmgr_pdev *pdev,
|
||||
vdev = wlan_objmgr_get_vdev_by_macaddr_from_pdev(pdev,
|
||||
wh->i_addr2,
|
||||
WLAN_PKT_CAPTURE_ID);
|
||||
if (!vdev) {
|
||||
pkt_capture_err("vdev is NULL");
|
||||
if (!vdev)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
vdev_id = wlan_vdev_get_id(vdev);
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_PKT_CAPTURE_ID);
|
||||
|
||||
|
@@ -1454,6 +1454,8 @@ static void hdd_send_association_event(struct net_device *dev,
|
||||
/* start timer in sta/p2p_cli */
|
||||
hdd_bus_bw_compute_prev_txrx_stats(adapter);
|
||||
hdd_bus_bw_compute_timer_start(hdd_ctx);
|
||||
|
||||
if (ucfg_pkt_capture_get_pktcap_mode(hdd_ctx->psoc))
|
||||
ucfg_pkt_capture_record_channel(adapter->vdev);
|
||||
} else if (eConnectionState_IbssConnected == /* IBss Associated */
|
||||
sta_ctx->conn_info.conn_state) {
|
||||
|
@@ -2905,6 +2905,7 @@ void lim_process_switch_channel_rsp(struct mac_context *mac,
|
||||
pe_session->send_p2p_conf_frame = true;
|
||||
}
|
||||
|
||||
if (ucfg_pkt_capture_get_pktcap_mode(mac->psoc))
|
||||
ucfg_pkt_capture_record_channel(pe_session->vdev);
|
||||
break;
|
||||
case LIM_SWITCH_CHANNEL_SAP_DFS:
|
||||
@@ -2932,6 +2933,7 @@ void lim_process_switch_channel_rsp(struct mac_context *mac,
|
||||
*/
|
||||
policy_mgr_update_connection_info(mac->psoc,
|
||||
pe_session->smeSessionId);
|
||||
if (ucfg_pkt_capture_get_pktcap_mode(mac->psoc))
|
||||
ucfg_pkt_capture_record_channel(pe_session->vdev);
|
||||
break;
|
||||
default:
|
||||
|
@@ -21402,6 +21402,8 @@ static QDF_STATUS csr_process_roam_sync_callback(struct mac_context *mac_ctx,
|
||||
session->roam_synch_in_progress = false;
|
||||
csr_check_and_set_sae_single_pmk_cap(mac_ctx, session,
|
||||
session_id);
|
||||
|
||||
if (ucfg_pkt_capture_get_pktcap_mode(mac_ctx->psoc))
|
||||
ucfg_pkt_capture_record_channel(vdev);
|
||||
|
||||
if (WLAN_REG_IS_5GHZ_CH_FREQ(bss_desc->chan_freq)) {
|
||||
|
@@ -2797,7 +2797,8 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
|
||||
WLAN_MGMT_NB_ID);
|
||||
}
|
||||
|
||||
if (ucfg_pkt_capture_get_pktcap_mode(psoc)) {
|
||||
if (ucfg_pkt_capture_get_pktcap_mode(psoc) &&
|
||||
PKT_CAPTURE_MODE_MGMT_ONLY) {
|
||||
ucfg_pkt_capture_mgmt_tx(wma_handle->pdev,
|
||||
tx_frame,
|
||||
wma_handle->interfaces[vdev_id].mhz,
|
||||
|
Reference in New Issue
Block a user