aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-11-04 06:18:19 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-11-09 16:13:52 -0500
commitb92ab5d86dafc2b3733c5fdd5def40c8fe7ea7c9 (patch)
tree2676545e9b179102b00e02cc19b9643e8f718871 /net/wireless/mlme.c
parentee971924543fe82f279d3e97f6f6d02320b381b7 (diff)
cfg80211: add event for unexpected 4addr frames
The frames are used by AP/STA WDS mode, and hostapd needs to know when such a frame was received to set up the VLAN appropriately to allow using it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/mlme.c')
-rw-r--r--net/wireless/mlme.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index f4d868b1e11c..34891e08c54a 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -1123,3 +1123,17 @@ bool cfg80211_rx_spurious_frame(struct net_device *dev,
1123 return nl80211_unexpected_frame(dev, addr, gfp); 1123 return nl80211_unexpected_frame(dev, addr, gfp);
1124} 1124}
1125EXPORT_SYMBOL(cfg80211_rx_spurious_frame); 1125EXPORT_SYMBOL(cfg80211_rx_spurious_frame);
1126
1127bool cfg80211_rx_unexpected_4addr_frame(struct net_device *dev,
1128 const u8 *addr, gfp_t gfp)
1129{
1130 struct wireless_dev *wdev = dev->ieee80211_ptr;
1131
1132 if (WARN_ON(wdev->iftype != NL80211_IFTYPE_AP &&
1133 wdev->iftype != NL80211_IFTYPE_P2P_GO &&
1134 wdev->iftype != NL80211_IFTYPE_AP_VLAN))
1135 return false;
1136
1137 return nl80211_unexpected_4addr_frame(dev, addr, gfp);
1138}
1139EXPORT_SYMBOL(cfg80211_rx_unexpected_4addr_frame);