staging: rtl8192e: Remove rtllib_stats structure
authorMateusz Kulikowski <mateusz.kulikowski@gmail.com>
Tue, 14 Jul 2015 20:04:09 +0000 (22:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Jul 2015 05:43:29 +0000 (22:43 -0700)
Two remaining fields of rtllib_stats are only incremented, but
never read.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtllib.h
drivers/staging/rtl8192e/rtllib_rx.c
drivers/staging/rtl8192e/rtllib_tx.c

index dc0653a3ad451dc942a6ea1da4956dd57d8cbf2c..c44c8686e6bc4b0fdae99bcec67252af372d6e10 100644 (file)
@@ -690,11 +690,6 @@ struct rtllib_frag_entry {
        u8 dst_addr[ETH_ALEN];
 };
 
-struct rtllib_stats {
-       unsigned int tx_discards;
-       unsigned int rx_discards_undecryptable;
-};
-
 struct rtllib_device;
 
 #define SEC_ACTIVE_KEY    (1<<4)
@@ -1532,7 +1527,6 @@ struct rtllib_device {
 
        /* Bookkeeping structures */
        struct net_device_stats stats;
-       struct rtllib_stats ieee_stats;
        struct rtllib_softmac_stats softmac_stats;
 
        /* Probe / Beacon management */
index da862c3da4ce342be9afb6b673b9cf3766c755ca..0698a0d1f46609ced58635b15962fcbcf68db7cc 100644 (file)
@@ -317,7 +317,6 @@ rtllib_rx_frame_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
                        netdev_dbg(ieee->dev,
                                   "Decryption failed ICV mismatch (key %d)\n",
                                   skb->data[hdrlen + 3] >> 6);
-               ieee->ieee_stats.rx_discards_undecryptable++;
                return -1;
        }
 
@@ -1077,7 +1076,6 @@ static int rtllib_rx_get_crypt(struct rtllib_device *ieee, struct sk_buff *skb,
                        netdev_dbg(ieee->dev,
                                   "Decryption failed (not set) (SA= %pM)\n",
                                   hdr->addr2);
-                       ieee->ieee_stats.rx_discards_undecryptable++;
                        return -1;
                }
        }
index e99ea5e67ef98c6f0be353930417d81ee08d49bf..517500c83d3ef522c132499999f7326f3d5fcbbe 100644 (file)
@@ -205,7 +205,6 @@ int rtllib_encrypt_fragment(struct rtllib_device *ieee, struct sk_buff *frag,
        if (res < 0) {
                netdev_info(ieee->dev, "%s: Encryption failed: len=%d.\n",
                            ieee->dev->name, frag->len);
-               ieee->ieee_stats.tx_discards++;
                return -1;
        }