ath79: add support for gl-e750
[openwrt/staging/dedeckeh.git] / package / network / services / hostapd / patches / 011-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch
index 184b6e9e9debf4c618fcc1ea1e68239556585a63..3a9b8471718e6977050b6b2ef1f70edb8d1e8a7b 100644 (file)
@@ -1,8 +1,7 @@
-From bbaa6142eadf229334436fdbf51aa65bb819f771 Mon Sep 17 00:00:00 2001
+From 89fa0d75fb1be82330258082ed3d7fd452eb6076 Mon Sep 17 00:00:00 2001
 From: Peter Oh <peter.oh@bowerswilkins.com>
-Date: Tue, 29 May 2018 14:39:15 -0700
-Subject: [PATCH 11/18] mesh: Allow DFS channels to be selected if dfs is
- enabled
+Date: Mon, 27 Aug 2018 14:28:45 -0700
+Subject: [PATCH 3/7] mesh: Allow DFS channels to be selected if dfs is enabled
 
 Note: DFS is assumed to be usable if a country code has been set
 
@@ -14,16 +13,16 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
 
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -2090,6 +2090,8 @@ void ibss_mesh_setup_freq(struct wpa_sup
-       struct hostapd_freq_params vht_freq;
+@@ -2349,6 +2349,8 @@ void ibss_mesh_setup_freq(struct wpa_sup
        int chwidth, seg0, seg1;
        u32 vht_caps = 0;
+       int is_24ghz;
 +      int dfs_enabled = wpa_s->conf->country[0] &&
 +              (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR);
  
        freq->freq = ssid->frequency;
  
-@@ -2166,8 +2168,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -2436,8 +2438,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
                return;
  
        /* Check primary channel flags */
@@ -34,9 +33,9 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
 +              if (!dfs_enabled)
 +                      return;
  
- #ifdef CONFIG_HT_OVERRIDES
-       if (ssid->disable_ht40)
-@@ -2193,8 +2198,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
+       freq->channel = pri_chan->chan;
+@@ -2470,8 +2475,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
                return;
  
        /* Check secondary channel flags */
@@ -47,9 +46,9 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
 +              if (!dfs_enabled)
 +                      return;
  
-       freq->channel = pri_chan->chan;
-@@ -2284,8 +2292,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
+       if (ht40 == -1) {
+               if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS))
+@@ -2564,8 +2572,11 @@ skip_ht40:
                        return;
  
                /* Back to HT configuration if channel not usable */
@@ -61,8 +60,8 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
 +                              return;
        }
  
-       chwidth = VHT_CHANWIDTH_80MHZ;
-@@ -2305,10 +2316,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
+       chwidth = CHANWIDTH_80MHZ;
+@@ -2585,10 +2596,11 @@ skip_ht40:
                                if (!chan)
                                        continue;
  
@@ -76,4 +75,4 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
 +                                              continue;
  
                                /* Found a suitable second segment for 80+80 */
-                               chwidth = VHT_CHANWIDTH_80P80MHZ;
+                               chwidth = CHANWIDTH_80P80MHZ;