Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215286
b: refs/heads/master
c: 5a5c731
h: refs/heads/master
v: v3
  • Loading branch information
Ben Greear authored and John W. Linville committed Oct 11, 2010
1 parent c4c737b commit 9fff35a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b38afa87698375179026224522c2e48dcbf17e65
refs/heads/master: 5a5c731aa59cc2c44ca20f45b1a577cd4f5435e2
4 changes: 4 additions & 0 deletions trunk/include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ struct station_parameters {
* @STATION_INFO_TX_PACKETS: @tx_packets filled
* @STATION_INFO_TX_RETRIES: @tx_retries filled
* @STATION_INFO_TX_FAILED: @tx_failed filled
* @STATION_INFO_RX_DROP_MISC: @rx_dropped_misc filled
*/
enum station_info_flags {
STATION_INFO_INACTIVE_TIME = 1<<0,
Expand All @@ -417,6 +418,7 @@ enum station_info_flags {
STATION_INFO_TX_PACKETS = 1<<9,
STATION_INFO_TX_RETRIES = 1<<10,
STATION_INFO_TX_FAILED = 1<<11,
STATION_INFO_RX_DROP_MISC = 1<<12,
};

/**
Expand Down Expand Up @@ -468,6 +470,7 @@ struct rate_info {
* @tx_packets: packets transmitted to this station
* @tx_retries: cumulative retry counts
* @tx_failed: number of failed transmissions (retries exceeded, no ACK)
* @rx_dropped_misc: Dropped for un-specified reason.
* @generation: generation number for nl80211 dumps.
* This number should increase every time the list of stations
* changes, i.e. when a station is added or removed, so that
Expand All @@ -487,6 +490,7 @@ struct station_info {
u32 tx_packets;
u32 tx_retries;
u32 tx_failed;
u32 rx_dropped_misc;

int generation;
};
Expand Down
4 changes: 3 additions & 1 deletion trunk/net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo)
STATION_INFO_TX_PACKETS |
STATION_INFO_TX_RETRIES |
STATION_INFO_TX_FAILED |
STATION_INFO_TX_BITRATE;
STATION_INFO_TX_BITRATE |
STATION_INFO_RX_DROP_MISC;

sinfo->inactive_time = jiffies_to_msecs(jiffies - sta->last_rx);
sinfo->rx_bytes = sta->rx_bytes;
Expand All @@ -338,6 +339,7 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo)
sinfo->tx_packets = sta->tx_packets;
sinfo->tx_retries = sta->tx_retry_count;
sinfo->tx_failed = sta->tx_retry_failed;
sinfo->rx_dropped_misc = sta->rx_dropped;

if ((sta->local->hw.flags & IEEE80211_HW_SIGNAL_DBM) ||
(sta->local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC)) {
Expand Down
4 changes: 4 additions & 0 deletions trunk/net/wireless/wext-compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1366,6 +1366,10 @@ struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev)
}

wstats.qual.updated |= IW_QUAL_NOISE_INVALID;
if (sinfo.filled & STATION_INFO_RX_DROP_MISC)
wstats.discard.misc = sinfo.rx_dropped_misc;
if (sinfo.filled & STATION_INFO_TX_FAILED)
wstats.discard.retries = sinfo.tx_failed;

return &wstats;
}
Expand Down

0 comments on commit 9fff35a

Please sign in to comment.