hostapd: update to version 2014-04-24, fixes some dfs related issues
authorFelix Fietkau <nbd@openwrt.org>
Sat, 26 Apr 2014 19:48:06 +0000 (19:48 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 26 Apr 2014 19:48:06 +0000 (19:48 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 40571

16 files changed:
package/network/services/hostapd/Makefile
package/network/services/hostapd/patches/200-multicall.patch
package/network/services/hostapd/patches/300-noscan.patch
package/network/services/hostapd/patches/310-rescan_immediately.patch
package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch
package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch
package/network/services/hostapd/patches/370-ap_sta_support.patch
package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch
package/network/services/hostapd/patches/410-bring_down_interface.patch
package/network/services/hostapd/patches/440-dynamic_20_40_mhz.patch
package/network/services/hostapd/patches/480-max_num_sta_probe.patch
package/network/services/hostapd/patches/500-wpa_supplicant-add-new-config-params-to-be-used-with.patch
package/network/services/hostapd/patches/501-driver_nl80211-use-new-parameters-during-ibss-join.patch
package/network/services/hostapd/patches/502-wpa_s-support-htmode-param.patch
package/network/services/hostapd/patches/510-wpa_supplicant_p2p_parse_ifcomb.patch [deleted file]
package/network/services/hostapd/patches/600-ubus_support.patch

index 1a6b4298171c25a4ca3f8d0d7deab2e86ce12714..2e8eae2069ebf6427281d2ac96859668f312c477 100644 (file)
@@ -8,9 +8,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_VERSION:=2014-04-04
+PKG_VERSION:=2014-04-24
 PKG_RELEASE:=1
-PKG_REV:=ca4fd18290cc0966cba6d71a079d8c9177e53d1d
+PKG_REV:=3cf48c4f2e2d558130253457fea02ef4047cf8e1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=git://w1.fi/srv/git/hostap.git
index f3581200097e992870d59919d27ae3da45f41612..1511b1990f2e79c718011956b774c9367dbead42 100644 (file)
  wpa_cli.exe: wpa_cli
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -3874,8 +3874,8 @@ union wpa_event_data {
+@@ -3886,8 +3886,8 @@ union wpa_event_data {
   * Driver wrapper code should call this function whenever an event is received
   * from the driver.
   */
        for (;;) {
 --- a/wpa_supplicant/events.c
 +++ b/wpa_supplicant/events.c
-@@ -2887,8 +2887,8 @@ static void wpa_supplicant_notify_avoid_
+@@ -2929,8 +2929,8 @@ static void wpa_supplicant_notify_avoid_
  }
  
  
  
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -3711,6 +3711,9 @@ static void wpa_supplicant_deinit_iface(
+@@ -3724,6 +3724,9 @@ static void wpa_supplicant_deinit_iface(
        os_free(wpa_s);
  }
  
  
  /**
   * wpa_supplicant_add_iface - Add a new network interface
-@@ -3902,6 +3905,7 @@ struct wpa_global * wpa_supplicant_init(
+@@ -3915,6 +3918,7 @@ struct wpa_global * wpa_supplicant_init(
        wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
  #endif /* CONFIG_NO_WPA_MSG */
  
index 0bcec5ef9f4295c07af57ddcab94ad1b49ef1b74..50b70b7e5de23c57ccee690e646f0b369e6fd7bb 100644 (file)
@@ -1,6 +1,6 @@
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -2634,6 +2634,8 @@ static int hostapd_config_fill(struct ho
+@@ -2638,6 +2638,8 @@ static int hostapd_config_fill(struct ho
                }
  #endif /* CONFIG_IEEE80211W */
  #ifdef CONFIG_IEEE80211N
index 322c6a4cf492e86cb3ba8a6dcc83053769ccdb63..f96c7e616df4cc0f1cf63f9e6622e1d10809481d 100644 (file)
@@ -1,6 +1,6 @@
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -2741,7 +2741,7 @@ static struct wpa_supplicant * wpa_suppl
+@@ -2746,7 +2746,7 @@ static struct wpa_supplicant * wpa_suppl
        if (wpa_s == NULL)
                return NULL;
        wpa_s->scan_req = INITIAL_SCAN_REQ;
index 9dbfb5ae04fb5c499688f5006fb38d2c92ce551c..864ac5e309377f2086207f62f8905598c88c6504 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -7323,7 +7323,7 @@ static int wpa_driver_nl80211_set_freq(s
+@@ -7380,7 +7380,7 @@ static int wpa_driver_nl80211_set_freq(s
  
        nl80211_cmd(drv, msg, 0, NL80211_CMD_SET_WIPHY);
  
@@ -9,7 +9,7 @@
        if (nl80211_put_freq_params(msg, freq) < 0)
                goto nla_put_failure;
  
-@@ -11840,7 +11840,7 @@ static int nl80211_switch_channel(void *
+@@ -11905,7 +11905,7 @@ static int nl80211_switch_channel(void *
                return -ENOMEM;
  
        nl80211_cmd(drv, msg, 0, NL80211_CMD_CHANNEL_SWITCH);
index 011f24530ac81ecca67aab6ff2c44b403cf0b32e..8da6372b0d0377efce03d8353780bc013f2093ad 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -4701,18 +4701,20 @@ wpa_driver_nl80211_finish_drv_init(struc
+@@ -4748,18 +4748,20 @@ wpa_driver_nl80211_finish_drv_init(struc
  }
  
  
@@ -24,7 +24,7 @@
  
        return send_and_recv_msgs(drv, msg, NULL, NULL);
   nla_put_failure:
-@@ -4720,6 +4722,15 @@ static int wpa_driver_nl80211_del_beacon
+@@ -4767,6 +4769,15 @@ static int wpa_driver_nl80211_del_beacon
        return -ENOBUFS;
  }
  
@@ -40,7 +40,7 @@
  
  /**
   * wpa_driver_nl80211_deinit - Deinitialize nl80211 driver interface
-@@ -10412,7 +10423,6 @@ static int wpa_driver_nl80211_stop_ap(vo
+@@ -10475,7 +10486,6 @@ static int wpa_driver_nl80211_stop_ap(vo
        if (!is_ap_interface(drv->nlmode))
                return -1;
        wpa_driver_nl80211_del_beacon(drv);
index b4e1df2a26bdbd3c913ebfeec1472d7a4a9b299b..5e82252466123aa691141b9c1c3df4763de4f291 100644 (file)
@@ -92,7 +92,7 @@
  /* Configure default/group WEP keys for static WEP */
  int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
  {
-@@ -702,8 +742,12 @@ void wpa_supplicant_set_state(struct wpa
+@@ -705,8 +745,12 @@ void wpa_supplicant_set_state(struct wpa
  #endif /* CONFIG_P2P */
  
                sme_sched_obss_scan(wpa_s, 1);
                wpa_s->new_connection = 1;
                wpa_drv_set_operstate(wpa_s, 0);
  #ifndef IEEE8021X_EAPOL
-@@ -3505,6 +3549,20 @@ static int wpa_supplicant_init_iface(str
+@@ -3516,6 +3560,20 @@ static int wpa_supplicant_init_iface(str
                           sizeof(wpa_s->bridge_ifname));
        }
  
        /* RSNA Supplicant Key Management - INITIALIZE */
        eapol_sm_notify_portEnabled(wpa_s->eapol, FALSE);
        eapol_sm_notify_portValid(wpa_s->eapol, FALSE);
-@@ -3698,6 +3756,11 @@ static void wpa_supplicant_deinit_iface(
+@@ -3711,6 +3769,11 @@ static void wpa_supplicant_deinit_iface(
        if (terminate)
                wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TERMINATING);
  
index 40d3a9305b45e565b574bd0587355972e1ad3ab2..d39ba2e33b8e90365e6eb7191a91d0111a243372 100644 (file)
@@ -42,7 +42,7 @@
  
 --- a/wpa_supplicant/ctrl_iface.c
 +++ b/wpa_supplicant/ctrl_iface.c
-@@ -6100,6 +6100,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -6075,6 +6075,7 @@ char * wpa_supplicant_ctrl_iface_process
                        reply_len = -1;
        } else if (os_strncmp(buf, "NOTE ", 5) == 0) {
                wpa_printf(MSG_INFO, "NOTE: %s", buf + 5);
@@ -50,7 +50,7 @@
        } else if (os_strcmp(buf, "MIB") == 0) {
                reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size);
                if (reply_len >= 0) {
-@@ -6111,6 +6112,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -6086,6 +6087,7 @@ char * wpa_supplicant_ctrl_iface_process
                        else
                                reply_len += res;
                }
@@ -58,7 +58,7 @@
        } else if (os_strncmp(buf, "STATUS", 6) == 0) {
                reply_len = wpa_supplicant_ctrl_iface_status(
                        wpa_s, buf + 6, reply, reply_size);
-@@ -6518,6 +6520,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -6490,6 +6492,7 @@ char * wpa_supplicant_ctrl_iface_process
                reply_len = wpa_supplicant_ctrl_iface_bss(
                        wpa_s, buf + 4, reply, reply_size);
  #ifdef CONFIG_AP
@@ -66,7 +66,7 @@
        } else if (os_strcmp(buf, "STA-FIRST") == 0) {
                reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size);
        } else if (os_strncmp(buf, "STA ", 4) == 0) {
-@@ -6526,6 +6529,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -6498,6 +6501,7 @@ char * wpa_supplicant_ctrl_iface_process
        } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
                reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply,
                                                   reply_size);
  {
 --- a/src/rsn_supp/wpa.c
 +++ b/src/rsn_supp/wpa.c
-@@ -1910,6 +1910,8 @@ static u32 wpa_key_mgmt_suite(struct wpa
+@@ -1912,6 +1912,8 @@ static u32 wpa_key_mgmt_suite(struct wpa
  }
  
  
  #define RSN_SUITE "%02x-%02x-%02x-%d"
  #define RSN_SUITE_ARG(s) \
  ((s) >> 24) & 0xff, ((s) >> 16) & 0xff, ((s) >> 8) & 0xff, (s) & 0xff
-@@ -1993,6 +1995,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch
+@@ -1995,6 +1997,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch
  
        return (int) len;
  }
index fc61ed5e0c0244c3015ff1994c6f7ccbc5c86cf3..5a57249c77f2f1debb61fef3cff0cc3d1b199b89 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -8873,12 +8873,7 @@ static int wpa_driver_nl80211_set_mode(s
+@@ -8936,12 +8936,7 @@ static int wpa_driver_nl80211_set_mode(s
                        /* Try to set the mode again while the interface is
                         * down */
                        ret = nl80211_set_mode(drv, drv->ifindex, nlmode);
@@ -14,7 +14,7 @@
                                break;
                } else
                        wpa_printf(MSG_DEBUG, "nl80211: Failed to set "
-@@ -8891,6 +8886,8 @@ static int wpa_driver_nl80211_set_mode(s
+@@ -8954,6 +8949,8 @@ static int wpa_driver_nl80211_set_mode(s
                           "interface is down");
                drv->nlmode = nlmode;
                drv->ignore_if_down_event = 1;
index 24ab2d52eebd4698e3810e04ff6f62dcf5d0f9ca..af2fb26c81d684feb81fca6ffb1812ba43b63edb 100644 (file)
@@ -1,6 +1,6 @@
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -2644,6 +2644,10 @@ static int hostapd_config_fill(struct ho
+@@ -2648,6 +2648,10 @@ static int hostapd_config_fill(struct ho
                                   line);
                        return 1;
                }
  
  
  u8 * hostapd_eid_ht_capabilities(struct hostapd_data *hapd, u8 *eid)
-@@ -92,12 +94,15 @@ u8 * hostapd_eid_ht_operation(struct hos
+@@ -92,6 +94,9 @@ u8 * hostapd_eid_ht_operation(struct hos
  
-       oper->control_chan = hapd->iconf->channel;
+       oper->primary_chan = hapd->iconf->channel;
        oper->operation_mode = host_to_le16(hapd->iface->ht_op_mode);
--      if (hapd->iconf->secondary_channel == 1)
--              oper->ht_param |= HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE |
--                      HT_INFO_HT_PARAM_REC_TRANS_CHNL_WIDTH;
--      if (hapd->iconf->secondary_channel == -1)
--              oper->ht_param |= HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW |
--                      HT_INFO_HT_PARAM_REC_TRANS_CHNL_WIDTH;
-+
-+      if (!hapd->iface->force_20mhz) {
-+              if (hapd->iconf->secondary_channel == 1)
-+                      oper->ht_param |= HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE |
-+                              HT_INFO_HT_PARAM_REC_TRANS_CHNL_WIDTH;
-+              if (hapd->iconf->secondary_channel == -1)
-+                      oper->ht_param |= HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW |
-+                              HT_INFO_HT_PARAM_REC_TRANS_CHNL_WIDTH;
-+      }
++      if (hapd->iface->force_20mhz)
++              goto skip;
++
+       if (hapd->iconf->secondary_channel == 1)
+               oper->ht_param |= HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE |
+                       HT_INFO_HT_PARAM_STA_CHNL_WIDTH;
+@@ -99,6 +104,7 @@ u8 * hostapd_eid_ht_operation(struct hos
+               oper->ht_param |= HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW |
+                       HT_INFO_HT_PARAM_STA_CHNL_WIDTH;
  
++skip:
        pos += sizeof(*oper);
  
-@@ -291,3 +296,84 @@ void hostapd_get_ht_capab(struct hostapd
+       return pos;
+@@ -288,3 +294,84 @@ void hostapd_get_ht_capab(struct hostapd
  
        neg_ht_cap->ht_capabilities_info = host_to_le16(cap);
  }
index 608a9b5ad95281b011cfcb6c9d6c32d12ac54e03..e238bf4b8c3bf116f2d09d795a5d9e113b885081 100644 (file)
@@ -9,5 +9,5 @@
 +                         " too many connected stations.", MAC2STR(mgmt->sa));
 +
  #ifdef CONFIG_INTERWORKING
-       if (elems.interworking && elems.interworking_len >= 1) {
-               u8 ant = elems.interworking[0] & 0x0f;
+       if (hapd->conf->interworking &&
+           elems.interworking && elems.interworking_len >= 1) {
index 62ef7c7516564748eb788ac5943c877c50fea898..56569702a974245bd0f1a821757cabb6809fd5cf 100644 (file)
@@ -22,7 +22,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
  #include "common/defs.h"
  #include "utils/list.h"
  
-@@ -406,6 +407,11 @@ struct wpa_driver_associate_params {
+@@ -414,6 +415,11 @@ struct wpa_driver_associate_params {
         * responsible for selecting with which BSS to associate. */
        const u8 *bssid;
  
@@ -142,7 +142,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
  /* Helper macros for network block parser */
  
  #ifdef OFFSET
-@@ -1731,6 +1823,9 @@ static const struct parse_data ssid_fiel
+@@ -1733,6 +1825,9 @@ static const struct parse_data ssid_fiel
        { INT(ap_max_inactivity) },
        { INT(dtim_period) },
        { INT(beacon_int) },
@@ -162,7 +162,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
  
  #define MAX_SSID_LEN 32
  
-@@ -630,6 +631,10 @@ struct wpa_ssid {
+@@ -636,6 +637,10 @@ struct wpa_ssid {
         * dereferences since it may not be updated in all cases.
         */
        void *parent_cred;
@@ -175,7 +175,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
  #endif /* CONFIG_SSID_H */
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -1788,6 +1788,13 @@ static void wpas_start_assoc_cb(struct w
+@@ -1791,6 +1791,13 @@ static void wpas_start_assoc_cb(struct w
                        params.beacon_int = ssid->beacon_int;
                else
                        params.beacon_int = wpa_s->conf->beacon_int;
index bcf15997f50c48f14d975571f90382cded5c081c..c7746823235b1cf232fc00e8515159f38bab0d0a 100644 (file)
@@ -10,7 +10,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
 
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -8398,7 +8398,7 @@ static int wpa_driver_nl80211_ibss(struc
+@@ -8455,7 +8455,7 @@ static int wpa_driver_nl80211_ibss(struc
                                   struct wpa_driver_associate_params *params)
  {
        struct nl_msg *msg;
@@ -19,7 +19,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
        int count = 0;
  
        wpa_printf(MSG_DEBUG, "nl80211: Join IBSS (ifindex=%d)", drv->ifindex);
-@@ -8437,6 +8437,37 @@ retry:
+@@ -8494,6 +8494,37 @@ retry:
                            params->beacon_int);
        }
  
index 8ffe364255d85d8c22fb1076d0dff274bfa2ccf6..fdba6d78848aa1927e069e4831adaa7fad75d520 100644 (file)
@@ -16,7 +16,7 @@ Signed-off-by: Antonio Quartulli <ordex@autistici.org>
 
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -411,6 +411,8 @@ struct wpa_driver_associate_params {
+@@ -419,6 +419,8 @@ struct wpa_driver_associate_params {
        int fixed_freq;
        unsigned char rates[NL80211_MAX_SUPP_RATES];
        int mcast_rate;
@@ -27,7 +27,7 @@ Signed-off-by: Antonio Quartulli <ordex@autistici.org>
         * bssid_hint - BSSID of a proposed AP
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -8468,6 +8468,22 @@ retry:
+@@ -8525,6 +8525,22 @@ retry:
                NLA_PUT_U32(msg, NL80211_ATTR_MCAST_RATE, params->mcast_rate);
        }
  
@@ -124,7 +124,7 @@ Signed-off-by: Antonio Quartulli <ordex@autistici.org>
  static int wpa_config_parse_rates(const struct parse_data *data,
                                  struct wpa_ssid *ssid, int line,
                                  const char *value)
-@@ -1826,6 +1891,7 @@ static const struct parse_data ssid_fiel
+@@ -1828,6 +1893,7 @@ static const struct parse_data ssid_fiel
        { INT_RANGE(fixed_freq, 0, 1) },
        { FUNC(rates) },
        { FUNC(mcast_rate) },
@@ -134,7 +134,7 @@ Signed-off-by: Antonio Quartulli <ordex@autistici.org>
  #undef OFFSET
 --- a/wpa_supplicant/config_ssid.h
 +++ b/wpa_supplicant/config_ssid.h
-@@ -635,6 +635,8 @@ struct wpa_ssid {
+@@ -641,6 +641,8 @@ struct wpa_ssid {
        int fixed_freq;
        unsigned char rates[NL80211_MAX_SUPP_RATES];
        double mcast_rate;
@@ -145,7 +145,7 @@ Signed-off-by: Antonio Quartulli <ordex@autistici.org>
  #endif /* CONFIG_SSID_H */
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -1795,6 +1795,8 @@ static void wpas_start_assoc_cb(struct w
+@@ -1798,6 +1798,8 @@ static void wpas_start_assoc_cb(struct w
                        i++;
                }
                params.mcast_rate = ssid->mcast_rate;
diff --git a/package/network/services/hostapd/patches/510-wpa_supplicant_p2p_parse_ifcomb.patch b/package/network/services/hostapd/patches/510-wpa_supplicant_p2p_parse_ifcomb.patch
deleted file mode 100644 (file)
index c2923cf..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/src/drivers/driver_nl80211.c
-+++ b/src/drivers/driver_nl80211.c
-@@ -3444,10 +3444,12 @@ static int wiphy_info_iface_comb_process
-       }
-       if (combination_has_p2p && combination_has_mgd) {
--              info->p2p_concurrent = 1;
--              info->num_multichan_concurrent =
-+              int num_channels =
-                       nla_get_u32(tb_comb[NL80211_IFACE_COMB_NUM_CHANNELS]);
--              return 1;
-+
-+              info->p2p_concurrent = 1;
-+              if (info->num_multichan_concurrent < num_channels)
-+                      info->num_multichan_concurrent = num_channels;
-       }
-       return 0;
index 4738da2fe11918861030e7a0c38e80f045851e5b..b17d8f24aca2f5a7b2e2dbfc715eabd30b9ba71d 100644 (file)
  
        ie = mgmt->u.probe_req.variable;
        if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.probe_req))
-@@ -644,6 +650,12 @@ void handle_probe_req(struct hostapd_dat
+@@ -645,6 +651,12 @@ void handle_probe_req(struct hostapd_dat
        }
  #endif /* CONFIG_P2P */