hostapd: update to 2010-07-05
authorFelix Fietkau <nbd@openwrt.org>
Thu, 8 Jul 2010 18:35:15 +0000 (18:35 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 8 Jul 2010 18:35:15 +0000 (18:35 +0000)
SVN-Revision: 22097

13 files changed:
package/hostapd/Makefile
package/hostapd/patches/110-countrycode.patch
package/hostapd/patches/130-scan_wait.patch
package/hostapd/patches/200-multicall.patch
package/hostapd/patches/300-timestamp_check.patch
package/hostapd/patches/310-scan_ssid.patch
package/hostapd/patches/320-rescan_immediately.patch
package/hostapd/patches/350-wds_fix.patch
package/hostapd/patches/360-wds_bridge.patch
package/hostapd/patches/370-basic_rates.patch
package/hostapd/patches/380-ap_isolate.patch
package/hostapd/patches/390-nl80211_fixes.patch
package/hostapd/patches/400-nl80211_sta_auth.patch

index ea6294cc3e343101a693b692143753209ddb4571..4189922561b530033797f7f4607612b2b24fef8e 100644 (file)
@@ -8,9 +8,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_VERSION:=20100418
-PKG_RELEASE:=2
-PKG_REV:=0b86f67a2970403d1b1b6d34ce49f5485ef5dbb3
+PKG_VERSION:=20100705
+PKG_RELEASE:=1
+PKG_REV:=2f1ce78bf78cecd7021385b04a4f55f22e76ab97
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=git://w1.fi/srv/git/hostap.git
index 88dd1e92ebbd26fd004b8ab052df45fb766af6ce..11cf06e847031cb13b91b190aea30c1106e63fb8 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -659,7 +659,6 @@ static int setup_interface(struct hostap
+@@ -660,7 +660,6 @@ static int setup_interface(struct hostap
                country[3] = '\0';
                if (hostapd_set_country(hapd, country) < 0) {
                        wpa_printf(MSG_ERROR, "Failed to set country code");
index 5e8d1e72e27e63b3c7ac5df008c14257933f344e..1f249533f0addca5d077dafa9fa72b4614183cea 100644 (file)
@@ -10,7 +10,7 @@
  /* hostapd.c */
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -754,6 +754,9 @@ int hostapd_setup_interface_complete(str
+@@ -755,6 +755,9 @@ int hostapd_setup_interface_complete(str
        wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
                   iface->bss[0]->conf->iface);
  
index 006e26a94af811422ef34bd1853b67269fc0df17..a35b5c8d35e896c54450f571627f50585634318d 100644 (file)
@@ -62,7 +62,7 @@
  
  ifndef CONFIG_OS
  ifdef CONFIG_NATIVE_WINDOWS
-@@ -579,6 +580,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
+@@ -581,6 +582,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
  CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
  LIBS += -ldl -rdynamic
  endif
@@ -73,7 +73,7 @@
  endif
  
  ifdef CONFIG_AP
-@@ -631,6 +636,12 @@ CFLAGS += -DEAP_SERVER_WSC
+@@ -635,6 +640,12 @@ CFLAGS += -DEAP_SERVER_WSC
  OBJS += ../src/ap/wps_hostapd.o
  OBJS += ../src/eap_server/eap_server_wsc.o
  endif
@@ -86,7 +86,7 @@
  endif
  
  ifdef NEED_RSN_AUTHENTICATOR
-@@ -1262,6 +1273,12 @@ BCHECK=../src/drivers/build.wpa_supplica
+@@ -1270,6 +1281,12 @@ BCHECK=../src/drivers/build.wpa_supplica
  wpa_priv: $(BCHECK) $(OBJS_priv)
        $(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS)
  
@@ -99,7 +99,7 @@
  wpa_supplicant: .config $(BCHECK) $(OBJS) $(EXTRA_progs)
        $(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
  
-@@ -1321,6 +1338,12 @@ endif
+@@ -1329,6 +1346,12 @@ endif
        $(Q)$(CC) -c -o $@ $(CFLAGS) $<
        @$(E) "  CC " $<
  
  wpa_cli.exe: wpa_cli
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -2449,8 +2449,8 @@ union wpa_event_data {
+@@ -2465,8 +2465,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
-@@ -1577,8 +1577,8 @@ static void ft_rx_action(struct wpa_supp
+@@ -1582,8 +1582,8 @@ static void ft_rx_action(struct wpa_supp
  #endif /* CONFIG_IEEE80211R */
  
  
        u16 reason_code = 0;
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -2223,6 +2223,9 @@ struct wpa_supplicant * wpa_supplicant_g
+@@ -2228,6 +2228,9 @@ struct wpa_supplicant * wpa_supplicant_g
        return NULL;
  }
  
  
  /**
   * wpa_supplicant_init - Initialize %wpa_supplicant
-@@ -2241,6 +2244,7 @@ struct wpa_global * wpa_supplicant_init(
+@@ -2246,6 +2249,7 @@ struct wpa_global * wpa_supplicant_init(
        if (params == NULL)
                return NULL;
  
index fef63e30a4f84dd36b1674b09a8fb8eb1f9ff3e8..70ac63597caf03f7a1ca67ec33000f993bb3364b 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/tls/x509v3.c
 +++ b/src/tls/x509v3.c
-@@ -1832,8 +1832,11 @@ int x509_certificate_chain_validate(stru
+@@ -1854,8 +1854,11 @@ int x509_certificate_chain_validate(stru
                if (chain_trusted)
                        continue;
  
index 60babf474dee29d69bac6ce4da172c421dd0205b..884459ce6651163a8a859ff084a90799a7a96928 100644 (file)
@@ -8,7 +8,7 @@
        size_t max_ssids;
        enum wpa_states prev_state;
  
-@@ -311,6 +312,16 @@ static void wpa_supplicant_scan(void *el
+@@ -316,6 +317,16 @@ static void wpa_supplicant_scan(void *el
            wpa_s->wpa_state == WPA_INACTIVE)
                wpa_supplicant_set_state(wpa_s, WPA_SCANNING);
  
@@ -25,7 +25,7 @@
        /* Find the starting point from which to continue scanning */
        ssid = wpa_s->conf->ssid;
        if (wpa_s->prev_scan_ssid != WILDCARD_SSID_SCAN) {
-@@ -374,6 +385,9 @@ static void wpa_supplicant_scan(void *el
+@@ -379,6 +390,9 @@ static void wpa_supplicant_scan(void *el
                int_array_sort_unique(params.freqs);
        }
  
index 1a0eb58a72c0f72b865dedc46952d08fc0f2b39f..19183040a9e1da7ed29404d5394e61ed49bc1aa8 100644 (file)
@@ -1,6 +1,6 @@
 --- a/wpa_supplicant/events.c
 +++ b/wpa_supplicant/events.c
-@@ -958,7 +958,7 @@ static void wpa_supplicant_event_scan_re
+@@ -963,7 +963,7 @@ static void wpa_supplicant_event_scan_re
                        wpa_printf(MSG_DEBUG, "Setup a new network");
                        wpa_supplicant_associate(wpa_s, NULL, ssid);
                } else {
index 7bcf410a98c8716702cccdeaf73b1ad34c0a092d..3a3ee000aefb692951ecc0f7704afae7d637ddec 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -4576,9 +4576,11 @@ static int i802_set_wds_sta(void *priv, 
+@@ -4652,9 +4652,11 @@ static int i802_set_wds_sta(void *priv, 
        wpa_printf(MSG_DEBUG, "nl80211: Set WDS STA addr=" MACSTR
                   " aid=%d val=%d name=%s", MAC2STR(addr), aid, val, name);
        if (val) {
@@ -16,7 +16,7 @@
        } else {
 --- a/src/ap/ieee802_11.c
 +++ b/src/ap/ieee802_11.c
-@@ -1614,6 +1614,9 @@ static void handle_assoc_cb(struct hosta
+@@ -1627,6 +1627,9 @@ static void handle_assoc_cb(struct hosta
                               "Could not add STA to kernel driver");
        }
  
index 48867922b138fd3137621f2c5937549fadf0f13a..4cc60de063ed89b9a19cd3752d602154e2b592b4 100644 (file)
@@ -21,7 +21,7 @@
                        /* clear to get error below if setting is invalid */
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -4566,7 +4566,8 @@ static int i802_set_sta_vlan(void *priv,
+@@ -4642,7 +4642,8 @@ static int i802_set_sta_vlan(void *priv,
  }
  
  
@@ -31,7 +31,7 @@
  {
        struct i802_bss *bss = priv;
        struct wpa_driver_nl80211_data *drv = bss->drv;
-@@ -4580,6 +4581,10 @@ static int i802_set_wds_sta(void *priv, 
+@@ -4656,6 +4657,10 @@ static int i802_set_wds_sta(void *priv, 
                        if (nl80211_create_iface(drv, name, NL80211_IFTYPE_AP_VLAN,
                                         NULL, 1) < 0)
                                return -1;
index 98420c01faca962b4934997b288a460d6e928224..6c3fafe837fb9b0ab64e4f551abb2048c7eb249d 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -715,6 +715,16 @@ int hostapd_setup_interface_complete(str
+@@ -716,6 +716,16 @@ int hostapd_setup_interface_complete(str
                }
        }
  
index 92ac6ded8fff0986fb230b041e47af7a6718cc4e..12fbdc86b7ed57ab82503771b47a1a6900d01404 100644 (file)
@@ -38,7 +38,7 @@
         * @freq: Frequency (in MHz) of the channel
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -4263,6 +4263,29 @@ static int i802_set_rate_sets(void *priv
+@@ -4339,6 +4339,29 @@ static int i802_set_rate_sets(void *priv
        return -ENOBUFS;
  }
  
@@ -68,7 +68,7 @@
  #endif /* HOSTAPD */
  
  
-@@ -5372,6 +5395,7 @@ const struct wpa_driver_ops wpa_driver_n
+@@ -5448,6 +5471,7 @@ const struct wpa_driver_ops wpa_driver_n
        .set_tx_queue_params = i802_set_tx_queue_params,
        .set_sta_vlan = i802_set_sta_vlan,
        .set_wds_sta = i802_set_wds_sta,
index fdac284b6413aabd7878be2b3708c673fd4bc47f..20c603252c49ce1a0eb5caa6838ff4c1c8bb4273 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -1119,7 +1119,6 @@ nla_put_failure:
+@@ -1135,7 +1135,6 @@ nla_put_failure:
  }
  
  
@@ -8,7 +8,7 @@
  struct wiphy_info_data {
        int max_scan_ssids;
        int ap_supported;
-@@ -1231,7 +1230,6 @@ static int wpa_driver_nl80211_capa(struc
+@@ -1247,7 +1246,6 @@ static int wpa_driver_nl80211_capa(struc
  
        return 0;
  }
@@ -16,7 +16,7 @@
  
  
  static int wpa_driver_nl80211_init_nl(struct wpa_driver_nl80211_data *drv,
-@@ -1371,6 +1369,7 @@ static void * wpa_driver_nl80211_init(vo
+@@ -1411,6 +1409,7 @@ static void * wpa_driver_nl80211_init(vo
        drv->monitor_ifidx = -1;
        drv->monitor_sock = -1;
        drv->ioctl_sock = -1;
@@ -24,7 +24,7 @@
  
        if (wpa_driver_nl80211_init_nl(drv, ctx)) {
                os_free(drv);
-@@ -1468,24 +1467,23 @@ wpa_driver_nl80211_finish_drv_init(struc
+@@ -1530,32 +1529,32 @@ wpa_driver_nl80211_finish_drv_init(struc
        drv->ifindex = if_nametoindex(bss->ifname);
        drv->first_bss.ifindex = drv->ifindex;
  
 -              wpa_printf(MSG_DEBUG, "nl80211: Could not configure driver to "
 -                         "use managed mode");
 -      }
--
--      if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname, 1)) {
--              wpa_printf(MSG_ERROR, "Could not set interface '%s' UP",
--                         bss->ifname);
--              return -1;
--      }
 +      if (drv->nlmode == NL80211_IFTYPE_STATION) {
-+              if (wpa_driver_nl80211_set_mode(bss, IEEE80211_MODE_INFRA) < 0)
-+                      wpa_printf(MSG_DEBUG, "nl80211: Could not configure "
-+                                 "driver to use managed mode");
-+
-+              if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname, 1)) {
-+                      wpa_printf(MSG_ERROR, "Could not set interface '%s' UP",
-+                                 bss->ifname);
-+                      return -1;
++              if (wpa_driver_nl80211_set_mode(bss, IEEE80211_MODE_INFRA) < 0) {
++                      wpa_printf(MSG_DEBUG, "nl80211: Could not configure driver to "
++                                 "use managed mode");
 +              }
  
+-      if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname, 1)) {
+-              if (rfkill_is_blocked(drv->rfkill)) {
+-                      wpa_printf(MSG_DEBUG, "nl80211: Could not yet enable "
+-                                 "interface '%s' due to rfkill",
+-                                 bss->ifname);
+-                      drv->if_disabled = 1;
+-                      send_rfkill_event = 1;
+-              } else {
+-                      wpa_printf(MSG_ERROR, "nl80211: Could not set "
+-                                 "interface '%s' UP", bss->ifname);
+-                      return -1;
++              if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname, 1)) {
++                      if (rfkill_is_blocked(drv->rfkill)) {
++                              wpa_printf(MSG_DEBUG, "nl80211: Could not yet enable "
++                                         "interface '%s' due to rfkill",
++                                         bss->ifname);
++                              drv->if_disabled = 1;
++                              send_rfkill_event = 1;
++                      } else {
++                              wpa_printf(MSG_ERROR, "nl80211: Could not set "
++                                         "interface '%s' UP", bss->ifname);
++                              return -1;
++                      }
+               }
+-      }
 -      if (wpa_driver_nl80211_capa(drv))
 -              return -1;
 +              if (wpa_driver_nl80211_capa(drv))
@@ -64,7 +79,7 @@
  
        if (nl80211_register_action_frames(drv) < 0) {
                wpa_printf(MSG_DEBUG, "nl80211: Failed to register Action "
-@@ -2143,13 +2141,9 @@ static int wpa_driver_nl80211_set_key(co
+@@ -2219,13 +2218,9 @@ static int wpa_driver_nl80211_set_key(co
         */
        if (ret || !set_tx || alg == WPA_ALG_NONE)
                return ret;
@@ -79,7 +94,7 @@
  
        msg = nlmsg_alloc();
        if (!msg)
-@@ -2990,7 +2984,8 @@ static void nl80211_remove_iface(struct 
+@@ -3066,7 +3061,8 @@ static void nl80211_remove_iface(struct 
  
  #ifdef HOSTAPD
        /* stop listening for EAPOL on this interface */
  #endif /* HOSTAPD */
  
        msg = nlmsg_alloc();
-@@ -3063,7 +3058,8 @@ static int nl80211_create_iface_once(str
+@@ -3139,7 +3135,8 @@ static int nl80211_create_iface_once(str
  
  #ifdef HOSTAPD
        /* start listening for EAPOL on this interface */
  #endif /* HOSTAPD */
  
        if (addr && iftype != NL80211_IFTYPE_MONITOR &&
-@@ -4766,6 +4762,7 @@ static void *i802_init(struct hostapd_da
+@@ -4842,6 +4839,7 @@ static void *i802_init(struct hostapd_da
                return NULL;
  
        drv = bss->drv;
index 8c959062dc76e201c13047f338890f3693ce0d9e..41c68c0932f9a946f76f3539f39af0c9e73b8b22 100644 (file)
@@ -1,6 +1,6 @@
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -543,10 +543,16 @@ void wpa_supplicant_set_state(struct wpa
+@@ -545,10 +545,16 @@ void wpa_supplicant_set_state(struct wpa
                wpa_s->reassociated_connection = 1;
                wpa_drv_set_operstate(wpa_s, 1);
                wpa_s->after_wps = 0;