libpcap: add optional netfilter support
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 320-mac80211-fix-CSA-in-IBSS-mode.patch
1 From: Koen Vandeputte <koen.vandeputte@ncentric.com>
2 Date: Wed, 8 Feb 2017 15:29:45 +0100
3 Subject: [PATCH] mac80211: fix CSA in IBSS mode
4 MIME-Version: 1.0
5 Content-Type: text/plain; charset=UTF-8
6 Content-Transfer-Encoding: 8bit
7
8 Add the missing IBSS capability flag during capability init as it needs
9 to be inserted into the generated beacon in order for CSA to work.
10
11 Signed-off-by: Piotr Gawlowicz <gawlowicz@tkn.tu-berlin.de>
12 Signed-off-by: MikoĊ‚aj Chwalisz <chwalisz@tkn.tu-berlin.de>
13 Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
14 ---
15
16 --- a/net/mac80211/ibss.c
17 +++ b/net/mac80211/ibss.c
18 @@ -487,14 +487,14 @@ int ieee80211_ibss_csa_beacon(struct iee
19 struct beacon_data *presp, *old_presp;
20 struct cfg80211_bss *cbss;
21 const struct cfg80211_bss_ies *ies;
22 - u16 capability = 0;
23 + u16 capability = WLAN_CAPABILITY_IBSS;
24 u64 tsf;
25 int ret = 0;
26
27 sdata_assert_lock(sdata);
28
29 if (ifibss->privacy)
30 - capability = WLAN_CAPABILITY_PRIVACY;
31 + capability |= WLAN_CAPABILITY_PRIVACY;
32
33 cbss = cfg80211_get_bss(sdata->local->hw.wiphy, ifibss->chandef.chan,
34 ifibss->bssid, ifibss->ssid,