Commit c979aec7 authored by Moritz Muehlenhoff's avatar Moritz Muehlenhoff Committed by Greg Kroah-Hartman

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

Signed-off-by: default avatarMoritz Muehlenhoff <jmm@debian.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d6c82d97
...@@ -53,9 +53,6 @@ ...@@ -53,9 +53,6 @@
#ifndef _LINUX_P80211CONV_H #ifndef _LINUX_P80211CONV_H
#define _LINUX_P80211CONV_H #define _LINUX_P80211CONV_H
/*================================================================*/
/* Constants */
#define WLAN_ETHADDR_LEN 6 #define WLAN_ETHADDR_LEN 6
#define WLAN_IEEE_OUI_LEN 3 #define WLAN_IEEE_OUI_LEN 3
...@@ -66,21 +63,17 @@ ...@@ -66,21 +63,17 @@
#define P80211CAPTURE_VERSION 0x80211001 #define P80211CAPTURE_VERSION 0x80211001
/*================================================================*/
/* Macros */
#define P80211_FRMMETA_MAGIC 0x802110 #define P80211_FRMMETA_MAGIC 0x802110
#define P80211SKB_FRMMETA(s) \ #define P80211SKB_FRMMETA(s) \
(((((p80211_frmmeta_t*)((s)->cb))->magic)==P80211_FRMMETA_MAGIC) ? \ (((((p80211_frmmeta_t *)((s)->cb))->magic) == P80211_FRMMETA_MAGIC) ? \
((p80211_frmmeta_t*)((s)->cb)) : \ ((p80211_frmmeta_t *)((s)->cb)) : \
(NULL)) (NULL))
#define P80211SKB_RXMETA(s) \ #define P80211SKB_RXMETA(s) \
(P80211SKB_FRMMETA((s)) ? P80211SKB_FRMMETA((s))->rx : ((p80211_rxmeta_t*)(NULL))) (P80211SKB_FRMMETA((s)) ? P80211SKB_FRMMETA((s))->rx : ((p80211_rxmeta_t *)(NULL)))
typedef struct p80211_rxmeta typedef struct p80211_rxmeta {
{
struct wlandevice *wlandev; struct wlandevice *wlandev;
u64 mactime; /* Hi-rez MAC-supplied time value */ u64 mactime; /* Hi-rez MAC-supplied time value */
...@@ -96,8 +89,7 @@ typedef struct p80211_rxmeta ...@@ -96,8 +89,7 @@ typedef struct p80211_rxmeta
} p80211_rxmeta_t; } p80211_rxmeta_t;
typedef struct p80211_frmmeta typedef struct p80211_frmmeta {
{
unsigned int magic; unsigned int magic;
p80211_rxmeta_t *rx; p80211_rxmeta_t *rx;
} p80211_frmmeta_t; } p80211_frmmeta_t;
...@@ -106,14 +98,10 @@ void p80211skb_free(struct wlandevice *wlandev, struct sk_buff *skb); ...@@ -106,14 +98,10 @@ void p80211skb_free(struct wlandevice *wlandev, struct sk_buff *skb);
int p80211skb_rxmeta_attach(struct wlandevice *wlandev, struct sk_buff *skb); int p80211skb_rxmeta_attach(struct wlandevice *wlandev, struct sk_buff *skb);
void p80211skb_rxmeta_detach(struct sk_buff *skb); void p80211skb_rxmeta_detach(struct sk_buff *skb);
/*================================================================*/
/* Types */
/* /*
* Frame capture header. (See doc/capturefrm.txt) * Frame capture header. (See doc/capturefrm.txt)
*/ */
typedef struct p80211_caphdr typedef struct p80211_caphdr {
{
u32 version; u32 version;
u32 length; u32 length;
u64 mactime; u64 mactime;
...@@ -131,7 +119,7 @@ typedef struct p80211_caphdr ...@@ -131,7 +119,7 @@ typedef struct p80211_caphdr
} p80211_caphdr_t; } p80211_caphdr_t;
/* buffer free method pointer type */ /* buffer free method pointer type */
typedef void (* freebuf_method_t)(void *buf, int size); typedef void (*freebuf_method_t) (void *buf, int size);
typedef struct p80211_metawep { typedef struct p80211_metawep {
void *data; void *data;
...@@ -140,39 +128,33 @@ typedef struct p80211_metawep { ...@@ -140,39 +128,33 @@ typedef struct p80211_metawep {
} p80211_metawep_t; } p80211_metawep_t;
/* local ether header type */ /* local ether header type */
typedef struct wlan_ethhdr typedef struct wlan_ethhdr {
{
u8 daddr[WLAN_ETHADDR_LEN]; u8 daddr[WLAN_ETHADDR_LEN];
u8 saddr[WLAN_ETHADDR_LEN]; u8 saddr[WLAN_ETHADDR_LEN];
u16 type; u16 type;
} __attribute__((packed)) wlan_ethhdr_t; } __attribute__ ((packed)) wlan_ethhdr_t;
/* local llc header type */ /* local llc header type */
typedef struct wlan_llc typedef struct wlan_llc {
{
u8 dsap; u8 dsap;
u8 ssap; u8 ssap;
u8 ctl; u8 ctl;
} __attribute__((packed)) wlan_llc_t; } __attribute__ ((packed)) wlan_llc_t;
/* local snap header type */ /* local snap header type */
typedef struct wlan_snap typedef struct wlan_snap {
{
u8 oui[WLAN_IEEE_OUI_LEN]; u8 oui[WLAN_IEEE_OUI_LEN];
u16 type; u16 type;
} __attribute__((packed)) wlan_snap_t; } __attribute__ ((packed)) wlan_snap_t;
/* Circular include trick */ /* Circular include trick */
struct wlandevice; struct wlandevice;
/*================================================================*/ int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv,
/*Function Declarations */
int skb_p80211_to_ether( struct wlandevice *wlandev, u32 ethconv,
struct sk_buff *skb); struct sk_buff *skb);
int skb_ether_to_p80211( struct wlandevice *wlandev, u32 ethconv, int skb_ether_to_p80211(struct wlandevice *wlandev, u32 ethconv,
struct sk_buff *skb, p80211_hdr_t *p80211_hdr, struct sk_buff *skb, p80211_hdr_t *p80211_hdr,
p80211_metawep_t *p80211_wep ); p80211_metawep_t *p80211_wep);
int p80211_stt_findproto(u16 proto); int p80211_stt_findproto(u16 proto);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment