From 8b706a99b82d3189475d53c40e72b99f9e678ad4 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 12 Jan 2013 09:54:54 +0200 Subject: [PATCH] nl80211: Add MFP information for NL80211_CMD_CONNECT This was previously included only with NL80211_CMD_ASSOCIATE, but the information is as useful (if not even more useful) for NL80211_CMD_CONNECT. It should be noted that cfg80211 does not yet use this attribute with NL80211_CMD_CONNECT, but that can be added easily. Signed-hostap: Jouni Malinen --- src/drivers/driver_nl80211.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index cf9b68379..6d2ed2831 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -6945,6 +6945,11 @@ skip_auth_type: NLA_PUT_U32(msg, NL80211_ATTR_AKM_SUITES, mgmt); } +#ifdef CONFIG_IEEE80211W + if (params->mgmt_frame_protection == MGMT_FRAME_PROTECTION_REQUIRED) + NLA_PUT_U32(msg, NL80211_ATTR_USE_MFP, NL80211_MFP_REQUIRED); +#endif /* CONFIG_IEEE80211W */ + if (params->disable_ht) NLA_PUT_FLAG(msg, NL80211_ATTR_DISABLE_HT);