diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h index ab226b583d30..014641b09f25 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.h +++ b/core/hdd/src/wlan_hdd_cfg80211.h @@ -1652,6 +1652,14 @@ enum qca_wlan_vendor_attr_ll_stats_results { /* Unsigned 32bit value to indicate ll stats result type */ QCA_WLAN_VENDOR_ATTR_LL_STATS_TYPE, + /* Unsigned 32bit value */ + QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_NUM_TX_LEVELS, + + /* Unsigned 32bit value + * Number of msecs the radio spent in transmitting for each power level + */ + QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_TX_TIME_PER_LEVEL, + /* keep last */ QCA_WLAN_VENDOR_ATTR_LL_STATS_AFTER_LAST, QCA_WLAN_VENDOR_ATTR_LL_STATS_MAX = diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index 67f45a364d05..6ceb554bd43b 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -882,6 +882,13 @@ static void hdd_link_layer_process_radio_stats(hdd_adapter_t *pAdapter, nla_put_u32(vendor_event, QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME_HS20, pWifiRadioStat->onTimeHs20) || + nla_put_u32(vendor_event, + QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_NUM_TX_LEVELS, + MAX_TPC_LEVELS) || + nla_put(vendor_event, + QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_TX_TIME_PER_LEVEL, + sizeof(u32) * MAX_TPC_LEVELS, + pWifiRadioStat->tx_time_per_tpc) || nla_put_u32(vendor_event, QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_NUM_CHANNELS, pWifiRadioStat->numChannels)) { diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 362aa55d3b93..e5d11883e850 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -4995,6 +4995,7 @@ typedef struct { uint32_t ccaBusyTime; } tSirWifiChannelStats, *tpSirWifiChannelStats; +#define MAX_TPC_LEVELS 64 /* radio statistics */ typedef struct { /* wifi radio (if multiple radio supported) */ @@ -5035,6 +5036,10 @@ typedef struct { uint32_t onTimeHs20; /* number of channels */ uint32_t numChannels; + + /* tx time (in milliseconds) per TPC level (0.5 dBm) */ + uint32_t tx_time_per_tpc[MAX_TPC_LEVELS]; + /* channel statistics tSirWifiChannelStats */ tSirWifiChannelStats channels[0]; } tSirWifiRadioStat, *tpSirWifiRadioStat;