qcacld-3.0: Use nla_put_u8 for time_slice_duty_cycle

Currently host uses nla_put_u32 for time_slice_duty_cycle
but it's an uint8 variable.

In order to address this issue use nla_put_u8.

Change-Id: I55024b0daeaf0219e3fe93ddb43b2da0c69c38e3
CRs-Fixed: 3347871
This commit is contained in:
Asutosh Mohapatra
2022-12-07 17:48:40 +05:30
committed by Madan Koyyalamudi
vanhempi 110310e806
commit 8742066e3c
2 muutettua tiedostoa jossa 9 lisäystä ja 7 poistoa

Näytä tiedosto

@@ -720,9 +720,9 @@ static bool put_wifi_interface_info(struct wifi_interface_info *stats,
nla_put(vendor_event,
QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_COUNTRY_STR,
REG_ALPHA2_LEN + 1, stats->countryStr) ||
nla_put_u32(vendor_event,
QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_TS_DUTY_CYCLE,
stats->time_slice_duty_cycle)) {
nla_put_u8(vendor_event,
QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_TS_DUTY_CYCLE,
stats->time_slice_duty_cycle)) {
hdd_err("QCA_WLAN_VENDOR_ATTR put fail");
return false;
}

Näytä tiedosto

@@ -2910,10 +2910,6 @@ int wma_unified_link_iface_stats_event_handler(void *handle,
iface_link_stats->rssi_data += WMA_TGT_NOISE_FLOOR_DBM;
iface_link_stats->rssi_ack += WMA_TGT_NOISE_FLOOR_DBM;
}
wma_debug("db2dbm: %d, rssi_mgmt: %d, rssi_data: %d, rssi_ack: %d, beacon_rx %u",
db2dbm_enabled, iface_link_stats->rssi_mgmt,
iface_link_stats->rssi_data, iface_link_stats->rssi_ack,
iface_link_stats->beacon_rx);
/* Copy roaming state */
iface_stat->info.roaming = link_stats->roam_state;
@@ -2921,6 +2917,12 @@ int wma_unified_link_iface_stats_event_handler(void *handle,
iface_stat->info.time_slice_duty_cycle =
link_stats->time_slice_duty_cycle;
wma_debug("db2dbm: %d, rssi_mgmt: %d, rssi_data: %d, rssi_ack: %d, beacon_rx %u, time_slice_duty_cycle %u",
db2dbm_enabled, iface_link_stats->rssi_mgmt,
iface_link_stats->rssi_data, iface_link_stats->rssi_ack,
iface_link_stats->beacon_rx,
iface_stat->info.time_slice_duty_cycle);
iface_ac_stats = &iface_stat->ac_stats[0];
for (count = 0; count < link_stats->num_ac; count++) {
*iface_ac_stats = *ac_stats;