diff options
-rw-r--r-- | include/linux/nl80211.h | 2 | ||||
-rw-r--r-- | include/net/cfg80211.h | 2 | ||||
-rw-r--r-- | net/mac80211/cfg.c | 4 | ||||
-rw-r--r-- | net/mac80211/debugfs_sta.c | 5 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 1 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 7 | ||||
-rw-r--r-- | net/mac80211/sta_info.h | 2 |
7 files changed, 19 insertions, 4 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index e86ed59f9ad5..218f0e73a7ae 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -412,12 +412,14 @@ enum nl80211_iftype { | |||
412 | * @NL80211_STA_FLAG_SHORT_PREAMBLE: station is capable of receiving frames | 412 | * @NL80211_STA_FLAG_SHORT_PREAMBLE: station is capable of receiving frames |
413 | * with short barker preamble | 413 | * with short barker preamble |
414 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable | 414 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable |
415 | * @NL80211_STA_FLAG_MFP: station uses management frame protection | ||
415 | */ | 416 | */ |
416 | enum nl80211_sta_flags { | 417 | enum nl80211_sta_flags { |
417 | __NL80211_STA_FLAG_INVALID, | 418 | __NL80211_STA_FLAG_INVALID, |
418 | NL80211_STA_FLAG_AUTHORIZED, | 419 | NL80211_STA_FLAG_AUTHORIZED, |
419 | NL80211_STA_FLAG_SHORT_PREAMBLE, | 420 | NL80211_STA_FLAG_SHORT_PREAMBLE, |
420 | NL80211_STA_FLAG_WME, | 421 | NL80211_STA_FLAG_WME, |
422 | NL80211_STA_FLAG_MFP, | ||
421 | 423 | ||
422 | /* keep last */ | 424 | /* keep last */ |
423 | __NL80211_STA_FLAG_AFTER_LAST, | 425 | __NL80211_STA_FLAG_AFTER_LAST, |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 23c0ab74ded6..6619ed106134 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -112,12 +112,14 @@ struct beacon_parameters { | |||
112 | * @STATION_FLAG_SHORT_PREAMBLE: station is capable of receiving frames | 112 | * @STATION_FLAG_SHORT_PREAMBLE: station is capable of receiving frames |
113 | * with short preambles | 113 | * with short preambles |
114 | * @STATION_FLAG_WME: station is WME/QoS capable | 114 | * @STATION_FLAG_WME: station is WME/QoS capable |
115 | * @STATION_FLAG_MFP: station uses management frame protection | ||
115 | */ | 116 | */ |
116 | enum station_flags { | 117 | enum station_flags { |
117 | STATION_FLAG_CHANGED = 1<<0, | 118 | STATION_FLAG_CHANGED = 1<<0, |
118 | STATION_FLAG_AUTHORIZED = 1<<NL80211_STA_FLAG_AUTHORIZED, | 119 | STATION_FLAG_AUTHORIZED = 1<<NL80211_STA_FLAG_AUTHORIZED, |
119 | STATION_FLAG_SHORT_PREAMBLE = 1<<NL80211_STA_FLAG_SHORT_PREAMBLE, | 120 | STATION_FLAG_SHORT_PREAMBLE = 1<<NL80211_STA_FLAG_SHORT_PREAMBLE, |
120 | STATION_FLAG_WME = 1<<NL80211_STA_FLAG_WME, | 121 | STATION_FLAG_WME = 1<<NL80211_STA_FLAG_WME, |
122 | STATION_FLAG_MFP = 1<<NL80211_STA_FLAG_MFP, | ||
121 | }; | 123 | }; |
122 | 124 | ||
123 | /** | 125 | /** |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 9d4e4d846ec1..309d9189aa49 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -630,6 +630,10 @@ static void sta_apply_parameters(struct ieee80211_local *local, | |||
630 | sta->flags &= ~WLAN_STA_WME; | 630 | sta->flags &= ~WLAN_STA_WME; |
631 | if (params->station_flags & STATION_FLAG_WME) | 631 | if (params->station_flags & STATION_FLAG_WME) |
632 | sta->flags |= WLAN_STA_WME; | 632 | sta->flags |= WLAN_STA_WME; |
633 | |||
634 | sta->flags &= ~WLAN_STA_MFP; | ||
635 | if (params->station_flags & STATION_FLAG_MFP) | ||
636 | sta->flags |= WLAN_STA_MFP; | ||
633 | spin_unlock_bh(&sta->lock); | 637 | spin_unlock_bh(&sta->lock); |
634 | } | 638 | } |
635 | 639 | ||
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index a2fbe0131312..90230c718b5b 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c | |||
@@ -67,14 +67,15 @@ static ssize_t sta_flags_read(struct file *file, char __user *userbuf, | |||
67 | char buf[100]; | 67 | char buf[100]; |
68 | struct sta_info *sta = file->private_data; | 68 | struct sta_info *sta = file->private_data; |
69 | u32 staflags = get_sta_flags(sta); | 69 | u32 staflags = get_sta_flags(sta); |
70 | int res = scnprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s", | 70 | int res = scnprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s", |
71 | staflags & WLAN_STA_AUTH ? "AUTH\n" : "", | 71 | staflags & WLAN_STA_AUTH ? "AUTH\n" : "", |
72 | staflags & WLAN_STA_ASSOC ? "ASSOC\n" : "", | 72 | staflags & WLAN_STA_ASSOC ? "ASSOC\n" : "", |
73 | staflags & WLAN_STA_PS ? "PS\n" : "", | 73 | staflags & WLAN_STA_PS ? "PS\n" : "", |
74 | staflags & WLAN_STA_AUTHORIZED ? "AUTHORIZED\n" : "", | 74 | staflags & WLAN_STA_AUTHORIZED ? "AUTHORIZED\n" : "", |
75 | staflags & WLAN_STA_SHORT_PREAMBLE ? "SHORT PREAMBLE\n" : "", | 75 | staflags & WLAN_STA_SHORT_PREAMBLE ? "SHORT PREAMBLE\n" : "", |
76 | staflags & WLAN_STA_WME ? "WME\n" : "", | 76 | staflags & WLAN_STA_WME ? "WME\n" : "", |
77 | staflags & WLAN_STA_WDS ? "WDS\n" : ""); | 77 | staflags & WLAN_STA_WDS ? "WDS\n" : "", |
78 | staflags & WLAN_STA_MFP ? "MFP\n" : ""); | ||
78 | return simple_read_from_buffer(userbuf, count, ppos, buf, res); | 79 | return simple_read_from_buffer(userbuf, count, ppos, buf, res); |
79 | } | 80 | } |
80 | STA_OPS(flags); | 81 | STA_OPS(flags); |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 3db6bc3cdaf2..b5f86cb17630 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -260,6 +260,7 @@ struct mesh_preq_queue { | |||
260 | #define IEEE80211_STA_PRIVACY_INVOKED BIT(13) | 260 | #define IEEE80211_STA_PRIVACY_INVOKED BIT(13) |
261 | #define IEEE80211_STA_TKIP_WEP_USED BIT(14) | 261 | #define IEEE80211_STA_TKIP_WEP_USED BIT(14) |
262 | #define IEEE80211_STA_CSA_RECEIVED BIT(15) | 262 | #define IEEE80211_STA_CSA_RECEIVED BIT(15) |
263 | #define IEEE80211_STA_MFP_ENABLED BIT(16) | ||
263 | /* flags for MLME request */ | 264 | /* flags for MLME request */ |
264 | #define IEEE80211_STA_REQ_SCAN 0 | 265 | #define IEEE80211_STA_REQ_SCAN 0 |
265 | #define IEEE80211_STA_REQ_DIRECT_PROBE 1 | 266 | #define IEEE80211_STA_REQ_DIRECT_PROBE 1 |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index a1e683e305f0..bc8a7f1a6a15 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * BSS client mode implementation | 2 | * BSS client mode implementation |
3 | * Copyright 2003, Jouni Malinen <jkmaline@cc.hut.fi> | 3 | * Copyright 2003-2008, Jouni Malinen <j@w1.fi> |
4 | * Copyright 2004, Instant802 Networks, Inc. | 4 | * Copyright 2004, Instant802 Networks, Inc. |
5 | * Copyright 2005, Devicescape Software, Inc. | 5 | * Copyright 2005, Devicescape Software, Inc. |
6 | * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> | 6 | * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> |
@@ -472,7 +472,7 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata, | |||
472 | /* u.deauth.reason_code == u.disassoc.reason_code */ | 472 | /* u.deauth.reason_code == u.disassoc.reason_code */ |
473 | mgmt->u.deauth.reason_code = cpu_to_le16(reason); | 473 | mgmt->u.deauth.reason_code = cpu_to_le16(reason); |
474 | 474 | ||
475 | ieee80211_tx_skb(sdata, skb, 0); | 475 | ieee80211_tx_skb(sdata, skb, ifsta->flags & IEEE80211_STA_MFP_ENABLED); |
476 | } | 476 | } |
477 | 477 | ||
478 | /* MLME */ | 478 | /* MLME */ |
@@ -1408,6 +1408,9 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, | |||
1408 | 1408 | ||
1409 | rate_control_rate_init(sta); | 1409 | rate_control_rate_init(sta); |
1410 | 1410 | ||
1411 | if (ifsta->flags & IEEE80211_STA_MFP_ENABLED) | ||
1412 | set_sta_flags(sta, WLAN_STA_MFP); | ||
1413 | |||
1411 | if (elems.wmm_param) | 1414 | if (elems.wmm_param) |
1412 | set_sta_flags(sta, WLAN_STA_WME); | 1415 | set_sta_flags(sta, WLAN_STA_WME); |
1413 | 1416 | ||
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index b683d3f5ef8a..d13a44b935e2 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h | |||
@@ -34,6 +34,7 @@ | |||
34 | * @WLAN_STA_CLEAR_PS_FILT: Clear PS filter in hardware (using the | 34 | * @WLAN_STA_CLEAR_PS_FILT: Clear PS filter in hardware (using the |
35 | * IEEE80211_TX_CTL_CLEAR_PS_FILT control flag) when the next | 35 | * IEEE80211_TX_CTL_CLEAR_PS_FILT control flag) when the next |
36 | * frame to this station is transmitted. | 36 | * frame to this station is transmitted. |
37 | * @WLAN_STA_MFP: Management frame protection is used with this STA. | ||
37 | */ | 38 | */ |
38 | enum ieee80211_sta_info_flags { | 39 | enum ieee80211_sta_info_flags { |
39 | WLAN_STA_AUTH = 1<<0, | 40 | WLAN_STA_AUTH = 1<<0, |
@@ -46,6 +47,7 @@ enum ieee80211_sta_info_flags { | |||
46 | WLAN_STA_WDS = 1<<7, | 47 | WLAN_STA_WDS = 1<<7, |
47 | WLAN_STA_PSPOLL = 1<<8, | 48 | WLAN_STA_PSPOLL = 1<<8, |
48 | WLAN_STA_CLEAR_PS_FILT = 1<<9, | 49 | WLAN_STA_CLEAR_PS_FILT = 1<<9, |
50 | WLAN_STA_MFP = 1<<10, | ||
49 | }; | 51 | }; |
50 | 52 | ||
51 | #define STA_TID_NUM 16 | 53 | #define STA_TID_NUM 16 |