--- x/drivers/net/wireless/ath/ath9k/htc_drv_init.c +++ y/drivers/net/wireless/ath/ath9k/htc_drv_init.c @@ -837,6 +837,16 @@ static int ath9k_init_device(struct ath9 struct ath_regulatory *reg; char hw_name[64]; + /* Setup TX */ + error = ath9k_tx_init(priv); + if (error != 0) + goto err_tx; + + /* Setup RX */ + error = ath9k_rx_init(priv); + if (error != 0) + goto err_rx; + /* Bring up device */ error = ath9k_init_priv(priv, devid, product, drv_info); if (error != 0) @@ -858,16 +868,6 @@ static int ath9k_init_device(struct ath9 reg = &common->regulatory; - /* Setup TX */ - error = ath9k_tx_init(priv); - if (error != 0) - goto err_tx; - - /* Setup RX */ - error = ath9k_rx_init(priv); - if (error != 0) - goto err_rx; - ath9k_hw_disable(priv->ah); #ifdef CONFIG_MAC80211_LEDS /* must be initialized before ieee80211_register_hw */ @@ -917,16 +917,16 @@ static int ath9k_init_device(struct ath9 err_world: ieee80211_unregister_hw(hw); err_register: - ath9k_rx_cleanup(priv); -err_rx: - ath9k_tx_cleanup(priv); -err_tx: - /* Nothing */ err_regd: /* Nothing */ err_fw: ath9k_deinit_priv(priv); err_init: + ath9k_rx_cleanup(priv); +err_rx: + ath9k_tx_cleanup(priv); +err_tx: + /* Nothing */ return error; }