aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVivek Natarajan <nataraja@qca.qualcomm.com>2011-09-15 11:00:43 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2011-09-19 03:01:55 -0400
commit9df337a104ab99c595cc4ede2c917ba1c2b66374 (patch)
treeb30d4e412ec3c057f3d7ed88eabf2da67e9a9aef
parent151411e88fe1d1a729a4f706a2aebef8bc000a69 (diff)
ath6kl: deinitialise wiphy on error
This fixes the following panic observed on card removal. BUG: unable to handle kernel paging request at f86e22ac EIP is at wiphy_update_regulatory+0x252/0x590 [cfg80211] Call Trace: [<f92fb9e5>] set_regdom+0x165/0x600 [cfg80211] [<c02057ba>] ? __kmalloc+0x10a/0x190 [<c0366557>] ? nla_parse+0xb7/0xd0 [<f9300b92>] ? T.1400+0x12/0x20 [cfg80211] [<f9300c84>] nl80211_set_reg+0xe4/0x270 [cfg80211] [<f92fe560>] ? nl80211_pre_doit+0x0/0x160 [cfg80211] [<c050bdeb>] genl_rcv_msg+0x23b/0x280 [<c050bbb0>] ? genl_rcv_msg+0x0/0x280 [<c050ab76>] netlink_rcv_skb+0x86/0xb0 [<c050bb80>] ? genl_rcv+0x0/0x30 [<c050bb9c>] genl_rcv+0x1c/0x30 Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/ath6kl/sdio.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c
index 0cce80169670..4724ddfab4f7 100644
--- a/drivers/net/wireless/ath/ath6kl/sdio.c
+++ b/drivers/net/wireless/ath/ath6kl/sdio.c
@@ -25,6 +25,7 @@
25#include "hif-ops.h" 25#include "hif-ops.h"
26#include "target.h" 26#include "target.h"
27#include "debug.h" 27#include "debug.h"
28#include "cfg80211.h"
28 29
29struct ath6kl_sdio { 30struct ath6kl_sdio {
30 struct sdio_func *func; 31 struct sdio_func *func;
@@ -816,7 +817,7 @@ static int ath6kl_sdio_probe(struct sdio_func *func,
816 ath6kl_err("Failed to enable 4-bit async irq mode %d\n", 817 ath6kl_err("Failed to enable 4-bit async irq mode %d\n",
817 ret); 818 ret);
818 sdio_release_host(func); 819 sdio_release_host(func);
819 goto err_dma; 820 goto err_cfg80211;
820 } 821 }
821 822
822 ath6kl_dbg(ATH6KL_DBG_TRC, "4-bit async irq mode enabled\n"); 823 ath6kl_dbg(ATH6KL_DBG_TRC, "4-bit async irq mode enabled\n");
@@ -829,7 +830,7 @@ static int ath6kl_sdio_probe(struct sdio_func *func,
829 830
830 ret = ath6kl_sdio_power_on(ar_sdio); 831 ret = ath6kl_sdio_power_on(ar_sdio);
831 if (ret) 832 if (ret)
832 goto err_dma; 833 goto err_cfg80211;
833 834
834 sdio_claim_host(func); 835 sdio_claim_host(func);
835 836
@@ -853,6 +854,8 @@ static int ath6kl_sdio_probe(struct sdio_func *func,
853 854
854err_off: 855err_off:
855 ath6kl_sdio_power_off(ar_sdio); 856 ath6kl_sdio_power_off(ar_sdio);
857err_cfg80211:
858 ath6kl_cfg80211_deinit(ar_sdio->ar);
856err_dma: 859err_dma:
857 kfree(ar_sdio->dma_buffer); 860 kfree(ar_sdio->dma_buffer);
858err_hif: 861err_hif: