hotplug2 rules: Run /etc/hotplug.d/firmware/ scripts (if any) on firmware load events
[openwrt.git] / package / hostapd / patches / 551-nl80211_del_beacon_bss.patch
1 --- a/src/drivers/driver_nl80211.c
2 +++ b/src/drivers/driver_nl80211.c
3 @@ -2044,23 +2044,41 @@ wpa_driver_nl80211_finish_drv_init(struc
4 }
5
6
7 -static int wpa_driver_nl80211_del_beacon(struct wpa_driver_nl80211_data *drv)
8 +static int wpa_driver_nl80211_del_bss_beacon(struct i802_bss *bss)
9 {
10 + struct wpa_driver_nl80211_data *drv = bss->drv;
11 struct nl_msg *msg;
12
13 + bss->beacon_set = 0;
14 +
15 msg = nlmsg_alloc();
16 if (!msg)
17 return -ENOMEM;
18
19 genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
20 0, NL80211_CMD_DEL_BEACON, 0);
21 - NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
22 + NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, bss->ifindex);
23
24 return send_and_recv_msgs(drv, msg, NULL, NULL);
25 nla_put_failure:
26 + nlmsg_free(msg);
27 return -ENOBUFS;
28 }
29
30 +static int wpa_driver_nl80211_del_beacon(struct wpa_driver_nl80211_data *drv)
31 +{
32 + struct i802_bss *bss;
33 +
34 + for (bss = &drv->first_bss; bss; bss = bss->next)
35 + wpa_driver_nl80211_del_bss_beacon(bss);
36 +}
37 +
38 +static int wpa_driver_nl80211_stop_ap(void *priv)
39 +{
40 + struct i802_bss *bss = priv;
41 +
42 + wpa_driver_nl80211_del_beacon(bss->drv);
43 +}
44
45 /**
46 * wpa_driver_nl80211_deinit - Deinitialize nl80211 driver interface
47 @@ -6456,4 +6474,5 @@ const struct wpa_driver_ops wpa_driver_n
48 .set_intra_bss = nl80211_set_intra_bss,
49 .set_param = nl80211_set_param,
50 .get_radio_name = nl80211_get_radio_name,
51 + .stop_ap = wpa_driver_nl80211_stop_ap,
52 };
53 --- a/src/drivers/driver.h
54 +++ b/src/drivers/driver.h
55 @@ -2187,6 +2187,8 @@ struct wpa_driver_ops {
56 int (*p2p_invite)(void *priv, const u8 *peer, int role,
57 const u8 *bssid, const u8 *ssid, size_t ssid_len,
58 const u8 *go_dev_addr, int persistent_group);
59 +
60 + int (*stop_ap)(void *priv);
61 };
62
63
This page took 0.041338 seconds and 5 git commands to generate.