diff --git a/core/hdd/src/wlan_hdd_debugfs_llstat.c b/core/hdd/src/wlan_hdd_debugfs_llstat.c index 261de57142ad..b409aaa5f49d 100644 --- a/core/hdd/src/wlan_hdd_debugfs_llstat.c +++ b/core/hdd/src/wlan_hdd_debugfs_llstat.c @@ -198,7 +198,8 @@ void hdd_debugfs_process_peer_stats(struct hdd_adapter *adapter, void *data) DEBUGFS_LLSTATS_BUF_SIZE - ll_stats.len, "\npreamble: %0x, nss: %0x, bw: %0x, mcs: %0x, bitrate: %0x, txmpdu: %u, rxmpdu: %u, mpdu_lost: %u, retries: %u, retries_short: %u, retries_long: %u", rate_stat->rate.preamble, rate_stat->rate.nss, - rate_stat->rate.bw, rate_stat->rate.rateMcsIdx, + rate_stat->rate.bw, + rate_stat->rate.rate_or_mcs_index, rate_stat->rate.bitrate, rate_stat->tx_mpdu, rate_stat->rx_mpdu, rate_stat->mpdu_lost, rate_stat->retries, rate_stat->retries_short, diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index b6afff52f59c..f360ab8d0a09 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -207,28 +207,28 @@ static bool put_wifi_rate_stat(struct wifi_rate_stat *stats, stats->rate.bw) || nla_put_u8(vendor_event, QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_MCS_INDEX, - stats->rate.rateMcsIdx) || + stats->rate.rate_or_mcs_index) || nla_put_u32(vendor_event, QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_BIT_RATE, stats->rate.bitrate) || nla_put_u32(vendor_event, - QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_TX_MPDU, - stats->tx_mpdu) || + QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_TX_MPDU, + stats->tx_mpdu) || nla_put_u32(vendor_event, - QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RX_MPDU, - stats->rx_mpdu) || + QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RX_MPDU, + stats->rx_mpdu) || nla_put_u32(vendor_event, - QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_MPDU_LOST, - stats->mpdu_lost) || + QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_MPDU_LOST, + stats->mpdu_lost) || nla_put_u32(vendor_event, - QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RETRIES, - stats->retries) || + QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RETRIES, + stats->retries) || nla_put_u32(vendor_event, - QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RETRIES_SHORT, - stats->retries_short) || + QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RETRIES_SHORT, + stats->retries_short) || nla_put_u32(vendor_event, - QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RETRIES_LONG, - stats->retries_long)) { + QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RETRIES_LONG, + stats->retries_long)) { hdd_err("QCA_WLAN_VENDOR_ATTR put fail"); return false; } diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 3e1424348e62..bfec8ef85d6a 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -3577,22 +3577,25 @@ struct wifi_channel_info { uint32_t center_freq1; }; -/* wifi rate info */ -typedef struct { - /* 0: OFDM, 1:CCK, 2:HT 3:VHT 4..7 reserved */ +/** + * struct wifi_rate_info - wifi rate information + * @preamble: 0:OFDM, 1:CCK, 2:HT 3:VHT 4..7 reserved + * @nss: 0:1x1, 1:2x2, 3:3x3, 4:4x4 + * @bw: 0:20MHz, 1:40Mhz, 2:80Mhz, 3:160Mhz + * @rate_or_mcs_index: + * * OFDM/CCK: rate code per ieee std in units of 0.5mbps + * * HT/VHT: mcs index + * @reserved: reserved + * @bitrate: bitrate units of 100 Kbps + */ +struct wifi_rate_info { uint32_t preamble:3; - /* 0:1x1, 1:2x2, 3:3x3, 4:4x4 */ uint32_t nss:2; - /* 0:20MHz, 1:40Mhz, 2:80Mhz, 3:160Mhz */ uint32_t bw:3; - /* OFDM/CCK rate code would be as per ieee std in units of 0.5mbps */ - /* HT/VHT it would be mcs index */ - uint32_t rateMcsIdx:8; - /* reserved */ + uint32_t rate_or_mcs_index:8; uint32_t reserved:16; - /* units of 100 Kbps */ uint32_t bitrate; -} tSirWifiRate, *tpSirWifiRate; +}; /* channel statistics */ typedef struct { @@ -3672,7 +3675,7 @@ typedef struct { * @retries_long: number of long data pkt retries */ struct wifi_rate_stat { - tSirWifiRate rate; + struct wifi_rate_info rate; uint32_t tx_mpdu; uint32_t rx_mpdu; uint32_t mpdu_lost;