aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 68b6708b996f..5b659068b020 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -7289,7 +7289,8 @@ void nl80211_send_sta_del_event(struct cfg80211_registered_device *rdev,
7289 nlmsg_free(msg); 7289 nlmsg_free(msg);
7290} 7290}
7291 7291
7292bool nl80211_unexpected_frame(struct net_device *dev, const u8 *addr, gfp_t gfp) 7292static bool __nl80211_unexpected_frame(struct net_device *dev, u8 cmd,
7293 const u8 *addr, gfp_t gfp)
7293{ 7294{
7294 struct wireless_dev *wdev = dev->ieee80211_ptr; 7295 struct wireless_dev *wdev = dev->ieee80211_ptr;
7295 struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); 7296 struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy);
@@ -7305,7 +7306,7 @@ bool nl80211_unexpected_frame(struct net_device *dev, const u8 *addr, gfp_t gfp)
7305 if (!msg) 7306 if (!msg)
7306 return true; 7307 return true;
7307 7308
7308 hdr = nl80211hdr_put(msg, 0, 0, 0, NL80211_CMD_UNEXPECTED_FRAME); 7309 hdr = nl80211hdr_put(msg, 0, 0, 0, cmd);
7309 if (!hdr) { 7310 if (!hdr) {
7310 nlmsg_free(msg); 7311 nlmsg_free(msg);
7311 return true; 7312 return true;
@@ -7330,6 +7331,20 @@ bool nl80211_unexpected_frame(struct net_device *dev, const u8 *addr, gfp_t gfp)
7330 return true; 7331 return true;
7331} 7332}
7332 7333
7334bool nl80211_unexpected_frame(struct net_device *dev, const u8 *addr, gfp_t gfp)
7335{
7336 return __nl80211_unexpected_frame(dev, NL80211_CMD_UNEXPECTED_FRAME,
7337 addr, gfp);
7338}
7339
7340bool nl80211_unexpected_4addr_frame(struct net_device *dev,
7341 const u8 *addr, gfp_t gfp)
7342{
7343 return __nl80211_unexpected_frame(dev,
7344 NL80211_CMD_UNEXPECTED_4ADDR_FRAME,
7345 addr, gfp);
7346}
7347
7333int nl80211_send_mgmt(struct cfg80211_registered_device *rdev, 7348int nl80211_send_mgmt(struct cfg80211_registered_device *rdev,
7334 struct net_device *netdev, u32 nlpid, 7349 struct net_device *netdev, u32 nlpid,
7335 int freq, const u8 *buf, size_t len, gfp_t gfp) 7350 int freq, const u8 *buf, size_t len, gfp_t gfp)