浏览代码

mac80211: send statistics with delete station event

Use the new cfg80211_del_sta_sinfo() function to send the
statistics about the deleted station with the delete event.
This lets userspace see how much traffic etc. the deleted
station used.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg 10 年之前
父节点
当前提交
6f7a8d26e2
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      net/mac80211/sta_info.c

+ 3 - 1
net/mac80211/sta_info.c

@@ -874,6 +874,7 @@ static void __sta_info_destroy_part2(struct sta_info *sta)
 {
 {
 	struct ieee80211_local *local = sta->local;
 	struct ieee80211_local *local = sta->local;
 	struct ieee80211_sub_if_data *sdata = sta->sdata;
 	struct ieee80211_sub_if_data *sdata = sta->sdata;
+	struct station_info sinfo = {};
 	int ret;
 	int ret;
 
 
 	/*
 	/*
@@ -908,7 +909,8 @@ static void __sta_info_destroy_part2(struct sta_info *sta)
 
 
 	sta_dbg(sdata, "Removed STA %pM\n", sta->sta.addr);
 	sta_dbg(sdata, "Removed STA %pM\n", sta->sta.addr);
 
 
-	cfg80211_del_sta(sdata->dev, sta->sta.addr, GFP_KERNEL);
+	sta_set_sinfo(sta, &sinfo);
+	cfg80211_del_sta_sinfo(sdata->dev, sta->sta.addr, &sinfo, GFP_KERNEL);
 
 
 	rate_control_remove_sta_debugfs(sta);
 	rate_control_remove_sta_debugfs(sta);
 	ieee80211_sta_debugfs_remove(sta);
 	ieee80211_sta_debugfs_remove(sta);