Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
brcmu_utils.h File Reference
#include <linux/skbuff.h>

Go to the source code of this file.

Data Structures

struct  pktq_prec
 
struct  pktq
 

Macros

#define SPINWAIT(exp, us)
 
#define PKTQ_LEN_DEFAULT   128 /* Max 128 packets */
 
#define PKTQ_MAX_PREC   16 /* Maximum precedence levels */
 
#define BCME_STRLEN   64 /* Max string length for BCM errors */
 
#define PKTBUFSZ   2048
 
#define NBBY   8 /* 8 bits per byte */
 
#define setbit(a, i)   (((u8 *)a)[(i)/NBBY] |= 1<<((i)%NBBY))
 
#define clrbit(a, i)   (((u8 *)a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
 
#define isset(a, i)   (((const u8 *)a)[(i)/NBBY] & (1<<((i)%NBBY)))
 
#define isclr(a, i)   ((((const u8 *)a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
 
#define NBITS(type)   (sizeof(type) * 8)
 
#define NBITVAL(nbits)   (1 << (nbits))
 
#define MAXBITVAL(nbits)   ((1 << (nbits)) - 1)
 
#define NBITMASK(nbits)   MAXBITVAL(nbits)
 
#define MAXNBVAL(nbyte)   MAXBITVAL((nbyte) * 8)
 
#define CRC16_INIT_VALUE   0xffff /* Initial CRC16 checksum value */
 
#define CRC16_GOOD_VALUE   0xf0b8 /* Good final CRC16 checksum value */
 
#define ETHER_ADDR_STR_LEN   18
 
#define brcmu_prpkt(a, b)
 

Functions

struct sk_buffbrcmu_pktq_penq (struct pktq *pq, int prec, struct sk_buff *p)
 
struct sk_buffbrcmu_pktq_penq_head (struct pktq *pq, int prec, struct sk_buff *p)
 
struct sk_buffbrcmu_pktq_pdeq (struct pktq *pq, int prec)
 
struct sk_buffbrcmu_pktq_pdeq_tail (struct pktq *pq, int prec)
 
struct sk_buffbrcmu_pkt_buf_get_skb (uint len)
 
void brcmu_pkt_buf_free_skb (struct sk_buff *skb)
 
void brcmu_pktq_pflush (struct pktq *pq, int prec, bool dir, bool(*fn)(struct sk_buff *, void *), void *arg)
 
int brcmu_pktq_mlen (struct pktq *pq, uint prec_bmp)
 
struct sk_buffbrcmu_pktq_mdeq (struct pktq *pq, uint prec_bmp, int *prec_out)
 
void brcmu_pktq_init (struct pktq *pq, int num_prec, int max_len)
 
struct sk_buffbrcmu_pktq_peek_tail (struct pktq *pq, int *prec_out)
 
void brcmu_pktq_flush (struct pktq *pq, bool dir, bool(*fn)(struct sk_buff *, void *), void *arg)
 
 __printf (3, 4) static inline void brcmu_dbg_hex_dump(const void *data
 

Variables

size_t size
 
size_t const charfmt
 

Macro Definition Documentation

#define BCME_STRLEN   64 /* Max string length for BCM errors */

Definition at line 39 of file brcmu_utils.h.

#define brcmu_prpkt (   a,
  b 
)

Definition at line 182 of file brcmu_utils.h.

#define clrbit (   a,
  i 
)    (((u8 *)a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))

Definition at line 49 of file brcmu_utils.h.

#define CRC16_GOOD_VALUE   0xf0b8 /* Good final CRC16 checksum value */

Definition at line 62 of file brcmu_utils.h.

#define CRC16_INIT_VALUE   0xffff /* Initial CRC16 checksum value */

Definition at line 61 of file brcmu_utils.h.

#define ETHER_ADDR_STR_LEN   18

Definition at line 65 of file brcmu_utils.h.

