Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
dhd_cdc.c File Reference
#include <linux/types.h>
#include <linux/netdevice.h>
#include <linux/sched.h>
#include <defs.h>
#include <brcmu_utils.h>
#include <brcmu_wifi.h>
#include "dhd.h"
#include "dhd_proto.h"
#include "dhd_bus.h"
#include "dhd_dbg.h"

Go to the source code of this file.

Data Structures

struct  brcmf_proto_cdc_dcmd
 
struct  brcmf_proto_bdc_header
 
struct  brcmf_proto
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define CDC_MAX_MSG_SIZE   (ETH_FRAME_LEN+ETH_FCS_LEN)
 
#define CDC_DCMD_ERROR   0x01 /* 1=cmd failed */
 
#define CDC_DCMD_SET   0x02 /* 0=get, 1=set cmd */
 
#define CDC_DCMD_IF_MASK   0xF000 /* I/F index */
 
#define CDC_DCMD_IF_SHIFT   12
 
#define CDC_DCMD_ID_MASK   0xFFFF0000 /* id an cmd pairing */
 
#define CDC_DCMD_ID_SHIFT   16 /* ID Mask shift bits */
 
#define CDC_DCMD_ID(flags)   (((flags) & CDC_DCMD_ID_MASK) >> CDC_DCMD_ID_SHIFT)
 
#define BDC_HEADER_LEN   4
 
#define BDC_PROTO_VER   2 /* Protocol version */
 
#define BDC_FLAG_VER_MASK   0xf0 /* Protocol version mask */
 
#define BDC_FLAG_VER_SHIFT   4 /* Protocol version shift */
 
#define BDC_FLAG_SUM_GOOD   0x04 /* Good RX checksums */
 
#define BDC_FLAG_SUM_NEEDED   0x08 /* Dongle needs to do TX checksums */
 
#define BDC_PRIORITY_MASK   0x7
 
#define BDC_FLAG2_IF_MASK   0x0f /* packet rx interface in APSTA */
 
#define BDC_FLAG2_IF_SHIFT   0
 
#define BDC_GET_IF_IDX(hdr)   ((int)((((hdr)->flags2) & BDC_FLAG2_IF_MASK) >> BDC_FLAG2_IF_SHIFT))
 
#define BDC_SET_IF_IDX(hdr, idx)
 
#define RETRIES   2 /* # of retries to retrieve matching dcmd response */
 
#define BUS_HEADER_LEN
 
#define ROUND_UP_MARGIN
 

Functions

int brcmf_proto_cdc_query_dcmd (struct brcmf_pub *drvr, int ifidx, uint cmd, void *buf, uint len)
 
int brcmf_proto_cdc_set_dcmd (struct brcmf_pub *drvr, int ifidx, uint cmd, void *buf, uint len)
 
int brcmf_proto_dcmd (struct brcmf_pub *drvr, int ifidx, struct brcmf_dcmd *dcmd, int len)
 
void brcmf_proto_hdrpush (struct brcmf_pub *drvr, int ifidx, struct sk_buff *pktbuf)
 
int brcmf_proto_hdrpull (struct device *dev, int *ifidx, struct sk_buff *pktbuf)
 
int brcmf_proto_attach (struct brcmf_pub *drvr)
 
void brcmf_proto_detach (struct brcmf_pub *drvr)
 
int brcmf_proto_init (struct brcmf_pub *drvr)
 
void brcmf_proto_stop (struct brcmf_pub *drvr)
 

Macro Definition Documentation

#define BDC_FLAG2_IF_MASK   0x0f /* packet rx interface in APSTA */

Definition at line 69 of file dhd_cdc.c.

#define BDC_FLAG2_IF_SHIFT   0

Definition at line 70 of file dhd_cdc.c.

#define BDC_FLAG_SUM_GOOD   0x04 /* Good RX checksums */

Definition at line 66 of file dhd_cdc.c.

#define BDC_FLAG_SUM_NEEDED   0x08 /* Dongle needs to do TX checksums */

Definition at line 67 of file dhd_cdc.c.

#define BDC_FLAG_VER_MASK   0xf0 /* Protocol version mask */

Definition at line 64 of file dhd_cdc.c.

