mac80211: Update to version 5.15.81
[openwrt/staging/wigyori.git] / package / kernel / mac80211 / patches / subsys / 150-disable_addr_notifier.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Sun, 24 Feb 2013 00:00:00 +0100
3 Subject: [PATCH] mac80211: disable ipv4/ipv6 address notifiers
4
5 ---
6 net/mac80211/main.c | 18 +++++++++---------
7 1 file changed, 9 insertions(+), 9 deletions(-)
8
9 --- a/net/mac80211/main.c
10 +++ b/net/mac80211/main.c
11 @@ -337,7 +337,7 @@ void ieee80211_restart_hw(struct ieee802
12 }
13 EXPORT_SYMBOL(ieee80211_restart_hw);
14
15 -#ifdef CONFIG_INET
16 +#ifdef __disabled__CONFIG_INET
17 static int ieee80211_ifa_changed(struct notifier_block *nb,
18 unsigned long data, void *arg)
19 {
20 @@ -396,7 +396,7 @@ static int ieee80211_ifa_changed(struct
21 }
22 #endif
23
24 -#if IS_ENABLED(CONFIG_IPV6)
25 +#if IS_ENABLED(__disabled__CONFIG_IPV6)
26 static int ieee80211_ifa6_changed(struct notifier_block *nb,
27 unsigned long data, void *arg)
28 {
29 @@ -1321,14 +1321,14 @@ int ieee80211_register_hw(struct ieee802
30 wiphy_unlock(hw->wiphy);
31 rtnl_unlock();
32
33 -#ifdef CONFIG_INET
34 +#ifdef __disabled__CONFIG_INET
35 local->ifa_notifier.notifier_call = ieee80211_ifa_changed;
36 result = register_inetaddr_notifier(&local->ifa_notifier);
37 if (result)
38 goto fail_ifa;
39 #endif
40
41 -#if IS_ENABLED(CONFIG_IPV6)
42 +#if IS_ENABLED(__disabled__CONFIG_IPV6)
43 local->ifa6_notifier.notifier_call = ieee80211_ifa6_changed;
44 result = register_inet6addr_notifier(&local->ifa6_notifier);
45 if (result)
46 @@ -1337,13 +1337,13 @@ int ieee80211_register_hw(struct ieee802
47
48 return 0;
49
50 -#if IS_ENABLED(CONFIG_IPV6)
51 +#if IS_ENABLED(__disabled__CONFIG_IPV6)
52 fail_ifa6:
53 -#ifdef CONFIG_INET
54 +#ifdef __disabled__CONFIG_INET
55 unregister_inetaddr_notifier(&local->ifa_notifier);
56 #endif
57 #endif
58 -#if defined(CONFIG_INET) || defined(CONFIG_IPV6)
59 +#if defined(__disabled__CONFIG_INET) || defined(__disabled__CONFIG_IPV6)
60 fail_ifa:
61 #endif
62 wiphy_unregister(local->hw.wiphy);
63 @@ -1373,10 +1373,10 @@ void ieee80211_unregister_hw(struct ieee
64 tasklet_kill(&local->tx_pending_tasklet);
65 tasklet_kill(&local->tasklet);
66
67 -#ifdef CONFIG_INET
68 +#ifdef __disabled__CONFIG_INET
69 unregister_inetaddr_notifier(&local->ifa_notifier);
70 #endif
71 -#if IS_ENABLED(CONFIG_IPV6)
72 +#if IS_ENABLED(__disabled__CONFIG_IPV6)
73 unregister_inet6addr_notifier(&local->ifa6_notifier);
74 #endif
75