|
@@ -274,8 +274,6 @@ dp_rx_populate_cdp_indication_ppdu_user(struct dp_pdev *pdev,
|
|
|
{
|
|
|
struct dp_peer *peer;
|
|
|
struct dp_soc *soc = pdev->soc;
|
|
|
- struct dp_ast_entry *ast_entry;
|
|
|
- uint32_t ast_index;
|
|
|
int i;
|
|
|
struct mon_rx_user_status *rx_user_status;
|
|
|
struct mon_rx_user_info *rx_user_info;
|
|
@@ -283,6 +281,7 @@ dp_rx_populate_cdp_indication_ppdu_user(struct dp_pdev *pdev,
|
|
|
int ru_size;
|
|
|
bool is_data = false;
|
|
|
uint32_t num_users;
|
|
|
+ uint16_t sw_peer_id;
|
|
|
|
|
|
num_users = ppdu_info->com_info.num_users;
|
|
|
for (i = 0; i < num_users; i++) {
|
|
@@ -293,20 +292,11 @@ dp_rx_populate_cdp_indication_ppdu_user(struct dp_pdev *pdev,
|
|
|
rx_user_info = &ppdu_info->rx_user_info[i];
|
|
|
rx_stats_peruser = &cdp_rx_ppdu->user[i];
|
|
|
|
|
|
- ast_index = rx_user_status->ast_index;
|
|
|
- if (ast_index >= wlan_cfg_get_max_ast_idx(soc->wlan_cfg_ctx)) {
|
|
|
- rx_stats_peruser->peer_id = HTT_INVALID_PEER;
|
|
|
- continue;
|
|
|
- }
|
|
|
-
|
|
|
- ast_entry = soc->ast_table[ast_index];
|
|
|
- if (!ast_entry || ast_entry->peer_id == HTT_INVALID_PEER) {
|
|
|
- rx_stats_peruser->peer_id = HTT_INVALID_PEER;
|
|
|
- continue;
|
|
|
- }
|
|
|
+ sw_peer_id = rx_user_status->sw_peer_id;
|
|
|
|
|
|
- peer = dp_peer_get_ref_by_id(soc, ast_entry->peer_id,
|
|
|
+ peer = dp_peer_get_ref_by_id(soc, sw_peer_id,
|
|
|
DP_MOD_ID_RX_PPDU_STATS);
|
|
|
+
|
|
|
if (!peer) {
|
|
|
rx_stats_peruser->peer_id = HTT_INVALID_PEER;
|
|
|
continue;
|
|
@@ -422,9 +412,10 @@ dp_rx_populate_cdp_indication_ppdu(struct dp_pdev *pdev,
|
|
|
{
|
|
|
struct dp_peer *peer;
|
|
|
struct dp_soc *soc = pdev->soc;
|
|
|
- struct dp_ast_entry *ast_entry;
|
|
|
- uint32_t ast_index;
|
|
|
uint32_t i;
|
|
|
+ struct mon_rx_user_status *rx_user_status;
|
|
|
+ uint32_t num_users = ppdu_info->com_info.num_users;
|
|
|
+ uint16_t sw_peer_id;
|
|
|
|
|
|
cdp_rx_ppdu->first_data_seq_ctrl =
|
|
|
ppdu_info->rx_status.first_data_seq_ctrl;
|
|
@@ -450,22 +441,14 @@ dp_rx_populate_cdp_indication_ppdu(struct dp_pdev *pdev,
|
|
|
cdp_rx_ppdu->is_ampdu = 0;
|
|
|
cdp_rx_ppdu->tid = ppdu_info->rx_status.tid;
|
|
|
|
|
|
+ qdf_assert_always(num_users <= CDP_MU_MAX_USERS);
|
|
|
+ rx_user_status = &ppdu_info->rx_user_status[num_users - 1];
|
|
|
|
|
|
- ast_index = ppdu_info->rx_status.ast_index;
|
|
|
- if (ast_index >= wlan_cfg_get_max_ast_idx(soc->wlan_cfg_ctx)) {
|
|
|
- cdp_rx_ppdu->peer_id = HTT_INVALID_PEER;
|
|
|
- cdp_rx_ppdu->num_users = 0;
|
|
|
- goto end;
|
|
|
- }
|
|
|
+ sw_peer_id = rx_user_status->sw_peer_id;
|
|
|
|
|
|
- ast_entry = soc->ast_table[ast_index];
|
|
|
- if (!ast_entry || ast_entry->peer_id == HTT_INVALID_PEER) {
|
|
|
- cdp_rx_ppdu->peer_id = HTT_INVALID_PEER;
|
|
|
- cdp_rx_ppdu->num_users = 0;
|
|
|
- goto end;
|
|
|
- }
|
|
|
- peer = dp_peer_get_ref_by_id(soc, ast_entry->peer_id,
|
|
|
+ peer = dp_peer_get_ref_by_id(soc, sw_peer_id,
|
|
|
DP_MOD_ID_RX_PPDU_STATS);
|
|
|
+
|
|
|
if (!peer) {
|
|
|
cdp_rx_ppdu->peer_id = HTT_INVALID_PEER;
|
|
|
cdp_rx_ppdu->num_users = 0;
|
|
@@ -1167,12 +1150,11 @@ dp_rx_mon_handle_cfr_mu_info(struct dp_pdev *pdev,
|
|
|
{
|
|
|
struct dp_peer *peer;
|
|
|
struct dp_soc *soc = pdev->soc;
|
|
|
- struct dp_ast_entry *ast_entry;
|
|
|
struct mon_rx_user_status *rx_user_status;
|
|
|
struct cdp_rx_stats_ppdu_user *rx_stats_peruser;
|
|
|
uint32_t num_users;
|
|
|
+ uint16_t sw_peer_id;
|
|
|
int user_id;
|
|
|
- uint32_t ast_index;
|
|
|
|
|
|
qdf_spin_lock_bh(&soc->ast_lock);
|
|
|
|
|
@@ -1185,21 +1167,12 @@ dp_rx_mon_handle_cfr_mu_info(struct dp_pdev *pdev,
|
|
|
|
|
|
rx_user_status = &ppdu_info->rx_user_status[user_id];
|
|
|
rx_stats_peruser = &cdp_rx_ppdu->user[user_id];
|
|
|
- ast_index = rx_user_status->ast_index;
|
|
|
-
|
|
|
- if (ast_index >= wlan_cfg_get_max_ast_idx(soc->wlan_cfg_ctx)) {
|
|
|
- rx_stats_peruser->peer_id = HTT_INVALID_PEER;
|
|
|
- continue;
|
|
|
- }
|
|
|
|
|
|
- ast_entry = soc->ast_table[ast_index];
|
|
|
- if (!ast_entry || ast_entry->peer_id == HTT_INVALID_PEER) {
|
|
|
- rx_stats_peruser->peer_id = HTT_INVALID_PEER;
|
|
|
- continue;
|
|
|
- }
|
|
|
+ sw_peer_id = rx_user_status->sw_peer_id;
|
|
|
|
|
|
- peer = dp_peer_get_ref_by_id(soc, ast_entry->peer_id,
|
|
|
+ peer = dp_peer_get_ref_by_id(soc, sw_peer_id,
|
|
|
DP_MOD_ID_RX_PPDU_STATS);
|
|
|
+
|
|
|
if (!peer) {
|
|
|
rx_stats_peruser->peer_id = HTT_INVALID_PEER;
|
|
|
continue;
|
|
@@ -1610,29 +1583,31 @@ dp_rx_process_peer_based_pktlog(struct dp_soc *soc,
|
|
|
qdf_nbuf_t status_nbuf, uint32_t pdev_id)
|
|
|
{
|
|
|
struct dp_peer *peer;
|
|
|
- struct dp_ast_entry *ast_entry;
|
|
|
- uint32_t ast_index;
|
|
|
-
|
|
|
- ast_index = ppdu_info->rx_status.ast_index;
|
|
|
- if (ast_index < wlan_cfg_get_max_ast_idx(soc->wlan_cfg_ctx)) {
|
|
|
- ast_entry = soc->ast_table[ast_index];
|
|
|
- if (ast_entry) {
|
|
|
- peer = dp_peer_get_ref_by_id(soc, ast_entry->peer_id,
|
|
|
- DP_MOD_ID_RX_PPDU_STATS);
|
|
|
- if (peer) {
|
|
|
- if ((peer->peer_id != HTT_INVALID_PEER) &&
|
|
|
- (peer->peer_based_pktlog_filter)) {
|
|
|
- dp_wdi_event_handler(
|
|
|
- WDI_EVENT_RX_DESC, soc,
|
|
|
- status_nbuf,
|
|
|
- peer->peer_id,
|
|
|
- WDI_NO_VAL, pdev_id);
|
|
|
- }
|
|
|
- dp_peer_unref_delete(peer,
|
|
|
- DP_MOD_ID_RX_PPDU_STATS);
|
|
|
- }
|
|
|
- }
|
|
|
+ struct mon_rx_user_status *rx_user_status;
|
|
|
+ uint32_t num_users = ppdu_info->com_info.num_users;
|
|
|
+ uint16_t sw_peer_id;
|
|
|
+
|
|
|
+ qdf_assert_always(num_users <= CDP_MU_MAX_USERS);
|
|
|
+ rx_user_status = &ppdu_info->rx_user_status[num_users - 1];
|
|
|
+
|
|
|
+ sw_peer_id = rx_user_status->sw_peer_id;
|
|
|
+
|
|
|
+ peer = dp_peer_get_ref_by_id(soc, sw_peer_id,
|
|
|
+ DP_MOD_ID_RX_PPDU_STATS);
|
|
|
+
|
|
|
+ if (!peer)
|
|
|
+ return;
|
|
|
+
|
|
|
+ if ((peer->peer_id != HTT_INVALID_PEER) &&
|
|
|
+ (peer->peer_based_pktlog_filter)) {
|
|
|
+ dp_wdi_event_handler(
|
|
|
+ WDI_EVENT_RX_DESC, soc,
|
|
|
+ status_nbuf,
|
|
|
+ peer->peer_id,
|
|
|
+ WDI_NO_VAL, pdev_id);
|
|
|
}
|
|
|
+ dp_peer_unref_delete(peer,
|
|
|
+ DP_MOD_ID_RX_PPDU_STATS);
|
|
|
}
|
|
|
|
|
|
#if defined(HTT_UL_OFDMA_USER_INFO_V0_W0_VALID_M)
|