1 #include <linux/ieee80211.h>
2 #include <linux/export.h>
3 #include <net/cfg80211.h>
9 int __cfg80211_stop_ap(struct cfg80211_registered_device
*rdev
,
10 struct net_device
*dev
, bool notify
)
12 struct wireless_dev
*wdev
= dev
->ieee80211_ptr
;
15 ASSERT_WDEV_LOCK(wdev
);
17 if (!rdev
->ops
->stop_ap
)
20 if (dev
->ieee80211_ptr
->iftype
!= NL80211_IFTYPE_AP
&&
21 dev
->ieee80211_ptr
->iftype
!= NL80211_IFTYPE_P2P_GO
)
24 if (!wdev
->beacon_interval
)
27 err
= rdev_stop_ap(rdev
, dev
);
29 wdev
->beacon_interval
= 0;
30 memset(&wdev
->chandef
, 0, sizeof(wdev
->chandef
));
32 rdev_set_qos_map(rdev
, dev
, NULL
);
34 nl80211_send_ap_stopped(wdev
);
36 /* Should we apply the grace period during beaconing interface
39 cfg80211_sched_dfs_chan_update(rdev
);
45 int cfg80211_stop_ap(struct cfg80211_registered_device
*rdev
,
46 struct net_device
*dev
, bool notify
)
48 struct wireless_dev
*wdev
= dev
->ieee80211_ptr
;
52 err
= __cfg80211_stop_ap(rdev
, dev
, notify
);