aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-11-04 06:18:12 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-11-09 16:05:49 -0500
commit28946da763e8b8d8ffd01ab861b684a4afb4bc3b (patch)
treec4e1cd440702b81c2192a164356da4ba769a29a6 /net/wireless/mlme.c
parent665c93a93e35cafcd8c84073824f1ef1b19f0a7d (diff)
nl80211: allow subscribing to unexpected class3 frames
To implement AP mode without monitor interfaces we need to be able to send a deauth to stations that send frames without being associated. Enable this by adding a new nl80211 event for such frames that an application can subscribe to. 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.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index 21fc9702f81c..f4d868b1e11c 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -879,6 +879,9 @@ void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlpid)
879 } 879 }
880 880
881 spin_unlock_bh(&wdev->mgmt_registrations_lock); 881 spin_unlock_bh(&wdev->mgmt_registrations_lock);
882
883 if (nlpid == wdev->ap_unexpected_nlpid)
884 wdev->ap_unexpected_nlpid = 0;
882} 885}
883 886
884void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev) 887void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev)
@@ -1107,3 +1110,16 @@ void cfg80211_pmksa_candidate_notify(struct net_device *dev, int index,
1107 nl80211_pmksa_candidate_notify(rdev, dev, index, bssid, preauth, gfp); 1110 nl80211_pmksa_candidate_notify(rdev, dev, index, bssid, preauth, gfp);
1108} 1111}
1109EXPORT_SYMBOL(cfg80211_pmksa_candidate_notify); 1112EXPORT_SYMBOL(cfg80211_pmksa_candidate_notify);
1113
1114bool cfg80211_rx_spurious_frame(struct net_device *dev,
1115 const u8 *addr, gfp_t gfp)
1116{
1117 struct wireless_dev *wdev = dev->ieee80211_ptr;
1118
1119 if (WARN_ON(wdev->iftype != NL80211_IFTYPE_AP &&
1120 wdev->iftype != NL80211_IFTYPE_P2P_GO))
1121 return false;
1122
1123 return nl80211_unexpected_frame(dev, addr, gfp);
1124}
1125EXPORT_SYMBOL(cfg80211_rx_spurious_frame);