hostapd: adjust patches to work with git am
[openwrt/openwrt.git] / package / network / services / hostapd / patches / 341-mesh-ctrl-iface-channel-switch.patch
index b9a0b23a7b4d1ece652631a3d49f474bf1247605..4a5852af2e45584296a601471c06f32281174b92 100644 (file)
@@ -1,6 +1,11 @@
+From: Felix Fietkau <nbd@nbd.name>
+Date: Mon, 28 Jan 2019 21:36:44 +0100
+Subject: [PATCH] wpa_supplicant: fix calling channel switch via wpa_cli on
+ mesh interfaces
+
 --- a/wpa_supplicant/ap.c
 +++ b/wpa_supplicant/ap.c
-@@ -1363,15 +1363,35 @@ int ap_switch_channel(struct wpa_supplic
+@@ -1846,17 +1846,37 @@ int ap_switch_channel(struct wpa_supplic
  
  
  #ifdef CONFIG_CTRL_IFACE
        struct csa_settings settings;
        int ret = hostapd_parse_csa_settings(pos, &settings);
  
+-      if (ret)
+-              return ret;
 +      if (!(wpa_s->ap_iface && wpa_s->ap_iface->bss[0]) &&
 +          !(wpa_s->ifmsh && wpa_s->ifmsh->bss[0]))
 +              return -1;
-+
-+      ret = __ap_ctrl_iface_chanswitch(wpa_s->ap_iface, &settings);
-       if (ret)
-               return ret;
+       settings.link_id = -1;
  
 -      return ap_switch_channel(wpa_s, &settings);
++      ret = __ap_ctrl_iface_chanswitch(wpa_s->ap_iface, &settings);
++      if (ret)
++              return ret;
++
 +      return __ap_ctrl_iface_chanswitch(wpa_s->ifmsh, &settings);
  }
  #endif /* CONFIG_CTRL_IFACE */