summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-04-24 03:34:46 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-04-24 03:34:46 +0000
commitcbbe49a1d8f3daabca43b65184a18fd895f90b2d (patch)
tree3bdb5db904b0b68ae748a2966dc16e053b478af4 /package
parente15e8f6976a0812fd259860499476d1cad3c268f (diff)
downloadmtk-20170518-cbbe49a1d8f3daabca43b65184a18fd895f90b2d.zip
mtk-20170518-cbbe49a1d8f3daabca43b65184a18fd895f90b2d.tar.gz
mtk-20170518-cbbe49a1d8f3daabca43b65184a18fd895f90b2d.tar.bz2
hostapd: fix a few compile errors and warnings
SVN-Revision: 26751
Diffstat (limited to 'package')
-rw-r--r--package/hostapd/patches/500-scan_wait.patch17
-rw-r--r--package/hostapd/patches/510-multicall.patch4
-rw-r--r--package/hostapd/patches/551-nl80211_del_beacon_bss.patch8
-rw-r--r--package/hostapd/patches/710-bring_down_interface.patch4
-rw-r--r--package/hostapd/patches/730-fix_wds_bridge_handling.patch4
-rw-r--r--package/hostapd/patches/800-dynamic_20_40_mhz.patch32
6 files changed, 46 insertions, 23 deletions
diff --git a/package/hostapd/patches/500-scan_wait.patch b/package/hostapd/patches/500-scan_wait.patch
index 7f1c749..8a79e76 100644
--- a/package/hostapd/patches/500-scan_wait.patch
+++ b/package/hostapd/patches/500-scan_wait.patch
@@ -31,7 +31,7 @@
struct hapd_interfaces {
-@@ -163,6 +165,15 @@ static void hostapd_logger_cb(void *ctx,
+@@ -163,6 +165,16 @@ static void hostapd_logger_cb(void *ctx,
}
#endif /* CONFIG_NO_HOSTAPD_LOGGER */
@@ -42,12 +42,13 @@
+ return -1;
+ }
+ daemonize = 0;
++ return 0;
+}
+
/**
* hostapd_init - Allocate and initialize per-interface data
-@@ -184,6 +195,7 @@ static struct hostapd_iface * hostapd_in
+@@ -184,6 +196,7 @@ static struct hostapd_iface * hostapd_in
if (hapd_iface == NULL)
goto fail;
@@ -55,7 +56,7 @@
hapd_iface->reload_config = hostapd_reload_config;
hapd_iface->config_read_cb = hostapd_config_read;
hapd_iface->config_fname = os_strdup(config_file);
-@@ -399,7 +411,7 @@ static int hostapd_global_init(struct ha
+@@ -399,7 +412,7 @@ static int hostapd_global_init(struct ha
}
@@ -64,7 +65,7 @@
{
#ifdef EAP_SERVER_TNC
tncs_global_deinit();
-@@ -419,8 +431,7 @@ static void hostapd_global_deinit(const
+@@ -419,8 +432,7 @@ static void hostapd_global_deinit(const
}
@@ -74,7 +75,7 @@
{
#ifdef EAP_SERVER_TNC
int tnc = 0;
-@@ -441,11 +452,6 @@ static int hostapd_global_run(struct hap
+@@ -441,11 +453,6 @@ static int hostapd_global_run(struct hap
}
#endif /* EAP_SERVER_TNC */
@@ -86,7 +87,7 @@
eloop_run();
return 0;
-@@ -501,8 +507,7 @@ int main(int argc, char *argv[])
+@@ -501,8 +508,7 @@ int main(int argc, char *argv[])
struct hapd_interfaces interfaces;
int ret = 1;
size_t i;
@@ -96,7 +97,7 @@
const char *log_file = NULL;
if (os_program_init())
-@@ -576,7 +581,7 @@ int main(int argc, char *argv[])
+@@ -576,7 +582,7 @@ int main(int argc, char *argv[])
goto out;
}
@@ -105,7 +106,7 @@
goto out;
ret = 0;
-@@ -587,7 +592,7 @@ int main(int argc, char *argv[])
+@@ -587,7 +593,7 @@ int main(int argc, char *argv[])
hostapd_interface_deinit_free(interfaces.iface[i]);
os_free(interfaces.iface);
diff --git a/package/hostapd/patches/510-multicall.patch b/package/hostapd/patches/510-multicall.patch
index 81a18b9..6ac66cf 100644
--- a/package/hostapd/patches/510-multicall.patch
+++ b/package/hostapd/patches/510-multicall.patch
@@ -212,7 +212,7 @@
wpa_debug_open_syslog();
--- a/hostapd/main.c
+++ b/hostapd/main.c
-@@ -501,6 +501,9 @@ static const char * hostapd_msg_ifname_c
+@@ -502,6 +502,9 @@ static const char * hostapd_msg_ifname_c
return NULL;
}
@@ -222,7 +222,7 @@
int main(int argc, char *argv[])
{
-@@ -513,6 +516,7 @@ int main(int argc, char *argv[])
+@@ -514,6 +517,7 @@ int main(int argc, char *argv[])
if (os_program_init())
return -1;
diff --git a/package/hostapd/patches/551-nl80211_del_beacon_bss.patch b/package/hostapd/patches/551-nl80211_del_beacon_bss.patch
index a4cf619..5f3c0f4 100644
--- a/package/hostapd/patches/551-nl80211_del_beacon_bss.patch
+++ b/package/hostapd/patches/551-nl80211_del_beacon_bss.patch
@@ -1,6 +1,6 @@
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -2092,23 +2092,41 @@ wpa_driver_nl80211_finish_drv_init(struc
+@@ -2092,23 +2092,43 @@ wpa_driver_nl80211_finish_drv_init(struc
}
@@ -33,18 +33,20 @@
+
+ for (bss = &drv->first_bss; bss; bss = bss->next)
+ wpa_driver_nl80211_del_bss_beacon(bss);
++
++ return 0;
+}
+
+static int wpa_driver_nl80211_stop_ap(void *priv)
+{
+ struct i802_bss *bss = priv;
+
-+ wpa_driver_nl80211_del_beacon(bss->drv);
++ return wpa_driver_nl80211_del_beacon(bss->drv);
+}
/**
* wpa_driver_nl80211_deinit - Deinitialize nl80211 driver interface
-@@ -6581,4 +6599,5 @@ const struct wpa_driver_ops wpa_driver_n
+@@ -6581,4 +6601,5 @@ const struct wpa_driver_ops wpa_driver_n
.set_intra_bss = nl80211_set_intra_bss,
.set_param = nl80211_set_param,
.get_radio_name = nl80211_get_radio_name,
diff --git a/package/hostapd/patches/710-bring_down_interface.patch b/package/hostapd/patches/710-bring_down_interface.patch
index 20e2264..7da78c4 100644
--- a/package/hostapd/patches/710-bring_down_interface.patch
+++ b/package/hostapd/patches/710-bring_down_interface.patch
@@ -1,6 +1,6 @@
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -4919,9 +4919,6 @@ static int wpa_driver_nl80211_set_mode(v
+@@ -4921,9 +4921,6 @@ static int wpa_driver_nl80211_set_mode(v
/* Try to set the mode again while the interface is
* down */
ret = nl80211_set_mode(drv, drv->ifindex, nlmode);
@@ -10,7 +10,7 @@
if (!ret)
break;
} else
-@@ -4934,6 +4931,8 @@ static int wpa_driver_nl80211_set_mode(v
+@@ -4936,6 +4933,8 @@ static int wpa_driver_nl80211_set_mode(v
wpa_printf(MSG_DEBUG, "nl80211: Mode change succeeded while "
"interface is down");
drv->nlmode = nlmode;
diff --git a/package/hostapd/patches/730-fix_wds_bridge_handling.patch b/package/hostapd/patches/730-fix_wds_bridge_handling.patch
index 78d13dd..4ab7590 100644
--- a/package/hostapd/patches/730-fix_wds_bridge_handling.patch
+++ b/package/hostapd/patches/730-fix_wds_bridge_handling.patch
@@ -1,6 +1,6 @@
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -5502,6 +5502,9 @@ static int i802_set_wds_sta(void *priv,
+@@ -5504,6 +5504,9 @@ static int i802_set_wds_sta(void *priv,
linux_set_iface_flags(drv->ioctl_sock, name, 1);
return i802_set_sta_vlan(priv, addr, name, 0);
} else {
@@ -10,7 +10,7 @@
i802_set_sta_vlan(priv, addr, bss->ifname, 0);
return wpa_driver_nl80211_if_remove(priv, WPA_IF_AP_VLAN,
name);
-@@ -5942,14 +5945,14 @@ static int wpa_driver_nl80211_if_remove(
+@@ -5944,14 +5947,14 @@ static int wpa_driver_nl80211_if_remove(
return -1;
#ifdef HOSTAPD
diff --git a/package/hostapd/patches/800-dynamic_20_40_mhz.patch b/package/hostapd/patches/800-dynamic_20_40_mhz.patch
index 4fc677e..3ffa2e1 100644
--- a/package/hostapd/patches/800-dynamic_20_40_mhz.patch
+++ b/package/hostapd/patches/800-dynamic_20_40_mhz.patch
@@ -23,7 +23,15 @@
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -285,6 +285,7 @@ static void hostapd_cleanup_iface_pre(st
+@@ -27,6 +27,7 @@
+ #include "beacon.h"
+ #include "iapp.h"
+ #include "ieee802_1x.h"
++#include "ieee802_11.h"
+ #include "ieee802_11_auth.h"
+ #include "vlan_init.h"
+ #include "wpa_auth.h"
+@@ -285,6 +286,7 @@ static void hostapd_cleanup_iface_pre(st
*/
static void hostapd_cleanup_iface(struct hostapd_iface *iface)
{
@@ -77,7 +85,19 @@
#endif /* IEEE802_11_H */
--- a/src/ap/ieee802_11_ht.c
+++ b/src/ap/ieee802_11_ht.c
-@@ -70,12 +70,15 @@ u8 * hostapd_eid_ht_operation(struct hos
+@@ -20,9 +20,11 @@
+ #include "drivers/driver.h"
+ #include "hostapd.h"
+ #include "ap_config.h"
++#include "ap_drv_ops.h"
+ #include "sta_info.h"
+ #include "beacon.h"
+ #include "ieee802_11.h"
++#include "utils/eloop.h"
+
+
+ u8 * hostapd_eid_ht_capabilities(struct hostapd_data *hapd, u8 *eid)
+@@ -70,12 +72,15 @@ u8 * hostapd_eid_ht_operation(struct hos
oper->control_chan = hapd->iconf->channel;
oper->operation_mode = host_to_le16(hapd->iface->ht_op_mode);
@@ -99,14 +119,14 @@
pos += sizeof(*oper);
-@@ -265,3 +268,80 @@ void hostapd_get_ht_capab(struct hostapd
+@@ -265,3 +270,80 @@ void hostapd_get_ht_capab(struct hostapd
neg_ht_cap->ht_capabilities_info = host_to_le16(cap);
}
+
-+static int hostapd_set_force_20mhz(struct hostapd_iface *iface);
++static void hostapd_set_force_20mhz(struct hostapd_iface *iface);
+
-+static int hostapd_restore_40mhz(void *eloop_data, void *user_ctx)
++static void hostapd_restore_40mhz(void *eloop_data, void *user_ctx)
+{
+ struct hostapd_iface *iface = eloop_data;
+ struct os_time time;
@@ -132,7 +152,7 @@
+ hostapd_set_force_20mhz(iface);
+}
+
-+static int hostapd_set_force_20mhz(struct hostapd_iface *iface)
++static void hostapd_set_force_20mhz(struct hostapd_iface *iface)
+{
+ int secondary_channel;
+ int i;