Date:2011-04-24 05:34:46 (2 years 1 month ago)
Author:nbd
Commit:4feb070323665b63dbb761bd53add43063da85a9
Message:hostapd: fix a few compile errors and warnings

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26751 3c298f89-4303-0410-b956-a3cf2f4a3e73
Files: package/hostapd/patches/500-scan_wait.patch (8 diffs)
package/hostapd/patches/510-multicall.patch (2 diffs)
package/hostapd/patches/551-nl80211_del_beacon_bss.patch (2 diffs)
package/hostapd/patches/710-bring_down_interface.patch (2 diffs)
package/hostapd/patches/730-fix_wds_bridge_handling.patch (2 diffs)
package/hostapd/patches/800-dynamic_20_40_mhz.patch (4 diffs)

Change Details

package/hostapd/patches/500-scan_wait.patch
3131
3232
3333 struct hapd_interfaces {
34@@ -163,6 +165,15 @@ static void hostapd_logger_cb(void *ctx,
34@@ -163,6 +165,16 @@ static void hostapd_logger_cb(void *ctx,
3535 }
3636 #endif /* CONFIG_NO_HOSTAPD_LOGGER */
3737
...... 
4242+ return -1;
4343+ }
4444+ daemonize = 0;
45+ return 0;
4546+}
4647+
4748
4849 /**
4950  * hostapd_init - Allocate and initialize per-interface data
50@@ -184,6 +195,7 @@ static struct hostapd_iface * hostapd_in
51@@ -184,6 +196,7 @@ static struct hostapd_iface * hostapd_in
5152     if (hapd_iface == NULL)
5253         goto fail;
5354
...... 
5556     hapd_iface->reload_config = hostapd_reload_config;
5657     hapd_iface->config_read_cb = hostapd_config_read;
5758     hapd_iface->config_fname = os_strdup(config_file);
58@@ -399,7 +411,7 @@ static int hostapd_global_init(struct ha
59@@ -399,7 +412,7 @@ static int hostapd_global_init(struct ha
5960 }
6061
6162
...... 
6465 {
6566 #ifdef EAP_SERVER_TNC
6667     tncs_global_deinit();
67@@ -419,8 +431,7 @@ static void hostapd_global_deinit(const
68@@ -419,8 +432,7 @@ static void hostapd_global_deinit(const
6869 }
6970
7071
...... 
7475 {
7576 #ifdef EAP_SERVER_TNC
7677     int tnc = 0;
77@@ -441,11 +452,6 @@ static int hostapd_global_run(struct hap
78@@ -441,11 +453,6 @@ static int hostapd_global_run(struct hap
7879     }
7980 #endif /* EAP_SERVER_TNC */
8081
...... 
8687     eloop_run();
8788
8889     return 0;
89@@ -501,8 +507,7 @@ int main(int argc, char *argv[])
90@@ -501,8 +508,7 @@ int main(int argc, char *argv[])
9091     struct hapd_interfaces interfaces;
9192     int ret = 1;
9293     size_t i;
...... 
9697     const char *log_file = NULL;
9798
9899     if (os_program_init())
99@@ -576,7 +581,7 @@ int main(int argc, char *argv[])
100@@ -576,7 +582,7 @@ int main(int argc, char *argv[])
100101             goto out;
101102     }
102103
...... 
105106         goto out;
106107
107108     ret = 0;
108@@ -587,7 +592,7 @@ int main(int argc, char *argv[])
109@@ -587,7 +593,7 @@ int main(int argc, char *argv[])
109110         hostapd_interface_deinit_free(interfaces.iface[i]);
110111     os_free(interfaces.iface);
111112
package/hostapd/patches/510-multicall.patch
212212         wpa_debug_open_syslog();
213213--- a/hostapd/main.c
214214+++ b/hostapd/main.c
215@@ -501,6 +501,9 @@ static const char * hostapd_msg_ifname_c
215@@ -502,6 +502,9 @@ static const char * hostapd_msg_ifname_c
216216     return NULL;
217217 }
218218
...... 
222222
223223 int main(int argc, char *argv[])
224224 {
225@@ -513,6 +516,7 @@ int main(int argc, char *argv[])
225@@ -514,6 +517,7 @@ int main(int argc, char *argv[])
226226     if (os_program_init())
227227         return -1;
228228
package/hostapd/patches/551-nl80211_del_beacon_bss.patch
11--- a/src/drivers/driver_nl80211.c
22+++ b/src/drivers/driver_nl80211.c
3@@ -2092,23 +2092,41 @@ wpa_driver_nl80211_finish_drv_init(struc
3@@ -2092,23 +2092,43 @@ wpa_driver_nl80211_finish_drv_init(struc
44 }
55
66
...... 
3333+
3434+ for (bss = &drv->first_bss; bss; bss = bss->next)
3535+ wpa_driver_nl80211_del_bss_beacon(bss);
36+
37+ return 0;
3638+}
3739+
3840+static int wpa_driver_nl80211_stop_ap(void *priv)
3941+{
4042+ struct i802_bss *bss = priv;
4143+
42+ wpa_driver_nl80211_del_beacon(bss->drv);
44+ return wpa_driver_nl80211_del_beacon(bss->drv);
4345+}
4446
4547 /**
4648  * wpa_driver_nl80211_deinit - Deinitialize nl80211 driver interface
47@@ -6581,4 +6599,5 @@ const struct wpa_driver_ops wpa_driver_n
49@@ -6581,4 +6601,5 @@ const struct wpa_driver_ops wpa_driver_n
4850     .set_intra_bss = nl80211_set_intra_bss,
4951     .set_param = nl80211_set_param,
5052     .get_radio_name = nl80211_get_radio_name,
package/hostapd/patches/710-bring_down_interface.patch
11--- a/src/drivers/driver_nl80211.c
22+++ b/src/drivers/driver_nl80211.c
3@@ -4919,9 +4919,6 @@ static int wpa_driver_nl80211_set_mode(v
3@@ -4921,9 +4921,6 @@ static int wpa_driver_nl80211_set_mode(v
44             /* Try to set the mode again while the interface is
55              * down */
66             ret = nl80211_set_mode(drv, drv->ifindex, nlmode);
...... 
1010             if (!ret)
1111                 break;
1212         } else
13@@ -4934,6 +4931,8 @@ static int wpa_driver_nl80211_set_mode(v
13@@ -4936,6 +4933,8 @@ static int wpa_driver_nl80211_set_mode(v
1414         wpa_printf(MSG_DEBUG, "nl80211: Mode change succeeded while "
1515                "interface is down");
1616         drv->nlmode = nlmode;
package/hostapd/patches/730-fix_wds_bridge_handling.patch
11--- a/src/drivers/driver_nl80211.c
22+++ b/src/drivers/driver_nl80211.c
3@@ -5502,6 +5502,9 @@ static int i802_set_wds_sta(void *priv,
3@@ -5504,6 +5504,9 @@ static int i802_set_wds_sta(void *priv,
44         linux_set_iface_flags(drv->ioctl_sock, name, 1);
55         return i802_set_sta_vlan(priv, addr, name, 0);
66     } else {
...... 
1010         i802_set_sta_vlan(priv, addr, bss->ifname, 0);
1111         return wpa_driver_nl80211_if_remove(priv, WPA_IF_AP_VLAN,
1212                             name);
13@@ -5942,14 +5945,14 @@ static int wpa_driver_nl80211_if_remove(
13@@ -5944,14 +5947,14 @@ static int wpa_driver_nl80211_if_remove(
1414         return -1;
1515
1616 #ifdef HOSTAPD
package/hostapd/patches/800-dynamic_20_40_mhz.patch
2323
2424--- a/src/ap/hostapd.c
2525+++ b/src/ap/hostapd.c
26@@ -285,6 +285,7 @@ static void hostapd_cleanup_iface_pre(st
26@@ -27,6 +27,7 @@
27 #include "beacon.h"
28 #include "iapp.h"
29 #include "ieee802_1x.h"
30+#include "ieee802_11.h"
31 #include "ieee802_11_auth.h"
32 #include "vlan_init.h"
33 #include "wpa_auth.h"
34@@ -285,6 +286,7 @@ static void hostapd_cleanup_iface_pre(st
2735  */
2836 static void hostapd_cleanup_iface(struct hostapd_iface *iface)
2937 {
...... 
7785 #endif /* IEEE802_11_H */
7886--- a/src/ap/ieee802_11_ht.c
7987+++ b/src/ap/ieee802_11_ht.c
80@@ -70,12 +70,15 @@ u8 * hostapd_eid_ht_operation(struct hos
88@@ -20,9 +20,11 @@
89 #include "drivers/driver.h"
90 #include "hostapd.h"
91 #include "ap_config.h"
92+#include "ap_drv_ops.h"
93 #include "sta_info.h"
94 #include "beacon.h"
95 #include "ieee802_11.h"
96+#include "utils/eloop.h"
97
98
99 u8 * hostapd_eid_ht_capabilities(struct hostapd_data *hapd, u8 *eid)
100@@ -70,12 +72,15 @@ u8 * hostapd_eid_ht_operation(struct hos
81101
82102     oper->control_chan = hapd->iconf->channel;
83103     oper->operation_mode = host_to_le16(hapd->iface->ht_op_mode);
...... 
99119
100120     pos += sizeof(*oper);
101121
102@@ -265,3 +268,80 @@ void hostapd_get_ht_capab(struct hostapd
122@@ -265,3 +270,80 @@ void hostapd_get_ht_capab(struct hostapd
103123
104124     neg_ht_cap->ht_capabilities_info = host_to_le16(cap);
105125 }
106126+
107+static int hostapd_set_force_20mhz(struct hostapd_iface *iface);
127+static void hostapd_set_force_20mhz(struct hostapd_iface *iface);
108128+
109+static int hostapd_restore_40mhz(void *eloop_data, void *user_ctx)
129+static void hostapd_restore_40mhz(void *eloop_data, void *user_ctx)
110130+{
111131+ struct hostapd_iface *iface = eloop_data;
112132+ struct os_time time;
...... 
132152+ hostapd_set_force_20mhz(iface);
133153+}
134154+
135+static int hostapd_set_force_20mhz(struct hostapd_iface *iface)
155+static void hostapd_set_force_20mhz(struct hostapd_iface *iface)
136156+{
137157+ int secondary_channel;
138158+ int i;

Archive Download the corresponding diff file



interactive