]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mac80211: make ARP filtering depend on CONFIG_INET
authorJohn W. Linville <linville@tuxdriver.com>
Fri, 4 Jun 2010 18:25:44 +0000 (14:25 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 4 Jun 2010 18:25:44 +0000 (14:25 -0400)
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/main.c
net/mac80211/mlme.c

index 045ead9507aa797e814cfe2b00853ff6b5f1268e..5706156d1ecfab9b863ead264a55b31f3b1569a7 100644 (file)
@@ -329,6 +329,7 @@ static void ieee80211_recalc_smps_work(struct work_struct *work)
        mutex_unlock(&local->iflist_mtx);
 }
 
+#ifdef CONFIG_INET
 int ieee80211_set_arp_filter(struct ieee80211_sub_if_data *sdata)
 {
        struct in_device *idev;
@@ -380,6 +381,7 @@ static int ieee80211_ifa_changed(struct notifier_block *nb,
 
        return NOTIFY_DONE;
 }
+#endif
 
 struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
                                        const struct ieee80211_ops *ops)
@@ -669,10 +671,12 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
                goto fail_pm_qos;
        }
 
+#ifdef CONFIG_INET
        local->ifa_notifier.notifier_call = ieee80211_ifa_changed;
        result = register_inetaddr_notifier(&local->ifa_notifier);
        if (result)
                goto fail_ifa;
+#endif
 
        return 0;
 
@@ -707,7 +711,9 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw)
 
        pm_qos_remove_notifier(PM_QOS_NETWORK_LATENCY,
                               &local->network_latency_notifier);
+#ifdef CONFIG_INET
        unregister_inetaddr_notifier(&local->ifa_notifier);
+#endif
 
        rtnl_lock();
 
index 7e720133358cb8cb49d09a512fb442c7ecd27602..3623bb7c4bf45d2e5b9021568c874f5999b56bbe 100644 (file)
@@ -2078,6 +2078,7 @@ static enum work_done_result ieee80211_assoc_done(struct ieee80211_work *wk,
                        cfg80211_send_assoc_timeout(wk->sdata->dev,
                                                    wk->filter_ta);
                        return WORK_DONE_DESTROY;
+#ifdef CONFIG_INET
                } else {
                        mutex_unlock(&wk->sdata->u.mgd.mtx);
 
@@ -2088,6 +2089,7 @@ static enum work_done_result ieee80211_assoc_done(struct ieee80211_work *wk,
                        rtnl_lock();
                        ieee80211_set_arp_filter(wk->sdata);
                        rtnl_unlock();
+#endif
                }
        }