qcacld-3.0: Prioritize per link stats over aggregated stats
Currently in the driver, whenever userspace requests vdev station stats using AP MLD mac address, host returns aggregated ML stats. If AP MLD mac address and link bssid are same, and userspace requests for per link stats using the link bssid, in such case, host has no clue whether userspace is requesting for aggregated stats or per link stats, and by default host returns aggregated stats to userspace. This can lead to host reporting incorrect stats to userspace. Hence, to avoid this issue, host will prioritize per link stats over aggregated stats if link bssid and AP MLD mac address are same. Change-Id: I2ad9493920faa2241c35d0ab01b54cdf22bf0daf CRs-Fixed: 3660360
This commit is contained in:

committed by
Ravindra Konda

parent
b74100cbb7
commit
d28e46e22f
@@ -7838,7 +7838,7 @@ wlan_hdd_update_mlo_sinfo(struct wlan_hdd_link_info *link_info,
|
|||||||
|
|
||||||
/* Update the rate info for link with best RSSI */
|
/* Update the rate info for link with best RSSI */
|
||||||
if (sinfo->signal > hdd_sinfo->signal) {
|
if (sinfo->signal > hdd_sinfo->signal) {
|
||||||
hdd_debug_rl("Updating rates for link_id %d",
|
hdd_nofl_debug("Updating rates for link_id %d",
|
||||||
sta_ctx->conn_info.ieee_link_id);
|
sta_ctx->conn_info.ieee_link_id);
|
||||||
wlan_hdd_update_mlo_rate_info(hdd_sinfo, sinfo);
|
wlan_hdd_update_mlo_rate_info(hdd_sinfo, sinfo);
|
||||||
}
|
}
|
||||||
@@ -8001,18 +8001,17 @@ static int wlan_hdd_send_mlo_station_stats(struct hdd_adapter *adapter,
|
|||||||
return wlan_hdd_get_sta_stats(adapter->deflink, mac, sinfo);
|
return wlan_hdd_get_sta_stats(adapter->deflink, mac, sinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wlan_is_mlo_aggregated_stats_allowed(adapter, mac)) {
|
|
||||||
link_info = hdd_get_link_info_by_bssid(hdd_ctx, mac);
|
link_info = hdd_get_link_info_by_bssid(hdd_ctx, mac);
|
||||||
if (!link_info) {
|
if (!link_info) {
|
||||||
|
if (wlan_is_mlo_aggregated_stats_allowed(adapter, mac))
|
||||||
|
return wlan_hdd_get_mlo_sta_stats(adapter, mac, sinfo);
|
||||||
|
|
||||||
hdd_debug_rl("Invalid bssid");
|
hdd_debug_rl("Invalid bssid");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
return wlan_hdd_get_sta_stats(link_info, mac, sinfo);
|
return wlan_hdd_get_sta_stats(link_info, mac, sinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
return wlan_hdd_get_mlo_sta_stats(adapter, mac, sinfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* __wlan_hdd_cfg80211_get_station() - get station statistics
|
* __wlan_hdd_cfg80211_get_station() - get station statistics
|
||||||
* @wiphy: Pointer to wiphy
|
* @wiphy: Pointer to wiphy
|
||||||
@@ -8048,7 +8047,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
|
|||||||
if (wlan_hdd_validate_vdev_id(link_info->vdev_id))
|
if (wlan_hdd_validate_vdev_id(link_info->vdev_id))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
hdd_debug_rl("Stats request on MAC: " QDF_MAC_ADDR_FMT,
|
hdd_nofl_debug("Stats request on MAC: " QDF_MAC_ADDR_FMT,
|
||||||
QDF_MAC_ADDR_REF(mac));
|
QDF_MAC_ADDR_REF(mac));
|
||||||
|
|
||||||
if (!mac || qdf_is_macaddr_zero((struct qdf_mac_addr *)mac)) {
|
if (!mac || qdf_is_macaddr_zero((struct qdf_mac_addr *)mac)) {
|
||||||
@@ -8247,7 +8246,7 @@ static int __wlan_hdd_cfg80211_dump_station(struct wiphy *wiphy,
|
|||||||
wlan_hdd_is_per_link_stats_supported(hdd_ctx))
|
wlan_hdd_is_per_link_stats_supported(hdd_ctx))
|
||||||
return wlan_hdd_get_mlo_sta_stats(adapter, mac, sinfo);
|
return wlan_hdd_get_mlo_sta_stats(adapter, mac, sinfo);
|
||||||
|
|
||||||
hdd_debug("Sending Assoc Link stats");
|
hdd_nofl_debug("Sending Assoc Link stats");
|
||||||
errno = wlan_hdd_get_sta_stats(adapter->deflink, mac, sinfo);
|
errno = wlan_hdd_get_sta_stats(adapter->deflink, mac, sinfo);
|
||||||
}
|
}
|
||||||
return errno;
|
return errno;
|
||||||
|
Reference in New Issue
Block a user