Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5fad5a2e authored by Adrian Bunk's avatar Adrian Bunk Committed by John W. Linville
Browse files

[PATCH] hostap: don't #include C files in hostap_main.c



This patch contains an attempt to properly build hostap.o without
#include'ing C files.

Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 8aec9383
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
hostap-y := hostap_main.o
hostap-y := hostap_80211_rx.o hostap_80211_tx.o hostap_ap.o hostap_info.o \
            hostap_ioctl.o hostap_main.o hostap_proc.o 
obj-$(CONFIG_HOSTAP) += hostap.o

obj-$(CONFIG_HOSTAP_CS) += hostap_cs.o
+37 −0
Original line number Diff line number Diff line
#ifndef HOSTAP_H
#define HOSTAP_H

#include <linux/ethtool.h>

#include "hostap_wlan.h"
#include "hostap_ap.h"

static const long freq_list[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442,
				  2447, 2452, 2457, 2462, 2467, 2472, 2484 };
#define FREQ_COUNT (sizeof(freq_list) / sizeof(freq_list[0]))

/* hostap.c */

extern struct proc_dir_entry *hostap_proc;
@@ -40,6 +49,26 @@ int prism2_update_comms_qual(struct net_device *dev);
int prism2_sta_send_mgmt(local_info_t *local, u8 *dst, u16 stype,
			 u8 *body, size_t bodylen);
int prism2_sta_deauth(local_info_t *local, u16 reason);
int prism2_wds_add(local_info_t *local, u8 *remote_addr,
		   int rtnl_locked);
int prism2_wds_del(local_info_t *local, u8 *remote_addr,
		   int rtnl_locked, int do_not_remove);


/* hostap_ap.c */

int ap_control_add_mac(struct mac_restrictions *mac_restrictions, u8 *mac);
int ap_control_del_mac(struct mac_restrictions *mac_restrictions, u8 *mac);
void ap_control_flush_macs(struct mac_restrictions *mac_restrictions);
int ap_control_kick_mac(struct ap_data *ap, struct net_device *dev, u8 *mac);
void ap_control_kickall(struct ap_data *ap);
void * ap_crypt_get_ptrs(struct ap_data *ap, u8 *addr, int permanent,
			 struct ieee80211_crypt_data ***crypt);
int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[],
			   struct iw_quality qual[], int buf_size,
			   int aplist);
int prism2_ap_translate_scan(struct net_device *dev, char *buffer);
int prism2_hostapd(struct ap_data *ap, struct prism2_hostapd_param *param);


/* hostap_proc.c */
@@ -54,4 +83,12 @@ void hostap_info_init(local_info_t *local);
void hostap_info_process(local_info_t *local, struct sk_buff *skb);


/* hostap_ioctl.c */

extern const struct iw_handler_def hostap_iw_handler_def;
extern struct ethtool_ops prism2_ethtool_ops;

int hostap_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);


#endif /* HOSTAP_H */
+3 −0
Original line number Diff line number Diff line
#ifndef HOSTAP_80211_H
#define HOSTAP_80211_H

#include <linux/types.h>
#include <net/ieee80211_crypt.h>

struct hostap_ieee80211_mgmt {
	u16 frame_control;
	u16 duration;
+11 −0
Original line number Diff line number Diff line
#include <linux/etherdevice.h>
#include <net/ieee80211_crypt.h>

#include "hostap_80211.h"
#include "hostap.h"
#include "hostap_ap.h"

/* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */
/* Ethernet-II snap header (RFC1042 for most EtherTypes) */
static unsigned char rfc1042_header[] =
{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
/* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
static unsigned char bridge_tunnel_header[] =
{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 };
/* No encapsulation header if EtherType < 0x600 (=length) */

void hostap_dump_rx_80211(const char *name, struct sk_buff *skb,
			  struct hostap_80211_rx_status *rx_stats)
+15 −0
Original line number Diff line number Diff line
#include "hostap_80211.h"
#include "hostap_common.h"
#include "hostap_wlan.h"
#include "hostap.h"
#include "hostap_ap.h"

/* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */
/* Ethernet-II snap header (RFC1042 for most EtherTypes) */
static unsigned char rfc1042_header[] =
{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
/* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
static unsigned char bridge_tunnel_header[] =
{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 };
/* No encapsulation header if EtherType < 0x600 (=length) */

void hostap_dump_tx_80211(const char *name, struct sk_buff *skb)
{
	struct ieee80211_hdr_4addr *hdr;
Loading