summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/net/mac80211.h4
-rw-r--r--net/mac80211/wext.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 00a50a3..9bca2ab 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -865,6 +865,9 @@ enum ieee80211_tkip_key_type {
*
* @IEEE80211_HW_SUPPORTS_DYNAMIC_PS:
* Hardware has support for dynamic PS.
+ *
+ * @IEEE80211_HW_MFP_CAPABLE:
+ * Hardware supports management frame protection (MFP, IEEE 802.11w).
*/
enum ieee80211_hw_flags {
IEEE80211_HW_RX_INCLUDES_FCS = 1<<1,
@@ -880,6 +883,7 @@ enum ieee80211_hw_flags {
IEEE80211_HW_SUPPORTS_PS = 1<<11,
IEEE80211_HW_PS_NULLFUNC_STACK = 1<<12,
IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<13,
+ IEEE80211_HW_MFP_CAPABLE = 1<<14,
};
/**
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index 2dd3874..70a29b6 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -976,6 +976,10 @@ static int ieee80211_ioctl_siwauth(struct net_device *dev,
ret = -EOPNOTSUPP;
break;
case IW_AUTH_MFP:
+ if (!(sdata->local->hw.flags & IEEE80211_HW_MFP_CAPABLE)) {
+ ret = -EOPNOTSUPP;
+ break;
+ }
if (sdata->vif.type == NL80211_IFTYPE_STATION ||
sdata->vif.type == NL80211_IFTYPE_ADHOC)
sdata->u.sta.mfp = data->value;