Staging: wlan-ng: p80211netdev.h: Coding style cleanups

Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Moritz Muehlenhoff 2009-02-08 02:20:59 +01:00 committed by Greg Kroah-Hartman
parent c27f880c34
commit a32fb5f754

View file

@ -83,69 +83,65 @@ typedef struct net_device netdevice_t;
#define WLAN_MSD_RUNNING 7 #define WLAN_MSD_RUNNING 7
#ifndef ETH_P_ECONET #ifndef ETH_P_ECONET
#define ETH_P_ECONET 0x0018 /* needed for 2.2.x kernels */ #define ETH_P_ECONET 0x0018 /* needed for 2.2.x kernels */
#endif #endif
#define ETH_P_80211_RAW (ETH_P_ECONET + 1) #define ETH_P_80211_RAW (ETH_P_ECONET + 1)
#ifndef ARPHRD_IEEE80211 #ifndef ARPHRD_IEEE80211
#define ARPHRD_IEEE80211 801 /* kernel 2.4.6 */ #define ARPHRD_IEEE80211 801 /* kernel 2.4.6 */
#endif #endif
#ifndef ARPHRD_IEEE80211_PRISM /* kernel 2.4.18 */ #ifndef ARPHRD_IEEE80211_PRISM /* kernel 2.4.18 */
#define ARPHRD_IEEE80211_PRISM 802 #define ARPHRD_IEEE80211_PRISM 802
#endif #endif
/*--- NSD Capabilities Flags ------------------------------*/ /*--- NSD Capabilities Flags ------------------------------*/
#define P80211_NSDCAP_HARDWAREWEP 0x01 /* hardware wep engine */ #define P80211_NSDCAP_HARDWAREWEP 0x01 /* hardware wep engine */
#define P80211_NSDCAP_SHORT_PREAMBLE 0x10 /* hardware supports */ #define P80211_NSDCAP_SHORT_PREAMBLE 0x10 /* hardware supports */
#define P80211_NSDCAP_HWFRAGMENT 0x80 /* nsd handles frag/defrag */ #define P80211_NSDCAP_HWFRAGMENT 0x80 /* nsd handles frag/defrag */
#define P80211_NSDCAP_AUTOJOIN 0x100 /* nsd does autojoin */ #define P80211_NSDCAP_AUTOJOIN 0x100 /* nsd does autojoin */
#define P80211_NSDCAP_NOSCAN 0x200 /* nsd can scan */ #define P80211_NSDCAP_NOSCAN 0x200 /* nsd can scan */
/*================================================================*/
/* Types */
/* Received frame statistics */ /* Received frame statistics */
typedef struct p80211_frmrx_t typedef struct p80211_frmrx_t {
{ u32 mgmt;
u32 mgmt; u32 assocreq;
u32 assocreq; u32 assocresp;
u32 assocresp; u32 reassocreq;
u32 reassocreq; u32 reassocresp;
u32 reassocresp; u32 probereq;
u32 probereq; u32 proberesp;
u32 proberesp; u32 beacon;
u32 beacon; u32 atim;
u32 atim; u32 disassoc;
u32 disassoc; u32 authen;
u32 authen; u32 deauthen;
u32 deauthen; u32 mgmt_unknown;
u32 mgmt_unknown; u32 ctl;
u32 ctl; u32 pspoll;
u32 pspoll; u32 rts;
u32 rts; u32 cts;
u32 cts; u32 ack;
u32 ack; u32 cfend;
u32 cfend; u32 cfendcfack;
u32 cfendcfack; u32 ctl_unknown;
u32 ctl_unknown; u32 data;
u32 data; u32 dataonly;
u32 dataonly; u32 data_cfack;
u32 data_cfack; u32 data_cfpoll;
u32 data_cfpoll; u32 data__cfack_cfpoll;
u32 data__cfack_cfpoll; u32 null;
u32 null; u32 cfack;
u32 cfack; u32 cfpoll;
u32 cfpoll; u32 cfack_cfpoll;
u32 cfack_cfpoll; u32 data_unknown;
u32 data_unknown; u32 decrypt;
u32 decrypt; u32 decrypt_err;
u32 decrypt_err;
} p80211_frmrx_t; } p80211_frmrx_t;
/* called by /proc/net/wireless */ /* called by /proc/net/wireless */
struct iw_statistics* p80211wext_get_wireless_stats(netdevice_t *dev); struct iw_statistics *p80211wext_get_wireless_stats(netdevice_t * dev);
/* wireless extensions' ioctls */ /* wireless extensions' ioctls */
extern struct iw_handler_def p80211wext_handler_def; extern struct iw_handler_def p80211wext_handler_def;
int p80211wext_event_associated(struct wlandevice *wlandev, int assoc); int p80211wext_event_associated(struct wlandevice *wlandev, int assoc);
@ -164,84 +160,87 @@ extern int wlan_watchdog;
extern int wlan_wext_write; extern int wlan_wext_write;
/* WLAN device type */ /* WLAN device type */
typedef struct wlandevice typedef struct wlandevice {
{ struct wlandevice *next; /* link for list of devices */
struct wlandevice *next; /* link for list of devices */ void *priv; /* private data for MSD */
void *priv; /* private data for MSD */
/* Subsystem State */ /* Subsystem State */
char name[WLAN_DEVNAMELEN_MAX]; /* Dev name, from register_wlandev()*/ char name[WLAN_DEVNAMELEN_MAX]; /* Dev name, from register_wlandev() */
char *nsdname; char *nsdname;
u32 state; /* Device I/F state (open/closed) */ u32 state; /* Device I/F state (open/closed) */
u32 msdstate; /* state of underlying driver */ u32 msdstate; /* state of underlying driver */
u32 hwremoved; /* Has the hw been yanked out? */ u32 hwremoved; /* Has the hw been yanked out? */
/* Hardware config */ /* Hardware config */
unsigned int irq; unsigned int irq;
unsigned int iobase; unsigned int iobase;
unsigned int membase; unsigned int membase;
u32 nsdcaps; /* NSD Capabilities flags */ u32 nsdcaps; /* NSD Capabilities flags */
/* Config vars */ /* Config vars */
unsigned int ethconv; unsigned int ethconv;
/* device methods (init by MSD, used by p80211 */ /* device methods (init by MSD, used by p80211 */
int (*open)(struct wlandevice *wlandev); int (*open) (struct wlandevice *wlandev);
int (*close)(struct wlandevice *wlandev); int (*close) (struct wlandevice *wlandev);
void (*reset)(struct wlandevice *wlandev ); void (*reset) (struct wlandevice *wlandev);
int (*txframe)(struct wlandevice *wlandev, struct sk_buff *skb, p80211_hdr_t *p80211_hdr, p80211_metawep_t *p80211_wep); int (*txframe) (struct wlandevice *wlandev, struct sk_buff *skb,
int (*mlmerequest)(struct wlandevice *wlandev, p80211msg_t *msg); p80211_hdr_t *p80211_hdr,
int (*set_multicast_list)(struct wlandevice *wlandev, p80211_metawep_t *p80211_wep);
netdevice_t *dev); int (*mlmerequest) (struct wlandevice *wlandev, p80211msg_t *msg);
void (*tx_timeout)(struct wlandevice *wlandev); int (*set_multicast_list) (struct wlandevice *wlandev,
netdevice_t *dev);
void (*tx_timeout) (struct wlandevice *wlandev);
/* 802.11 State */ /* 802.11 State */
u8 bssid[WLAN_BSSID_LEN]; u8 bssid[WLAN_BSSID_LEN];
p80211pstr32_t ssid; p80211pstr32_t ssid;
u32 macmode; u32 macmode;
int linkstatus; int linkstatus;
/* WEP State */ /* WEP State */
u8 wep_keys[NUM_WEPKEYS][MAX_KEYLEN]; u8 wep_keys[NUM_WEPKEYS][MAX_KEYLEN];
u8 wep_keylens[NUM_WEPKEYS]; u8 wep_keylens[NUM_WEPKEYS];
int hostwep; int hostwep;
/* Request/Confirm i/f state (used by p80211) */ /* Request/Confirm i/f state (used by p80211) */
unsigned long request_pending; /* flag, access atomically */ unsigned long request_pending; /* flag, access atomically */
/* netlink socket */ /* netlink socket */
/* queue for indications waiting for cmd completion */ /* queue for indications waiting for cmd completion */
/* Linux netdevice and support */ /* Linux netdevice and support */
netdevice_t *netdev; /* ptr to linux netdevice */ netdevice_t *netdev; /* ptr to linux netdevice */
struct net_device_stats linux_stats; struct net_device_stats linux_stats;
/* Rx bottom half */ /* Rx bottom half */
struct tasklet_struct rx_bh; struct tasklet_struct rx_bh;
struct sk_buff_head nsd_rxq; struct sk_buff_head nsd_rxq;
/* 802.11 device statistics */ /* 802.11 device statistics */
struct p80211_frmrx_t rx; struct p80211_frmrx_t rx;
struct iw_statistics wstats; struct iw_statistics wstats;
/* jkriegl: iwspy fields */ /* jkriegl: iwspy fields */
u8 spy_number; u8 spy_number;
char spy_address[IW_MAX_SPY][ETH_ALEN]; char spy_address[IW_MAX_SPY][ETH_ALEN];
struct iw_quality spy_stat[IW_MAX_SPY]; struct iw_quality spy_stat[IW_MAX_SPY];
} wlandevice_t; } wlandevice_t;
/* WEP stuff */ /* WEP stuff */
int wep_change_key(wlandevice_t *wlandev, int keynum, u8* key, int keylen); int wep_change_key(wlandevice_t *wlandev, int keynum, u8 *key, int keylen);
int wep_decrypt(wlandevice_t *wlandev, u8 *buf, u32 len, int key_override, u8 *iv, u8 *icv); int wep_decrypt(wlandevice_t *wlandev, u8 *buf, u32 len, int key_override,
int wep_encrypt(wlandevice_t *wlandev, u8 *buf, u8 *dst, u32 len, int keynum, u8 *iv, u8 *icv); u8 *iv, u8 *icv);
int wep_encrypt(wlandevice_t *wlandev, u8 *buf, u8 *dst, u32 len, int keynum,
u8 *iv, u8 *icv);
int wlan_setup(wlandevice_t *wlandev); int wlan_setup(wlandevice_t *wlandev);
int wlan_unsetup(wlandevice_t *wlandev); int wlan_unsetup(wlandevice_t *wlandev);
int register_wlandev(wlandevice_t *wlandev); int register_wlandev(wlandevice_t *wlandev);
int unregister_wlandev(wlandevice_t *wlandev); int unregister_wlandev(wlandevice_t *wlandev);
void p80211netdev_rx(wlandevice_t *wlandev, struct sk_buff *skb); void p80211netdev_rx(wlandevice_t *wlandev, struct sk_buff *skb);
void p80211netdev_hwremoved(wlandevice_t *wlandev); void p80211netdev_hwremoved(wlandevice_t *wlandev);
#endif #endif