#include <linux/compiler.h>
#include <linux/errno.h>
#include <linux/if_arp.h>
#include <linux/in6.h>
#include <linux/gfp.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/proc_fs.h>
#include <linux/skbuff.h>
#include <linux/tcp.h>
#include <linux/types.h>
#include <linux/wireless.h>
#include <linux/etherdevice.h>
#include <linux/uaccess.h>
#include <linux/ctype.h>
#include <net/lib80211.h>
#include "libipw.h"
static void libipw_monitor_rx(struct libipw_device *ieee,
struct sk_buff *skb,
struct libipw_rx_stats *rx_stats)
{ … }
static struct libipw_frag_entry *libipw_frag_cache_find(struct
libipw_device
*ieee,
unsigned int seq,
unsigned int frag,
u8 * src,
u8 * dst)
{ … }
static struct sk_buff *libipw_frag_cache_get(struct libipw_device *ieee,
struct libipw_hdr_4addr *hdr)
{ … }
static int libipw_frag_cache_invalidate(struct libipw_device *ieee,
struct libipw_hdr_4addr *hdr)
{ … }
#ifdef NOT_YET
static int
libipw_rx_frame_mgmt(struct libipw_device *ieee, struct sk_buff *skb,
struct libipw_rx_stats *rx_stats, u16 type,
u16 stype)
{
if (ieee->iw_mode == IW_MODE_MASTER) {
printk(KERN_DEBUG "%s: Master mode not yet supported.\n",
ieee->dev->name);
return 0;
}
if (ieee->hostapd && type == WLAN_FC_TYPE_MGMT) {
if (stype == WLAN_FC_STYPE_BEACON &&
ieee->iw_mode == IW_MODE_MASTER) {
struct sk_buff *skb2;
skb2 = skb_clone(skb, GFP_ATOMIC);
if (skb2)
hostap_rx(skb2->dev, skb2, rx_stats);
}
ieee->apdevstats.rx_packets++;
ieee->apdevstats.rx_bytes += skb->len;
prism2_rx_80211(ieee->apdev, skb, rx_stats, PRISM2_RX_MGMT);
return 0;
}
if (ieee->iw_mode == IW_MODE_MASTER) {
if (type != WLAN_FC_TYPE_MGMT && type != WLAN_FC_TYPE_CTRL) {
printk(KERN_DEBUG "%s: unknown management frame "
"(type=0x%02x, stype=0x%02x) dropped\n",
skb->dev->name, type, stype);
return -1;
}
hostap_rx(skb->dev, skb, rx_stats);
return 0;
}
printk(KERN_DEBUG "%s: hostap_rx_frame_mgmt: management frame "
"received in non-Host AP mode\n", skb->dev->name);
return -1;
}
#endif
static unsigned char libipw_rfc1042_header[] = …;
static unsigned char libipw_bridge_tunnel_header[] = …;
static int libipw_is_eapol_frame(struct libipw_device *ieee,
struct sk_buff *skb)
{ … }
static int
libipw_rx_frame_decrypt(struct libipw_device *ieee, struct sk_buff *skb,
struct lib80211_crypt_data *crypt)
{ … }
static int
libipw_rx_frame_decrypt_msdu(struct libipw_device *ieee,
struct sk_buff *skb, int keyidx,
struct lib80211_crypt_data *crypt)
{ … }
int libipw_rx(struct libipw_device *ieee, struct sk_buff *skb,
struct libipw_rx_stats *rx_stats)
{ … }
void libipw_rx_any(struct libipw_device *ieee,
struct sk_buff *skb, struct libipw_rx_stats *stats)
{ … }
#define MGMT_FRAME_FIXED_PART_LENGTH …
static u8 qos_oui[QOS_OUI_LEN] = …;
static int libipw_verify_qos_info(struct libipw_qos_information_element
*info_element, int sub_type)
{ … }
static int libipw_read_qos_param_element(
struct libipw_qos_parameter_info *element_param,
struct libipw_info_element *info_element)
{ … }
static int libipw_read_qos_info_element(
struct libipw_qos_information_element *element_info,
struct libipw_info_element *info_element)
{ … }
static void libipw_qos_convert_ac_to_parameters(struct
libipw_qos_parameter_info
*param_elm, struct
libipw_qos_parameters
*qos_param)
{ … }
static int libipw_parse_qos_info_param_IE(struct libipw_info_element
*info_element,
struct libipw_network *network)
{ … }
#ifdef CONFIG_LIBIPW_DEBUG
#define MFIE_STRING(x) …
static const char *get_info_element_string(u16 id)
{ … }
#endif
static int libipw_parse_info_param(struct libipw_info_element
*info_element, u16 length,
struct libipw_network *network)
{ … }
static int libipw_handle_assoc_resp(struct libipw_device *ieee, struct libipw_assoc_response
*frame, struct libipw_rx_stats *stats)
{ … }
static int libipw_network_init(struct libipw_device *ieee, struct libipw_probe_response
*beacon,
struct libipw_network *network,
struct libipw_rx_stats *stats)
{ … }
static inline int is_same_network(struct libipw_network *src,
struct libipw_network *dst)
{ … }
static void update_network(struct libipw_network *dst,
struct libipw_network *src)
{ … }
static inline int is_beacon(__le16 fc)
{ … }
static void libipw_process_probe_response(struct libipw_device
*ieee, struct
libipw_probe_response
*beacon, struct libipw_rx_stats
*stats)
{ … }
void libipw_rx_mgt(struct libipw_device *ieee,
struct libipw_hdr_4addr *header,
struct libipw_rx_stats *stats)
{ … }
EXPORT_SYMBOL_GPL(…);
EXPORT_SYMBOL(…);
EXPORT_SYMBOL(…);