1 --- a/src/ap/ieee802_11.c
2 +++ b/src/ap/ieee802_11.c
3 @@ -1471,13 +1471,6 @@ static void handle_assoc_cb(struct hosta
5 struct ieee80211_ht_capabilities ht_cap;
8 - hostapd_logger(hapd, mgmt->da, HOSTAPD_MODULE_IEEE80211,
10 - "did not acknowledge association response");
14 if (len < IEEE80211_HDRLEN + (reassoc ? sizeof(mgmt->u.reassoc_resp) :
15 sizeof(mgmt->u.assoc_resp))) {
16 printf("handle_assoc_cb(reassoc=%d) - too short payload "
17 @@ -1485,11 +1478,6 @@ static void handle_assoc_cb(struct hosta
22 - status = le_to_host16(mgmt->u.reassoc_resp.status_code);
24 - status = le_to_host16(mgmt->u.assoc_resp.status_code);
26 sta = ap_get_sta(hapd, mgmt->da);
28 printf("handle_assoc_cb: STA " MACSTR " not found\n",
29 @@ -1497,6 +1485,19 @@ static void handle_assoc_cb(struct hosta
34 + hostapd_logger(hapd, mgmt->da, HOSTAPD_MODULE_IEEE80211,
35 + HOSTAPD_LEVEL_DEBUG,
36 + "did not acknowledge association response");
37 + sta->flags &= ~WLAN_STA_ASSOC_REQ_OK;
42 + status = le_to_host16(mgmt->u.reassoc_resp.status_code);
44 + status = le_to_host16(mgmt->u.assoc_resp.status_code);
46 if (status != WLAN_STATUS_SUCCESS)
49 --- a/src/drivers/driver_nl80211.c
50 +++ b/src/drivers/driver_nl80211.c
51 @@ -181,6 +181,7 @@ struct i802_bss {
52 struct wpa_driver_nl80211_data *drv;
53 struct i802_bss *next;
56 char ifname[IFNAMSIZ + 1];
57 char brname[IFNAMSIZ];
58 unsigned int beacon_set:1;
59 @@ -191,7 +192,6 @@ struct i802_bss {
60 struct wpa_driver_nl80211_data {
61 struct nl80211_global *global;
67 @@ -2482,7 +2482,7 @@ wpa_driver_nl80211_finish_drv_init(struc
70 if (linux_get_ifhwaddr(drv->global->ioctl_sock, bss->ifname,
75 if (nl80211_register_action_frames(drv) < 0) {
76 @@ -5176,8 +5176,8 @@ static int wpa_driver_nl80211_hapd_send_
77 pos = (u8 *) (hdr + 1);
80 - /* add an empty QoS header if needed */
82 + /* Set highest priority in QoS header */
87 @@ -6407,7 +6407,7 @@ static int i802_set_wds_sta(void *priv,
88 if (!if_nametoindex(name)) {
89 if (nl80211_create_iface(drv, name,
90 NL80211_IFTYPE_AP_VLAN,
95 linux_br_add_if(drv->global->ioctl_sock,
96 @@ -6417,6 +6417,10 @@ static int i802_set_wds_sta(void *priv,
97 linux_set_iface_flags(drv->global->ioctl_sock, name, 1);
98 return i802_set_sta_vlan(priv, addr, name, 0);
101 + linux_br_del_if(drv->global->ioctl_sock, bridge_ifname,
104 i802_set_sta_vlan(priv, addr, bss->ifname, 0);
105 return wpa_driver_nl80211_if_remove(priv, WPA_IF_AP_VLAN,
107 @@ -6625,7 +6629,7 @@ static int nl80211_addr_in_use(struct nl
108 struct wpa_driver_nl80211_data *drv;
109 dl_list_for_each(drv, &global->interfaces,
110 struct wpa_driver_nl80211_data, list) {
111 - if (os_memcmp(addr, drv->addr, ETH_ALEN) == 0)
112 + if (os_memcmp(addr, drv->first_bss.addr, ETH_ALEN) == 0)
116 @@ -6640,9 +6644,9 @@ static int nl80211_p2p_interface_addr(st
120 - os_memcpy(new_addr, drv->addr, ETH_ALEN);
121 + os_memcpy(new_addr, drv->first_bss.addr, ETH_ALEN);
122 for (idx = 0; idx < 64; idx++) {
123 - new_addr[0] = drv->addr[0] | 0x02;
124 + new_addr[0] = drv->first_bss.addr[0] | 0x02;
125 new_addr[0] ^= idx << 2;
126 if (!nl80211_addr_in_use(drv->global, new_addr))
128 @@ -6745,6 +6749,7 @@ static int wpa_driver_nl80211_if_add(voi
132 + memcpy(new_bss->addr, addr ? addr : if_addr, ETH_ALEN);
133 os_strlcpy(new_bss->ifname, ifname, IFNAMSIZ);
134 new_bss->ifindex = ifidx;
136 @@ -6775,7 +6780,12 @@ static int wpa_driver_nl80211_if_remove(
140 + nl80211_remove_iface(drv, ifindex);
143 + if (type != WPA_IF_AP_BSS)
146 if (bss->added_if_into_bridge) {
147 if (linux_br_del_if(drv->global->ioctl_sock, bss->brname,
149 @@ -6789,13 +6799,6 @@ static int wpa_driver_nl80211_if_remove(
151 bss->brname, strerror(errno));
153 -#endif /* HOSTAPD */
155 - nl80211_remove_iface(drv, ifindex);
158 - if (type != WPA_IF_AP_BSS)
161 if (bss != &drv->first_bss) {
162 struct i802_bss *tbss;