321-mac80211-fix-CSA-in-IBSS-mode.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  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. Add the missing IBSS capability flag during capability init as it needs
  8. to be inserted into the generated beacon in order for CSA to work.
  9. Signed-off-by: Piotr Gawlowicz <gawlowicz@tkn.tu-berlin.de>
  10. Signed-off-by: Mikołaj Chwalisz <chwalisz@tkn.tu-berlin.de>
  11. Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
  12. ---
  13. --- a/net/mac80211/ibss.c
  14. +++ b/net/mac80211/ibss.c
  15. @@ -487,14 +487,14 @@ int ieee80211_ibss_csa_beacon(struct iee
  16. struct beacon_data *presp, *old_presp;
  17. struct cfg80211_bss *cbss;
  18. const struct cfg80211_bss_ies *ies;
  19. - u16 capability = 0;
  20. + u16 capability = WLAN_CAPABILITY_IBSS;
  21. u64 tsf;
  22. int ret = 0;
  23. sdata_assert_lock(sdata);
  24. if (ifibss->privacy)
  25. - capability = WLAN_CAPABILITY_PRIVACY;
  26. + capability |= WLAN_CAPABILITY_PRIVACY;
  27. cbss = cfg80211_get_bss(sdata->local->hw.wiphy, ifibss->chandef.chan,
  28. ifibss->bssid, ifibss->ssid,