diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-11-03 09:50:13 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-07 13:19:14 -0500 |
commit | 133a3ff2c934223a8143bfa52401bba962a97165 (patch) | |
tree | 61618a358b6d895ed3c3e5764b7b1e5dc0f2c74a /net/wireless/nl80211.c | |
parent | 6c7394197af90f6a332180e33f5d025d3037d883 (diff) |
cfg80211: allow setting TXQ parameters only in AP mode
In other modes the parameters should not be set.
Right now, mac80211 will set them, even if the
user asked for setting them on VLANs which the
driver doesn't know about, causing all kinds of
trouble.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index b587857a9d7d..b3a476fe8272 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -1252,6 +1252,12 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info) | |||
1252 | goto bad_res; | 1252 | goto bad_res; |
1253 | } | 1253 | } |
1254 | 1254 | ||
1255 | if (netdev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP && | ||
1256 | netdev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO) { | ||
1257 | result = -EINVAL; | ||
1258 | goto bad_res; | ||
1259 | } | ||
1260 | |||
1255 | nla_for_each_nested(nl_txq_params, | 1261 | nla_for_each_nested(nl_txq_params, |
1256 | info->attrs[NL80211_ATTR_WIPHY_TXQ_PARAMS], | 1262 | info->attrs[NL80211_ATTR_WIPHY_TXQ_PARAMS], |
1257 | rem_txq_params) { | 1263 | rem_txq_params) { |