diff options
Diffstat (limited to 'net/wireless/mlme.c')
-rw-r--r-- | net/wireless/mlme.c | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index 21fc9702f81..6c1bafd508c 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 | ||
884 | void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev) | 887 | void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev) |
@@ -901,7 +904,7 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, | |||
901 | enum nl80211_channel_type channel_type, | 904 | enum nl80211_channel_type channel_type, |
902 | bool channel_type_valid, unsigned int wait, | 905 | bool channel_type_valid, unsigned int wait, |
903 | const u8 *buf, size_t len, bool no_cck, | 906 | const u8 *buf, size_t len, bool no_cck, |
904 | u64 *cookie) | 907 | bool dont_wait_for_ack, u64 *cookie) |
905 | { | 908 | { |
906 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 909 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
907 | const struct ieee80211_mgmt *mgmt; | 910 | const struct ieee80211_mgmt *mgmt; |
@@ -992,7 +995,8 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, | |||
992 | /* Transmit the Action frame as requested by user space */ | 995 | /* Transmit the Action frame as requested by user space */ |
993 | return rdev->ops->mgmt_tx(&rdev->wiphy, dev, chan, offchan, | 996 | return rdev->ops->mgmt_tx(&rdev->wiphy, dev, chan, offchan, |
994 | channel_type, channel_type_valid, | 997 | channel_type, channel_type_valid, |
995 | wait, buf, len, no_cck, cookie); | 998 | wait, buf, len, no_cck, dont_wait_for_ack, |
999 | cookie); | ||
996 | } | 1000 | } |
997 | 1001 | ||
998 | bool cfg80211_rx_mgmt(struct net_device *dev, int freq, const u8 *buf, | 1002 | bool cfg80211_rx_mgmt(struct net_device *dev, int freq, const u8 *buf, |
@@ -1107,3 +1111,30 @@ void cfg80211_pmksa_candidate_notify(struct net_device *dev, int index, | |||
1107 | nl80211_pmksa_candidate_notify(rdev, dev, index, bssid, preauth, gfp); | 1111 | nl80211_pmksa_candidate_notify(rdev, dev, index, bssid, preauth, gfp); |
1108 | } | 1112 | } |
1109 | EXPORT_SYMBOL(cfg80211_pmksa_candidate_notify); | 1113 | EXPORT_SYMBOL(cfg80211_pmksa_candidate_notify); |
1114 | |||
1115 | bool cfg80211_rx_spurious_frame(struct net_device *dev, | ||
1116 | const u8 *addr, gfp_t gfp) | ||
1117 | { | ||
1118 | struct wireless_dev *wdev = dev->ieee80211_ptr; | ||
1119 | |||
1120 | if (WARN_ON(wdev->iftype != NL80211_IFTYPE_AP && | ||
1121 | wdev->iftype != NL80211_IFTYPE_P2P_GO)) | ||
1122 | return false; | ||
1123 | |||
1124 | return nl80211_unexpected_frame(dev, addr, gfp); | ||
1125 | } | ||
1126 | EXPORT_SYMBOL(cfg80211_rx_spurious_frame); | ||
1127 | |||
1128 | bool cfg80211_rx_unexpected_4addr_frame(struct net_device *dev, | ||
1129 | const u8 *addr, gfp_t gfp) | ||
1130 | { | ||
1131 | struct wireless_dev *wdev = dev->ieee80211_ptr; | ||
1132 | |||
1133 | if (WARN_ON(wdev->iftype != NL80211_IFTYPE_AP && | ||
1134 | wdev->iftype != NL80211_IFTYPE_P2P_GO && | ||
1135 | wdev->iftype != NL80211_IFTYPE_AP_VLAN)) | ||
1136 | return false; | ||
1137 | |||
1138 | return nl80211_unexpected_4addr_frame(dev, addr, gfp); | ||
1139 | } | ||
1140 | EXPORT_SYMBOL(cfg80211_rx_unexpected_4addr_frame); | ||