On non-AP interfaces userspace has no business interfering with the station management, this can confuse mac80211 (and other drivers probably wouldn't support it anyway). Allow adding and removing stations only on AP interfaces. Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx> --- net/wireless/nl80211.c | 8 ++++++++ 1 file changed, 8 insertions(+) --- wireless-testing.orig/net/wireless/nl80211.c 2009-05-11 14:30:25.000000000 +0200 +++ wireless-testing/net/wireless/nl80211.c 2009-05-11 14:32:34.000000000 +0200 @@ -1726,6 +1726,10 @@ static int nl80211_new_station(struct sk if (err) goto out_rtnl; + if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP && + dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP_VLAN) + return -EINVAL; + err = get_vlan(info->attrs[NL80211_ATTR_STA_VLAN], drv, ¶ms.vlan); if (err) goto out; @@ -1769,6 +1773,10 @@ static int nl80211_del_station(struct sk if (err) goto out_rtnl; + if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP && + dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP_VLAN) + return -EINVAL; + if (!drv->ops->del_station) { err = -EOPNOTSUPP; goto out; -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html