Browse Source

qcacmn: Assign bss peer in peer map event

Assign num_mpdu to mpdu_tried_mcast for mcast stats updation
Defer bss peer assigning till peer map event arrives
Do not set delete_in_progress for bss Peer

Change-Id: I0881ea3c8804990c336d97cb7b239a991ec64fa9
Anish Nataraj 7 years ago
parent
commit
0dae67614e
3 changed files with 21 additions and 0 deletions
  1. 1 0
      dp/wifi3.0/dp_htt.c
  2. 12 0
      dp/wifi3.0/dp_peer.c
  3. 8 0
      dp/wifi3.0/dp_peer.h

+ 1 - 0
dp/wifi3.0/dp_htt.c

@@ -1693,6 +1693,7 @@ static void dp_process_ppdu_stats_user_common_tlv(
 		ppdu_user_desc->is_mcast = true;
 		ppdu_user_desc->mpdu_tried_mcast =
 		HTT_PPDU_STATS_USER_COMMON_TLV_MPDUS_TRIED_GET(*tag_buf);
+		ppdu_user_desc->num_mpdu = ppdu_user_desc->mpdu_tried_mcast;
 	} else {
 		ppdu_user_desc->mpdu_tried_ucast =
 		HTT_PPDU_STATS_USER_COMMON_TLV_MPDUS_TRIED_GET(*tag_buf);

+ 12 - 0
dp/wifi3.0/dp_peer.c

@@ -972,6 +972,18 @@ dp_rx_peer_map_handler(void *soc_handle, uint16_t peer_id, uint16_t hw_peer_id,
 		peer = dp_peer_find_add_id(soc, peer_mac_addr, peer_id,
 					hw_peer_id, vdev_id);
 
+	qdf_assert_always(peer->vdev);
+	/*
+	 * For every peer MAp message search and set if bss_peer
+	 */
+	if (!(qdf_mem_cmp(peer->mac_addr.raw, peer->vdev->mac_addr.raw,
+					DP_MAC_ADDR_LEN))) {
+		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO_HIGH,
+				"vdev bss_peer!!!!");
+		peer->bss_peer = 1;
+		peer->vdev->vap_bss_peer = peer;
+	}
+
 	dp_peer_map_ast(soc, peer, peer_mac_addr,
 			hw_peer_id, vdev_id);
 }

+ 8 - 0
dp/wifi3.0/dp_peer.h

@@ -42,6 +42,14 @@ dp_peer_find_by_id(struct dp_soc *soc,
 	peer = (peer_id >= soc->max_peers) ? NULL :
 				soc->peer_id_to_obj_map[peer_id];
 
+	/**
+	 * For bss peer, peer is not really deleted
+	 * but reference count is decremented in firmware
+	 * and hence ignore delete in progress for bss peer
+	 */
+	if (peer && !peer->bss_peer && peer->delete_in_progress)
+		return NULL;
+
 	return peer;
 }