|
@@ -7304,7 +7304,7 @@ int ath10k_mac_register(struct ath10k *ar)
|
|
ath10k_reg_notifier);
|
|
ath10k_reg_notifier);
|
|
if (ret) {
|
|
if (ret) {
|
|
ath10k_err(ar, "failed to initialise regulatory: %i\n", ret);
|
|
ath10k_err(ar, "failed to initialise regulatory: %i\n", ret);
|
|
- goto err_free;
|
|
|
|
|
|
+ goto err_dfs_detector_exit;
|
|
}
|
|
}
|
|
|
|
|
|
ar->hw->wiphy->cipher_suites = cipher_suites;
|
|
ar->hw->wiphy->cipher_suites = cipher_suites;
|
|
@@ -7313,7 +7313,7 @@ int ath10k_mac_register(struct ath10k *ar)
|
|
ret = ieee80211_register_hw(ar->hw);
|
|
ret = ieee80211_register_hw(ar->hw);
|
|
if (ret) {
|
|
if (ret) {
|
|
ath10k_err(ar, "failed to register ieee80211: %d\n", ret);
|
|
ath10k_err(ar, "failed to register ieee80211: %d\n", ret);
|
|
- goto err_free;
|
|
|
|
|
|
+ goto err_dfs_detector_exit;
|
|
}
|
|
}
|
|
|
|
|
|
if (!ath_is_world_regd(&ar->ath_common.regulatory)) {
|
|
if (!ath_is_world_regd(&ar->ath_common.regulatory)) {
|
|
@@ -7327,10 +7327,16 @@ int ath10k_mac_register(struct ath10k *ar)
|
|
|
|
|
|
err_unregister:
|
|
err_unregister:
|
|
ieee80211_unregister_hw(ar->hw);
|
|
ieee80211_unregister_hw(ar->hw);
|
|
|
|
+
|
|
|
|
+err_dfs_detector_exit:
|
|
|
|
+ if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector)
|
|
|
|
+ ar->dfs_detector->exit(ar->dfs_detector);
|
|
|
|
+
|
|
err_free:
|
|
err_free:
|
|
kfree(ar->mac.sbands[IEEE80211_BAND_2GHZ].channels);
|
|
kfree(ar->mac.sbands[IEEE80211_BAND_2GHZ].channels);
|
|
kfree(ar->mac.sbands[IEEE80211_BAND_5GHZ].channels);
|
|
kfree(ar->mac.sbands[IEEE80211_BAND_5GHZ].channels);
|
|
|
|
|
|
|
|
+ SET_IEEE80211_DEV(ar->hw, NULL);
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|