ath5k: fix memory leak when fewer than N_PD_CURVES are in use
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / ath / ath5k / reset.c
index 84206898f77d89daa5821a9afeece34b275f3f67..126a4eab35f39d7a10995f0f20ff814a87def88c 100644 (file)
@@ -158,6 +158,11 @@ static void ath5k_hw_init_core_clock(struct ath5k_hw *ah)
        txlat = AR5K_REG_MS(usec_reg, AR5K_USEC_TX_LATENCY_5211);
        rxlat = AR5K_REG_MS(usec_reg, AR5K_USEC_RX_LATENCY_5211);
 
+       /*
+        * Set default Tx frame to Tx data start delay
+        */
+       txf2txs = AR5K_INIT_TXF2TXD_START_DEFAULT;
+
        /*
         * 5210 initvals don't include usec settings
         * so we need to use magic values here for
@@ -1119,8 +1124,11 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
                        /* Non fatal, can happen eg.
                         * on mode change */
                        ret = 0;
-               } else
+               } else {
+                       ATH5K_DBG(ah->ah_sc, ATH5K_DEBUG_RESET,
+                               "fast chan change successful\n");
                        return 0;
+               }
        }
 
        /*