hostapd: update packaging and patches
[openwrt/openwrt.git] / package / network / services / hostapd / patches / 015-mesh-do-not-use-offchan-mgmt-tx-on-DFS.patch
1 From 9423e8be0393e82c8622806a0529e47fd5583c0b Mon Sep 17 00:00:00 2001
2 From: Peter Oh <peter.oh@bowerswilkins.com>
3 Date: Tue, 29 May 2018 14:39:19 -0700
4 Subject: [PATCH 15/18] mesh: do not use offchan mgmt tx on DFS
5
6 Drivers don't allow mesh to use offchannel on management Tx.
7
8 Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
9 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
10 [daniel@makrotopia.org: adapted to changed ieee80211_is_dfs prototype]
11 ---
12 src/drivers/driver_nl80211.c | 12 ++++++++++--
13 1 file changed, 10 insertions(+), 2 deletions(-)
14
15 --- a/src/drivers/driver_nl80211.c
16 +++ b/src/drivers/driver_nl80211.c
17 @@ -7165,6 +7165,10 @@ static int wpa_driver_nl80211_send_actio
18 struct wpa_driver_nl80211_data *drv = bss->drv;
19 int ret = -1;
20 u8 *buf;
21 + int offchanok = 1;
22 + u16 num_modes, flags;
23 + struct hostapd_hw_modes *modes;
24 + u8 dfs_domain;
25 struct ieee80211_hdr *hdr;
26
27 wpa_printf(MSG_DEBUG, "nl80211: Send Action frame (ifindex=%d, "
28 @@ -7189,7 +7193,11 @@ static int wpa_driver_nl80211_send_actio
29 } else {
30 os_memset(bss->rand_addr, 0, ETH_ALEN);
31 }
32 -
33 + if (is_mesh_interface(drv->nlmode) &&
34 + (modes = nl80211_get_hw_feature_data(bss, &num_modes, &flags,
35 + &dfs_domain)) &&
36 + ieee80211_is_dfs(freq, modes, num_modes))
37 + offchanok = 0;
38 if (is_ap_interface(drv->nlmode) &&
39 (!(drv->capa.flags & WPA_DRIVER_FLAGS_OFFCHANNEL_TX) ||
40 (int) freq == bss->freq || drv->device_ap_sme ||
41 @@ -7201,7 +7209,7 @@ static int wpa_driver_nl80211_send_actio
42 ret = nl80211_send_frame_cmd(bss, freq, wait_time, buf,
43 24 + data_len,
44 &drv->send_action_cookie,
45 - no_cck, 0, 1, NULL, 0);
46 + no_cck, 0, offchanok, NULL, 0);
47
48 os_free(buf);
49 return ret;