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:
@@ -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;
|
||||
|
@@ -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);
|
||||
|
@@ -92,19 +92,27 @@ static int get_congestion_report_len(void)
|
||||
|
||||
/**
|
||||
* hdd_congestion_notification_cb() - congestion notification callback function
|
||||
* @vdev_id: vdev id
|
||||
* @congestion: congestion percentage
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void hdd_congestion_notification_cb(uint8_t congestion)
|
||||
static void hdd_congestion_notification_cb(uint8_t vdev_id, uint8_t congestion)
|
||||
{
|
||||
struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
||||
struct hdd_adapter *adapter;
|
||||
struct sk_buff *event;
|
||||
|
||||
if (wlan_hdd_validate_context(hdd_ctx))
|
||||
return;
|
||||
|
||||
event = cfg80211_vendor_event_alloc(hdd_ctx->wiphy, NULL,
|
||||
adapter = hdd_get_adapter_by_vdev(hdd_ctx, vdev_id);
|
||||
if (!adapter) {
|
||||
hdd_err("Failed to find adapter of vdev %d", vdev_id);
|
||||
return;
|
||||
}
|
||||
|
||||
event = cfg80211_vendor_event_alloc(hdd_ctx->wiphy, &(adapter->wdev),
|
||||
get_congestion_report_len(),
|
||||
QCA_NL80211_VENDOR_SUBCMD_MEDIUM_ASSESS_INDEX,
|
||||
GFP_KERNEL);
|
||||
|
Reference in New Issue
Block a user