mirror of https://gitee.com/openkylin/linux.git
Staging: wlan-ng: p80211types.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:
parent
82eaca7d9a
commit
356925c713
|
@ -65,10 +65,6 @@
|
|||
#include "wlan_compat.h"
|
||||
#endif
|
||||
|
||||
/*================================================================*/
|
||||
/* Constants */
|
||||
/*================================================================*/
|
||||
|
||||
/*----------------------------------------------------------------*/
|
||||
/* The following constants are indexes into the Mib Category List */
|
||||
/* and the Message Category List */
|
||||
|
@ -129,9 +125,6 @@
|
|||
/* is a DID-LEN-DATA triple */
|
||||
/* with a max size of 4+4+384 */
|
||||
|
||||
/*================================================================*/
|
||||
/* Macros */
|
||||
|
||||
/*----------------------------------------------------------------*/
|
||||
/* The following macro creates a name for an enum */
|
||||
|
||||
|
@ -165,7 +158,6 @@
|
|||
#define P80211DID_MASK_ISTABLE (0x00000001UL)
|
||||
#define P80211DID_MASK_ACCESS (0x00000003UL)
|
||||
|
||||
|
||||
#define P80211DID_MK(a, m, l) ((((u32)(a)) & (m)) << (l))
|
||||
|
||||
#define P80211DID_MKSECTION(a) P80211DID_MK(a, \
|
||||
|
@ -184,7 +176,6 @@
|
|||
P80211DID_MASK_ISTABLE, \
|
||||
P80211DID_LSB_ISTABLE)
|
||||
|
||||
|
||||
#define P80211DID_MKID(s,g,i,n,t,a) (P80211DID_MKSECTION(s) | \
|
||||
P80211DID_MKGROUP(g) | \
|
||||
P80211DID_MKITEM(i) | \
|
||||
|
@ -192,7 +183,6 @@
|
|||
P80211DID_MKISTABLE(t) | \
|
||||
(a))
|
||||
|
||||
|
||||
#define P80211DID_GET(a, m, l) ((((u32)(a)) >> (l)) & (m))
|
||||
|
||||
#define P80211DID_SECTION(a) P80211DID_GET(a, \
|
||||
|
@ -214,21 +204,16 @@
|
|||
P80211DID_MASK_ACCESS, \
|
||||
P80211DID_LSB_ACCESS)
|
||||
|
||||
/*================================================================*/
|
||||
/* Types */
|
||||
|
||||
/*----------------------------------------------------------------*/
|
||||
/* The following structure types are used for the represenation */
|
||||
/* of ENUMint type metadata. */
|
||||
|
||||
typedef struct p80211enumpair
|
||||
{
|
||||
typedef struct p80211enumpair {
|
||||
u32 val;
|
||||
char *name;
|
||||
} p80211enumpair_t;
|
||||
|
||||
typedef struct p80211enum
|
||||
{
|
||||
typedef struct p80211enum {
|
||||
int nitems;
|
||||
p80211enumpair_t *list;
|
||||
} p80211enum_t;
|
||||
|
@ -238,63 +223,54 @@ typedef struct p80211enum
|
|||
/* messages. */
|
||||
|
||||
/* Template pascal string */
|
||||
typedef struct p80211pstr
|
||||
{
|
||||
typedef struct p80211pstr {
|
||||
u8 len;
|
||||
} __attribute__ ((packed)) p80211pstr_t;
|
||||
|
||||
typedef struct p80211pstrd
|
||||
{
|
||||
typedef struct p80211pstrd {
|
||||
u8 len;
|
||||
u8 data[0];
|
||||
} __attribute__ ((packed)) p80211pstrd_t;
|
||||
|
||||
/* Maximum pascal string */
|
||||
typedef struct p80211pstr255
|
||||
{
|
||||
typedef struct p80211pstr255 {
|
||||
u8 len;
|
||||
u8 data[MAXLEN_PSTR255];
|
||||
} __attribute__ ((packed)) p80211pstr255_t;
|
||||
|
||||
/* pascal string for macaddress and bssid */
|
||||
typedef struct p80211pstr6
|
||||
{
|
||||
typedef struct p80211pstr6 {
|
||||
u8 len;
|
||||
u8 data[MAXLEN_PSTR6];
|
||||
} __attribute__ ((packed)) p80211pstr6_t;
|
||||
|
||||
/* pascal string for channel list */
|
||||
typedef struct p80211pstr14
|
||||
{
|
||||
typedef struct p80211pstr14 {
|
||||
u8 len;
|
||||
u8 data[MAXLEN_PSTR14];
|
||||
} __attribute__ ((packed)) p80211pstr14_t;
|
||||
|
||||
/* pascal string for ssid */
|
||||
typedef struct p80211pstr32
|
||||
{
|
||||
typedef struct p80211pstr32 {
|
||||
u8 len;
|
||||
u8 data[MAXLEN_PSTR32];
|
||||
} __attribute__ ((packed)) p80211pstr32_t;
|
||||
|
||||
/* MAC address array */
|
||||
typedef struct p80211macarray
|
||||
{
|
||||
typedef struct p80211macarray {
|
||||
u32 cnt;
|
||||
u8 data[1][MAXLEN_PSTR6];
|
||||
} __attribute__ ((packed)) p80211macarray_t;
|
||||
|
||||
/* prototype template */
|
||||
typedef struct p80211item
|
||||
{
|
||||
typedef struct p80211item {
|
||||
u32 did;
|
||||
u16 status;
|
||||
u16 len;
|
||||
} __attribute__ ((packed)) p80211item_t;
|
||||
|
||||
/* prototype template w/ data item */
|
||||
typedef struct p80211itemd
|
||||
{
|
||||
typedef struct p80211itemd {
|
||||
u32 did;
|
||||
u16 status;
|
||||
u16 len;
|
||||
|
@ -302,8 +278,7 @@ typedef struct p80211itemd
|
|||
} __attribute__ ((packed)) p80211itemd_t;
|
||||
|
||||
/* message data item for int, BOUNDEDINT, ENUMINT */
|
||||
typedef struct p80211item_uint32
|
||||
{
|
||||
typedef struct p80211item_uint32 {
|
||||
u32 did;
|
||||
u16 status;
|
||||
u16 len;
|
||||
|
@ -311,8 +286,7 @@ typedef struct p80211item_uint32
|
|||
} __attribute__ ((packed)) p80211item_uint32_t;
|
||||
|
||||
/* message data item for OCTETSTR, DISPLAYSTR */
|
||||
typedef struct p80211item_pstr6
|
||||
{
|
||||
typedef struct p80211item_pstr6 {
|
||||
u32 did;
|
||||
u16 status;
|
||||
u16 len;
|
||||
|
@ -320,8 +294,7 @@ typedef struct p80211item_pstr6
|
|||
} __attribute__ ((packed)) p80211item_pstr6_t;
|
||||
|
||||
/* message data item for OCTETSTR, DISPLAYSTR */
|
||||
typedef struct p80211item_pstr14
|
||||
{
|
||||
typedef struct p80211item_pstr14 {
|
||||
u32 did;
|
||||
u16 status;
|
||||
u16 len;
|
||||
|
@ -329,8 +302,7 @@ typedef struct p80211item_pstr14
|
|||
} __attribute__ ((packed)) p80211item_pstr14_t;
|
||||
|
||||
/* message data item for OCTETSTR, DISPLAYSTR */
|
||||
typedef struct p80211item_pstr32
|
||||
{
|
||||
typedef struct p80211item_pstr32 {
|
||||
u32 did;
|
||||
u16 status;
|
||||
u16 len;
|
||||
|
@ -338,8 +310,7 @@ typedef struct p80211item_pstr32
|
|||
} __attribute__ ((packed)) p80211item_pstr32_t;
|
||||
|
||||
/* message data item for OCTETSTR, DISPLAYSTR */
|
||||
typedef struct p80211item_pstr255
|
||||
{
|
||||
typedef struct p80211item_pstr255 {
|
||||
u32 did;
|
||||
u16 status;
|
||||
u16 len;
|
||||
|
@ -347,8 +318,7 @@ typedef struct p80211item_pstr255
|
|||
} __attribute__ ((packed)) p80211item_pstr255_t;
|
||||
|
||||
/* message data item for UNK 392, namely mib items */
|
||||
typedef struct p80211item_unk392
|
||||
{
|
||||
typedef struct p80211item_unk392 {
|
||||
u32 did;
|
||||
u16 status;
|
||||
u16 len;
|
||||
|
@ -356,8 +326,7 @@ typedef struct p80211item_unk392
|
|||
} __attribute__ ((packed)) p80211item_unk392_t;
|
||||
|
||||
/* message data item for UNK 1025, namely p2 pdas */
|
||||
typedef struct p80211item_unk1024
|
||||
{
|
||||
typedef struct p80211item_unk1024 {
|
||||
u32 did;
|
||||
u16 status;
|
||||
u16 len;
|
||||
|
@ -365,8 +334,7 @@ typedef struct p80211item_unk1024
|
|||
} __attribute__ ((packed)) p80211item_unk1024_t;
|
||||
|
||||
/* message data item for UNK 4096, namely p2 download chunks */
|
||||
typedef struct p80211item_unk4096
|
||||
{
|
||||
typedef struct p80211item_unk4096 {
|
||||
u32 did;
|
||||
u16 status;
|
||||
u16 len;
|
||||
|
@ -380,14 +348,12 @@ struct catlistitem;
|
|||
/* metadata items. Some components may choose to use more, */
|
||||
/* less or different metadata items. */
|
||||
|
||||
typedef void (*p80211_totext_t)( struct catlistitem *, u32 did, u8* itembuf, char *textbuf);
|
||||
typedef void (*p80211_fromtext_t)( struct catlistitem *, u32 did, u8* itembuf, char *textbuf);
|
||||
typedef void (*p80211_totext_t) (struct catlistitem *, u32 did, u8 *itembuf,
|
||||
char *textbuf);
|
||||
typedef void (*p80211_fromtext_t) (struct catlistitem *, u32 did, u8 *itembuf,
|
||||
char *textbuf);
|
||||
typedef u32(*p80211_valid_t) (struct catlistitem *, u32 did, u8 *itembuf);
|
||||
|
||||
|
||||
/*================================================================*/
|
||||
/* Extern Declarations */
|
||||
|
||||
/*----------------------------------------------------------------*/
|
||||
/* Enumeration Lists */
|
||||
/* The following are the external declarations */
|
||||
|
@ -415,4 +381,3 @@ extern p80211enum_t MKENUMNAME(lnxroam_reason);
|
|||
extern p80211enum_t MKENUMNAME(p2preamble);
|
||||
|
||||
#endif /* _P80211TYPES_H */
|
||||
|
||||
|
|
Loading…
Reference in New Issue