aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 31023ca17575..a38b26730652 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -463,10 +463,17 @@ static int ieee80211_get_et_sset_count(struct wiphy *wiphy,
463 struct net_device *dev, 463 struct net_device *dev,
464 int sset) 464 int sset)
465{ 465{
466 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
467 int rv = 0;
468
466 if (sset == ETH_SS_STATS) 469 if (sset == ETH_SS_STATS)
467 return STA_STATS_LEN; 470 rv += STA_STATS_LEN;
468 471
469 return -EOPNOTSUPP; 472 rv += drv_get_et_sset_count(sdata, sset);
473
474 if (rv == 0)
475 return -EOPNOTSUPP;
476 return rv;
470} 477}
471 478
472static void ieee80211_get_et_stats(struct wiphy *wiphy, 479static void ieee80211_get_et_stats(struct wiphy *wiphy,
@@ -527,16 +534,22 @@ static void ieee80211_get_et_stats(struct wiphy *wiphy,
527 } 534 }
528 535
529 rcu_read_unlock(); 536 rcu_read_unlock();
537
538 drv_get_et_stats(sdata, stats, &(data[STA_STATS_LEN]));
530} 539}
531 540
532static void ieee80211_get_et_strings(struct wiphy *wiphy, 541static void ieee80211_get_et_strings(struct wiphy *wiphy,
533 struct net_device *dev, 542 struct net_device *dev,
534 u32 sset, u8 *data) 543 u32 sset, u8 *data)
535{ 544{
545 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
546 int sz_sta_stats = 0;
547
536 if (sset == ETH_SS_STATS) { 548 if (sset == ETH_SS_STATS) {
537 int sz_sta_stats = sizeof(ieee80211_gstrings_sta_stats); 549 sz_sta_stats = sizeof(ieee80211_gstrings_sta_stats);
538 memcpy(data, *ieee80211_gstrings_sta_stats, sz_sta_stats); 550 memcpy(data, *ieee80211_gstrings_sta_stats, sz_sta_stats);
539 } 551 }
552 drv_get_et_strings(sdata, sset, &(data[sz_sta_stats]));
540} 553}
541 554
542static int ieee80211_dump_station(struct wiphy *wiphy, struct net_device *dev, 555static int ieee80211_dump_station(struct wiphy *wiphy, struct net_device *dev,