|
@@ -1073,6 +1073,183 @@ dp_rx_handle_ppdu_stats(struct dp_soc *soc, struct dp_pdev *pdev,
|
|
|
}
|
|
|
#endif/* QCA_ENHANCED_STATS_SUPPORT */
|
|
|
|
|
|
+#ifdef QCA_UNDECODED_METADATA_SUPPORT
|
|
|
+/**
|
|
|
+ * dp_rx_populate_cdp_indication_ppdu_undecoded_metadata() - Populate cdp
|
|
|
+ * rx indication structure
|
|
|
+ * @pdev: pdev ctx
|
|
|
+ * @ppdu_info: ppdu info structure from ppdu ring
|
|
|
+ * @cdp_rx_ppdu: Rx PPDU indication structure
|
|
|
+ *
|
|
|
+ * Return: none
|
|
|
+ */
|
|
|
+static void
|
|
|
+dp_rx_populate_cdp_indication_ppdu_undecoded_metadata(struct dp_pdev *pdev,
|
|
|
+ struct hal_rx_ppdu_info *ppdu_info,
|
|
|
+ struct cdp_rx_indication_ppdu *cdp_rx_ppdu)
|
|
|
+{
|
|
|
+ uint32_t chain;
|
|
|
+
|
|
|
+ cdp_rx_ppdu->phyrx_abort = ppdu_info->rx_status.phyrx_abort;
|
|
|
+ cdp_rx_ppdu->phyrx_abort_reason =
|
|
|
+ ppdu_info->rx_status.phyrx_abort_reason;
|
|
|
+
|
|
|
+ cdp_rx_ppdu->first_data_seq_ctrl =
|
|
|
+ ppdu_info->rx_status.first_data_seq_ctrl;
|
|
|
+ cdp_rx_ppdu->frame_ctrl =
|
|
|
+ ppdu_info->rx_status.frame_control;
|
|
|
+ cdp_rx_ppdu->tcp_msdu_count = ppdu_info->rx_status.tcp_msdu_count;
|
|
|
+ cdp_rx_ppdu->udp_msdu_count = ppdu_info->rx_status.udp_msdu_count;
|
|
|
+ cdp_rx_ppdu->other_msdu_count = ppdu_info->rx_status.other_msdu_count;
|
|
|
+ cdp_rx_ppdu->u.preamble = ppdu_info->rx_status.preamble_type;
|
|
|
+ cdp_rx_ppdu->num_mpdu = ppdu_info->com_info.mpdu_cnt_fcs_ok;
|
|
|
+ cdp_rx_ppdu->num_msdu = (cdp_rx_ppdu->tcp_msdu_count +
|
|
|
+ cdp_rx_ppdu->udp_msdu_count +
|
|
|
+ cdp_rx_ppdu->other_msdu_count);
|
|
|
+
|
|
|
+ cdp_rx_ppdu->retries = CDP_FC_IS_RETRY_SET(cdp_rx_ppdu->frame_ctrl) ?
|
|
|
+ ppdu_info->com_info.mpdu_cnt_fcs_ok : 0;
|
|
|
+
|
|
|
+ if (ppdu_info->com_info.mpdu_cnt_fcs_ok > 1)
|
|
|
+ cdp_rx_ppdu->is_ampdu = 1;
|
|
|
+ else
|
|
|
+ cdp_rx_ppdu->is_ampdu = 0;
|
|
|
+ cdp_rx_ppdu->tid = ppdu_info->rx_status.tid;
|
|
|
+
|
|
|
+ cdp_rx_ppdu->ppdu_id = ppdu_info->com_info.ppdu_id;
|
|
|
+ cdp_rx_ppdu->length = ppdu_info->rx_status.ppdu_len;
|
|
|
+ cdp_rx_ppdu->duration = ppdu_info->rx_status.duration;
|
|
|
+ cdp_rx_ppdu->u.bw = ppdu_info->rx_status.bw;
|
|
|
+ cdp_rx_ppdu->u.nss = ppdu_info->rx_status.nss;
|
|
|
+ cdp_rx_ppdu->u.mcs = ppdu_info->rx_status.mcs;
|
|
|
+ if (ppdu_info->rx_status.sgi == VHT_SGI_NYSM &&
|
|
|
+ ppdu_info->rx_status.preamble_type == HAL_RX_PKT_TYPE_11AC)
|
|
|
+ cdp_rx_ppdu->u.gi = CDP_SGI_0_4_US;
|
|
|
+ else
|
|
|
+ cdp_rx_ppdu->u.gi = ppdu_info->rx_status.sgi;
|
|
|
+
|
|
|
+ cdp_rx_ppdu->u.ldpc = ppdu_info->rx_status.ldpc;
|
|
|
+ cdp_rx_ppdu->u.ppdu_type = ppdu_info->rx_status.reception_type;
|
|
|
+ cdp_rx_ppdu->u.ltf_size = (ppdu_info->rx_status.he_data5 >>
|
|
|
+ QDF_MON_STATUS_HE_LTF_SIZE_SHIFT) & 0x3;
|
|
|
+
|
|
|
+ cdp_rx_ppdu->rssi = ppdu_info->rx_status.rssi_comb;
|
|
|
+ cdp_rx_ppdu->timestamp = ppdu_info->rx_status.tsft;
|
|
|
+ cdp_rx_ppdu->channel = ppdu_info->rx_status.chan_num;
|
|
|
+ cdp_rx_ppdu->beamformed = ppdu_info->rx_status.beamformed;
|
|
|
+ cdp_rx_ppdu->num_bytes = ppdu_info->rx_status.ppdu_len;
|
|
|
+ cdp_rx_ppdu->lsig_a = ppdu_info->rx_status.rate;
|
|
|
+ cdp_rx_ppdu->u.ltf_size = ppdu_info->rx_status.ltf_size;
|
|
|
+
|
|
|
+ if (ppdu_info->rx_status.preamble_type == HAL_RX_PKT_TYPE_11AC) {
|
|
|
+ cdp_rx_ppdu->u.stbc = ppdu_info->rx_status.is_stbc;
|
|
|
+ cdp_rx_ppdu->vht_no_txop_ps =
|
|
|
+ ppdu_info->rx_status.vht_no_txop_ps;
|
|
|
+ cdp_rx_ppdu->vht_crc = ppdu_info->rx_status.vht_crc;
|
|
|
+ cdp_rx_ppdu->group_id = ppdu_info->rx_status.vht_flag_values5;
|
|
|
+ } else if (ppdu_info->rx_status.preamble_type ==
|
|
|
+ HAL_RX_PKT_TYPE_11AX) {
|
|
|
+ cdp_rx_ppdu->u.stbc = (ppdu_info->rx_status.he_data3 >>
|
|
|
+ QDF_MON_STATUS_STBC_SHIFT) & 0x1;
|
|
|
+ cdp_rx_ppdu->u.dcm = (ppdu_info->rx_status.he_data3 >>
|
|
|
+ QDF_MON_STATUS_DCM_SHIFT) & 0x1;
|
|
|
+ } else {
|
|
|
+ cdp_rx_ppdu->u.stbc = ppdu_info->rx_status.ht_stbc;
|
|
|
+ cdp_rx_ppdu->ht_length = ppdu_info->rx_status.ht_length;
|
|
|
+ cdp_rx_ppdu->ht_smoothing = ppdu_info->rx_status.smoothing;
|
|
|
+ cdp_rx_ppdu->ht_not_sounding =
|
|
|
+ ppdu_info->rx_status.not_sounding;
|
|
|
+ cdp_rx_ppdu->ht_aggregation = ppdu_info->rx_status.aggregation;
|
|
|
+ cdp_rx_ppdu->ht_stbc = ppdu_info->rx_status.ht_stbc;
|
|
|
+ cdp_rx_ppdu->ht_crc = ppdu_info->rx_status.ht_crc;
|
|
|
+ }
|
|
|
+
|
|
|
+ cdp_rx_ppdu->l_sig_length = ppdu_info->rx_status.l_sig_length;
|
|
|
+ cdp_rx_ppdu->l_sig_a_parity = ppdu_info->rx_status.l_sig_a_parity;
|
|
|
+ cdp_rx_ppdu->l_sig_a_pkt_type = ppdu_info->rx_status.l_sig_a_pkt_type;
|
|
|
+
|
|
|
+ if (ppdu_info->rx_status.preamble_type == HAL_RX_PKT_TYPE_11AX) {
|
|
|
+ cdp_rx_ppdu->he_crc = ppdu_info->rx_status.he_crc;
|
|
|
+ cdp_rx_ppdu->bss_color_id =
|
|
|
+ ppdu_info->rx_status.he_data3 & 0x3F;
|
|
|
+ cdp_rx_ppdu->beam_change = (ppdu_info->rx_status.he_data3 >>
|
|
|
+ QDF_MON_STATUS_BEAM_CHANGE_SHIFT) & 0x1;
|
|
|
+ cdp_rx_ppdu->dl_ul_flag = (ppdu_info->rx_status.he_data3 >>
|
|
|
+ QDF_MON_STATUS_DL_UL_SHIFT) & 0x1;
|
|
|
+ cdp_rx_ppdu->ldpc_extra_sym = (ppdu_info->rx_status.he_data3 >>
|
|
|
+ QDF_MON_STATUS_LDPC_EXTRA_SYMBOL_SHIFT) & 0x1;
|
|
|
+ cdp_rx_ppdu->special_reuse =
|
|
|
+ ppdu_info->rx_status.he_data4 & 0xF;
|
|
|
+ cdp_rx_ppdu->ltf_sym = (ppdu_info->rx_status.he_data5 >>
|
|
|
+ QDF_MON_STATUS_HE_LTF_SYM_SHIFT) & 0x7;
|
|
|
+ cdp_rx_ppdu->txbf = (ppdu_info->rx_status.he_data5 >>
|
|
|
+ QDF_MON_STATUS_TXBF_SHIFT) & 0x1;
|
|
|
+ cdp_rx_ppdu->pe_disambiguity = (ppdu_info->rx_status.he_data5 >>
|
|
|
+ QDF_MON_STATUS_PE_DISAMBIGUITY_SHIFT) & 0x1;
|
|
|
+ cdp_rx_ppdu->pre_fec_pad = (ppdu_info->rx_status.he_data5 >>
|
|
|
+ QDF_MON_STATUS_PRE_FEC_PAD_SHIFT) & 0x3;
|
|
|
+ cdp_rx_ppdu->dopplar = (ppdu_info->rx_status.he_data6 >>
|
|
|
+ QDF_MON_STATUS_DOPPLER_SHIFT) & 0x1;
|
|
|
+ cdp_rx_ppdu->txop_duration = (ppdu_info->rx_status.he_data6 >>
|
|
|
+ QDF_MON_STATUS_TXOP_SHIFT) & 0x7F;
|
|
|
+ cdp_rx_ppdu->sig_b_mcs = ppdu_info->rx_status.he_flags1 & 0x7;
|
|
|
+ cdp_rx_ppdu->sig_b_dcm = (ppdu_info->rx_status.he_flags1 >>
|
|
|
+ QDF_MON_STATUS_DCM_FLAG_1_SHIFT) & 0x1;
|
|
|
+ cdp_rx_ppdu->sig_b_sym = (ppdu_info->rx_status.he_flags2 >>
|
|
|
+ QDF_MON_STATUS_NUM_SIG_B_SYMBOLS_SHIFT) & 0xF;
|
|
|
+ cdp_rx_ppdu->sig_b_comp = (ppdu_info->rx_status.he_flags2 >>
|
|
|
+ QDF_MON_STATUS_SIG_B_COMPRESSION_FLAG_2_SHIFT) & 0x1;
|
|
|
+ }
|
|
|
+ dp_rx_populate_rx_rssi_chain(ppdu_info, cdp_rx_ppdu);
|
|
|
+ dp_rx_populate_su_evm_details(ppdu_info, cdp_rx_ppdu);
|
|
|
+ cdp_rx_ppdu->rx_antenna = ppdu_info->rx_status.rx_antenna;
|
|
|
+
|
|
|
+ cdp_rx_ppdu->nf = ppdu_info->rx_status.chan_noise_floor;
|
|
|
+ for (chain = 0; chain < MAX_CHAIN; chain++)
|
|
|
+ cdp_rx_ppdu->per_chain_rssi[chain] =
|
|
|
+ ppdu_info->rx_status.rssi[chain];
|
|
|
+
|
|
|
+ cdp_rx_ppdu->is_mcast_bcast = ppdu_info->nac_info.mcast_bcast;
|
|
|
+
|
|
|
+ cdp_rx_ppdu->num_users = ppdu_info->com_info.num_users;
|
|
|
+
|
|
|
+ dp_rx_populate_cdp_indication_ppdu_user(pdev, ppdu_info, cdp_rx_ppdu);
|
|
|
+}
|
|
|
+
|
|
|
+void
|
|
|
+dp_rx_handle_ppdu_undecoded_metadata(struct dp_soc *soc, struct dp_pdev *pdev,
|
|
|
+ struct hal_rx_ppdu_info *ppdu_info)
|
|
|
+{
|
|
|
+ qdf_nbuf_t ppdu_nbuf;
|
|
|
+ struct cdp_rx_indication_ppdu *cdp_rx_ppdu;
|
|
|
+
|
|
|
+ /* Return if RX_ABORT not set */
|
|
|
+ if (ppdu_info->rx_status.phyrx_abort == 0)
|
|
|
+ return;
|
|
|
+
|
|
|
+ ppdu_nbuf = qdf_nbuf_alloc(soc->osdev,
|
|
|
+ sizeof(struct cdp_rx_indication_ppdu),
|
|
|
+ 0, 0, FALSE);
|
|
|
+ if (ppdu_nbuf) {
|
|
|
+ cdp_rx_ppdu = ((struct cdp_rx_indication_ppdu *)
|
|
|
+ qdf_nbuf_data(ppdu_nbuf));
|
|
|
+
|
|
|
+ qdf_mem_zero(cdp_rx_ppdu,
|
|
|
+ sizeof(struct cdp_rx_indication_ppdu));
|
|
|
+ dp_rx_populate_cdp_indication_ppdu_undecoded_metadata(pdev,
|
|
|
+ ppdu_info, cdp_rx_ppdu);
|
|
|
+
|
|
|
+ if (!qdf_nbuf_put_tail(ppdu_nbuf,
|
|
|
+ sizeof(struct cdp_rx_indication_ppdu)))
|
|
|
+ return;
|
|
|
+
|
|
|
+ dp_wdi_event_handler(WDI_EVENT_RX_PPDU_DESC_UNDECODED_METADATA,
|
|
|
+ soc, ppdu_nbuf, HTT_INVALID_PEER,
|
|
|
+ WDI_NO_VAL, pdev->pdev_id);
|
|
|
+ }
|
|
|
+}
|
|
|
+#endif/* QCA_UNDECODED_METADATA_SUPPORT */
|
|
|
+
|
|
|
#ifdef QCA_MCOPY_SUPPORT
|
|
|
QDF_STATUS
|
|
|
dp_rx_handle_mcopy_mode(struct dp_soc *soc, struct dp_pdev *pdev,
|