Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78613
b: refs/heads/master
c: 7bbdd2d
h: refs/heads/master
i:
  78611: d1f796b
v: v3
  • Loading branch information
Johannes Berg authored and David S. Miller committed Jan 28, 2008
1 parent 30dd4c8 commit 4b30557
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fd5b74dcb88cfc109d6576b22deaef6f47f82c12
refs/heads/master: 7bbdd2d987971f9d123a2db89ed921bf02e34f9a
26 changes: 26 additions & 0 deletions trunk/net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,31 @@ static int ieee80211_config_default_key(struct wiphy *wiphy,
return 0;
}

static int ieee80211_get_station(struct wiphy *wiphy, struct net_device *dev,
u8 *mac, struct station_stats *stats)
{
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
struct sta_info *sta;

sta = sta_info_get(local, mac);
if (!sta)
return -ENOENT;

/* XXX: verify sta->dev == dev */

stats->filled = STATION_STAT_INACTIVE_TIME |
STATION_STAT_RX_BYTES |
STATION_STAT_TX_BYTES;

stats->inactive_time = jiffies_to_msecs(jiffies - sta->last_rx);
stats->rx_bytes = sta->rx_bytes;
stats->tx_bytes = sta->tx_bytes;

sta_info_put(sta);

return 0;
}

struct cfg80211_ops mac80211_config_ops = {
.add_virtual_intf = ieee80211_add_iface,
.del_virtual_intf = ieee80211_del_iface,
Expand All @@ -277,4 +302,5 @@ struct cfg80211_ops mac80211_config_ops = {
.del_key = ieee80211_del_key,
.get_key = ieee80211_get_key,
.set_default_key = ieee80211_config_default_key,
.get_station = ieee80211_get_station,
};

0 comments on commit 4b30557

Please sign in to comment.