|
@@ -5648,15 +5648,9 @@ static int hdd_register_notifiers(struct hdd_context *hdd_ctx)
|
|
|
{
|
|
|
int ret;
|
|
|
|
|
|
- ret = register_netdevice_notifier(&hdd_netdev_notifier);
|
|
|
- if (ret) {
|
|
|
- hdd_err("register_netdevice_notifier failed: %d", ret);
|
|
|
- goto out;
|
|
|
- }
|
|
|
-
|
|
|
ret = hdd_wlan_register_ip6_notifier(hdd_ctx);
|
|
|
if (ret)
|
|
|
- goto unregister_notifier;
|
|
|
+ goto out;
|
|
|
|
|
|
hdd_ctx->ipv4_notifier.notifier_call = wlan_hdd_ipv4_changed;
|
|
|
ret = register_inetaddr_notifier(&hdd_ctx->ipv4_notifier);
|
|
@@ -5669,8 +5663,6 @@ static int hdd_register_notifiers(struct hdd_context *hdd_ctx)
|
|
|
|
|
|
unregister_ip6_notifier:
|
|
|
hdd_wlan_unregister_ip6_notifier(hdd_ctx);
|
|
|
-unregister_notifier:
|
|
|
- unregister_netdevice_notifier(&hdd_netdev_notifier);
|
|
|
out:
|
|
|
return ret;
|
|
|
|
|
@@ -5689,8 +5681,6 @@ void hdd_unregister_notifiers(struct hdd_context *hdd_ctx)
|
|
|
hdd_wlan_unregister_ip6_notifier(hdd_ctx);
|
|
|
|
|
|
unregister_inetaddr_notifier(&hdd_ctx->ipv4_notifier);
|
|
|
-
|
|
|
- unregister_netdevice_notifier(&hdd_netdev_notifier);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -6024,6 +6014,8 @@ static void hdd_wlan_exit(struct hdd_context *hdd_ctx)
|
|
|
QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
|
|
|
}
|
|
|
|
|
|
+ unregister_netdevice_notifier(&hdd_netdev_notifier);
|
|
|
+
|
|
|
hdd_wlan_stop_modules(hdd_ctx, false);
|
|
|
|
|
|
qdf_spinlock_destroy(&hdd_ctx->hdd_adapter_lock);
|
|
@@ -9758,6 +9750,10 @@ int hdd_wlan_startup(struct device *dev)
|
|
|
|
|
|
hdd_initialize_mac_address(hdd_ctx);
|
|
|
|
|
|
+ ret = hdd_register_notifiers(hdd_ctx);
|
|
|
+ if (ret)
|
|
|
+ goto err_ipa_cleanup;
|
|
|
+
|
|
|
rtnl_held = hdd_hold_rtnl_lock();
|
|
|
|
|
|
ret = hdd_open_interfaces(hdd_ctx, rtnl_held);
|
|
@@ -9793,10 +9789,6 @@ int hdd_wlan_startup(struct device *dev)
|
|
|
if (hdd_ctx->rps)
|
|
|
hdd_set_rps_cpu_mask(hdd_ctx);
|
|
|
|
|
|
- ret = hdd_register_notifiers(hdd_ctx);
|
|
|
- if (ret)
|
|
|
- goto err_close_adapters;
|
|
|
-
|
|
|
status = wlansap_global_init();
|
|
|
if (QDF_IS_STATUS_ERROR(status))
|
|
|
goto err_close_adapters;
|
|
@@ -9873,6 +9865,7 @@ err_release_rtnl_lock:
|
|
|
if (rtnl_held)
|
|
|
hdd_release_rtnl_lock();
|
|
|
|
|
|
+err_ipa_cleanup:
|
|
|
hdd_ipa_cleanup(hdd_ctx);
|
|
|
|
|
|
err_wiphy_unregister:
|