qcacmn: add ppdu_desc to cdp_tx_indication_info
ppdu_desc contains more information that is relevant to radiotap. Change-Id: Ie2d0d53027958edf0a1032b270b7a8339b849924
This commit is contained in:
@@ -154,6 +154,36 @@
|
||||
#define FILTER_DATA_DATA 0x0001
|
||||
#define FILTER_DATA_NULL 0x0008
|
||||
|
||||
/*
|
||||
* Multiply rate by 2 to avoid float point
|
||||
* and get rate in units of 500kbps
|
||||
*/
|
||||
#define CDP_11B_RATE_0MCS (11 * 2)
|
||||
#define CDP_11B_RATE_1MCS (5.5 * 2)
|
||||
#define CDP_11B_RATE_2MCS (2 * 2)
|
||||
#define CDP_11B_RATE_3MCS (1 * 2)
|
||||
#define CDP_11B_RATE_4MCS (11 * 2)
|
||||
#define CDP_11B_RATE_5MCS (5.5 * 2)
|
||||
#define CDP_11B_RATE_6MCS (2 * 2)
|
||||
|
||||
#define CDP_11A_RATE_0MCS (48 * 2)
|
||||
#define CDP_11A_RATE_1MCS (24 * 2)
|
||||
#define CDP_11A_RATE_2MCS (12 * 2)
|
||||
#define CDP_11A_RATE_3MCS (6 * 2)
|
||||
#define CDP_11A_RATE_4MCS (54 * 2)
|
||||
#define CDP_11A_RATE_5MCS (36 * 2)
|
||||
#define CDP_11A_RATE_6MCS (18 * 2)
|
||||
#define CDP_11A_RATE_7MCS (9 * 2)
|
||||
|
||||
#define CDP_LEGACY_MCS0 0
|
||||
#define CDP_LEGACY_MCS1 1
|
||||
#define CDP_LEGACY_MCS2 2
|
||||
#define CDP_LEGACY_MCS3 3
|
||||
#define CDP_LEGACY_MCS4 4
|
||||
#define CDP_LEGACY_MCS5 5
|
||||
#define CDP_LEGACY_MCS6 6
|
||||
#define CDP_LEGACY_MCS7 7
|
||||
|
||||
QDF_DECLARE_EWMA(tx_lag, 1024, 8)
|
||||
struct cdp_stats_cookie;
|
||||
|
||||
@@ -166,6 +196,32 @@ enum cdp_cfg_param_type {
|
||||
CDP_CFG_NUM_PARAMS
|
||||
};
|
||||
|
||||
/*
|
||||
* PPDU TYPE from FW -
|
||||
* @CDP_PPDU_STATS_PPDU_TYPE_SU: single user type
|
||||
* @CDP_PPDU_STATS_PPDU_TYPE_MU_MIMO: multi user mu-mimo
|
||||
* @CDP_PPDU_STATS_PPDU_TYPE_MU_OFDMA: multi user ofdma
|
||||
* @CDP_PPDU_STATS_PPDU_TYPE_MU_MIMO_OFDMA: multi user mu-mimo ofdma
|
||||
* @CDP_PPDU_STATS_PPDU_TYPE_UL_TRIG: ul trigger ppdu
|
||||
* @CDP_PPDU_STATS_PPDU_TYPE_BURST_BCN: burst beacon
|
||||
* @CDP_PPDU_STATS_PPDU_TYPE_UL_BSR_RESP: bsr respond
|
||||
* @CDP_PPDU_STATS_PPDU_TYPE_UL_BSR_TRIG: bsr trigger
|
||||
* @CDP_PPDU_STATS_PPDU_TYPE_UL_RESP: ul response
|
||||
* @CDP_PPDU_STATS_PPDU_TYPE_UNKNOWN
|
||||
*/
|
||||
enum CDP_PPDU_STATS_PPDU_TYPE {
|
||||
CDP_PPDU_STATS_PPDU_TYPE_SU = 0,
|
||||
CDP_PPDU_STATS_PPDU_TYPE_MU_MIMO = 1,
|
||||
CDP_PPDU_STATS_PPDU_TYPE_MU_OFDMA = 2,
|
||||
CDP_PPDU_STATS_PPDU_TYPE_MU_MIMO_OFDMA = 4,
|
||||
CDP_PPDU_STATS_PPDU_TYPE_UL_TRIG = 5,
|
||||
CDP_PPDU_STATS_PPDU_TYPE_BURST_BCN = 6,
|
||||
CDP_PPDU_STATS_PPDU_TYPE_UL_BSR_RESP = 7,
|
||||
CDP_PPDU_STATS_PPDU_TYPE_UL_BSR_TRIG = 8,
|
||||
CDP_PPDU_STATS_PPDU_TYPE_UL_RESP = 9,
|
||||
CDP_PPDU_STATS_PPDU_TYPE_UNKNOWN = 0x1F,
|
||||
};
|
||||
|
||||
/*
|
||||
* htt_dbg_stats_type -
|
||||
* bit positions for each stats type within a stats type bitmask
|
||||
@@ -1495,10 +1551,12 @@ struct cdp_tx_indication_mpdu_info {
|
||||
* struct cdp_tx_indication_info - Tx capture information
|
||||
* @mpdu_info: Tx MPDU completion information
|
||||
* @mpdu_nbuf: reconstructed mpdu packet
|
||||
* @ppdu_desc: tx completion ppdu
|
||||
*/
|
||||
struct cdp_tx_indication_info {
|
||||
struct cdp_tx_indication_mpdu_info mpdu_info;
|
||||
qdf_nbuf_t mpdu_nbuf;
|
||||
struct cdp_tx_completion_ppdu *ppdu_desc;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1545,6 +1603,8 @@ struct cdp_tx_mgmt_comp_info {
|
||||
* @ppdu_end_timestamp: TSF at PPDU end
|
||||
* @ack_timestamp: TSF at the reception of ACK
|
||||
* @delayed_ba: Delayed ba flag
|
||||
* @beam_change: beam change bit in ppdu for he-information
|
||||
* @bss_color: 6 bit value for full bss color
|
||||
* @user: per-User stats (array of per-user structures)
|
||||
* @mpdu_q: queue of mpdu in a ppdu
|
||||
* @mpdus: MPDU list based on enqueue sequence bitmap
|
||||
@@ -1582,6 +1642,8 @@ struct cdp_tx_completion_ppdu {
|
||||
uint64_t ppdu_end_timestamp;
|
||||
uint64_t ack_timestamp;
|
||||
bool delayed_ba;
|
||||
uint8_t beam_change;
|
||||
uint8_t bss_color;
|
||||
struct cdp_tx_completion_ppdu_user user[CDP_MU_MAX_USERS];
|
||||
qdf_nbuf_queue_t mpdu_q;
|
||||
qdf_nbuf_t *mpdus;
|
||||
|
@@ -191,6 +191,24 @@ cdp_deliver_tx_mgmt(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
||||
soc->ops->mon_ops->txrx_deliver_tx_mgmt(pdev, nbuf);
|
||||
}
|
||||
|
||||
static inline void
|
||||
cdp_set_bsscolor(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
||||
uint8_t bsscolor)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!soc->ops->mon_ops ||
|
||||
!soc->ops->mon_ops->txrx_set_bsscolor)
|
||||
return;
|
||||
|
||||
soc->ops->mon_ops->txrx_set_bsscolor(pdev, bsscolor);
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_PKT_CAPTURE
|
||||
static inline void
|
||||
cdp_pktcapture_record_channel(
|
||||
|
@@ -102,6 +102,8 @@ enum {
|
||||
};
|
||||
|
||||
struct cdp_mon_status {
|
||||
/* bss color value 1-63 used for update on ppdu_desc bsscolor */
|
||||
uint8_t bsscolor;
|
||||
int rs_numchains;
|
||||
int rs_flags;
|
||||
#define IEEE80211_RX_FCS_ERROR 0x01
|
||||
|
@@ -756,6 +756,9 @@ struct cdp_mon_ops {
|
||||
|
||||
void (*txrx_deliver_tx_mgmt)
|
||||
(struct cdp_pdev *pdev, qdf_nbuf_t nbuf);
|
||||
|
||||
void (*txrx_set_bsscolor)
|
||||
(struct cdp_pdev *pdev, uint8_t bsscolor);
|
||||
};
|
||||
|
||||
#ifdef WLAN_FEATURE_PKT_CAPTURE
|
||||
@@ -1084,6 +1087,7 @@ struct ol_if_ops {
|
||||
bool (*is_roam_inprogress)(uint32_t vdev_id);
|
||||
enum QDF_GLOBAL_MODE (*get_con_mode)(void);
|
||||
/* TODO: Add any other control path calls required to OL_IF/WMA layer */
|
||||
|
||||
};
|
||||
|
||||
#ifdef DP_PEER_EXTENDED_API
|
||||
|
@@ -2107,6 +2107,10 @@ static void dp_process_ppdu_stats_common_tlv(struct dp_pdev *pdev,
|
||||
|
||||
ppdu_desc->phy_mode = HTT_PPDU_STATS_COMMON_TLV_PHY_MODE_GET(*tag_buf);
|
||||
|
||||
tag_buf = start_tag_buf + HTT_GET_STATS_CMN_INDEX(RESV_NUM_UL_BEAM);
|
||||
ppdu_desc->beam_change =
|
||||
HTT_PPDU_STATS_COMMON_TLV_BEAM_CHANGE_GET(*tag_buf);
|
||||
|
||||
dp_tx_capture_htt_frame_counter(pdev, frame_type);
|
||||
|
||||
tag_buf = start_tag_buf + HTT_GET_STATS_CMN_INDEX(START_TSTMP_U32_US);
|
||||
@@ -3313,6 +3317,9 @@ static struct ppdu_info *dp_htt_process_tlv(struct dp_pdev *pdev,
|
||||
ppdu_info = dp_get_ppdu_desc(pdev, ppdu_id, tlv_type);
|
||||
if (!ppdu_info)
|
||||
return NULL;
|
||||
ppdu_info->ppdu_desc->bss_color =
|
||||
pdev->rx_mon_recv_status.bsscolor;
|
||||
|
||||
ppdu_info->ppdu_id = ppdu_id;
|
||||
ppdu_info->tlv_bitmap |= (1 << tlv_type);
|
||||
|
||||
|
@@ -6751,6 +6751,19 @@ dp_deliver_tx_mgmt(struct cdp_pdev *pdev_handle, qdf_nbuf_t nbuf)
|
||||
dp_deliver_mgmt_frm(pdev, nbuf);
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_set_bsscolor() - sets bsscolor for tx capture
|
||||
* @pdev_handle: Datapath PDEV handle
|
||||
* @bsscolor: new bsscolor
|
||||
*/
|
||||
static void
|
||||
dp_mon_set_bsscolor(struct cdp_pdev *pdev_handle, uint8_t bsscolor)
|
||||
{
|
||||
struct dp_pdev *pdev = (struct dp_pdev *)pdev_handle;
|
||||
|
||||
pdev->rx_mon_recv_status.bsscolor = bsscolor;
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_get_pdev_id_frm_pdev() - get pdev_id
|
||||
* @pdev_handle: Datapath PDEV handle
|
||||
@@ -9465,6 +9478,7 @@ static struct cdp_mon_ops dp_ops_mon = {
|
||||
.txrx_set_advance_monitor_filter = dp_pdev_set_advance_monitor_filter,
|
||||
.txrx_monitor_record_channel = dp_pdev_set_monitor_channel,
|
||||
.txrx_deliver_tx_mgmt = dp_deliver_tx_mgmt,
|
||||
.txrx_set_bsscolor = dp_mon_set_bsscolor,
|
||||
};
|
||||
|
||||
static struct cdp_host_stats_ops dp_ops_host_stats = {
|
||||
|
Reference in New Issue
Block a user