#define BDC_FLAG_VER_SHIFT   4 /* Protocol version shift */

Definition at line 65 of file dhd_cdc.c.

#define BDC_GET_IF_IDX (   hdr)    ((int)((((hdr)->flags2) & BDC_FLAG2_IF_MASK) >> BDC_FLAG2_IF_SHIFT))

Definition at line 72 of file dhd_cdc.c.

#define BDC_HEADER_LEN   4

Definition at line 62 of file dhd_cdc.c.

#define BDC_PRIORITY_MASK   0x7

Definition at line 68 of file dhd_cdc.c.

#define BDC_PROTO_VER   2 /* Protocol version */

Definition at line 63 of file dhd_cdc.c.

#define BDC_SET_IF_IDX (   hdr,
  idx 
)
Value:

Definition at line 74 of file dhd_cdc.c.

#define BUS_HEADER_LEN
Value:
(16+64) /* Must be atleast SDPCM_RESERVE
* (amount of header tha might be added)
* plus any space that might be needed
* for bus alignment padding.
*/

Definition at line 87 of file dhd_cdc.c.

#define CDC_DCMD_ERROR   0x01 /* 1=cmd failed */

Definition at line 49 of file dhd_cdc.c.

#define CDC_DCMD_ID (   flags)    (((flags) & CDC_DCMD_ID_MASK) >> CDC_DCMD_ID_SHIFT)

Definition at line 55 of file dhd_cdc.c.

#define CDC_DCMD_ID_MASK   0xFFFF0000 /* id an cmd pairing */

Definition at line 53 of file dhd_cdc.c.

#define CDC_DCMD_ID_SHIFT   16 /* ID Mask shift bits */

Definition at line 54 of file dhd_cdc.c.

#define CDC_DCMD_IF_MASK   0xF000 /* I/F index */

Definition at line 51 of file dhd_cdc.c.

#define CDC_DCMD_IF_SHIFT   12

Definition at line 52 of file dhd_cdc.c.

#define CDC_DCMD_SET   0x02 /* 0=get, 1=set cmd */

Definition at line 50 of file dhd_cdc.c.

#define CDC_MAX_MSG_SIZE   (ETH_FRAME_LEN+ETH_FCS_LEN)

Definition at line 46 of file dhd_cdc.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 22 of file dhd_cdc.c.

#define RETRIES   2 /* # of retries to retrieve matching dcmd response */

Definition at line 86 of file dhd_cdc.c.

#define ROUND_UP_MARGIN
Value:
2048 /* Biggest bus block size possible for
* round off at the end of buffer
* Currently is SDIO
*/

Definition at line 88 of file dhd_cdc.c.

Function Documentation

int brcmf_proto_attach ( struct brcmf_pub drvr)

Definition at line 422 of file dhd_cdc.c.

int brcmf_proto_cdc_query_dcmd ( struct brcmf_pub drvr,
int  ifidx,
uint  cmd,
void buf,
uint  len 
)

Definition at line 139 of file dhd_cdc.c.

int brcmf_proto_cdc_set_dcmd ( struct brcmf_pub drvr,
int  ifidx,
uint  cmd,
void buf,
uint  len 
)

Definition at line 221 of file dhd_cdc.c.

int brcmf_proto_dcmd ( struct brcmf_pub drvr,
int  ifidx,
struct brcmf_dcmd dcmd,
int  len 
)

Definition at line 274 of file dhd_cdc.c.

void brcmf_proto_detach ( struct brcmf_pub drvr)

Definition at line 448 of file dhd_cdc.c.

int brcmf_proto_hdrpull ( struct device dev,
int ifidx,
struct sk_buff pktbuf 
)

Definition at line 376 of file dhd_cdc.c.

void brcmf_proto_hdrpush ( struct brcmf_pub drvr,
int  ifidx,
struct sk_buff pktbuf 
)

Definition at line 353 of file dhd_cdc.c.

int brcmf_proto_init ( struct brcmf_pub drvr)

Definition at line 454 of file dhd_cdc.c.

void brcmf_proto_stop ( struct brcmf_pub drvr)

Definition at line 483 of file dhd_cdc.c.