summaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorDavid S. Miller2011-11-09 22:22:15 +0100
committerDavid S. Miller2011-11-09 22:22:15 +0100
commit3b971a7ceb2e39e0cab95c079c738b2052b3e02f (patch)
tree511e1112b22220c0f866718bbfa8cbee386f9d27 /net/wireless/nl80211.c
parentipv4: fix for ip_options_rcv_srr() daddr update. (diff)
parentMerge branch 'master' of ssh://ra.kernel.org/pub/scm/linux/kernel/git/linvill... (diff)
downloadkernel-qcow2-linux-3b971a7ceb2e39e0cab95c079c738b2052b3e02f.tar.gz
kernel-qcow2-linux-3b971a7ceb2e39e0cab95c079c738b2052b3e02f.tar.xz
kernel-qcow2-linux-3b971a7ceb2e39e0cab95c079c738b2052b3e02f.zip
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 48260c2d092a..b3a476fe8272 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -132,8 +132,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
[NL80211_ATTR_MESH_CONFIG] = { .type = NLA_NESTED },
[NL80211_ATTR_SUPPORT_MESH_AUTH] = { .type = NLA_FLAG },
- [NL80211_ATTR_HT_CAPABILITY] = { .type = NLA_BINARY,
- .len = NL80211_HT_CAPABILITY_LEN },
+ [NL80211_ATTR_HT_CAPABILITY] = { .len = NL80211_HT_CAPABILITY_LEN },
[NL80211_ATTR_MGMT_SUBTYPE] = { .type = NLA_U8 },
[NL80211_ATTR_IE] = { .type = NLA_BINARY,
@@ -1253,6 +1252,12 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
goto bad_res;
}
+ if (netdev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
+ netdev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO) {
+ result = -EINVAL;
+ goto bad_res;
+ }
+
nla_for_each_nested(nl_txq_params,
info->attrs[NL80211_ATTR_WIPHY_TXQ_PARAMS],
rem_txq_params) {