mac80211: rebase ontop of v4.18.5
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / subsys / 150-disable_addr_notifier.patch
1 --- a/net/mac80211/main.c
2 +++ b/net/mac80211/main.c
3 @@ -292,7 +292,7 @@ void ieee80211_restart_hw(struct ieee802
4 }
5 EXPORT_SYMBOL(ieee80211_restart_hw);
6
7 -#ifdef CONFIG_INET
8 +#ifdef __disabled__CONFIG_INET
9 static int ieee80211_ifa_changed(struct notifier_block *nb,
10 unsigned long data, void *arg)
11 {
12 @@ -351,7 +351,7 @@ static int ieee80211_ifa_changed(struct
13 }
14 #endif
15
16 -#if IS_ENABLED(CONFIG_IPV6)
17 +#if IS_ENABLED(__disabled__CONFIG_IPV6)
18 static int ieee80211_ifa6_changed(struct notifier_block *nb,
19 unsigned long data, void *arg)
20 {
21 @@ -1114,14 +1114,14 @@ int ieee80211_register_hw(struct ieee802
22 if (result)
23 goto fail_flows;
24
25 -#ifdef CONFIG_INET
26 +#ifdef __disabled__CONFIG_INET
27 local->ifa_notifier.notifier_call = ieee80211_ifa_changed;
28 result = register_inetaddr_notifier(&local->ifa_notifier);
29 if (result)
30 goto fail_ifa;
31 #endif
32
33 -#if IS_ENABLED(CONFIG_IPV6)
34 +#if IS_ENABLED(__disabled__CONFIG_IPV6)
35 local->ifa6_notifier.notifier_call = ieee80211_ifa6_changed;
36 result = register_inet6addr_notifier(&local->ifa6_notifier);
37 if (result)
38 @@ -1130,13 +1130,13 @@ int ieee80211_register_hw(struct ieee802
39
40 return 0;
41
42 -#if IS_ENABLED(CONFIG_IPV6)
43 +#if IS_ENABLED(__disabled__CONFIG_IPV6)
44 fail_ifa6:
45 -#ifdef CONFIG_INET
46 +#ifdef __disabled__CONFIG_INET
47 unregister_inetaddr_notifier(&local->ifa_notifier);
48 #endif
49 #endif
50 -#if defined(CONFIG_INET) || defined(CONFIG_IPV6)
51 +#if defined(__disabled__CONFIG_INET) || defined(__disabled__CONFIG_IPV6)
52 fail_ifa:
53 #endif
54 ieee80211_txq_teardown_flows(local);
55 @@ -1166,10 +1166,10 @@ void ieee80211_unregister_hw(struct ieee
56 tasklet_kill(&local->tx_pending_tasklet);
57 tasklet_kill(&local->tasklet);
58
59 -#ifdef CONFIG_INET
60 +#ifdef __disabled__CONFIG_INET
61 unregister_inetaddr_notifier(&local->ifa_notifier);
62 #endif
63 -#if IS_ENABLED(CONFIG_IPV6)
64 +#if IS_ENABLED(__disabled__CONFIG_IPV6)
65 unregister_inet6addr_notifier(&local->ifa6_notifier);
66 #endif
67