qcacmn: add wildcard search support for peer_hash_find
Add option to ignore vdev_id match to peer hash lookup API
when vdev_id is passed as 0xff to the API, it ignores vdev_id
argument
This option is needed for usecases like peer level statistics
display where only MAC address is known and vdev_id is not known
Also add the missing accounting of rx broadcast frames in the
overall statistics
Change-Id: I9939ac8bf30f6be3d216f9aa28d52560bf445e06
diff --git a/dp/wifi3.0/dp_peer.c b/dp/wifi3.0/dp_peer.c
index d233d34..e40a77f 100644
--- a/dp/wifi3.0/dp_peer.c
+++ b/dp/wifi3.0/dp_peer.c
@@ -714,7 +714,8 @@
* modified find will take care of finding the correct BSS peer.
*/
if (dp_peer_find_mac_addr_cmp(mac_addr, &peer->mac_addr) == 0 &&
- (peer->vdev->vdev_id == vdev_id)) {
+ ((peer->vdev->vdev_id == vdev_id) ||
+ (vdev_id == DP_VDEV_ALL))) {
#else
if (dp_peer_find_mac_addr_cmp(mac_addr, &peer->mac_addr) == 0) {
#endif
@@ -1081,7 +1082,7 @@
struct dp_pdev *pdev = (struct dp_pdev *)dev;
struct dp_peer *peer;
- peer = dp_peer_find_hash_find(pdev->soc, peer_mac_addr, 0, 0);
+ peer = dp_peer_find_hash_find(pdev->soc, peer_mac_addr, 0, DP_VDEV_ALL);
if (!peer)
return NULL;
@@ -2041,7 +2042,7 @@
struct dp_peer *peer;
struct dp_pdev *pdev = (struct dp_pdev *)pdev_handle;
- peer = dp_peer_find_hash_find(pdev->soc, peer_mac, 0, 0);
+ peer = dp_peer_find_hash_find(pdev->soc, peer_mac, 0, DP_VDEV_ALL);
if (NULL == peer) {
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
"Failed to find peer for: [%pM]", peer_mac);