diff options
Diffstat (limited to 'drivers/net/wireless/ath/ar9170/main.c')
-rw-r--r-- | drivers/net/wireless/ath/ar9170/main.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c index a6452af9c6c5..257c734733d1 100644 --- a/drivers/net/wireless/ath/ar9170/main.c +++ b/drivers/net/wireless/ath/ar9170/main.c | |||
@@ -2512,7 +2512,7 @@ void *ar9170_alloc(size_t priv_size) | |||
2512 | /* | 2512 | /* |
2513 | * this buffer is used for rx stream reconstruction. | 2513 | * this buffer is used for rx stream reconstruction. |
2514 | * Under heavy load this device (or the transport layer?) | 2514 | * Under heavy load this device (or the transport layer?) |
2515 | * tends to split the streams into seperate rx descriptors. | 2515 | * tends to split the streams into separate rx descriptors. |
2516 | */ | 2516 | */ |
2517 | 2517 | ||
2518 | skb = __dev_alloc_skb(AR9170_MAX_RX_BUFFER_SIZE, GFP_KERNEL); | 2518 | skb = __dev_alloc_skb(AR9170_MAX_RX_BUFFER_SIZE, GFP_KERNEL); |
@@ -2701,7 +2701,8 @@ int ar9170_register(struct ar9170 *ar, struct device *pdev) | |||
2701 | dev_info(pdev, "Atheros AR9170 is registered as '%s'\n", | 2701 | dev_info(pdev, "Atheros AR9170 is registered as '%s'\n", |
2702 | wiphy_name(ar->hw->wiphy)); | 2702 | wiphy_name(ar->hw->wiphy)); |
2703 | 2703 | ||
2704 | return err; | 2704 | ar->registered = true; |
2705 | return 0; | ||
2705 | 2706 | ||
2706 | err_unreg: | 2707 | err_unreg: |
2707 | ieee80211_unregister_hw(ar->hw); | 2708 | ieee80211_unregister_hw(ar->hw); |
@@ -2712,11 +2713,14 @@ err_out: | |||
2712 | 2713 | ||
2713 | void ar9170_unregister(struct ar9170 *ar) | 2714 | void ar9170_unregister(struct ar9170 *ar) |
2714 | { | 2715 | { |
2716 | if (ar->registered) { | ||
2715 | #ifdef CONFIG_AR9170_LEDS | 2717 | #ifdef CONFIG_AR9170_LEDS |
2716 | ar9170_unregister_leds(ar); | 2718 | ar9170_unregister_leds(ar); |
2717 | #endif /* CONFIG_AR9170_LEDS */ | 2719 | #endif /* CONFIG_AR9170_LEDS */ |
2718 | 2720 | ||
2719 | kfree_skb(ar->rx_failover); | ||
2720 | ieee80211_unregister_hw(ar->hw); | 2721 | ieee80211_unregister_hw(ar->hw); |
2722 | } | ||
2723 | |||
2724 | kfree_skb(ar->rx_failover); | ||
2721 | mutex_destroy(&ar->mutex); | 2725 | mutex_destroy(&ar->mutex); |
2722 | } | 2726 | } |