aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-01-08 06:32:05 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 16:00:05 -0500
commitfdfacf0ae2e8339098b1164d2317b792d7662c0a (patch)
treec30dd93d00d1aa5a7b55ee635d271b2761880c2b
parent22787dbaa3b952602542506e0426ea6d5f104042 (diff)
mac80211: 802.11w - Configuration of MFP disabled/optional/required
Add new WEXT IW_AUTH_* parameter for setting MFP disabled/optional/required. Signed-off-by: Jouni Malinen <j@w1.fi> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--include/linux/wireless.h6
-rw-r--r--net/mac80211/ieee80211_i.h6
-rw-r--r--net/mac80211/mlme.c4
-rw-r--r--net/mac80211/wext.c7
4 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/wireless.h b/include/linux/wireless.h
index 5d1f3fbffd77..cb24204851f7 100644
--- a/include/linux/wireless.h
+++ b/include/linux/wireless.h
@@ -578,6 +578,7 @@
578#define IW_AUTH_ROAMING_CONTROL 9 578#define IW_AUTH_ROAMING_CONTROL 9
579#define IW_AUTH_PRIVACY_INVOKED 10 579#define IW_AUTH_PRIVACY_INVOKED 10
580#define IW_AUTH_CIPHER_GROUP_MGMT 11 580#define IW_AUTH_CIPHER_GROUP_MGMT 11
581#define IW_AUTH_MFP 12
581 582
582/* IW_AUTH_WPA_VERSION values (bit field) */ 583/* IW_AUTH_WPA_VERSION values (bit field) */
583#define IW_AUTH_WPA_VERSION_DISABLED 0x00000001 584#define IW_AUTH_WPA_VERSION_DISABLED 0x00000001
@@ -607,6 +608,11 @@
607#define IW_AUTH_ROAMING_DISABLE 1 /* user space program used for roaming 608#define IW_AUTH_ROAMING_DISABLE 1 /* user space program used for roaming
608 * control */ 609 * control */
609 610
611/* IW_AUTH_MFP (management frame protection) values */
612#define IW_AUTH_MFP_DISABLED 0 /* MFP disabled */
613#define IW_AUTH_MFP_OPTIONAL 1 /* MFP optional */
614#define IW_AUTH_MFP_REQUIRED 2 /* MFP required */
615
610/* SIOCSIWENCODEEXT definitions */ 616/* SIOCSIWENCODEEXT definitions */
611#define IW_ENCODE_SEQ_MAX_SIZE 8 617#define IW_ENCODE_SEQ_MAX_SIZE 8
612/* struct iw_encode_ext ->alg */ 618/* struct iw_encode_ext ->alg */
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 8c3245717c55..212c732fbba7 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -320,6 +320,12 @@ struct ieee80211_if_sta {
320 int auth_alg; /* currently used IEEE 802.11 authentication algorithm */ 320 int auth_alg; /* currently used IEEE 802.11 authentication algorithm */
321 int auth_transaction; 321 int auth_transaction;
322 322
323 enum {
324 IEEE80211_MFP_DISABLED,
325 IEEE80211_MFP_OPTIONAL,
326 IEEE80211_MFP_REQUIRED
327 } mfp; /* management frame protection */
328
323 unsigned long ibss_join_req; 329 unsigned long ibss_join_req;
324 struct sk_buff *probe_resp; /* ProbeResp template for IBSS */ 330 struct sk_buff *probe_resp; /* ProbeResp template for IBSS */
325 u32 supp_rates_bits[IEEE80211_NUM_BANDS]; 331 u32 supp_rates_bits[IEEE80211_NUM_BANDS];
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index bc8a7f1a6a15..42c5f981c715 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2317,6 +2317,10 @@ static int ieee80211_sta_config_auth(struct ieee80211_sub_if_data *sdata,
2317 selected->ssid_len); 2317 selected->ssid_len);
2318 ieee80211_sta_set_bssid(sdata, selected->bssid); 2318 ieee80211_sta_set_bssid(sdata, selected->bssid);
2319 ieee80211_sta_def_wmm_params(sdata, selected); 2319 ieee80211_sta_def_wmm_params(sdata, selected);
2320 if (sdata->u.sta.mfp == IEEE80211_MFP_REQUIRED)
2321 sdata->u.sta.flags |= IEEE80211_STA_MFP_ENABLED;
2322 else
2323 sdata->u.sta.flags &= ~IEEE80211_STA_MFP_ENABLED;
2320 2324
2321 /* Send out direct probe if no probe resp was received or 2325 /* Send out direct probe if no probe resp was received or
2322 * the one we have is outdated 2326 * the one we have is outdated
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index 7ba1d5ba3afa..2dd387495dfe 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -975,6 +975,13 @@ static int ieee80211_ioctl_siwauth(struct net_device *dev,
975 else 975 else
976 ret = -EOPNOTSUPP; 976 ret = -EOPNOTSUPP;
977 break; 977 break;
978 case IW_AUTH_MFP:
979 if (sdata->vif.type == NL80211_IFTYPE_STATION ||
980 sdata->vif.type == NL80211_IFTYPE_ADHOC)
981 sdata->u.sta.mfp = data->value;
982 else
983 ret = -EOPNOTSUPP;
984 break;
978 default: 985 default:
979 ret = -EOPNOTSUPP; 986 ret = -EOPNOTSUPP;
980 break; 987 break;