qcacmn: Cleanup CFR meta version structures
Cleanup CFR metadata version structures to avoid redundant & unused definitions Change-Id: Ia8b8234a38455f8c976600ef40c0a56c7bf66a53
This commit is contained in:

کامیت شده توسط
Madan Koyyalamudi

والد
e015d42c1c
کامیت
e0b5142fdc
@@ -309,8 +309,8 @@ static bool cfr_dbr_event_handler(struct wlan_objmgr_pdev *pdev,
|
||||
qdf_mem_copy(&lut->dma_hdr, &dma_hdr, sizeof(struct whal_cfir_dma_hdr));
|
||||
|
||||
header = &lut->header;
|
||||
header->u.meta_v4.channel_bw = dma_hdr.upload_pkt_bw;
|
||||
header->u.meta_v4.length = length;
|
||||
header->u.meta_dbr.channel_bw = dma_hdr.upload_pkt_bw;
|
||||
header->u.meta_dbr.length = length;
|
||||
status = correlate_and_relay(pdev, cookie, lut,
|
||||
CORRELATE_DBR_MODULE_ID);
|
||||
if (status == STATUS_STREAM_AND_RELEASE) {
|
||||
@@ -400,9 +400,9 @@ void prepare_cfr_header_txstatus(wmi_cfr_peer_tx_event_param *tx_evt_param,
|
||||
uint32_t target_type)
|
||||
{
|
||||
target_if_cfr_fill_header(header, false, target_type, false);
|
||||
header->u.meta_v4.status = 0; /* failure */
|
||||
header->u.meta_v4.length = 0;
|
||||
qdf_mem_copy(&header->u.meta_v4.peer_addr[0],
|
||||
header->u.meta_dbr.status = 0; /* failure */
|
||||
header->u.meta_dbr.length = 0;
|
||||
qdf_mem_copy(&header->u.meta_dbr.peer_addr[0],
|
||||
&tx_evt_param->peer_mac_addr.bytes[0], QDF_MAC_ADDR_SIZE);
|
||||
}
|
||||
|
||||
@@ -552,35 +552,35 @@ target_if_peer_capture_event(ol_scn_t sc, uint8_t *data, uint32_t datalen)
|
||||
|
||||
target_if_cfr_fill_header(header, false, target_type, false);
|
||||
|
||||
header->u.meta_v4.status = (tx_evt_param.status &
|
||||
header->u.meta_dbr.status = (tx_evt_param.status &
|
||||
PEER_CFR_CAPTURE_EVT_STATUS_MASK) ?
|
||||
1 : 0;
|
||||
header->u.meta_v4.capture_bw = tx_evt_param.bandwidth;
|
||||
header->u.meta_v4.phy_mode = tx_evt_param.phy_mode;
|
||||
header->u.meta_v4.prim20_chan = tx_evt_param.primary_20mhz_chan;
|
||||
header->u.meta_v4.center_freq1 = tx_evt_param.band_center_freq1;
|
||||
header->u.meta_v4.center_freq2 = tx_evt_param.band_center_freq2;
|
||||
header->u.meta_dbr.capture_bw = tx_evt_param.bandwidth;
|
||||
header->u.meta_dbr.phy_mode = tx_evt_param.phy_mode;
|
||||
header->u.meta_dbr.prim20_chan = tx_evt_param.primary_20mhz_chan;
|
||||
header->u.meta_dbr.center_freq1 = tx_evt_param.band_center_freq1;
|
||||
header->u.meta_dbr.center_freq2 = tx_evt_param.band_center_freq2;
|
||||
/* Currently CFR data is captured on ACK of a Qos NULL frame.
|
||||
* For 20 MHz, ACK is Legacy and for 40/80/160, ACK is DUP Legacy.
|
||||
*/
|
||||
header->u.meta_v4.capture_mode = tx_evt_param.bandwidth ?
|
||||
header->u.meta_dbr.capture_mode = tx_evt_param.bandwidth ?
|
||||
CFR_DUP_LEGACY_ACK : CFR_LEGACY_ACK;
|
||||
header->u.meta_v4.capture_type = tx_evt_param.capture_method;
|
||||
header->u.meta_v4.num_rx_chain = wlan_vdev_mlme_get_rxchainmask(vdev);
|
||||
header->u.meta_v4.sts_count = tx_evt_param.spatial_streams;
|
||||
header->u.meta_v4.timestamp = tx_evt_param.timestamp_us;
|
||||
header->u.meta_v4.rx_start_ts = tx_evt_param.rx_start_ts;
|
||||
header->u.meta_v4.rtt_cfo_measurement = tx_evt_param.cfo_measurement;
|
||||
header->u.meta_dbr.capture_type = tx_evt_param.capture_method;
|
||||
header->u.meta_dbr.num_rx_chain = wlan_vdev_mlme_get_rxchainmask(vdev);
|
||||
header->u.meta_dbr.sts_count = tx_evt_param.spatial_streams;
|
||||
header->u.meta_dbr.timestamp = tx_evt_param.timestamp_us;
|
||||
header->u.meta_dbr.rx_start_ts = tx_evt_param.rx_start_ts;
|
||||
header->u.meta_dbr.rtt_cfo_measurement = tx_evt_param.cfo_measurement;
|
||||
|
||||
qdf_mem_copy(&header->u.meta_v4.agc_gain[0],
|
||||
qdf_mem_copy(&header->u.meta_dbr.agc_gain[0],
|
||||
&tx_evt_param.agc_gain[0],
|
||||
HOST_MAX_CHAINS * sizeof(tx_evt_param.agc_gain[0]));
|
||||
qdf_mem_copy(&header->u.meta_v4.peer_addr[0],
|
||||
qdf_mem_copy(&header->u.meta_dbr.peer_addr[0],
|
||||
&tx_evt_param.peer_mac_addr.bytes[0], QDF_MAC_ADDR_SIZE);
|
||||
qdf_mem_copy(&header->u.meta_v4.chain_rssi[0],
|
||||
qdf_mem_copy(&header->u.meta_dbr.chain_rssi[0],
|
||||
&tx_evt_param.chain_rssi[0],
|
||||
HOST_MAX_CHAINS * sizeof(tx_evt_param.chain_rssi[0]));
|
||||
qdf_mem_copy(&header->u.meta_v4.chain_phase[0],
|
||||
qdf_mem_copy(&header->u.meta_dbr.chain_phase[0],
|
||||
&tx_evt_param.chain_phase[0],
|
||||
HOST_MAX_CHAINS * sizeof(tx_evt_param.chain_phase[0]));
|
||||
|
||||
|
@@ -326,7 +326,7 @@ static void dump_mu_rx_info(void *mu_rx_user_info,
|
||||
static void dump_metadata(struct csi_cfr_header *header, uint32_t cookie)
|
||||
{
|
||||
uint8_t user_id, chain_id;
|
||||
struct cfr_metadata_version_5 *meta = &header->u.meta_v5;
|
||||
struct enh_cfr_metadata *meta = &header->u.meta_enh;
|
||||
uint8_t *usermac = NULL;
|
||||
|
||||
cfr_debug("<METADATA><%u>\n"
|
||||
@@ -717,7 +717,7 @@ void target_if_cfr_rx_tlv_process(struct wlan_objmgr_pdev *pdev, void *nbuf)
|
||||
int i, status = 0;
|
||||
QDF_STATUS retval = 0;
|
||||
struct wlan_lmac_if_cfr_rx_ops *cfr_rx_ops = NULL;
|
||||
struct cfr_metadata_version_5 *meta = NULL;
|
||||
struct enh_cfr_metadata *meta = NULL;
|
||||
uint8_t srng_id = 0;
|
||||
struct wlan_lmac_if_rx_ops *rx_ops;
|
||||
uint32_t target_type;
|
||||
@@ -820,7 +820,7 @@ void target_if_cfr_rx_tlv_process(struct wlan_objmgr_pdev *pdev, void *nbuf)
|
||||
lut->tx_address2 = cfr_info->rtt_che_buffer_pointer_high8;
|
||||
lut->txrx_tstamp = qdf_ktime_to_ms(qdf_ktime_get());
|
||||
header = &lut->header;
|
||||
meta = &header->u.meta_v5;
|
||||
meta = &header->u.meta_enh;
|
||||
|
||||
target_if_cfr_fill_header(header, false, target_type, true);
|
||||
|
||||
@@ -944,7 +944,7 @@ static bool enh_cfr_dbr_event_handler(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t capture_type = CFR_TYPE_METHOD_AUTO;
|
||||
uint8_t *peer_macaddr = NULL;
|
||||
struct wlan_lmac_if_cfr_rx_ops *cfr_rx_ops = NULL;
|
||||
struct cfr_metadata_version_5 *meta = NULL;
|
||||
struct enh_cfr_metadata *meta = NULL;
|
||||
struct wlan_lmac_if_rx_ops *rx_ops;
|
||||
|
||||
if ((!pdev) || (!payload)) {
|
||||
@@ -1025,7 +1025,7 @@ static bool enh_cfr_dbr_event_handler(struct wlan_objmgr_pdev *pdev,
|
||||
|
||||
header = &lut->header;
|
||||
header->cmn.chip_type = pcfr->chip_type;
|
||||
meta = &header->u.meta_v5;
|
||||
meta = &header->u.meta_enh;
|
||||
meta->channel_bw = dma_hdr.upload_pkt_bw;
|
||||
meta->num_rx_chain = NUM_CHAINS_FW_TO_HOST(dma_hdr.num_chains);
|
||||
meta->length = length;
|
||||
@@ -1186,12 +1186,12 @@ static void enh_prepare_cfr_header_txstatus(wmi_cfr_peer_tx_event_param
|
||||
uint32_t target_type)
|
||||
{
|
||||
target_if_cfr_fill_header(header, false, target_type, false);
|
||||
header->u.meta_v5.status = 0; /* failure */
|
||||
header->u.meta_v5.length = 0;
|
||||
header->u.meta_v5.rtt_cfo_measurement = tx_evt_param->cfo_measurement;
|
||||
header->u.meta_v5.rx_start_ts = tx_evt_param->rx_start_ts;
|
||||
header->u.meta_enh.status = 0; /* failure */
|
||||
header->u.meta_enh.length = 0;
|
||||
header->u.meta_enh.rtt_cfo_measurement = tx_evt_param->cfo_measurement;
|
||||
header->u.meta_enh.rx_start_ts = tx_evt_param->rx_start_ts;
|
||||
|
||||
qdf_mem_copy(&header->u.meta_v5.peer_addr.su_peer_addr[0],
|
||||
qdf_mem_copy(&header->u.meta_enh.peer_addr.su_peer_addr[0],
|
||||
&tx_evt_param->peer_mac_addr.bytes[0], QDF_MAC_ADDR_SIZE);
|
||||
}
|
||||
|
||||
@@ -1373,41 +1373,41 @@ target_if_peer_capture_event(ol_scn_t sc, uint8_t *data, uint32_t datalen)
|
||||
|
||||
header = &lut->header;
|
||||
target_if_cfr_fill_header(header, false, target_type, false);
|
||||
header->u.meta_v5.status = (tx_evt_param.status &
|
||||
PEER_CFR_CAPTURE_EVT_STATUS_MASK) ?
|
||||
1 : 0;
|
||||
header->u.meta_v5.capture_bw = tx_evt_param.bandwidth;
|
||||
header->u.meta_enh.status = (tx_evt_param.status &
|
||||
PEER_CFR_CAPTURE_EVT_STATUS_MASK) ?
|
||||
1 : 0;
|
||||
header->u.meta_enh.capture_bw = tx_evt_param.bandwidth;
|
||||
|
||||
bss_chan = wlan_vdev_mlme_get_bss_chan(vdev);
|
||||
header->u.meta_v5.phy_mode = bss_chan->ch_phymode;
|
||||
header->u.meta_enh.phy_mode = bss_chan->ch_phymode;
|
||||
|
||||
header->u.meta_v5.prim20_chan = tx_evt_param.primary_20mhz_chan;
|
||||
header->u.meta_v5.center_freq1 = tx_evt_param.band_center_freq1;
|
||||
header->u.meta_v5.center_freq2 = tx_evt_param.band_center_freq2;
|
||||
header->u.meta_enh.prim20_chan = tx_evt_param.primary_20mhz_chan;
|
||||
header->u.meta_enh.center_freq1 = tx_evt_param.band_center_freq1;
|
||||
header->u.meta_enh.center_freq2 = tx_evt_param.band_center_freq2;
|
||||
|
||||
/* Currently CFR data is captured on ACK of a Qos NULL frame.
|
||||
* For 20 MHz, ACK is Legacy and for 40/80/160, ACK is DUP Legacy.
|
||||
*/
|
||||
header->u.meta_v5.capture_mode = tx_evt_param.bandwidth ?
|
||||
header->u.meta_enh.capture_mode = tx_evt_param.bandwidth ?
|
||||
CFR_DUP_LEGACY_ACK : CFR_LEGACY_ACK;
|
||||
header->u.meta_v5.capture_type = tx_evt_param.capture_method;
|
||||
header->u.meta_v5.num_rx_chain = wlan_vdev_mlme_get_rxchainmask(vdev);
|
||||
header->u.meta_v5.sts_count = tx_evt_param.spatial_streams;
|
||||
header->u.meta_v5.timestamp = tx_evt_param.timestamp_us;
|
||||
header->u.meta_enh.capture_type = tx_evt_param.capture_method;
|
||||
header->u.meta_enh.num_rx_chain = wlan_vdev_mlme_get_rxchainmask(vdev);
|
||||
header->u.meta_enh.sts_count = tx_evt_param.spatial_streams;
|
||||
header->u.meta_enh.timestamp = tx_evt_param.timestamp_us;
|
||||
|
||||
qdf_mem_copy(&header->u.meta_v5.peer_addr.su_peer_addr[0],
|
||||
qdf_mem_copy(&header->u.meta_enh.peer_addr.su_peer_addr[0],
|
||||
&tx_evt_param.peer_mac_addr.bytes[0], QDF_MAC_ADDR_SIZE);
|
||||
qdf_mem_copy(&header->u.meta_v5.chain_rssi[0],
|
||||
qdf_mem_copy(&header->u.meta_enh.chain_rssi[0],
|
||||
&tx_evt_param.chain_rssi[0],
|
||||
HOST_MAX_CHAINS * sizeof(tx_evt_param.chain_rssi[0]));
|
||||
qdf_mem_copy(&header->u.meta_v5.chain_phase[0],
|
||||
qdf_mem_copy(&header->u.meta_enh.chain_phase[0],
|
||||
&tx_evt_param.chain_phase[0],
|
||||
HOST_MAX_CHAINS * sizeof(tx_evt_param.chain_phase[0]));
|
||||
qdf_mem_copy(&header->u.meta_v5.agc_gain[0],
|
||||
qdf_mem_copy(&header->u.meta_enh.agc_gain[0],
|
||||
&tx_evt_param.agc_gain[0],
|
||||
HOST_MAX_CHAINS * sizeof(tx_evt_param.agc_gain[0]));
|
||||
header->u.meta_v5.rtt_cfo_measurement = tx_evt_param.cfo_measurement;
|
||||
header->u.meta_v5.rx_start_ts = tx_evt_param.rx_start_ts;
|
||||
header->u.meta_enh.rtt_cfo_measurement = tx_evt_param.cfo_measurement;
|
||||
header->u.meta_enh.rx_start_ts = tx_evt_param.rx_start_ts;
|
||||
|
||||
status = correlate_and_relay_enh(pdev, cookie, lut,
|
||||
CORRELATE_TX_EV_MODULE_ID);
|
||||
|
@@ -135,18 +135,18 @@ QDF_STATUS ol_txrx_htt_cfr_rx_ind_handler(void *pdev_ptr,
|
||||
u_int8_t *peeraddr;
|
||||
|
||||
case HTT_PEER_CFR_CAPTURE_MSG_TYPE_1:
|
||||
cfr_header.u.meta_v1.status =
|
||||
cfr_header.u.meta_leg.status =
|
||||
HTT_T2H_CFR_DUMP_TYPE1_STATUS_GET(*(msg_word + 2));
|
||||
cfr_cap_status = cfr_header.u.meta_v1.status;
|
||||
cfr_header.u.meta_v1.capture_bw =
|
||||
cfr_cap_status = cfr_header.u.meta_leg.status;
|
||||
cfr_header.u.meta_leg.capture_bw =
|
||||
HTT_T2H_CFR_DUMP_TYPE1_CAP_BW_GET(*(msg_word + 2));
|
||||
cfr_header.u.meta_v1.capture_mode =
|
||||
cfr_header.u.meta_leg.capture_mode =
|
||||
HTT_T2H_CFR_DUMP_TYPE1_MODE_GET(*(msg_word + 2));
|
||||
cfr_header.u.meta_v1.sts_count =
|
||||
cfr_header.u.meta_leg.sts_count =
|
||||
HTT_T2H_CFR_DUMP_TYPE1_STS_GET(*(msg_word + 2));
|
||||
cfr_header.u.meta_v1.channel_bw =
|
||||
cfr_header.u.meta_leg.channel_bw =
|
||||
HTT_T2H_CFR_DUMP_TYPE1_CHAN_BW_GET(*(msg_word + 2));
|
||||
cfr_header.u.meta_v1.capture_type =
|
||||
cfr_header.u.meta_leg.capture_type =
|
||||
HTT_T2H_CFR_DUMP_TYPE1_CAP_TYPE_GET(*(msg_word + 2));
|
||||
cfr_vdev_id = HTT_T2H_CFR_DUMP_TYPE1_VDEV_ID_GET
|
||||
(*(msg_word + 2));
|
||||
@@ -154,27 +154,27 @@ QDF_STATUS ol_txrx_htt_cfr_rx_ind_handler(void *pdev_ptr,
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_pdev(pdev, cfr_vdev_id,
|
||||
WLAN_CFR_ID);
|
||||
if (!vdev) {
|
||||
cfr_header.u.meta_v1.num_rx_chain = 0;
|
||||
cfr_header.u.meta_leg.num_rx_chain = 0;
|
||||
} else {
|
||||
cfr_header.u.meta_v1.num_rx_chain =
|
||||
cfr_header.u.meta_leg.num_rx_chain =
|
||||
wlan_vdev_mlme_get_rxchainmask(vdev);
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_CFR_ID);
|
||||
}
|
||||
|
||||
peeraddr = target_if_mac_addr_deswizzle
|
||||
((u_int8_t *)(msg_word + 3),
|
||||
cfr_header.u.meta_v1.peer_addr);
|
||||
cfr_header.u.meta_leg.peer_addr);
|
||||
|
||||
memcpy(cfr_header.u.meta_v1.peer_addr, peeraddr, 6);
|
||||
memcpy(cfr_header.u.meta_leg.peer_addr, peeraddr, 6);
|
||||
|
||||
cfr_dump_index = *(msg_word + 5);
|
||||
cfr_header.u.meta_v1.length = *(msg_word + 6);
|
||||
cfr_dump_len = cfr_header.u.meta_v1.length;
|
||||
cfr_header.u.meta_v1.timestamp = *(msg_word + 7);
|
||||
cfr_header.u.meta_v1.prim20_chan = *(msg_word + 9);
|
||||
cfr_header.u.meta_v1.center_freq1 = *(msg_word + 10);
|
||||
cfr_header.u.meta_v1.center_freq2 = *(msg_word + 11);
|
||||
cfr_header.u.meta_v1.phy_mode = *(msg_word + 12);
|
||||
cfr_dump_index = *(msg_word + 5);
|
||||
cfr_header.u.meta_leg.length = *(msg_word + 6);
|
||||
cfr_dump_len = cfr_header.u.meta_leg.length;
|
||||
cfr_header.u.meta_leg.timestamp = *(msg_word + 7);
|
||||
cfr_header.u.meta_leg.prim20_chan = *(msg_word + 9);
|
||||
cfr_header.u.meta_leg.center_freq1 = *(msg_word + 10);
|
||||
cfr_header.u.meta_leg.center_freq2 = *(msg_word + 11);
|
||||
cfr_header.u.meta_leg.phy_mode = *(msg_word + 12);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
مرجع در شماره جدید
Block a user