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

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

Signed-off-by: default avatarMoritz Muehlenhoff <jmm@debian.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a32fb5f7
...@@ -157,8 +157,6 @@ ...@@ -157,8 +157,6 @@
#define WLAN_MGMT_STATUS_ASSOC_DENIED_NOPBCC 20 #define WLAN_MGMT_STATUS_ASSOC_DENIED_NOPBCC 20
#define WLAN_MGMT_STATUS_ASSOC_DENIED_NOAGILITY 21 #define WLAN_MGMT_STATUS_ASSOC_DENIED_NOAGILITY 21
/*-- Auth Algorithm Field ---------------------------*/ /*-- Auth Algorithm Field ---------------------------*/
#define WLAN_AUTH_ALG_OPENSYSTEM 0 #define WLAN_AUTH_ALG_OPENSYSTEM 0
#define WLAN_AUTH_ALG_SHAREDKEY 1 #define WLAN_AUTH_ALG_SHAREDKEY 1
...@@ -208,10 +206,6 @@ ...@@ -208,10 +206,6 @@
#define WLAN_DEAUTHEN_OFF_REASON 0 #define WLAN_DEAUTHEN_OFF_REASON 0
/*================================================================*/
/* Macros */
/*-- Capability Field ---------------------------*/ /*-- Capability Field ---------------------------*/
#define WLAN_GET_MGMT_CAP_INFO_ESS(n) ((n) & BIT(0)) #define WLAN_GET_MGMT_CAP_INFO_ESS(n) ((n) & BIT(0))
#define WLAN_GET_MGMT_CAP_INFO_IBSS(n) (((n) & BIT(1)) >> 1) #define WLAN_GET_MGMT_CAP_INFO_IBSS(n) (((n) & BIT(1)) >> 1)
...@@ -233,101 +227,87 @@ ...@@ -233,101 +227,87 @@
#define WLAN_SET_MGMT_CAP_INFO_PBCC(n) ((n) << 6) #define WLAN_SET_MGMT_CAP_INFO_PBCC(n) ((n) << 6)
#define WLAN_SET_MGMT_CAP_INFO_AGILITY(n) ((n) << 7) #define WLAN_SET_MGMT_CAP_INFO_AGILITY(n) ((n) << 7)
/*================================================================*/
/* Types */
/*-- Information Element Types --------------------*/ /*-- Information Element Types --------------------*/
/* prototype structure, all IEs start with these members */ /* prototype structure, all IEs start with these members */
typedef struct wlan_ie typedef struct wlan_ie {
{
u8 eid; u8 eid;
u8 len; u8 len;
} __attribute__((packed)) wlan_ie_t; } __attribute__ ((packed)) wlan_ie_t;
/*-- Service Set Identity (SSID) -----------------*/ /*-- Service Set Identity (SSID) -----------------*/
typedef struct wlan_ie_ssid typedef struct wlan_ie_ssid {
{
u8 eid; u8 eid;
u8 len; u8 len;
u8 ssid[1]; /* may be zero, ptrs may overlap */ u8 ssid[1]; /* may be zero, ptrs may overlap */
} __attribute__((packed)) wlan_ie_ssid_t; } __attribute__ ((packed)) wlan_ie_ssid_t;
/*-- Supported Rates -----------------------------*/ /*-- Supported Rates -----------------------------*/
typedef struct wlan_ie_supp_rates typedef struct wlan_ie_supp_rates {
{
u8 eid; u8 eid;
u8 len; u8 len;
u8 rates[1]; /* had better be at LEAST one! */ u8 rates[1]; /* had better be at LEAST one! */
} __attribute__((packed)) wlan_ie_supp_rates_t; } __attribute__ ((packed)) wlan_ie_supp_rates_t;
/*-- FH Parameter Set ----------------------------*/ /*-- FH Parameter Set ----------------------------*/
typedef struct wlan_ie_fh_parms typedef struct wlan_ie_fh_parms {
{
u8 eid; u8 eid;
u8 len; u8 len;
u16 dwell; u16 dwell;
u8 hopset; u8 hopset;
u8 hoppattern; u8 hoppattern;
u8 hopindex; u8 hopindex;
} __attribute__((packed)) wlan_ie_fh_parms_t; } __attribute__ ((packed)) wlan_ie_fh_parms_t;
/*-- DS Parameter Set ----------------------------*/ /*-- DS Parameter Set ----------------------------*/
typedef struct wlan_ie_ds_parms typedef struct wlan_ie_ds_parms {
{
u8 eid; u8 eid;
u8 len; u8 len;
u8 curr_ch; u8 curr_ch;
} __attribute__((packed)) wlan_ie_ds_parms_t; } __attribute__ ((packed)) wlan_ie_ds_parms_t;
/*-- CF Parameter Set ----------------------------*/ /*-- CF Parameter Set ----------------------------*/
typedef struct wlan_ie_cf_parms typedef struct wlan_ie_cf_parms {
{
u8 eid; u8 eid;
u8 len; u8 len;
u8 cfp_cnt; u8 cfp_cnt;
u8 cfp_period; u8 cfp_period;
u16 cfp_maxdur; u16 cfp_maxdur;
u16 cfp_durremaining; u16 cfp_durremaining;
} __attribute__((packed)) wlan_ie_cf_parms_t; } __attribute__ ((packed)) wlan_ie_cf_parms_t;
/*-- TIM ------------------------------------------*/ /*-- TIM ------------------------------------------*/
typedef struct wlan_ie_tim typedef struct wlan_ie_tim {
{
u8 eid; u8 eid;
u8 len; u8 len;
u8 dtim_cnt; u8 dtim_cnt;
u8 dtim_period; u8 dtim_period;
u8 bitmap_ctl; u8 bitmap_ctl;
u8 virt_bm[1]; u8 virt_bm[1];
} __attribute__((packed)) wlan_ie_tim_t; } __attribute__ ((packed)) wlan_ie_tim_t;
/*-- IBSS Parameter Set ---------------------------*/ /*-- IBSS Parameter Set ---------------------------*/
typedef struct wlan_ie_ibss_parms typedef struct wlan_ie_ibss_parms {
{
u8 eid; u8 eid;
u8 len; u8 len;
u16 atim_win; u16 atim_win;
} __attribute__((packed)) wlan_ie_ibss_parms_t; } __attribute__ ((packed)) wlan_ie_ibss_parms_t;
/*-- Challenge Text ------------------------------*/ /*-- Challenge Text ------------------------------*/
typedef struct wlan_ie_challenge typedef struct wlan_ie_challenge {
{
u8 eid; u8 eid;
u8 len; u8 len;
u8 challenge[1]; u8 challenge[1];
} __attribute__((packed)) wlan_ie_challenge_t; } __attribute__ ((packed)) wlan_ie_challenge_t;
/*-------------------------------------------------*/ /*-------------------------------------------------*/
/* Frame Types */ /* Frame Types */
/* prototype structure, all mgmt frame types will start with these members */ /* prototype structure, all mgmt frame types will start with these members */
typedef struct wlan_fr_mgmt typedef struct wlan_fr_mgmt {
{
u16 type; u16 type;
u16 len; /* DOES NOT include CRC !!!!*/ u16 len; /* DOES NOT include CRC !!!! */
u8 *buf; u8 *buf;
p80211_hdr_t *hdr; p80211_hdr_t *hdr;
/* used for target specific data, skb in Linux */ /* used for target specific data, skb in Linux */
...@@ -337,8 +317,7 @@ typedef struct wlan_fr_mgmt ...@@ -337,8 +317,7 @@ typedef struct wlan_fr_mgmt
} wlan_fr_mgmt_t; } wlan_fr_mgmt_t;
/*-- Beacon ---------------------------------------*/ /*-- Beacon ---------------------------------------*/
typedef struct wlan_fr_beacon typedef struct wlan_fr_beacon {
{
u16 type; u16 type;
u16 len; u16 len;
u8 *buf; u8 *buf;
...@@ -360,13 +339,11 @@ typedef struct wlan_fr_beacon ...@@ -360,13 +339,11 @@ typedef struct wlan_fr_beacon
} wlan_fr_beacon_t; } wlan_fr_beacon_t;
/*-- IBSS ATIM ------------------------------------*/ /*-- IBSS ATIM ------------------------------------*/
typedef struct wlan_fr_ibssatim typedef struct wlan_fr_ibssatim {
{
u16 type; u16 type;
u16 len; u16 len;
u8* buf; u8 *buf;
p80211_hdr_t *hdr; p80211_hdr_t *hdr;
/* used for target specific data, skb in Linux */ /* used for target specific data, skb in Linux */
void *priv; void *priv;
...@@ -379,8 +356,7 @@ typedef struct wlan_fr_ibssatim ...@@ -379,8 +356,7 @@ typedef struct wlan_fr_ibssatim
} wlan_fr_ibssatim_t; } wlan_fr_ibssatim_t;
/*-- Disassociation -------------------------------*/ /*-- Disassociation -------------------------------*/
typedef struct wlan_fr_disassoc typedef struct wlan_fr_disassoc {
{
u16 type; u16 type;
u16 len; u16 len;
u8 *buf; u8 *buf;
...@@ -395,11 +371,10 @@ typedef struct wlan_fr_disassoc ...@@ -395,11 +371,10 @@ typedef struct wlan_fr_disassoc
} wlan_fr_disassoc_t; } wlan_fr_disassoc_t;
/*-- Association Request --------------------------*/ /*-- Association Request --------------------------*/
typedef struct wlan_fr_assocreq typedef struct wlan_fr_assocreq {
{
u16 type; u16 type;
u16 len; u16 len;
u8* buf; u8 *buf;
p80211_hdr_t *hdr; p80211_hdr_t *hdr;
/* used for target specific data, skb in Linux */ /* used for target specific data, skb in Linux */
void *priv; void *priv;
...@@ -413,8 +388,7 @@ typedef struct wlan_fr_assocreq ...@@ -413,8 +388,7 @@ typedef struct wlan_fr_assocreq
} wlan_fr_assocreq_t; } wlan_fr_assocreq_t;
/*-- Association Response -------------------------*/ /*-- Association Response -------------------------*/
typedef struct wlan_fr_assocresp typedef struct wlan_fr_assocresp {
{
u16 type; u16 type;
u16 len; u16 len;
u8 *buf; u8 *buf;
...@@ -431,8 +405,7 @@ typedef struct wlan_fr_assocresp ...@@ -431,8 +405,7 @@ typedef struct wlan_fr_assocresp
} wlan_fr_assocresp_t; } wlan_fr_assocresp_t;
/*-- Reassociation Request ------------------------*/ /*-- Reassociation Request ------------------------*/
typedef struct wlan_fr_reassocreq typedef struct wlan_fr_reassocreq {
{
u16 type; u16 type;
u16 len; u16 len;
u8 *buf; u8 *buf;
...@@ -450,8 +423,7 @@ typedef struct wlan_fr_reassocreq ...@@ -450,8 +423,7 @@ typedef struct wlan_fr_reassocreq
} wlan_fr_reassocreq_t; } wlan_fr_reassocreq_t;
/*-- Reassociation Response -----------------------*/ /*-- Reassociation Response -----------------------*/
typedef struct wlan_fr_reassocresp typedef struct wlan_fr_reassocresp {
{
u16 type; u16 type;
u16 len; u16 len;
u8 *buf; u8 *buf;
...@@ -468,8 +440,7 @@ typedef struct wlan_fr_reassocresp ...@@ -468,8 +440,7 @@ typedef struct wlan_fr_reassocresp
} wlan_fr_reassocresp_t; } wlan_fr_reassocresp_t;
/*-- Probe Request --------------------------------*/ /*-- Probe Request --------------------------------*/
typedef struct wlan_fr_probereq typedef struct wlan_fr_probereq {
{
u16 type; u16 type;
u16 len; u16 len;
u8 *buf; u8 *buf;
...@@ -484,8 +455,7 @@ typedef struct wlan_fr_probereq ...@@ -484,8 +455,7 @@ typedef struct wlan_fr_probereq
} wlan_fr_probereq_t; } wlan_fr_probereq_t;
/*-- Probe Response -------------------------------*/ /*-- Probe Response -------------------------------*/
typedef struct wlan_fr_proberesp typedef struct wlan_fr_proberesp {
{
u16 type; u16 type;
u16 len; u16 len;
u8 *buf; u8 *buf;
...@@ -506,8 +476,7 @@ typedef struct wlan_fr_proberesp ...@@ -506,8 +476,7 @@ typedef struct wlan_fr_proberesp
} wlan_fr_proberesp_t; } wlan_fr_proberesp_t;
/*-- Authentication -------------------------------*/ /*-- Authentication -------------------------------*/
typedef struct wlan_fr_authen typedef struct wlan_fr_authen {
{
u16 type; u16 type;
u16 len; u16 len;
u8 *buf; u8 *buf;
...@@ -524,8 +493,7 @@ typedef struct wlan_fr_authen ...@@ -524,8 +493,7 @@ typedef struct wlan_fr_authen
} wlan_fr_authen_t; } wlan_fr_authen_t;
/*-- Deauthenication -----------------------------*/ /*-- Deauthenication -----------------------------*/
typedef struct wlan_fr_deauthen typedef struct wlan_fr_deauthen {
{
u16 type; u16 type;
u16 len; u16 len;
u8 *buf; u8 *buf;
...@@ -539,29 +507,25 @@ typedef struct wlan_fr_deauthen ...@@ -539,29 +507,25 @@ typedef struct wlan_fr_deauthen
} wlan_fr_deauthen_t; } wlan_fr_deauthen_t;
/*================================================================*/ void wlan_mgmt_encode_beacon(wlan_fr_beacon_t *f);
/* Function Declarations */ void wlan_mgmt_decode_beacon(wlan_fr_beacon_t *f);
void wlan_mgmt_encode_disassoc(wlan_fr_disassoc_t *f);
void wlan_mgmt_encode_beacon( wlan_fr_beacon_t *f ); void wlan_mgmt_decode_disassoc(wlan_fr_disassoc_t *f);
void wlan_mgmt_decode_beacon( wlan_fr_beacon_t *f ); void wlan_mgmt_encode_assocreq(wlan_fr_assocreq_t *f);
void wlan_mgmt_encode_disassoc( wlan_fr_disassoc_t *f ); void wlan_mgmt_decode_assocreq(wlan_fr_assocreq_t *f);
void wlan_mgmt_decode_disassoc( wlan_fr_disassoc_t *f ); void wlan_mgmt_encode_assocresp(wlan_fr_assocresp_t *f);
void wlan_mgmt_encode_assocreq( wlan_fr_assocreq_t *f ); void wlan_mgmt_decode_assocresp(wlan_fr_assocresp_t *f);
void wlan_mgmt_decode_assocreq( wlan_fr_assocreq_t *f ); void wlan_mgmt_encode_reassocreq(wlan_fr_reassocreq_t *f);
void wlan_mgmt_encode_assocresp( wlan_fr_assocresp_t *f ); void wlan_mgmt_decode_reassocreq(wlan_fr_reassocreq_t *f);
void wlan_mgmt_decode_assocresp( wlan_fr_assocresp_t *f ); void wlan_mgmt_encode_reassocresp(wlan_fr_reassocresp_t *f);
void wlan_mgmt_encode_reassocreq( wlan_fr_reassocreq_t *f ); void wlan_mgmt_decode_reassocresp(wlan_fr_reassocresp_t *f);
void wlan_mgmt_decode_reassocreq( wlan_fr_reassocreq_t *f ); void wlan_mgmt_encode_probereq(wlan_fr_probereq_t *f);
void wlan_mgmt_encode_reassocresp( wlan_fr_reassocresp_t *f ); void wlan_mgmt_decode_probereq(wlan_fr_probereq_t *f);
void wlan_mgmt_decode_reassocresp( wlan_fr_reassocresp_t *f ); void wlan_mgmt_encode_proberesp(wlan_fr_proberesp_t *f);
void wlan_mgmt_encode_probereq( wlan_fr_probereq_t *f ); void wlan_mgmt_decode_proberesp(wlan_fr_proberesp_t *f);
void wlan_mgmt_decode_probereq( wlan_fr_probereq_t *f ); void wlan_mgmt_encode_authen(wlan_fr_authen_t *f);
void wlan_mgmt_encode_proberesp( wlan_fr_proberesp_t *f ); void wlan_mgmt_decode_authen(wlan_fr_authen_t *f);
void wlan_mgmt_decode_proberesp( wlan_fr_proberesp_t *f ); void wlan_mgmt_encode_deauthen(wlan_fr_deauthen_t *f);
void wlan_mgmt_encode_authen( wlan_fr_authen_t *f ); void wlan_mgmt_decode_deauthen(wlan_fr_deauthen_t *f);
void wlan_mgmt_decode_authen( wlan_fr_authen_t *f );
void wlan_mgmt_encode_deauthen( wlan_fr_deauthen_t *f );
void wlan_mgmt_decode_deauthen( wlan_fr_deauthen_t *f );
#endif /* _P80211MGMT_H */ #endif /* _P80211MGMT_H */
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