mac80211: remove sta->tx_fragments counter
authorJohannes Berg <johannes.berg@intel.com>
Wed, 22 Apr 2015 18:55:55 +0000 (20:55 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 5 May 2015 12:21:55 +0000 (14:21 +0200)
This counter is unsafe with concurrent TX and is only exposed
through debugfs and ethtool. Instead of trying to fix it just
remove it for now, if it's really needed then it should be
exposed through nl80211 and in a way that drivers that do the
fragmentation in the device could support it as well.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/debugfs_sta.c
net/mac80211/ethtool.c
net/mac80211/sta_info.h
net/mac80211/tx.c

index 252859e90e8a5085f18916edda7a3bf407cdd000..7ca6014140003985ce916b20214c23ab1803e1cb 100644 (file)
@@ -452,7 +452,6 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta)
        DEBUGFS_ADD_COUNTER(rx_duplicates, num_duplicates);
        DEBUGFS_ADD_COUNTER(rx_fragments, rx_fragments);
        DEBUGFS_ADD_COUNTER(rx_dropped, rx_dropped);
-       DEBUGFS_ADD_COUNTER(tx_fragments, tx_fragments);
        DEBUGFS_ADD_COUNTER(tx_filtered, tx_filtered_count);
        DEBUGFS_ADD_COUNTER(tx_retry_failed, tx_retry_failed);
        DEBUGFS_ADD_COUNTER(tx_retry_count, tx_retry_count);
index 52bcea6ad9e8fb612a103ea61dd4dee0a31e2e53..188faab11c24573397b16296af97568afcd206cd 100644 (file)
@@ -38,7 +38,7 @@ static void ieee80211_get_ringparam(struct net_device *dev,
 static const char ieee80211_gstrings_sta_stats[][ETH_GSTRING_LEN] = {
        "rx_packets", "rx_bytes",
        "rx_duplicates", "rx_fragments", "rx_dropped",
-       "tx_packets", "tx_bytes", "tx_fragments",
+       "tx_packets", "tx_bytes",
        "tx_filtered", "tx_retry_failed", "tx_retries",
        "beacon_loss", "sta_state", "txrate", "rxrate", "signal",
        "channel", "noise", "ch_time", "ch_time_busy",
@@ -87,7 +87,6 @@ static void ieee80211_get_stats(struct net_device *dev,
                                                        \
                data[i++] += sinfo.tx_packets;          \
                data[i++] += sinfo.tx_bytes;            \
-               data[i++] += sta->tx_fragments;         \
                data[i++] += sta->tx_filtered_count;    \
                data[i++] += sta->tx_retry_failed;      \
                data[i++] += sta->tx_retry_count;       \
index c821fe47c2d12a3e1186068c3447405063aa1219..fdd981c0fa21734711552c81f5f1185db94fbce6 100644 (file)
@@ -323,7 +323,6 @@ struct ieee80211_fast_tx {
  * @fail_avg: moving percentage of failed MSDUs
  * @tx_packets: number of RX/TX MSDUs
  * @tx_bytes: number of bytes transmitted to this STA
- * @tx_fragments: number of transmitted MPDUs
  * @tid_seq: per-TID sequence numbers for sending to this STA
  * @ampdu_mlme: A-MPDU state machine state
  * @timer_to_tid: identity mapping to ID timers
@@ -433,7 +432,6 @@ struct sta_info {
        unsigned int fail_avg;
 
        /* Updated from TX path only, no locking requirements */
-       u32 tx_fragments;
        u64 tx_packets[IEEE80211_NUM_ACS];
        u64 tx_bytes[IEEE80211_NUM_ACS];
        struct ieee80211_tx_rate last_tx_rate;
index 745fdf5c2722a1e77d2f470b563f86fb96fb3484..db5e40360924f8ecc159d28abad8536626d5c058 100644 (file)
@@ -997,7 +997,6 @@ ieee80211_tx_h_stats(struct ieee80211_tx_data *tx)
 
        skb_queue_walk(&tx->skbs, skb) {
                ac = skb_get_queue_mapping(skb);
-               tx->sta->tx_fragments++;
                tx->sta->tx_bytes[ac] += skb->len;
        }
        if (ac >= 0)
@@ -2804,7 +2803,6 @@ static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,
        /* statistics normally done by ieee80211_tx_h_stats (but that
         * has to consider fragmentation, so is more complex)
         */
-       sta->tx_fragments++;
        sta->tx_bytes[skb_get_queue_mapping(skb)] += skb->len;
        sta->tx_packets[skb_get_queue_mapping(skb)]++;