diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-17 22:46:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-17 22:46:46 -0500 |
commit | d1138cf035ad5a8dc0796b213bd078a2fb92eb7c (patch) | |
tree | 72a4640fe87720ebfc118f2b3c7f140f5d19d6b7 /drivers/net/wireless/hostap | |
parent | 15578eeb6cd4b74492f26e60624aa1a9a52ddd7b (diff) | |
parent | 77783a78ded96a56e3a1a0c03bbe87c56896fe6e (diff) |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
Diffstat (limited to 'drivers/net/wireless/hostap')
-rw-r--r-- | drivers/net/wireless/hostap/Kconfig | 22 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/Makefile | 3 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap.h | 37 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_80211.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_80211_rx.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_80211_tx.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_ap.c | 36 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_ap.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_common.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_config.h | 13 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_info.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_ioctl.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_main.c | 60 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_proc.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_wlan.h | 4 |
15 files changed, 141 insertions, 90 deletions
diff --git a/drivers/net/wireless/hostap/Kconfig b/drivers/net/wireless/hostap/Kconfig index 56f41c714d38..c8f6286dd35f 100644 --- a/drivers/net/wireless/hostap/Kconfig +++ b/drivers/net/wireless/hostap/Kconfig | |||
@@ -26,11 +26,25 @@ config HOSTAP_FIRMWARE | |||
26 | depends on HOSTAP | 26 | depends on HOSTAP |
27 | ---help--- | 27 | ---help--- |
28 | Configure Host AP driver to include support for firmware image | 28 | Configure Host AP driver to include support for firmware image |
29 | download. Current version supports only downloading to volatile, i.e., | 29 | download. This option by itself only enables downloading to the |
30 | RAM memory. Flash upgrade is not yet supported. | 30 | volatile memory, i.e. the card RAM. This option is required to |
31 | support cards that don't have firmware in flash, such as D-Link | ||
32 | DWL-520 rev E and D-Link DWL-650 rev P. | ||
31 | 33 | ||
32 | Firmware image downloading needs user space tool, prism2_srec. It is | 34 | Firmware image downloading needs a user space tool, prism2_srec. |
33 | available from http://hostap.epitest.fi/. | 35 | It is available from http://hostap.epitest.fi/. |
36 | |||
37 | config HOSTAP_FIRMWARE_NVRAM | ||
38 | bool "Support for non-volatile firmware download" | ||
39 | depends on HOSTAP_FIRMWARE | ||
40 | ---help--- | ||
41 | Allow Host AP driver to write firmware images to the non-volatile | ||
42 | card memory, i.e. flash memory that survives power cycling. | ||
43 | Enable this option if you want to be able to change card firmware | ||
44 | permanently. | ||
45 | |||
46 | Firmware image downloading needs a user space tool, prism2_srec. | ||
47 | It is available from http://hostap.epitest.fi/. | ||
34 | 48 | ||
35 | config HOSTAP_PLX | 49 | config HOSTAP_PLX |
36 | tristate "Host AP driver for Prism2/2.5/3 in PLX9052 PCI adaptors" | 50 | tristate "Host AP driver for Prism2/2.5/3 in PLX9052 PCI adaptors" |
diff --git a/drivers/net/wireless/hostap/Makefile b/drivers/net/wireless/hostap/Makefile index 353ccb93134b..b8e41a702c00 100644 --- a/drivers/net/wireless/hostap/Makefile +++ b/drivers/net/wireless/hostap/Makefile | |||
@@ -1,4 +1,5 @@ | |||
1 | hostap-y := hostap_main.o | 1 | hostap-y := hostap_80211_rx.o hostap_80211_tx.o hostap_ap.o hostap_info.o \ |
2 | hostap_ioctl.o hostap_main.o hostap_proc.o | ||
2 | obj-$(CONFIG_HOSTAP) += hostap.o | 3 | obj-$(CONFIG_HOSTAP) += hostap.o |
3 | 4 | ||
4 | obj-$(CONFIG_HOSTAP_CS) += hostap_cs.o | 5 | obj-$(CONFIG_HOSTAP_CS) += hostap_cs.o |
diff --git a/drivers/net/wireless/hostap/hostap.h b/drivers/net/wireless/hostap/hostap.h index 5fac89b8ce3a..5e63765219fe 100644 --- a/drivers/net/wireless/hostap/hostap.h +++ b/drivers/net/wireless/hostap/hostap.h | |||
@@ -1,6 +1,15 @@ | |||
1 | #ifndef HOSTAP_H | 1 | #ifndef HOSTAP_H |
2 | #define HOSTAP_H | 2 | #define HOSTAP_H |
3 | 3 | ||
4 | #include <linux/ethtool.h> | ||
5 | |||
6 | #include "hostap_wlan.h" | ||
7 | #include "hostap_ap.h" | ||
8 | |||
9 | static const long freq_list[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442, | ||
10 | 2447, 2452, 2457, 2462, 2467, 2472, 2484 }; | ||
11 | #define FREQ_COUNT (sizeof(freq_list) / sizeof(freq_list[0])) | ||
12 | |||
4 | /* hostap.c */ | 13 | /* hostap.c */ |
5 | 14 | ||
6 | extern struct proc_dir_entry *hostap_proc; | 15 | extern struct proc_dir_entry *hostap_proc; |
@@ -40,6 +49,26 @@ int prism2_update_comms_qual(struct net_device *dev); | |||
40 | int prism2_sta_send_mgmt(local_info_t *local, u8 *dst, u16 stype, | 49 | int prism2_sta_send_mgmt(local_info_t *local, u8 *dst, u16 stype, |
41 | u8 *body, size_t bodylen); | 50 | u8 *body, size_t bodylen); |
42 | int prism2_sta_deauth(local_info_t *local, u16 reason); | 51 | int prism2_sta_deauth(local_info_t *local, u16 reason); |
52 | int prism2_wds_add(local_info_t *local, u8 *remote_addr, | ||
53 | int rtnl_locked); | ||
54 | int prism2_wds_del(local_info_t *local, u8 *remote_addr, | ||
55 | int rtnl_locked, int do_not_remove); | ||
56 | |||
57 | |||
58 | /* hostap_ap.c */ | ||
59 | |||
60 | int ap_control_add_mac(struct mac_restrictions *mac_restrictions, u8 *mac); | ||
61 | int ap_control_del_mac(struct mac_restrictions *mac_restrictions, u8 *mac); | ||
62 | void ap_control_flush_macs(struct mac_restrictions *mac_restrictions); | ||
63 | int ap_control_kick_mac(struct ap_data *ap, struct net_device *dev, u8 *mac); | ||
64 | void ap_control_kickall(struct ap_data *ap); | ||
65 | void * ap_crypt_get_ptrs(struct ap_data *ap, u8 *addr, int permanent, | ||
66 | struct ieee80211_crypt_data ***crypt); | ||
67 | int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[], | ||
68 | struct iw_quality qual[], int buf_size, | ||
69 | int aplist); | ||
70 | int prism2_ap_translate_scan(struct net_device *dev, char *buffer); | ||
71 | int prism2_hostapd(struct ap_data *ap, struct prism2_hostapd_param *param); | ||
43 | 72 | ||
44 | 73 | ||
45 | /* hostap_proc.c */ | 74 | /* hostap_proc.c */ |
@@ -54,4 +83,12 @@ void hostap_info_init(local_info_t *local); | |||
54 | void hostap_info_process(local_info_t *local, struct sk_buff *skb); | 83 | void hostap_info_process(local_info_t *local, struct sk_buff *skb); |
55 | 84 | ||
56 | 85 | ||
86 | /* hostap_ioctl.c */ | ||
87 | |||
88 | extern const struct iw_handler_def hostap_iw_handler_def; | ||
89 | extern struct ethtool_ops prism2_ethtool_ops; | ||
90 | |||
91 | int hostap_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); | ||
92 | |||
93 | |||
57 | #endif /* HOSTAP_H */ | 94 | #endif /* HOSTAP_H */ |
diff --git a/drivers/net/wireless/hostap/hostap_80211.h b/drivers/net/wireless/hostap/hostap_80211.h index bf506f50d722..1fc72fe511e9 100644 --- a/drivers/net/wireless/hostap/hostap_80211.h +++ b/drivers/net/wireless/hostap/hostap_80211.h | |||
@@ -1,6 +1,9 @@ | |||
1 | #ifndef HOSTAP_80211_H | 1 | #ifndef HOSTAP_80211_H |
2 | #define HOSTAP_80211_H | 2 | #define HOSTAP_80211_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | #include <net/ieee80211_crypt.h> | ||
6 | |||
4 | struct hostap_ieee80211_mgmt { | 7 | struct hostap_ieee80211_mgmt { |
5 | u16 frame_control; | 8 | u16 frame_control; |
6 | u16 duration; | 9 | u16 duration; |
diff --git a/drivers/net/wireless/hostap/hostap_80211_rx.c b/drivers/net/wireless/hostap/hostap_80211_rx.c index 4b13b76425c1..7e04dc94b3bc 100644 --- a/drivers/net/wireless/hostap/hostap_80211_rx.c +++ b/drivers/net/wireless/hostap/hostap_80211_rx.c | |||
@@ -1,7 +1,18 @@ | |||
1 | #include <linux/etherdevice.h> | 1 | #include <linux/etherdevice.h> |
2 | #include <net/ieee80211_crypt.h> | ||
2 | 3 | ||
3 | #include "hostap_80211.h" | 4 | #include "hostap_80211.h" |
4 | #include "hostap.h" | 5 | #include "hostap.h" |
6 | #include "hostap_ap.h" | ||
7 | |||
8 | /* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */ | ||
9 | /* Ethernet-II snap header (RFC1042 for most EtherTypes) */ | ||
10 | static unsigned char rfc1042_header[] = | ||
11 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; | ||
12 | /* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */ | ||
13 | static unsigned char bridge_tunnel_header[] = | ||
14 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; | ||
15 | /* No encapsulation header if EtherType < 0x600 (=length) */ | ||
5 | 16 | ||
6 | void hostap_dump_rx_80211(const char *name, struct sk_buff *skb, | 17 | void hostap_dump_rx_80211(const char *name, struct sk_buff *skb, |
7 | struct hostap_80211_rx_status *rx_stats) | 18 | struct hostap_80211_rx_status *rx_stats) |
diff --git a/drivers/net/wireless/hostap/hostap_80211_tx.c b/drivers/net/wireless/hostap/hostap_80211_tx.c index 9d24f8a38ac5..4a85e63906f1 100644 --- a/drivers/net/wireless/hostap/hostap_80211_tx.c +++ b/drivers/net/wireless/hostap/hostap_80211_tx.c | |||
@@ -1,3 +1,18 @@ | |||
1 | #include "hostap_80211.h" | ||
2 | #include "hostap_common.h" | ||
3 | #include "hostap_wlan.h" | ||
4 | #include "hostap.h" | ||
5 | #include "hostap_ap.h" | ||
6 | |||
7 | /* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */ | ||
8 | /* Ethernet-II snap header (RFC1042 for most EtherTypes) */ | ||
9 | static unsigned char rfc1042_header[] = | ||
10 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; | ||
11 | /* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */ | ||
12 | static unsigned char bridge_tunnel_header[] = | ||
13 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; | ||
14 | /* No encapsulation header if EtherType < 0x600 (=length) */ | ||
15 | |||
1 | void hostap_dump_tx_80211(const char *name, struct sk_buff *skb) | 16 | void hostap_dump_tx_80211(const char *name, struct sk_buff *skb) |
2 | { | 17 | { |
3 | struct ieee80211_hdr_4addr *hdr; | 18 | struct ieee80211_hdr_4addr *hdr; |
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c index 9da94ab7f05f..753a1de6664b 100644 --- a/drivers/net/wireless/hostap/hostap_ap.c +++ b/drivers/net/wireless/hostap/hostap_ap.c | |||
@@ -16,6 +16,14 @@ | |||
16 | * (8802.11: 5.5) | 16 | * (8802.11: 5.5) |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/proc_fs.h> | ||
20 | #include <linux/delay.h> | ||
21 | #include <linux/random.h> | ||
22 | |||
23 | #include "hostap_wlan.h" | ||
24 | #include "hostap.h" | ||
25 | #include "hostap_ap.h" | ||
26 | |||
19 | static int other_ap_policy[MAX_PARM_DEVICES] = { AP_OTHER_AP_SKIP_ALL, | 27 | static int other_ap_policy[MAX_PARM_DEVICES] = { AP_OTHER_AP_SKIP_ALL, |
20 | DEF_INTS }; | 28 | DEF_INTS }; |
21 | module_param_array(other_ap_policy, int, NULL, 0444); | 29 | module_param_array(other_ap_policy, int, NULL, 0444); |
@@ -360,8 +368,7 @@ static int ap_control_proc_read(char *page, char **start, off_t off, | |||
360 | } | 368 | } |
361 | 369 | ||
362 | 370 | ||
363 | static int ap_control_add_mac(struct mac_restrictions *mac_restrictions, | 371 | int ap_control_add_mac(struct mac_restrictions *mac_restrictions, u8 *mac) |
364 | u8 *mac) | ||
365 | { | 372 | { |
366 | struct mac_entry *entry; | 373 | struct mac_entry *entry; |
367 | 374 | ||
@@ -380,8 +387,7 @@ static int ap_control_add_mac(struct mac_restrictions *mac_restrictions, | |||
380 | } | 387 | } |
381 | 388 | ||
382 | 389 | ||
383 | static int ap_control_del_mac(struct mac_restrictions *mac_restrictions, | 390 | int ap_control_del_mac(struct mac_restrictions *mac_restrictions, u8 *mac) |
384 | u8 *mac) | ||
385 | { | 391 | { |
386 | struct list_head *ptr; | 392 | struct list_head *ptr; |
387 | struct mac_entry *entry; | 393 | struct mac_entry *entry; |
@@ -433,7 +439,7 @@ static int ap_control_mac_deny(struct mac_restrictions *mac_restrictions, | |||
433 | } | 439 | } |
434 | 440 | ||
435 | 441 | ||
436 | static void ap_control_flush_macs(struct mac_restrictions *mac_restrictions) | 442 | void ap_control_flush_macs(struct mac_restrictions *mac_restrictions) |
437 | { | 443 | { |
438 | struct list_head *ptr, *n; | 444 | struct list_head *ptr, *n; |
439 | struct mac_entry *entry; | 445 | struct mac_entry *entry; |
@@ -454,8 +460,7 @@ static void ap_control_flush_macs(struct mac_restrictions *mac_restrictions) | |||
454 | } | 460 | } |
455 | 461 | ||
456 | 462 | ||
457 | static int ap_control_kick_mac(struct ap_data *ap, struct net_device *dev, | 463 | int ap_control_kick_mac(struct ap_data *ap, struct net_device *dev, u8 *mac) |
458 | u8 *mac) | ||
459 | { | 464 | { |
460 | struct sta_info *sta; | 465 | struct sta_info *sta; |
461 | u16 resp; | 466 | u16 resp; |
@@ -486,7 +491,7 @@ static int ap_control_kick_mac(struct ap_data *ap, struct net_device *dev, | |||
486 | #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ | 491 | #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ |
487 | 492 | ||
488 | 493 | ||
489 | static void ap_control_kickall(struct ap_data *ap) | 494 | void ap_control_kickall(struct ap_data *ap) |
490 | { | 495 | { |
491 | struct list_head *ptr, *n; | 496 | struct list_head *ptr, *n; |
492 | struct sta_info *sta; | 497 | struct sta_info *sta; |
@@ -2321,9 +2326,9 @@ static void schedule_packet_send(local_info_t *local, struct sta_info *sta) | |||
2321 | } | 2326 | } |
2322 | 2327 | ||
2323 | 2328 | ||
2324 | static int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[], | 2329 | int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[], |
2325 | struct iw_quality qual[], int buf_size, | 2330 | struct iw_quality qual[], int buf_size, |
2326 | int aplist) | 2331 | int aplist) |
2327 | { | 2332 | { |
2328 | struct ap_data *ap = local->ap; | 2333 | struct ap_data *ap = local->ap; |
2329 | struct list_head *ptr; | 2334 | struct list_head *ptr; |
@@ -2363,7 +2368,7 @@ static int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[], | |||
2363 | 2368 | ||
2364 | /* Translate our list of Access Points & Stations to a card independant | 2369 | /* Translate our list of Access Points & Stations to a card independant |
2365 | * format that the Wireless Tools will understand - Jean II */ | 2370 | * format that the Wireless Tools will understand - Jean II */ |
2366 | static int prism2_ap_translate_scan(struct net_device *dev, char *buffer) | 2371 | int prism2_ap_translate_scan(struct net_device *dev, char *buffer) |
2367 | { | 2372 | { |
2368 | struct hostap_interface *iface; | 2373 | struct hostap_interface *iface; |
2369 | local_info_t *local; | 2374 | local_info_t *local; |
@@ -2608,8 +2613,7 @@ static int prism2_hostapd_sta_clear_stats(struct ap_data *ap, | |||
2608 | } | 2613 | } |
2609 | 2614 | ||
2610 | 2615 | ||
2611 | static int prism2_hostapd(struct ap_data *ap, | 2616 | int prism2_hostapd(struct ap_data *ap, struct prism2_hostapd_param *param) |
2612 | struct prism2_hostapd_param *param) | ||
2613 | { | 2617 | { |
2614 | switch (param->cmd) { | 2618 | switch (param->cmd) { |
2615 | case PRISM2_HOSTAPD_FLUSH: | 2619 | case PRISM2_HOSTAPD_FLUSH: |
@@ -3207,8 +3211,8 @@ void hostap_update_rates(local_info_t *local) | |||
3207 | } | 3211 | } |
3208 | 3212 | ||
3209 | 3213 | ||
3210 | static void * ap_crypt_get_ptrs(struct ap_data *ap, u8 *addr, int permanent, | 3214 | void * ap_crypt_get_ptrs(struct ap_data *ap, u8 *addr, int permanent, |
3211 | struct ieee80211_crypt_data ***crypt) | 3215 | struct ieee80211_crypt_data ***crypt) |
3212 | { | 3216 | { |
3213 | struct sta_info *sta; | 3217 | struct sta_info *sta; |
3214 | 3218 | ||
diff --git a/drivers/net/wireless/hostap/hostap_ap.h b/drivers/net/wireless/hostap/hostap_ap.h index 6d00df69c2e3..2fa2452b6b07 100644 --- a/drivers/net/wireless/hostap/hostap_ap.h +++ b/drivers/net/wireless/hostap/hostap_ap.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef HOSTAP_AP_H | 1 | #ifndef HOSTAP_AP_H |
2 | #define HOSTAP_AP_H | 2 | #define HOSTAP_AP_H |
3 | 3 | ||
4 | #include "hostap_80211.h" | ||
5 | |||
4 | /* AP data structures for STAs */ | 6 | /* AP data structures for STAs */ |
5 | 7 | ||
6 | /* maximum number of frames to buffer per STA */ | 8 | /* maximum number of frames to buffer per STA */ |
diff --git a/drivers/net/wireless/hostap/hostap_common.h b/drivers/net/wireless/hostap/hostap_common.h index 6f4fa9dc308f..01624005d808 100644 --- a/drivers/net/wireless/hostap/hostap_common.h +++ b/drivers/net/wireless/hostap/hostap_common.h | |||
@@ -1,6 +1,9 @@ | |||
1 | #ifndef HOSTAP_COMMON_H | 1 | #ifndef HOSTAP_COMMON_H |
2 | #define HOSTAP_COMMON_H | 2 | #define HOSTAP_COMMON_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | #include <linux/if_ether.h> | ||
6 | |||
4 | #define BIT(x) (1 << (x)) | 7 | #define BIT(x) (1 << (x)) |
5 | 8 | ||
6 | #define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5] | 9 | #define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5] |
diff --git a/drivers/net/wireless/hostap/hostap_config.h b/drivers/net/wireless/hostap/hostap_config.h index 7ed3425d08c1..c090a5aebb58 100644 --- a/drivers/net/wireless/hostap/hostap_config.h +++ b/drivers/net/wireless/hostap/hostap_config.h | |||
@@ -21,15 +21,10 @@ | |||
21 | #define PRISM2_DOWNLOAD_SUPPORT | 21 | #define PRISM2_DOWNLOAD_SUPPORT |
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | #ifdef PRISM2_DOWNLOAD_SUPPORT | 24 | /* Allow kernel configuration to enable non-volatile download support. */ |
25 | /* Allow writing firmware images into flash, i.e., to non-volatile storage. | 25 | #ifdef CONFIG_HOSTAP_FIRMWARE_NVRAM |
26 | * Before you enable this option, you should make absolutely sure that you are | 26 | #define PRISM2_NON_VOLATILE_DOWNLOAD |
27 | * using prism2_srec utility that comes with THIS version of the driver! | 27 | #endif |
28 | * In addition, please note that it is possible to kill your card with | ||
29 | * non-volatile download if you are using incorrect image. This feature has not | ||
30 | * been fully tested, so please be careful with it. */ | ||
31 | /* #define PRISM2_NON_VOLATILE_DOWNLOAD */ | ||
32 | #endif /* PRISM2_DOWNLOAD_SUPPORT */ | ||
33 | 28 | ||
34 | /* Save low-level I/O for debugging. This should not be enabled in normal use. | 29 | /* Save low-level I/O for debugging. This should not be enabled in normal use. |
35 | */ | 30 | */ |
diff --git a/drivers/net/wireless/hostap/hostap_info.c b/drivers/net/wireless/hostap/hostap_info.c index 5aa998fdf1c4..50f72d831cf4 100644 --- a/drivers/net/wireless/hostap/hostap_info.c +++ b/drivers/net/wireless/hostap/hostap_info.c | |||
@@ -1,5 +1,8 @@ | |||
1 | /* Host AP driver Info Frame processing (part of hostap.o module) */ | 1 | /* Host AP driver Info Frame processing (part of hostap.o module) */ |
2 | 2 | ||
3 | #include "hostap_wlan.h" | ||
4 | #include "hostap.h" | ||
5 | #include "hostap_ap.h" | ||
3 | 6 | ||
4 | /* Called only as a tasklet (software IRQ) */ | 7 | /* Called only as a tasklet (software IRQ) */ |
5 | static void prism2_info_commtallies16(local_info_t *local, unsigned char *buf, | 8 | static void prism2_info_commtallies16(local_info_t *local, unsigned char *buf, |
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c index 2617d70bcda9..f3e0ce1ee037 100644 --- a/drivers/net/wireless/hostap/hostap_ioctl.c +++ b/drivers/net/wireless/hostap/hostap_ioctl.c | |||
@@ -1,11 +1,13 @@ | |||
1 | /* ioctl() (mostly Linux Wireless Extensions) routines for Host AP driver */ | 1 | /* ioctl() (mostly Linux Wireless Extensions) routines for Host AP driver */ |
2 | 2 | ||
3 | #ifdef in_atomic | 3 | #include <linux/types.h> |
4 | /* Get kernel_locked() for in_atomic() */ | ||
5 | #include <linux/smp_lock.h> | 4 | #include <linux/smp_lock.h> |
6 | #endif | ||
7 | #include <linux/ethtool.h> | 5 | #include <linux/ethtool.h> |
6 | #include <net/ieee80211_crypt.h> | ||
8 | 7 | ||
8 | #include "hostap_wlan.h" | ||
9 | #include "hostap.h" | ||
10 | #include "hostap_ap.h" | ||
9 | 11 | ||
10 | static struct iw_statistics *hostap_get_wireless_stats(struct net_device *dev) | 12 | static struct iw_statistics *hostap_get_wireless_stats(struct net_device *dev) |
11 | { | 13 | { |
@@ -3910,7 +3912,7 @@ static void prism2_get_drvinfo(struct net_device *dev, | |||
3910 | local->sta_fw_ver & 0xff); | 3912 | local->sta_fw_ver & 0xff); |
3911 | } | 3913 | } |
3912 | 3914 | ||
3913 | static struct ethtool_ops prism2_ethtool_ops = { | 3915 | struct ethtool_ops prism2_ethtool_ops = { |
3914 | .get_drvinfo = prism2_get_drvinfo | 3916 | .get_drvinfo = prism2_get_drvinfo |
3915 | }; | 3917 | }; |
3916 | 3918 | ||
@@ -3985,7 +3987,7 @@ static const iw_handler prism2_private_handler[] = | |||
3985 | (iw_handler) prism2_ioctl_priv_readmif, /* 3 */ | 3987 | (iw_handler) prism2_ioctl_priv_readmif, /* 3 */ |
3986 | }; | 3988 | }; |
3987 | 3989 | ||
3988 | static const struct iw_handler_def hostap_iw_handler_def = | 3990 | const struct iw_handler_def hostap_iw_handler_def = |
3989 | { | 3991 | { |
3990 | .num_standard = sizeof(prism2_handler) / sizeof(iw_handler), | 3992 | .num_standard = sizeof(prism2_handler) / sizeof(iw_handler), |
3991 | .num_private = sizeof(prism2_private_handler) / sizeof(iw_handler), | 3993 | .num_private = sizeof(prism2_private_handler) / sizeof(iw_handler), |
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; |
diff --git a/drivers/net/wireless/hostap/hostap_proc.c b/drivers/net/wireless/hostap/hostap_proc.c index a0a4cbd4937a..d1d8ce022e63 100644 --- a/drivers/net/wireless/hostap/hostap_proc.c +++ b/drivers/net/wireless/hostap/hostap_proc.c | |||
@@ -1,5 +1,12 @@ | |||
1 | /* /proc routines for Host AP driver */ | 1 | /* /proc routines for Host AP driver */ |
2 | 2 | ||
3 | #include <linux/types.h> | ||
4 | #include <linux/proc_fs.h> | ||
5 | #include <net/ieee80211_crypt.h> | ||
6 | |||
7 | #include "hostap_wlan.h" | ||
8 | #include "hostap.h" | ||
9 | |||
3 | #define PROC_LIMIT (PAGE_SIZE - 80) | 10 | #define PROC_LIMIT (PAGE_SIZE - 80) |
4 | 11 | ||
5 | 12 | ||
diff --git a/drivers/net/wireless/hostap/hostap_wlan.h b/drivers/net/wireless/hostap/hostap_wlan.h index cfd801559492..87a54aa6f4dd 100644 --- a/drivers/net/wireless/hostap/hostap_wlan.h +++ b/drivers/net/wireless/hostap/hostap_wlan.h | |||
@@ -1,6 +1,10 @@ | |||
1 | #ifndef HOSTAP_WLAN_H | 1 | #ifndef HOSTAP_WLAN_H |
2 | #define HOSTAP_WLAN_H | 2 | #define HOSTAP_WLAN_H |
3 | 3 | ||
4 | #include <linux/wireless.h> | ||
5 | #include <linux/netdevice.h> | ||
6 | #include <net/iw_handler.h> | ||
7 | |||
4 | #include "hostap_config.h" | 8 | #include "hostap_config.h" |
5 | #include "hostap_common.h" | 9 | #include "hostap_common.h" |
6 | 10 | ||