From: Ben Greear <greearb@xxxxxxxxxxxxxxx> Provide efficient way to read current bss color. Signed-off-by: Ben Greear <greearb@xxxxxxxxxxxxxxx> --- net/mac80211/ethtool.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/net/mac80211/ethtool.c b/net/mac80211/ethtool.c index 99f6174a9d69..6058834db228 100644 --- a/net/mac80211/ethtool.c +++ b/net/mac80211/ethtool.c @@ -51,7 +51,8 @@ static const char ieee80211_gstrings_sta_stats[][ETH_GSTRING_LEN] = { "rx_duplicates", "rx_fragments", "rx_dropped", "tx_packets", "tx_bytes", "tx_filtered", "tx_retry_failed", "tx_retries", - "sta_state", "txrate", "rxrate", "signal", + "sta_state", "txrate", "rxrate", "signal", "bss_color", + /* Add new stats above here, channel and others go below */ "channel", "noise", "ch_time", "ch_time_busy", "ch_time_ext_busy", "ch_time_rx", "ch_time_tx" }; @@ -151,6 +152,11 @@ static void ieee80211_get_stats(struct net_device *dev, } } + if (sdata->vif.bss_conf.he_bss_color.enabled) + data[i++] = sdata->vif.bss_conf.he_bss_color.color; + else + data[i++] = 0; + do_survey: i = STA_STATS_LEN - STA_STATS_SURVEY_LEN; /* Get survey stats for current channel */ -- 2.42.0