aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnson <jjohnson@qca.qualcomm.com>2015-10-08 12:15:53 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2015-10-14 02:00:01 -0400
commit0e339447cf2c8b5c742f9be8e2d73bc27b7ac9c4 (patch)
tree77bd29e3fe19f7b6362bb94564192090cb900c22
parent83cfce87d91f06e37bd38f782f0714b406a95873 (diff)
ath10k: cleanup ath10k_mac_register() error handling
The logic in the error-handling path of ath10k_mac_register() is divergent from the logic in ath10k_mac_unregister(). Update the ath10k_mac_register() error handling logic to align with the ath10k_mac_unregister() logic. Signed-off-by: Jeff Johnson <jjohnson@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/ath10k/mac.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 6bfaead35298..f00aafd2c768 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -7304,7 +7304,7 @@ int ath10k_mac_register(struct ath10k *ar)
7304 ath10k_reg_notifier); 7304 ath10k_reg_notifier);
7305 if (ret) { 7305 if (ret) {
7306 ath10k_err(ar, "failed to initialise regulatory: %i\n", ret); 7306 ath10k_err(ar, "failed to initialise regulatory: %i\n", ret);
7307 goto err_free; 7307 goto err_dfs_detector_exit;
7308 } 7308 }
7309 7309
7310 ar->hw->wiphy->cipher_suites = cipher_suites; 7310 ar->hw->wiphy->cipher_suites = cipher_suites;
@@ -7313,7 +7313,7 @@ int ath10k_mac_register(struct ath10k *ar)
7313 ret = ieee80211_register_hw(ar->hw); 7313 ret = ieee80211_register_hw(ar->hw);
7314 if (ret) { 7314 if (ret) {
7315 ath10k_err(ar, "failed to register ieee80211: %d\n", ret); 7315 ath10k_err(ar, "failed to register ieee80211: %d\n", ret);
7316 goto err_free; 7316 goto err_dfs_detector_exit;
7317 } 7317 }
7318 7318
7319 if (!ath_is_world_regd(&ar->ath_common.regulatory)) { 7319 if (!ath_is_world_regd(&ar->ath_common.regulatory)) {
@@ -7327,10 +7327,16 @@ int ath10k_mac_register(struct ath10k *ar)
7327 7327
7328err_unregister: 7328err_unregister:
7329 ieee80211_unregister_hw(ar->hw); 7329 ieee80211_unregister_hw(ar->hw);
7330
7331err_dfs_detector_exit:
7332 if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector)
7333 ar->dfs_detector->exit(ar->dfs_detector);
7334
7330err_free: 7335err_free:
7331 kfree(ar->mac.sbands[IEEE80211_BAND_2GHZ].channels); 7336 kfree(ar->mac.sbands[IEEE80211_BAND_2GHZ].channels);
7332 kfree(ar->mac.sbands[IEEE80211_BAND_5GHZ].channels); 7337 kfree(ar->mac.sbands[IEEE80211_BAND_5GHZ].channels);
7333 7338
7339 SET_IEEE80211_DEV(ar->hw, NULL);
7334 return ret; 7340 return ret;
7335} 7341}
7336 7342