aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-06-04 14:25:44 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-04 14:25:44 -0400
commit26b36cfefaf2be98b225e3c1a399edb0daf52ddd (patch)
tree6344512c5477ebc5d8b2d5862b6e2dc2ce5b865b
parent2826bcd844e05dcbef9b9284bddb7fe88e8d314f (diff)
mac80211: make ARP filtering depend on CONFIG_INET
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/main.c6
-rw-r--r--net/mac80211/mlme.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 045ead9507aa..5706156d1ecf 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -329,6 +329,7 @@ static void ieee80211_recalc_smps_work(struct work_struct *work)
329 mutex_unlock(&local->iflist_mtx); 329 mutex_unlock(&local->iflist_mtx);
330} 330}
331 331
332#ifdef CONFIG_INET
332int ieee80211_set_arp_filter(struct ieee80211_sub_if_data *sdata) 333int ieee80211_set_arp_filter(struct ieee80211_sub_if_data *sdata)
333{ 334{
334 struct in_device *idev; 335 struct in_device *idev;
@@ -380,6 +381,7 @@ static int ieee80211_ifa_changed(struct notifier_block *nb,
380 381
381 return NOTIFY_DONE; 382 return NOTIFY_DONE;
382} 383}
384#endif
383 385
384struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, 386struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
385 const struct ieee80211_ops *ops) 387 const struct ieee80211_ops *ops)
@@ -669,10 +671,12 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
669 goto fail_pm_qos; 671 goto fail_pm_qos;
670 } 672 }
671 673
674#ifdef CONFIG_INET
672 local->ifa_notifier.notifier_call = ieee80211_ifa_changed; 675 local->ifa_notifier.notifier_call = ieee80211_ifa_changed;
673 result = register_inetaddr_notifier(&local->ifa_notifier); 676 result = register_inetaddr_notifier(&local->ifa_notifier);
674 if (result) 677 if (result)
675 goto fail_ifa; 678 goto fail_ifa;
679#endif
676 680
677 return 0; 681 return 0;
678 682
@@ -707,7 +711,9 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw)
707 711
708 pm_qos_remove_notifier(PM_QOS_NETWORK_LATENCY, 712 pm_qos_remove_notifier(PM_QOS_NETWORK_LATENCY,
709 &local->network_latency_notifier); 713 &local->network_latency_notifier);
714#ifdef CONFIG_INET
710 unregister_inetaddr_notifier(&local->ifa_notifier); 715 unregister_inetaddr_notifier(&local->ifa_notifier);
716#endif
711 717
712 rtnl_lock(); 718 rtnl_lock();
713 719
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 7e720133358c..3623bb7c4bf4 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2078,6 +2078,7 @@ static enum work_done_result ieee80211_assoc_done(struct ieee80211_work *wk,
2078 cfg80211_send_assoc_timeout(wk->sdata->dev, 2078 cfg80211_send_assoc_timeout(wk->sdata->dev,
2079 wk->filter_ta); 2079 wk->filter_ta);
2080 return WORK_DONE_DESTROY; 2080 return WORK_DONE_DESTROY;
2081#ifdef CONFIG_INET
2081 } else { 2082 } else {
2082 mutex_unlock(&wk->sdata->u.mgd.mtx); 2083 mutex_unlock(&wk->sdata->u.mgd.mtx);
2083 2084
@@ -2088,6 +2089,7 @@ static enum work_done_result ieee80211_assoc_done(struct ieee80211_work *wk,
2088 rtnl_lock(); 2089 rtnl_lock();
2089 ieee80211_set_arp_filter(wk->sdata); 2090 ieee80211_set_arp_filter(wk->sdata);
2090 rtnl_unlock(); 2091 rtnl_unlock();
2092#endif
2091 } 2093 }
2092 } 2094 }
2093 2095