Try 2: Add wireless statistics to d80211
Subsystems (2)
PATCH 1/4 Try 2: Add wireless statistics to d80211
This patch modifies d80211 to add wireless statistics.
Signed-off-by Larry Finger <[email protected]>
======================================
include/net/d80211.h +5 -0
@@ -205,6 +205,8 @@ struct ieee80211_rx_status {int channel;int phymode;int ssi; +int signal; +int noise;int antenna;int rate;int flag;
@@ -499,6 +501,9 @@ struct ieee80211_hw {/* This is the time in us to change channels */ int channel_change_time; +/* This is maximum value of rssi reported by this interface +*/ +int maxssi;int num_modes;struct ieee80211_hw_modes *modes;
net/d80211/ieee80211.c +2 -0
@@ -3175,6 +3175,8 @@ ieee80211_rx_h_sta_process(struct ieee80 sta->rx_fragments++; sta->rx_bytes += rx->skb->len; sta->last_rssi = rx->u.rx.status->ssi; + sta->last_signal = rx->u.rx.status->signal; + sta->last_noise = rx->u.rx.status->noise;if (!(rx->fc &IEEE80211_FCTL_MOREFRAGS )) {/* Change STA power saving mode only in the end of a frame
net/d80211/ieee80211_i.h +1 -0
@@ -336,6 +336,7 @@ struct ieee80211_local {struct net_device *apdev;/* wlan#ap - management frames (hostapd) */ int open_count;int monitors; +struct iw_statistics wstats;struct ieee80211_conf conf;int dev_index;
net/d80211/ieee80211_ioctl.c +44 -1
69 lines not on this page · raw message
net/d80211/ieee80211_sysfs_sta.c +4 -0
@@ -72,6 +72,8 @@ STA_ATTR(last_txrate, last_txrate, RATE)STA_ATTR (tx_retry_failed, tx_retry_failed,LU );STA_ATTR (tx_retry_count, tx_retry_count,LU );STA_ATTR (last_rssi, last_rssi,D ); +STA_ATTR (last_signal, last_signal,D ); +STA_ATTR (last_noise, last_noise,D );STA_ATTR (channel_use, channel_use,D );STA_ATTR (wep_weak_iv_count, wep_weak_iv_count,D );
@@ -175,6 +177,8 @@ static struct attribute *sta_ktype_attrs &sta_attr_tx_retry_failed.attr, &sta_attr_tx_retry_count.attr, &sta_attr_last_rssi.attr, + &sta_attr_last_signal.attr, + &sta_attr_last_noise.attr, &sta_attr_channel_use.attr, &sta_attr_wep_weak_iv_count.attr,
net/d80211/sta_info.h +2 -0
@@ -82,6 +82,8 @@ struct sta_info {unsigned long rx_dropped;/* number of dropped MPDUs from this STA */ int last_rssi;/* RSSI of last received frame from this STA */ +int last_signal;/* signal of last received frame from this STA */ +int last_noise;/* noise of last received frame from this STA */ int last_ack_rssi[3 ];/* RSSI of last received ACKs from this STA */ unsigned long last_ack;int channel_use;