qcacld-3.0: Report congestion to the correct interface

Only report congestion vendor event to the interface that request it.

Change-Id: I3c6d4fca116f65a9ae930d428e45716d544f9806
CRs-Fixed: 2803920
This commit is contained in:
Min Liu
2020-10-23 15:30:51 +08:00
committed by snandini
parent 794d5e0131
commit bdba1fa76d
3 changed files with 13 additions and 4 deletions

View File

@@ -193,7 +193,8 @@ struct request_info {
void *cookie);
void (*get_peer_stats_cb)(struct stats_event *ev,
void *cookie);
void (*congestion_notif_cb)(uint8_t congestion);
void (*congestion_notif_cb)(uint8_t vdev_id,
uint8_t congestion);
} u;
uint32_t vdev_id;
uint32_t pdev_id;

View File

@@ -704,7 +704,7 @@ tgt_mc_cp_stats_extract_congestion_stats(struct wlan_objmgr_psoc *psoc,
wlan_cp_stats_pdev_obj_unlock(pdev_cp_stats_priv);
if (last_req.u.congestion_notif_cb && is_congested)
last_req.u.congestion_notif_cb(congestion);
last_req.u.congestion_notif_cb(last_req.vdev_id, congestion);
out:
wlan_objmgr_pdev_release_ref(pdev, WLAN_CP_STATS_ID);