aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-05-10 14:14:43 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-05-16 13:08:15 -0400
commit3383b5a69de59eeef2501834c6e0960b7e2bff28 (patch)
tree08dd59ffc3e6b53ab59b2da27fcaecbe51092b23 /net
parentbdbc59b35f2a66cdd9465f573f865cc2109ab33d (diff)
nl80211: prevent additions to old station flags API
We don't really want/need to maintain the old station flags API any more, so refuse changes to new (not yet defined) flags from the old flags API. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/nl80211.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index b67b1114e25a..f1b0774d098b 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2410,10 +2410,16 @@ static int parse_station_flags(struct genl_info *info,
2410 return -EINVAL; 2410 return -EINVAL;
2411 } 2411 }
2412 2412
2413 for (flag = 1; flag <= NL80211_STA_FLAG_MAX; flag++) 2413 for (flag = 1; flag <= NL80211_STA_FLAG_MAX; flag++) {
2414 if (flags[flag]) 2414 if (flags[flag]) {
2415 params->sta_flags_set |= (1<<flag); 2415 params->sta_flags_set |= (1<<flag);
2416 2416
2417 /* no longer support new API additions in old API */
2418 if (flag > NL80211_STA_FLAG_MAX_OLD_API)
2419 return -EINVAL;
2420 }
2421 }
2422
2417 return 0; 2423 return 0;
2418} 2424}
2419 2425