Enable nl80211 support in hostapd.
[lede.git] / package / hostapd / patches / 007-add-nl80211-driver.patch
1 Index: hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576/hostapd/Makefile
2 ===================================================================
3 --- hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576.orig/hostapd/Makefile     2008-02-16 19:44:22.000000000 +0100
4 +++ hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576/hostapd/Makefile  2008-02-16 19:44:34.000000000 +0100
5 @@ -121,6 +121,12 @@ OBJS += driver_devicescape.o
6  LIBS += -lnl
7  endif
8  
9 +ifdef CONFIG_DRIVER_NL80211
10 +CFLAGS += -DCONFIG_DRIVER_NL80211
11 +OBJS += driver_nl80211.o radiotap.o
12 +LIBS += -lnl
13 +endif
14 +
15  ifdef CONFIG_DRIVER_BSD
16  CFLAGS += -DCONFIG_DRIVER_BSD
17  OBJS += driver_bsd.o
18 Index: hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576/hostapd/drivers.c
19 ===================================================================
20 --- hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576.orig/hostapd/drivers.c    2007-11-16 05:08:24.000000000 +0100
21 +++ hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576/hostapd/drivers.c 2008-02-16 19:56:29.000000000 +0100
22 @@ -22,6 +22,9 @@ extern struct wpa_driver_ops wpa_driver_
23  /* driver_devicescape.c */
24  extern struct wpa_driver_ops wpa_driver_devicescape_ops;
25  #endif /* CONFIG_DRIVER_DEVICESCAPE */
26 +#ifdef CONFIG_DRIVER_NL80211
27 +extern struct wpa_driver_ops wpa_driver_nl80211_ops; /* driver_nl80211.c */
28 +#endif /* CONFIG_DRIVER_NL80211 */
29  #ifdef CONFIG_DRIVER_PRISM54
30  extern struct wpa_driver_ops wpa_driver_prism54_ops; /* driver_prism54.c */
31  #endif /* CONFIG_DRIVER_PRISM54 */
32 @@ -47,6 +50,9 @@ struct wpa_driver_ops *hostapd_drivers[]
33  #ifdef CONFIG_DRIVER_DEVICESCAPE
34         &wpa_driver_devicescape_ops,
35  #endif /* CONFIG_DRIVER_DEVICESCAPE */
36 +#ifdef CONFIG_DRIVER_NL80211
37 +       &wpa_driver_nl80211_ops,
38 +#endif /* CONFIG_DRIVER_NL80211 */
39  #ifdef CONFIG_DRIVER_PRISM54
40         &wpa_driver_prism54_ops,
41  #endif /* CONFIG_DRIVER_PRISM54 */