diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-05-27 08:32:13 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-03 14:10:45 -0400 |
commit | 2b2c009ecf71f4c66ff8420b63dddbc9737e04e3 (patch) | |
tree | 62f93194843ecf92d871d34963450c03d165af08 /net/mac80211/driver-ops.h | |
parent | 095dfdb0c479661f437b24b85e31f0d0b841eab6 (diff) |
mac80211: Add support for hardware ARP query filtering
Some hardware allow extended filtering of ARP frames not intended for
the host. To perform such filtering, the hardware needs to know the current
IP address(es) of the host, bound to its interface.
Add support for ARP filtering to mac80211 by adding a new op to the driver
interface, allowing to configure the current IP addresses. This op is called
upon association with the currently configured address(es), and when
associated whenever the IP address(es) change.
This patch adds configuration of IPv4 addresses only, as IPv6 addresses don't
need ARP filtering.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/driver-ops.h')
-rw-r--r-- | net/mac80211/driver-ops.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 4f2271316650..978850ee3a5f 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h | |||
@@ -83,6 +83,23 @@ static inline void drv_bss_info_changed(struct ieee80211_local *local, | |||
83 | trace_drv_bss_info_changed(local, sdata, info, changed); | 83 | trace_drv_bss_info_changed(local, sdata, info, changed); |
84 | } | 84 | } |
85 | 85 | ||
86 | struct in_ifaddr; | ||
87 | static inline int drv_configure_arp_filter(struct ieee80211_local *local, | ||
88 | struct ieee80211_vif *vif, | ||
89 | struct in_ifaddr *ifa_list) | ||
90 | { | ||
91 | int ret = 0; | ||
92 | |||
93 | might_sleep(); | ||
94 | |||
95 | if (local->ops->configure_arp_filter) | ||
96 | ret = local->ops->configure_arp_filter(&local->hw, vif, | ||
97 | ifa_list); | ||
98 | |||
99 | trace_drv_configure_arp_filter(local, vif_to_sdata(vif), ifa_list, ret); | ||
100 | return ret; | ||
101 | } | ||
102 | |||
86 | static inline u64 drv_prepare_multicast(struct ieee80211_local *local, | 103 | static inline u64 drv_prepare_multicast(struct ieee80211_local *local, |
87 | struct netdev_hw_addr_list *mc_list) | 104 | struct netdev_hw_addr_list *mc_list) |
88 | { | 105 | { |