aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/wireless/nl80211.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 79927706937a..a39e4644778b 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1746,6 +1746,12 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
1746 if (err) 1746 if (err)
1747 goto out_rtnl; 1747 goto out_rtnl;
1748 1748
1749 if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
1750 dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP_VLAN) {
1751 err = -EINVAL;
1752 goto out;
1753 }
1754
1749 err = get_vlan(info->attrs[NL80211_ATTR_STA_VLAN], drv, &params.vlan); 1755 err = get_vlan(info->attrs[NL80211_ATTR_STA_VLAN], drv, &params.vlan);
1750 if (err) 1756 if (err)
1751 goto out; 1757 goto out;
@@ -1789,6 +1795,12 @@ static int nl80211_del_station(struct sk_buff *skb, struct genl_info *info)
1789 if (err) 1795 if (err)
1790 goto out_rtnl; 1796 goto out_rtnl;
1791 1797
1798 if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
1799 dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP_VLAN) {
1800 err = -EINVAL;
1801 goto out;
1802 }
1803
1792 if (!drv->ops->del_station) { 1804 if (!drv->ops->del_station) {
1793 err = -EOPNOTSUPP; 1805 err = -EOPNOTSUPP;
1794 goto out; 1806 goto out;