#define isclr (   a,
  i 
)    ((((const u8 *)a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)

Definition at line 51 of file brcmu_utils.h.

#define isset (   a,
  i 
)    (((const u8 *)a)[(i)/NBBY] & (1<<((i)%NBBY)))

Definition at line 50 of file brcmu_utils.h.

#define MAXBITVAL (   nbits)    ((1 << (nbits)) - 1)

Definition at line 56 of file brcmu_utils.h.

#define MAXNBVAL (   nbyte)    MAXBITVAL((nbyte) * 8)

Definition at line 58 of file brcmu_utils.h.

#define NBBY   8 /* 8 bits per byte */

Definition at line 46 of file brcmu_utils.h.

#define NBITMASK (   nbits)    MAXBITVAL(nbits)

Definition at line 57 of file brcmu_utils.h.

#define NBITS (   type)    (sizeof(type) * 8)

Definition at line 54 of file brcmu_utils.h.

#define NBITVAL (   nbits)    (1 << (nbits))

Definition at line 55 of file brcmu_utils.h.

#define PKTBUFSZ   2048

Definition at line 42 of file brcmu_utils.h.

#define PKTQ_LEN_DEFAULT   128 /* Max 128 packets */

Definition at line 36 of file brcmu_utils.h.

#define PKTQ_MAX_PREC   16 /* Maximum precedence levels */

Definition at line 37 of file brcmu_utils.h.

#define setbit (   a,
  i 
)    (((u8 *)a)[(i)/NBBY] |= 1<<((i)%NBBY))

Definition at line 48 of file brcmu_utils.h.

#define SPINWAIT (   exp,
  us 
)
Value:
{ \
uint countdown = (us) + 9; \
while ((exp) && (countdown >= 10)) {\
udelay(10); \
countdown -= 10; \
} \
}

Definition at line 27 of file brcmu_utils.h.

Function Documentation

__printf ( ,
 
) const
void brcmu_pkt_buf_free_skb ( struct sk_buff skb)

Definition at line 44 of file utils.c.

struct sk_buff* brcmu_pkt_buf_get_skb ( uint  len)
read

Definition at line 29 of file utils.c.

void brcmu_pktq_flush ( struct pktq pq,
bool  dir,
bool(*)(struct sk_buff *, void *)  fn,
void arg 
)

Definition at line 152 of file utils.c.

void brcmu_pktq_init ( struct pktq pq,
int  num_prec,
int  max_len 
)

Definition at line 161 of file utils.c.

struct sk_buff* brcmu_pktq_mdeq ( struct pktq pq,
uint  prec_bmp,
int prec_out 
)
read

Definition at line 214 of file utils.c.

int brcmu_pktq_mlen ( struct pktq pq,
uint  prec_bmp 
)

Definition at line 199 of file utils.c.

struct sk_buff* brcmu_pktq_pdeq ( struct pktq pq,
int  prec 
)
read

Definition at line 104 of file utils.c.

struct sk_buff* brcmu_pktq_pdeq_tail ( struct pktq pq,
int  prec 
)
read

Definition at line 119 of file utils.c.

struct sk_buff* brcmu_pktq_peek_tail ( struct pktq pq,
int prec_out 
)
read

Definition at line 180 of file utils.c.

struct sk_buff* brcmu_pktq_penq ( struct pktq pq,
int  prec,
struct sk_buff p 
)
read

Definition at line 66 of file utils.c.

struct sk_buff* brcmu_pktq_penq_head ( struct pktq pq,
int  prec,
struct sk_buff p 
)
read

Definition at line 85 of file utils.c.

void brcmu_pktq_pflush ( struct pktq pq,
int  prec,
bool  dir,
bool(*)(struct sk_buff *, void *)  fn,
void arg 
)

Definition at line 135 of file utils.c.

Variable Documentation

Definition at line 191 of file brcmu_utils.h.

size_t size

Definition at line 191 of file brcmu_utils.h.