HACK: hostapd: a quick fix in the wrong way
[openwrt/staging/lynxis.git] / package / network / services / hostapd / patches / 999-HACK-fix-object-dependencies.patch
1 Index: hostapd-2019-08-08-ca8c2bd2/hostapd/Makefile
2 ===================================================================
3 --- hostapd-2019-08-08-ca8c2bd2.orig/hostapd/Makefile
4 +++ hostapd-2019-08-08-ca8c2bd2/hostapd/Makefile
5 @@ -215,7 +215,7 @@ ifdef CONFIG_FULL_DYNAMIC_VLAN
6 # Define CONFIG_FULL_DYNAMIC_VLAN to have hostapd manipulate bridges
7 # and VLAN interfaces for the VLAN feature.
8 CFLAGS += -DCONFIG_FULL_DYNAMIC_VLAN
9 -OBJS += ../src/ap/vlan_full.o
10 +OBJS += ../src/ap/vlan_full.o ../src/drivers/linux_ioctl.o
11 ifdef CONFIG_VLAN_NETLINK
12 OBJS += ../src/ap/vlan_util.o
13 else
14 Index: hostapd-2019-08-08-ca8c2bd2/src/ap/beacon.c
15 ===================================================================
16 --- hostapd-2019-08-08-ca8c2bd2.orig/src/ap/beacon.c
17 +++ hostapd-2019-08-08-ca8c2bd2/src/ap/beacon.c
18 @@ -33,6 +33,36 @@
19 #include "taxonomy.h"
20 #include "ieee802_11_auth.h"
21
22 +static struct hostapd_sta_info * sta_track_get(struct hostapd_iface *iface,
23 + const u8 *addr)
24 +{
25 + struct hostapd_sta_info *info;
26 +
27 + dl_list_for_each(info, &iface->sta_seen, struct hostapd_sta_info, list)
28 + if (os_memcmp(addr, info->addr, ETH_ALEN) == 0)
29 + return info;
30 +
31 + return NULL;
32 +}
33 +
34 +
35 +#ifdef CONFIG_TAXONOMY
36 +void sta_track_claim_taxonomy_info(struct hostapd_iface *iface, const u8 *addr,
37 + struct wpabuf **probe_ie_taxonomy)
38 +{
39 + struct hostapd_sta_info *info;
40 +
41 + info = sta_track_get(iface, addr);
42 + if (!info)
43 + return;
44 +
45 + wpabuf_free(*probe_ie_taxonomy);
46 + *probe_ie_taxonomy = info->probe_ie_taxonomy;
47 + info->probe_ie_taxonomy = NULL;
48 +}
49 +#endif /* CONFIG_TAXONOMY */
50 +
51 +
52
53 #ifdef NEED_AP_MLME
54
55 @@ -637,19 +667,6 @@ void sta_track_expire(struct hostapd_ifa
56 }
57
58
59 -static struct hostapd_sta_info * sta_track_get(struct hostapd_iface *iface,
60 - const u8 *addr)
61 -{
62 - struct hostapd_sta_info *info;
63 -
64 - dl_list_for_each(info, &iface->sta_seen, struct hostapd_sta_info, list)
65 - if (os_memcmp(addr, info->addr, ETH_ALEN) == 0)
66 - return info;
67 -
68 - return NULL;
69 -}
70 -
71 -
72 void sta_track_add(struct hostapd_iface *iface, const u8 *addr, int ssi_signal)
73 {
74 struct hostapd_sta_info *info;
75 @@ -710,23 +727,6 @@ sta_track_seen_on(struct hostapd_iface *
76 }
77
78
79 -#ifdef CONFIG_TAXONOMY
80 -void sta_track_claim_taxonomy_info(struct hostapd_iface *iface, const u8 *addr,
81 - struct wpabuf **probe_ie_taxonomy)
82 -{
83 - struct hostapd_sta_info *info;
84 -
85 - info = sta_track_get(iface, addr);
86 - if (!info)
87 - return;
88 -
89 - wpabuf_free(*probe_ie_taxonomy);
90 - *probe_ie_taxonomy = info->probe_ie_taxonomy;
91 - info->probe_ie_taxonomy = NULL;
92 -}
93 -#endif /* CONFIG_TAXONOMY */
94 -
95 -
96 void handle_probe_req(struct hostapd_data *hapd,
97 const struct ieee80211_mgmt *mgmt, size_t len,
98 int ssi_signal)