diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2013-01-15 10:15:57 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-01-16 17:27:49 -0500 |
commit | cee00a959c0a86571e6f99cf42f0261d7e54d2ae (patch) | |
tree | ca8fe105ffd7059ef4f4eaf33197ba0b9a7acb9c /net/wireless/nl80211.c | |
parent | 1c18f1452a772dfe884ed25677bddb3ecaf9c43a (diff) |
cfg80211: Allow use_mfp to be specified with the connect command
The NL80211_ATTR_USE_MFP attribute was originally added for
NL80211_CMD_ASSOCIATE, but it is actually as useful (if not even more
useful) with NL80211_CMD_CONNECT, so process that attribute with the
connect command, too.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index d543cf152100..df82a5c9faee 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -5932,6 +5932,15 @@ static int nl80211_connect(struct sk_buff *skb, struct genl_info *info) | |||
5932 | connect.ie_len = nla_len(info->attrs[NL80211_ATTR_IE]); | 5932 | connect.ie_len = nla_len(info->attrs[NL80211_ATTR_IE]); |
5933 | } | 5933 | } |
5934 | 5934 | ||
5935 | if (info->attrs[NL80211_ATTR_USE_MFP]) { | ||
5936 | connect.mfp = nla_get_u32(info->attrs[NL80211_ATTR_USE_MFP]); | ||
5937 | if (connect.mfp != NL80211_MFP_REQUIRED && | ||
5938 | connect.mfp != NL80211_MFP_NO) | ||
5939 | return -EINVAL; | ||
5940 | } else { | ||
5941 | connect.mfp = NL80211_MFP_NO; | ||
5942 | } | ||
5943 | |||
5935 | if (info->attrs[NL80211_ATTR_WIPHY_FREQ]) { | 5944 | if (info->attrs[NL80211_ATTR_WIPHY_FREQ]) { |
5936 | connect.channel = | 5945 | connect.channel = |
5937 | ieee80211_get_channel(wiphy, | 5946 | ieee80211_get_channel(wiphy, |