aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/init.c
diff options
context:
space:
mode:
authorKalle Valo <kvalo@qca.qualcomm.com>2013-03-09 05:01:35 -0500
committerKalle Valo <kvalo@qca.qualcomm.com>2013-03-18 07:37:46 -0400
commitec1461dc30feb422af65ee849137f56e7f87f55e (patch)
tree1584c29dd220906bdc3d217c6371d32f183d9d96 /drivers/net/wireless/ath/ath6kl/init.c
parente72c27464cce59be432e6322a407a4d94626f8df (diff)
ath6kl: cleanup ath6kl_reset_device()
Move it to init.c, make it static, remove all useless checks and force it to always do cold reset. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/init.c')
-rw-r--r--drivers/net/wireless/ath/ath6kl/init.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c
index 3e45adc4a5c2..ae1e477ec0d2 100644
--- a/drivers/net/wireless/ath/ath6kl/init.c
+++ b/drivers/net/wireless/ath/ath6kl/init.c
@@ -1619,6 +1619,14 @@ static void ath6kl_init_get_fwcaps(struct ath6kl *ar, char *buf, size_t buf_len)
1619 buf[len] = '\0'; 1619 buf[len] = '\0';
1620} 1620}
1621 1621
1622static int ath6kl_init_hw_reset(struct ath6kl *ar)
1623{
1624 ath6kl_dbg(ATH6KL_DBG_BOOT, "cold resetting the device");
1625
1626 return ath6kl_diag_write32(ar, RESET_CONTROL_ADDRESS,
1627 cpu_to_le32(RESET_CONTROL_COLD_RST));
1628}
1629
1622static int __ath6kl_init_hw_start(struct ath6kl *ar) 1630static int __ath6kl_init_hw_start(struct ath6kl *ar)
1623{ 1631{
1624 long timeleft; 1632 long timeleft;
@@ -1836,9 +1844,7 @@ void ath6kl_stop_txrx(struct ath6kl *ar)
1836 * Try to reset the device if we can. The driver may have been 1844 * Try to reset the device if we can. The driver may have been
1837 * configure NOT to reset the target during a debug session. 1845 * configure NOT to reset the target during a debug session.
1838 */ 1846 */
1839 ath6kl_dbg(ATH6KL_DBG_TRC, 1847 ath6kl_init_hw_reset(ar);
1840 "attempting to reset target on instance destroy\n");
1841 ath6kl_reset_device(ar, ar->target_type, true, true);
1842 1848
1843 up(&ar->sem); 1849 up(&ar->sem);
1844} 1850}