diff options
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_main.c')
-rw-r--r-- | drivers/net/wireless/hostap/hostap_main.c | 60 |
1 files changed, 5 insertions, 55 deletions
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c index 3d2ea61033be..8dd4c4446a64 100644 --- a/drivers/net/wireless/hostap/hostap_main.c +++ b/drivers/net/wireless/hostap/hostap_main.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/kmod.h> | 24 | #include <linux/kmod.h> |
25 | #include <linux/rtnetlink.h> | 25 | #include <linux/rtnetlink.h> |
26 | #include <linux/wireless.h> | 26 | #include <linux/wireless.h> |
27 | #include <linux/etherdevice.h> | ||
27 | #include <net/iw_handler.h> | 28 | #include <net/iw_handler.h> |
28 | #include <net/ieee80211.h> | 29 | #include <net/ieee80211.h> |
29 | #include <net/ieee80211_crypt.h> | 30 | #include <net/ieee80211_crypt.h> |
@@ -47,57 +48,6 @@ MODULE_VERSION(PRISM2_VERSION); | |||
47 | #define PRISM2_MAX_MTU (PRISM2_MAX_FRAME_SIZE - (6 /* LLC */ + 8 /* WEP */)) | 48 | #define PRISM2_MAX_MTU (PRISM2_MAX_FRAME_SIZE - (6 /* LLC */ + 8 /* WEP */)) |
48 | 49 | ||
49 | 50 | ||
50 | /* hostap.c */ | ||
51 | static int prism2_wds_add(local_info_t *local, u8 *remote_addr, | ||
52 | int rtnl_locked); | ||
53 | static int prism2_wds_del(local_info_t *local, u8 *remote_addr, | ||
54 | int rtnl_locked, int do_not_remove); | ||
55 | |||
56 | /* hostap_ap.c */ | ||
57 | static int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[], | ||
58 | struct iw_quality qual[], int buf_size, | ||
59 | int aplist); | ||
60 | static int prism2_ap_translate_scan(struct net_device *dev, char *buffer); | ||
61 | static int prism2_hostapd(struct ap_data *ap, | ||
62 | struct prism2_hostapd_param *param); | ||
63 | static void * ap_crypt_get_ptrs(struct ap_data *ap, u8 *addr, int permanent, | ||
64 | struct ieee80211_crypt_data ***crypt); | ||
65 | static void ap_control_kickall(struct ap_data *ap); | ||
66 | #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT | ||
67 | static int ap_control_add_mac(struct mac_restrictions *mac_restrictions, | ||
68 | u8 *mac); | ||
69 | static int ap_control_del_mac(struct mac_restrictions *mac_restrictions, | ||
70 | u8 *mac); | ||
71 | static void ap_control_flush_macs(struct mac_restrictions *mac_restrictions); | ||
72 | static int ap_control_kick_mac(struct ap_data *ap, struct net_device *dev, | ||
73 | u8 *mac); | ||
74 | #endif /* !PRISM2_NO_KERNEL_IEEE80211_MGMT */ | ||
75 | |||
76 | |||
77 | static const long freq_list[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442, | ||
78 | 2447, 2452, 2457, 2462, 2467, 2472, 2484 }; | ||
79 | #define FREQ_COUNT (sizeof(freq_list) / sizeof(freq_list[0])) | ||
80 | |||
81 | |||
82 | /* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */ | ||
83 | /* Ethernet-II snap header (RFC1042 for most EtherTypes) */ | ||
84 | static unsigned char rfc1042_header[] = | ||
85 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; | ||
86 | /* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */ | ||
87 | static unsigned char bridge_tunnel_header[] = | ||
88 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; | ||
89 | /* No encapsulation header if EtherType < 0x600 (=length) */ | ||
90 | |||
91 | |||
92 | /* FIX: these could be compiled separately and linked together to hostap.o */ | ||
93 | #include "hostap_ap.c" | ||
94 | #include "hostap_info.c" | ||
95 | #include "hostap_ioctl.c" | ||
96 | #include "hostap_proc.c" | ||
97 | #include "hostap_80211_rx.c" | ||
98 | #include "hostap_80211_tx.c" | ||
99 | |||
100 | |||
101 | struct net_device * hostap_add_interface(struct local_info *local, | 51 | struct net_device * hostap_add_interface(struct local_info *local, |
102 | int type, int rtnl_locked, | 52 | int type, int rtnl_locked, |
103 | const char *prefix, | 53 | const char *prefix, |
@@ -196,8 +146,8 @@ static inline int prism2_wds_special_addr(u8 *addr) | |||
196 | } | 146 | } |
197 | 147 | ||
198 | 148 | ||
199 | static int prism2_wds_add(local_info_t *local, u8 *remote_addr, | 149 | int prism2_wds_add(local_info_t *local, u8 *remote_addr, |
200 | int rtnl_locked) | 150 | int rtnl_locked) |
201 | { | 151 | { |
202 | struct net_device *dev; | 152 | struct net_device *dev; |
203 | struct list_head *ptr; | 153 | struct list_head *ptr; |
@@ -258,8 +208,8 @@ static int prism2_wds_add(local_info_t *local, u8 *remote_addr, | |||
258 | } | 208 | } |
259 | 209 | ||
260 | 210 | ||
261 | static int prism2_wds_del(local_info_t *local, u8 *remote_addr, | 211 | int prism2_wds_del(local_info_t *local, u8 *remote_addr, |
262 | int rtnl_locked, int do_not_remove) | 212 | int rtnl_locked, int do_not_remove) |
263 | { | 213 | { |
264 | unsigned long flags; | 214 | unsigned long flags; |
265 | struct list_head *ptr; | 215 | struct list_head *ptr; |