Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 141203
b: refs/heads/master
c: c979aec
h: refs/heads/master
i:
  141201: 50e6189
  141199: 421a0fc
v: v3
  • Loading branch information
Moritz Muehlenhoff authored and Greg Kroah-Hartman committed Apr 3, 2009
1 parent c2d6250 commit 6f165c1
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 72 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d6c82d9719fea4e6e0a279913ec6f81529faad9a
refs/heads/master: c979aec791234192e1d520a9d5e79148164a7995
124 changes: 53 additions & 71 deletions trunk/drivers/staging/wlan-ng/p80211conv.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@
#ifndef _LINUX_P80211CONV_H
#define _LINUX_P80211CONV_H

/*================================================================*/
/* Constants */

#define WLAN_ETHADDR_LEN 6
#define WLAN_IEEE_OUI_LEN 3

Expand All @@ -66,113 +63,98 @@

#define P80211CAPTURE_VERSION 0x80211001

/*================================================================*/
/* Macros */

#define P80211_FRMMETA_MAGIC 0x802110

#define P80211SKB_FRMMETA(s) \
(((((p80211_frmmeta_t*)((s)->cb))->magic)==P80211_FRMMETA_MAGIC) ? \
((p80211_frmmeta_t*)((s)->cb)) : \
(((((p80211_frmmeta_t *)((s)->cb))->magic) == P80211_FRMMETA_MAGIC) ? \
((p80211_frmmeta_t *)((s)->cb)) : \
(NULL))

#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
{
struct wlandevice *wlandev;
typedef struct p80211_rxmeta {
struct wlandevice *wlandev;

u64 mactime; /* Hi-rez MAC-supplied time value */
u64 hosttime; /* Best-rez host supplied time value */
u64 mactime; /* Hi-rez MAC-supplied time value */
u64 hosttime; /* Best-rez host supplied time value */

unsigned int rxrate; /* Receive data rate in 100kbps */
unsigned int priority; /* 0-15, 0=contention, 6=CF */
int signal; /* An SSI, see p80211netdev.h */
int noise; /* An SSI, see p80211netdev.h */
unsigned int channel; /* Receive channel (mostly for snifs) */
unsigned int preamble; /* P80211ENUM_preambletype_* */
unsigned int encoding; /* P80211ENUM_encoding_* */
unsigned int rxrate; /* Receive data rate in 100kbps */
unsigned int priority; /* 0-15, 0=contention, 6=CF */
int signal; /* An SSI, see p80211netdev.h */
int noise; /* An SSI, see p80211netdev.h */
unsigned int channel; /* Receive channel (mostly for snifs) */
unsigned int preamble; /* P80211ENUM_preambletype_* */
unsigned int encoding; /* P80211ENUM_encoding_* */

} p80211_rxmeta_t;

typedef struct p80211_frmmeta
{
unsigned int magic;
p80211_rxmeta_t *rx;
typedef struct p80211_frmmeta {
unsigned int magic;
p80211_rxmeta_t *rx;
} p80211_frmmeta_t;

void p80211skb_free(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);

/*================================================================*/
/* Types */

/*
* Frame capture header. (See doc/capturefrm.txt)
*/
typedef struct p80211_caphdr
{
u32 version;
u32 length;
u64 mactime;
u64 hosttime;
u32 phytype;
u32 channel;
u32 datarate;
u32 antenna;
u32 priority;
u32 ssi_type;
s32 ssi_signal;
s32 ssi_noise;
u32 preamble;
u32 encoding;
typedef struct p80211_caphdr {
u32 version;
u32 length;
u64 mactime;
u64 hosttime;
u32 phytype;
u32 channel;
u32 datarate;
u32 antenna;
u32 priority;
u32 ssi_type;
s32 ssi_signal;
s32 ssi_noise;
u32 preamble;
u32 encoding;
} p80211_caphdr_t;

/* 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 {
void *data;
void *data;
u8 iv[4];
u8 icv[4];
} p80211_metawep_t;

/* local ether header type */
typedef struct wlan_ethhdr
{
u8 daddr[WLAN_ETHADDR_LEN];
u8 saddr[WLAN_ETHADDR_LEN];
u16 type;
} __attribute__((packed)) wlan_ethhdr_t;
typedef struct wlan_ethhdr {
u8 daddr[WLAN_ETHADDR_LEN];
u8 saddr[WLAN_ETHADDR_LEN];
u16 type;
} __attribute__ ((packed)) wlan_ethhdr_t;

/* local llc header type */
typedef struct wlan_llc
{
u8 dsap;
u8 ssap;
u8 ctl;
} __attribute__((packed)) wlan_llc_t;
typedef struct wlan_llc {
u8 dsap;
u8 ssap;
u8 ctl;
} __attribute__ ((packed)) wlan_llc_t;

/* local snap header type */
typedef struct wlan_snap
{
u8 oui[WLAN_IEEE_OUI_LEN];
u16 type;
} __attribute__((packed)) wlan_snap_t;
typedef struct wlan_snap {
u8 oui[WLAN_IEEE_OUI_LEN];
u16 type;
} __attribute__ ((packed)) wlan_snap_t;

/* Circular include trick */
struct wlandevice;

/*================================================================*/
/*Function Declarations */

int skb_p80211_to_ether( struct wlandevice *wlandev, u32 ethconv,
struct sk_buff *skb);
int skb_ether_to_p80211( struct wlandevice *wlandev, u32 ethconv,
struct sk_buff *skb, p80211_hdr_t *p80211_hdr,
p80211_metawep_t *p80211_wep );
int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv,
struct sk_buff *skb);
int skb_ether_to_p80211(struct wlandevice *wlandev, u32 ethconv,
struct sk_buff *skb, p80211_hdr_t *p80211_hdr,
p80211_metawep_t *p80211_wep);

int p80211_stt_findproto(u16 proto);

Expand Down

0 comments on commit 6f165c1

Please sign in to comment.