Bläddra i källkod

qcacmn: Pass pdev to dp_peer_stats_notify API

Pass pdev to dp_peer_stats_notify API instead of de-referencing
this from peer structure.

Change-Id: I5dc679283f5822f44b4140aefb3aee44a826c720
CRs-Fixed: 2500647
Tallapragada Kalyan 5 år sedan
förälder
incheckning
d92f598f75
4 ändrade filer med 11 tillägg och 12 borttagningar
  1. 5 6
      dp/wifi3.0/dp_htt.c
  2. 3 2
      dp/wifi3.0/dp_internal.h
  3. 1 1
      dp/wifi3.0/dp_rx_mon_status.c
  4. 2 3
      dp/wifi3.0/dp_stats.c

+ 5 - 6
dp/wifi3.0/dp_htt.c

@@ -238,7 +238,7 @@ dp_tx_rate_stats_update(struct dp_peer *peer,
 
 /*
  * dp_tx_stats_update() - Update per-peer statistics
- * @soc: Datapath soc handle
+ * @pdev: Datapath pdev handle
  * @peer: Datapath peer handle
  * @ppdu: PPDU Descriptor
  * @ack_rssi: RSSI of last ack received
@@ -246,11 +246,10 @@ dp_tx_rate_stats_update(struct dp_peer *peer,
  * Return: None
  */
 static void
-dp_tx_stats_update(struct dp_soc *soc, struct dp_peer *peer,
+dp_tx_stats_update(struct dp_pdev *pdev, struct dp_peer *peer,
 		   struct cdp_tx_completion_ppdu_user *ppdu,
 		   uint32_t ack_rssi)
 {
-	struct dp_pdev *pdev = peer->vdev->pdev;
 	uint8_t preamble, mcs;
 	uint16_t num_msdu;
 	uint16_t num_mpdu;
@@ -265,7 +264,7 @@ dp_tx_stats_update(struct dp_soc *soc, struct dp_peer *peer,
 	/* If the peer statistics are already processed as part of
 	 * per-MSDU completion handler, do not process these again in per-PPDU
 	 * indications */
-	if (soc->process_tx_status)
+	if (pdev->soc->process_tx_status)
 		return;
 
 	if (ppdu->completion_status != HTT_PPDU_STATS_USER_STATUS_OK) {
@@ -399,7 +398,7 @@ dp_tx_stats_update(struct dp_soc *soc, struct dp_peer *peer,
 	DP_STATS_INCC(peer, tx.ampdu_cnt, num_msdu, ppdu->is_ampdu);
 	DP_STATS_INCC(peer, tx.non_ampdu_cnt, num_msdu, !(ppdu->is_ampdu));
 
-	dp_peer_stats_notify(peer);
+	dp_peer_stats_notify(pdev, peer);
 
 #if defined(FEATURE_PERPKT_INFO) && WDI_EVENT_ENABLE
 	dp_wdi_event_handler(WDI_EVENT_UPDATE_DP_STATS, pdev->soc,
@@ -2970,7 +2969,7 @@ dp_ppdu_desc_user_stats_update(struct dp_pdev *pdev,
 		     (ppdu_desc->user[i].tid == CDP_DATA_NON_QOS_TID)) &&
 		      (ppdu_desc->frame_type != CDP_PPDU_FTYPE_CTRL)) {
 
-			dp_tx_stats_update(pdev->soc, peer,
+			dp_tx_stats_update(pdev, peer,
 					   &ppdu_desc->user[i],
 					   ppdu_desc->ack_rssi);
 			dp_tx_rate_stats_update(peer, &ppdu_desc->user[i]);

+ 3 - 2
dp/wifi3.0/dp_internal.h

@@ -1163,7 +1163,7 @@ dp_hif_update_pipe_callback(struct dp_soc *dp_soc,
 		DP_HTT_T2H_HP_PIPE, &hif_pipe_callbacks);
 }
 
-QDF_STATUS dp_peer_stats_notify(struct dp_peer *peer);
+QDF_STATUS dp_peer_stats_notify(struct dp_pdev *pdev, struct dp_peer *peer);
 
 #else
 static inline int dp_wdi_event_unsub(struct cdp_pdev *txrx_pdev_handle,
@@ -1216,7 +1216,8 @@ dp_hif_update_pipe_callback(struct dp_soc *dp_soc, void *cb_context,
 {
 }
 
-static inline QDF_STATUS dp_peer_stats_notify(struct dp_peer *peer)
+static inline QDF_STATUS dp_peer_stats_notify(struct dp_pdev *pdev,
+					      struct dp_peer *peer)
 {
 	return QDF_STATUS_SUCCESS;
 }

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

@@ -515,7 +515,7 @@ static void dp_rx_stats_update(struct dp_pdev *pdev, struct dp_peer *peer,
 	ac = TID_TO_WME_AC(ppdu->tid);
 	if (ppdu->tid != HAL_TID_INVALID)
 		DP_STATS_INC(peer, rx.wme_ac_type[ac], num_msdu);
-	dp_peer_stats_notify(peer);
+	dp_peer_stats_notify(pdev, peer);
 	DP_STATS_UPD(peer, rx.last_rssi, ppdu->rssi);
 
 	if (is_invalid_peer)

+ 2 - 3
dp/wifi3.0/dp_stats.c

@@ -3985,16 +3985,15 @@ void dp_htt_stats_copy_tag(struct dp_pdev *pdev, uint8_t tag_type, uint32_t *tag
 	if (dest_ptr)
 		qdf_mem_copy(dest_ptr, tag_buf, size);
 }
-QDF_STATUS dp_peer_stats_notify(struct dp_peer *peer)
+
+QDF_STATUS dp_peer_stats_notify(struct dp_pdev *dp_pdev, struct dp_peer *peer)
 {
-	struct dp_pdev *dp_pdev;
 	struct cdp_interface_peer_stats peer_stats_intf;
 	struct cdp_peer_stats *peer_stats = &peer->stats;
 
 	if (!peer->vdev)
 		return QDF_STATUS_E_FAULT;
 
-	dp_pdev = peer->vdev->pdev;
 	qdf_mem_zero(&peer_stats_intf, sizeof(peer_stats_intf));
 	if (peer_stats->rx.last_rssi != peer_stats->rx.rssi)
 		peer_stats_intf.rssi_changed = true;