- tds = tbf->bf_desc;
-- ret = ath9k_hw_rxprocdesc(ah, tds, &trs, 0);
-+ ret = ath9k_hw_rxprocdesc(ah, tds, &trs);
- if (ret == -EINPROGRESS)
- return NULL;
- }
-@@ -1978,5 +1978,10 @@ requeue:
-
- spin_unlock_bh(&sc->rx.rxbuflock);
-
-+ if (!(ah->imask & ATH9K_INT_RXEOL)) {
-+ ah->imask |= (ATH9K_INT_RXEOL | ATH9K_INT_RXORN);
-+ ath9k_hw_set_interrupts(ah, ah->imask);
-+ }
-+
- return 0;
- }
---- a/drivers/net/wireless/ath/ath9k/mac.c
-+++ b/drivers/net/wireless/ath/ath9k/mac.c
-@@ -345,21 +345,8 @@ int ath9k_hw_setuptxqueue(struct ath_hw
- }
- memset(qi, 0, sizeof(struct ath9k_tx_queue_info));
- qi->tqi_type = type;
-- if (qinfo == NULL) {
-- qi->tqi_qflags =
-- TXQ_FLAG_TXOKINT_ENABLE
-- | TXQ_FLAG_TXERRINT_ENABLE
-- | TXQ_FLAG_TXDESCINT_ENABLE | TXQ_FLAG_TXURNINT_ENABLE;
-- qi->tqi_aifs = INIT_AIFS;
-- qi->tqi_cwmin = ATH9K_TXQ_USEDEFAULT;
-- qi->tqi_cwmax = INIT_CWMAX;
-- qi->tqi_shretry = INIT_SH_RETRY;
-- qi->tqi_lgretry = INIT_LG_RETRY;
-- qi->tqi_physCompBuf = 0;
-- } else {
-- qi->tqi_physCompBuf = qinfo->tqi_physCompBuf;
-- (void) ath9k_hw_set_txq_props(ah, q, qinfo);
-- }
-+ qi->tqi_physCompBuf = qinfo->tqi_physCompBuf;
-+ (void) ath9k_hw_set_txq_props(ah, q, qinfo);
-
- return q;
- }
-@@ -564,7 +551,7 @@ bool ath9k_hw_resettxqueue(struct ath_hw
- EXPORT_SYMBOL(ath9k_hw_resettxqueue);
-
- int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds,
-- struct ath_rx_status *rs, u64 tsf)
-+ struct ath_rx_status *rs)
- {
- struct ar5416_desc ads;
- struct ar5416_desc *adsp = AR5416DESC(ds);
---- a/drivers/net/wireless/ath/ath9k/mac.h
-+++ b/drivers/net/wireless/ath/ath9k/mac.h
-@@ -687,7 +687,7 @@ int ath9k_hw_setuptxqueue(struct ath_hw
- bool ath9k_hw_releasetxqueue(struct ath_hw *ah, u32 q);
- bool ath9k_hw_resettxqueue(struct ath_hw *ah, u32 q);
- int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds,
-- struct ath_rx_status *rs, u64 tsf);
-+ struct ath_rx_status *rs);
- void ath9k_hw_setuprxdesc(struct ath_hw *ah, struct ath_desc *ds,
- u32 size, u32 flags);
- bool ath9k_hw_setrxabort(struct ath_hw *ah, bool set);
---- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
-+++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
-@@ -839,20 +839,8 @@ static bool ar9003_hw_init_cal(struct at
- struct ath9k_channel *chan)
- {
- struct ath_common *common = ath9k_hw_common(ah);
-- struct ath9k_hw_capabilities *pCap = &ah->caps;
-- int val;
- bool txiqcal_done = false;
-
-- val = REG_READ(ah, AR_ENT_OTP);
-- ath_dbg(common, ATH_DBG_CALIBRATE, "ath9k: AR_ENT_OTP 0x%x\n", val);
--
-- /* Configure rx/tx chains before running AGC/TxiQ cals */
-- if (val & AR_ENT_OTP_CHAIN2_DISABLE)
-- ar9003_hw_set_chain_masks(ah, 0x3, 0x3);
-- else
-- ar9003_hw_set_chain_masks(ah, pCap->rx_chainmask,
-- pCap->tx_chainmask);
--
- /* Do Tx IQ Calibration */
- REG_RMW_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_1,
- AR_PHY_TX_IQCAL_CONTROL_1_IQCORR_I_Q_COFF_DELPT,
-@@ -887,9 +875,6 @@ static bool ar9003_hw_init_cal(struct at
- if (txiqcal_done)
- ar9003_hw_tx_iq_cal_post_proc(ah);
-
-- /* Revert chainmasks to their original values before NF cal */
-- ar9003_hw_set_chain_masks(ah, ah->rxchainmask, ah->txchainmask);
--
- ath9k_hw_start_nfcal(ah, true);
-
- /* Initialize list pointers */
---- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
-+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
-@@ -540,7 +540,7 @@ static void ar9003_hw_init_bb(struct ath
- udelay(synthDelay + BASE_ACTIVATE_DELAY);
- }
-
--void ar9003_hw_set_chain_masks(struct ath_hw *ah, u8 rx, u8 tx)
-+static void ar9003_hw_set_chain_masks(struct ath_hw *ah, u8 rx, u8 tx)
- {
- switch (rx) {
- case 0x5:
---- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h
-+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
-@@ -1124,6 +1124,4 @@
- #define AR_PHY_CL_TAB_CL_GAIN_MOD 0x1f
- #define AR_PHY_CL_TAB_CL_GAIN_MOD_S 0
-
--void ar9003_hw_set_chain_masks(struct ath_hw *ah, u8 rx, u8 tx);
--
- #endif /* AR9003_PHY_H */
---- a/drivers/net/wireless/ath/ath9k/ath9k.h
-+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -558,8 +558,7 @@ struct ath_ant_comb {
- #define SC_OP_BT_PRIORITY_DETECTED BIT(12)
- #define SC_OP_BT_SCAN BIT(13)
- #define SC_OP_ANI_RUN BIT(14)
--#define SC_OP_ENABLE_APM BIT(15)
--#define SC_OP_PRIM_STA_VIF BIT(16)
-+#define SC_OP_PRIM_STA_VIF BIT(15)
-
- /* Powersave flags */
- #define PS_WAIT_FOR_BEACON BIT(0)
-@@ -664,7 +663,6 @@ extern int led_blink;
- extern bool is_ath9k_unloaded;
-
- irqreturn_t ath_isr(int irq, void *dev);
--void ath9k_init_crypto(struct ath_softc *sc);
- int ath9k_init_device(u16 devid, struct ath_softc *sc,
- const struct ath_bus_ops *bus_ops);
- void ath9k_deinit_device(struct ath_softc *sc);
---- a/drivers/net/wireless/ath/ath9k/common.c
-+++ b/drivers/net/wireless/ath/ath9k/common.c
-@@ -169,6 +169,32 @@ void ath9k_cmn_update_txpow(struct ath_h
- }
- EXPORT_SYMBOL(ath9k_cmn_update_txpow);
-
-+void ath9k_cmn_init_crypto(struct ath_hw *ah)
-+{
-+ struct ath_common *common = ath9k_hw_common(ah);
-+ int i = 0;
-+
-+ /* Get the hardware key cache size. */
-+ common->keymax = AR_KEYTABLE_SIZE;
-+
-+ /*
-+ * Check whether the separate key cache entries
-+ * are required to handle both tx+rx MIC keys.
-+ * With split mic keys the number of stations is limited
-+ * to 27 otherwise 59.
-+ */
-+ if (ah->misc_mode & AR_PCU_MIC_NEW_LOC_ENA)
-+ common->crypt_caps |= ATH_CRYPT_CAP_MIC_COMBINED;
-+
-+ /*
-+ * Reset the key cache since some parts do not
-+ * reset the contents on initial power up.
-+ */
-+ for (i = 0; i < common->keymax; i++)
-+ ath_hw_keyreset(common, (u16) i);
-+}
-+EXPORT_SYMBOL(ath9k_cmn_init_crypto);
-+
- static int __init ath9k_cmn_init(void)
- {
- return 0;
---- a/drivers/net/wireless/ath/ath9k/common.h
-+++ b/drivers/net/wireless/ath/ath9k/common.h
-@@ -62,3 +62,4 @@ void ath9k_cmn_btcoex_bt_stomp(struct at
- enum ath_stomp_type stomp_type);
- void ath9k_cmn_update_txpow(struct ath_hw *ah, u16 cur_txpow,
- u16 new_txpow, u16 *txpower);
-+void ath9k_cmn_init_crypto(struct ath_hw *ah);
---- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
-+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
-@@ -572,25 +572,6 @@ err:
- return -EINVAL;
- }