mac80211: add missing set_default to fix stray "radio0: sh: bad number" messages
[openwrt.git] / package / kernel / mac80211 / patches / 150-disable_addr_notifier.patch
1 --- a/net/mac80211/main.c
2 +++ b/net/mac80211/main.c
3 @@ -291,7 +291,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 @@ -350,7 +350,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 @@ -978,14 +978,14 @@ int ieee80211_register_hw(struct ieee802
22                 goto fail_pm_qos;
23         }
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 @@ -994,13 +994,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         pm_qos_remove_notifier(PM_QOS_NETWORK_LATENCY,
54                                &local->network_latency_notifier);
55 @@ -1033,10 +1033,10 @@ void ieee80211_unregister_hw(struct ieee
56  
57         pm_qos_remove_notifier(PM_QOS_NETWORK_LATENCY,
58                                &local->network_latency_notifier);
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