aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/nl80211.h2
-rw-r--r--net/mac80211/cfg.c6
-rw-r--r--net/wireless/nl80211.c5
3 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 0e652d860819..5ec4ac3a0ef4 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -1174,6 +1174,7 @@ enum nl80211_iftype {
1174 * with short barker preamble 1174 * with short barker preamble
1175 * @NL80211_STA_FLAG_WME: station is WME/QoS capable 1175 * @NL80211_STA_FLAG_WME: station is WME/QoS capable
1176 * @NL80211_STA_FLAG_MFP: station uses management frame protection 1176 * @NL80211_STA_FLAG_MFP: station uses management frame protection
1177 * @NL80211_STA_FLAG_AUTHENTICATED: station is authenticated
1177 * @NL80211_STA_FLAG_MAX: highest station flag number currently defined 1178 * @NL80211_STA_FLAG_MAX: highest station flag number currently defined
1178 * @__NL80211_STA_FLAG_AFTER_LAST: internal use 1179 * @__NL80211_STA_FLAG_AFTER_LAST: internal use
1179 */ 1180 */
@@ -1183,6 +1184,7 @@ enum nl80211_sta_flags {
1183 NL80211_STA_FLAG_SHORT_PREAMBLE, 1184 NL80211_STA_FLAG_SHORT_PREAMBLE,
1184 NL80211_STA_FLAG_WME, 1185 NL80211_STA_FLAG_WME,
1185 NL80211_STA_FLAG_MFP, 1186 NL80211_STA_FLAG_MFP,
1187 NL80211_STA_FLAG_AUTHENTICATED,
1186 1188
1187 /* keep last */ 1189 /* keep last */
1188 __NL80211_STA_FLAG_AFTER_LAST, 1190 __NL80211_STA_FLAG_AFTER_LAST,
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index dc623d884d02..1c25723eacda 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -686,6 +686,12 @@ static void sta_apply_parameters(struct ieee80211_local *local,
686 if (set & BIT(NL80211_STA_FLAG_MFP)) 686 if (set & BIT(NL80211_STA_FLAG_MFP))
687 sta->flags |= WLAN_STA_MFP; 687 sta->flags |= WLAN_STA_MFP;
688 } 688 }
689
690 if (mask & BIT(NL80211_STA_FLAG_AUTHENTICATED)) {
691 sta->flags &= ~WLAN_STA_AUTH;
692 if (set & BIT(NL80211_STA_FLAG_AUTHENTICATED))
693 sta->flags |= WLAN_STA_AUTH;
694 }
689 spin_unlock_irqrestore(&sta->flaglock, flags); 695 spin_unlock_irqrestore(&sta->flaglock, flags);
690 696
691 /* 697 /*
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index cbedfc2a42a2..ce29a0d0e88e 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1925,6 +1925,7 @@ static const struct nla_policy sta_flags_policy[NL80211_STA_FLAG_MAX + 1] = {
1925 [NL80211_STA_FLAG_SHORT_PREAMBLE] = { .type = NLA_FLAG }, 1925 [NL80211_STA_FLAG_SHORT_PREAMBLE] = { .type = NLA_FLAG },
1926 [NL80211_STA_FLAG_WME] = { .type = NLA_FLAG }, 1926 [NL80211_STA_FLAG_WME] = { .type = NLA_FLAG },
1927 [NL80211_STA_FLAG_MFP] = { .type = NLA_FLAG }, 1927 [NL80211_STA_FLAG_MFP] = { .type = NLA_FLAG },
1928 [NL80211_STA_FLAG_AUTHENTICATED] = { .type = NLA_FLAG },
1928}; 1929};
1929 1930
1930static int parse_station_flags(struct genl_info *info, 1931static int parse_station_flags(struct genl_info *info,
@@ -2284,7 +2285,9 @@ static int nl80211_set_station(struct sk_buff *skb, struct genl_info *info)
2284 err = -EINVAL; 2285 err = -EINVAL;
2285 if (params.supported_rates) 2286 if (params.supported_rates)
2286 err = -EINVAL; 2287 err = -EINVAL;
2287 if (params.sta_flags_mask) 2288 if (params.sta_flags_mask &
2289 ~(BIT(NL80211_STA_FLAG_AUTHENTICATED) |
2290 BIT(NL80211_STA_FLAG_AUTHORIZED)))
2288 err = -EINVAL; 2291 err = -EINVAL;
2289 break; 2292 break;
2290 default: 2293 default: