]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ath9k: completely zero intialize valid_phy_rate_idx
authorMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Tue, 28 Feb 2012 15:24:43 +0000 (20:54 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 5 Mar 2012 20:23:14 +0000 (15:23 -0500)
its better to zero initialize the 'valid_phy_rate_idx' array completely

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/rc.c
drivers/net/wireless/ath/ath9k/rc.h

index b8c6c38cbb98ca1c570b989590e2ad4ee366fb22..6407af22f7b90b216752198703574670f48726c9 100644 (file)
@@ -1226,7 +1226,7 @@ static void ath_rc_init(struct ath_softc *sc,
        ath_rc_init_valid_rate_idx(ath_rc_priv);
 
        for (i = 0; i < WLAN_RC_PHY_MAX; i++) {
-               for (j = 0; j < MAX_TX_RATE_PHY; j++)
+               for (j = 0; j < RATE_TABLE_SIZE; j++)
                        ath_rc_priv->valid_phy_rateidx[i][j] = 0;
                ath_rc_priv->valid_phy_ratecnt[i] = 0;
        }
index b7a4bcd3eec70f02c62f11e0a23ea7ff843813f2..75f8e9b06b2859d2866f16653c3a22913ee6baf5 100644 (file)
@@ -25,8 +25,6 @@ struct ath_softc;
 
 #define ATH_RATE_MAX     30
 #define RATE_TABLE_SIZE  72
-#define MAX_TX_RATE_PHY  48
-
 
 #define RC_INVALID     0x0000
 #define RC_LEGACY      0x0001