diff options
author | Jouni Malinen <j@w1.fi> | 2009-01-08 06:32:11 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 16:00:08 -0500 |
commit | 4375d08350e3661d5e8860d33eea084e47ba01cf (patch) | |
tree | bb4df587cbe044700e0f29900c51e54ebd06ddd3 | |
parent | 1f7d77ab69789980dad44e1af7afd3a68cd48276 (diff) |
mac80211: 802.11w - Add driver capability flag for MFP
This allows user space to determine whether a driver supports MFP and
behave properly without having to ask user to configure this in
MFP-optional mode.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | include/net/mac80211.h | 4 | ||||
-rw-r--r-- | net/mac80211/wext.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 00a50a38c7f2..9bca2abbf038 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -865,6 +865,9 @@ enum ieee80211_tkip_key_type { | |||
865 | * | 865 | * |
866 | * @IEEE80211_HW_SUPPORTS_DYNAMIC_PS: | 866 | * @IEEE80211_HW_SUPPORTS_DYNAMIC_PS: |
867 | * Hardware has support for dynamic PS. | 867 | * Hardware has support for dynamic PS. |
868 | * | ||
869 | * @IEEE80211_HW_MFP_CAPABLE: | ||
870 | * Hardware supports management frame protection (MFP, IEEE 802.11w). | ||
868 | */ | 871 | */ |
869 | enum ieee80211_hw_flags { | 872 | enum ieee80211_hw_flags { |
870 | IEEE80211_HW_RX_INCLUDES_FCS = 1<<1, | 873 | IEEE80211_HW_RX_INCLUDES_FCS = 1<<1, |
@@ -880,6 +883,7 @@ enum ieee80211_hw_flags { | |||
880 | IEEE80211_HW_SUPPORTS_PS = 1<<11, | 883 | IEEE80211_HW_SUPPORTS_PS = 1<<11, |
881 | IEEE80211_HW_PS_NULLFUNC_STACK = 1<<12, | 884 | IEEE80211_HW_PS_NULLFUNC_STACK = 1<<12, |
882 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<13, | 885 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<13, |
886 | IEEE80211_HW_MFP_CAPABLE = 1<<14, | ||
883 | }; | 887 | }; |
884 | 888 | ||
885 | /** | 889 | /** |
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index 2dd387495dfe..70a29b657b61 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c | |||
@@ -976,6 +976,10 @@ static int ieee80211_ioctl_siwauth(struct net_device *dev, | |||
976 | ret = -EOPNOTSUPP; | 976 | ret = -EOPNOTSUPP; |
977 | break; | 977 | break; |
978 | case IW_AUTH_MFP: | 978 | case IW_AUTH_MFP: |
979 | if (!(sdata->local->hw.flags & IEEE80211_HW_MFP_CAPABLE)) { | ||
980 | ret = -EOPNOTSUPP; | ||
981 | break; | ||
982 | } | ||
979 | if (sdata->vif.type == NL80211_IFTYPE_STATION || | 983 | if (sdata->vif.type == NL80211_IFTYPE_STATION || |
980 | sdata->vif.type == NL80211_IFTYPE_ADHOC) | 984 | sdata->vif.type == NL80211_IFTYPE_ADHOC) |
981 | sdata->u.sta.mfp = data->value; | 985 | sdata->u.sta.mfp = data->value; |