qcacmn: Add return path for fc_peer_stats for peer mac address

Add return path for fc_peer_stats for peer mac address if the peer
is connected to another pdev.

The DP peers are maintained at the SOC as such there is no check
to make sure that the peer is for a particular pdev.

This issue is especially seen when an end user invokes
fc_peer_stats in wifi0 for a peer that is connected to wifi1. In
such a case, we should be returning an error since the peer is not
connected to the pdev that the user application is directed to.

Change-Id: Ie1142c508605bfcf2fd49adc863879eee98fffe6
CRs-Fixed: 2397052
This commit is contained in:
Aditya Sathish
2019-02-13 15:28:49 +05:30
committed by nshrivas
parent 8a7357548a
commit f8074d87b2

View File

@@ -7199,6 +7199,13 @@ dp_get_host_peer_stats(struct cdp_pdev *pdev_handle, char *mac_addr)
return;
}
/* Making sure the peer is for the specific pdev */
if ((struct dp_pdev *)pdev_handle != peer->vdev->pdev) {
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
"%s: Peer is not for this pdev\n", __func__);
return;
}
dp_print_peer_stats(peer);
dp_peer_rxtid_stats(peer, dp_rx_tid_stats_cb, NULL);
}