cfg80211: introduce cfg80211_stop_ap
This functionality will be reused when interface is going down. Avoids code duplication. Also adds missing wdev locking. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Johannes Berg

vecāks
b1fbd46976
revīzija
60771780c2
@@ -2521,23 +2521,8 @@ static int nl80211_stop_ap(struct sk_buff *skb, struct genl_info *info)
|
||||
{
|
||||
struct cfg80211_registered_device *rdev = info->user_ptr[0];
|
||||
struct net_device *dev = info->user_ptr[1];
|
||||
struct wireless_dev *wdev = dev->ieee80211_ptr;
|
||||
int err;
|
||||
|
||||
if (!rdev->ops->stop_ap)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
|
||||
dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (!wdev->beacon_interval)
|
||||
return -ENOENT;
|
||||
|
||||
err = rdev->ops->stop_ap(&rdev->wiphy, dev);
|
||||
if (!err)
|
||||
wdev->beacon_interval = 0;
|
||||
return err;
|
||||
return cfg80211_stop_ap(rdev, dev);
|
||||
}
|
||||
|
||||
static const struct nla_policy sta_flags_policy[NL80211_STA_FLAG_MAX + 1] = {
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user