diff options
author | Arend van Spriel <arend@broadcom.com> | 2010-11-23 14:06:23 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-29 11:37:01 -0800 |
commit | c26b1378a71de617fb5ba7da8b6fdc882caed0e8 (patch) | |
tree | de60360cd48b818e66c84bbd8b65eee80d2cca7a /drivers/staging/brcm80211/brcmfmac | |
parent | b6eb5c0f71af22f7b44353a01241fff9a02997af (diff) |
staging: brcm80211: change packet buffer type to native struct sk_buff
The packet queues now store struct sk_buff pointer and subsequently
all driver code handling packets now use struct sk_buff as package
storage type. Next step will be getting rid of packet macros.
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/brcm80211/brcmfmac')
-rw-r--r-- | drivers/staging/brcm80211/brcmfmac/bcmsdh.c | 2 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 8 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmfmac/dhd.h | 10 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmfmac/dhd_bus.h | 2 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmfmac/dhd_cdc.c | 6 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmfmac/dhd_common.c | 5 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmfmac/dhd_linux.c | 10 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmfmac/dhd_proto.h | 7 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmfmac/dhd_sdio.c | 39 |
9 files changed, 49 insertions, 40 deletions
diff --git a/drivers/staging/brcm80211/brcmfmac/bcmsdh.c b/drivers/staging/brcm80211/brcmfmac/bcmsdh.c index 6171ebf56ff..acf43a36508 100644 --- a/drivers/staging/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh.c @@ -453,7 +453,7 @@ bool bcmsdh_regfail(void *sdh) int bcmsdh_recv_buf(void *sdh, u32 addr, uint fn, uint flags, - u8 *buf, uint nbytes, void *pkt, + u8 *buf, uint nbytes, struct sk_buff *pkt, bcmsdh_cmplt_fn_t complete, void *handle) { bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh; diff --git a/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c index babda77d932..3d3a428fa27 100644 --- a/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c +++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c @@ -928,13 +928,13 @@ sdioh_request_word(sdioh_info_t *sd, uint cmd_type, uint rw, uint func, static SDIOH_API_RC sdioh_request_packet(sdioh_info_t *sd, uint fix_inc, uint write, uint func, - uint addr, void *pkt) + uint addr, struct sk_buff *pkt) { bool fifo = (fix_inc == SDIOH_DATA_FIX); u32 SGCount = 0; int err_ret = 0; - void *pnext; + struct sk_buff *pnext; sd_trace(("%s: Enter\n", __func__)); @@ -1026,10 +1026,10 @@ sdioh_request_packet(sdioh_info_t *sd, uint fix_inc, uint write, uint func, extern SDIOH_API_RC sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write, uint func, uint addr, uint reg_width, uint buflen_u, - u8 *buffer, void *pkt) + u8 *buffer, struct sk_buff *pkt) { SDIOH_API_RC Status; - void *mypkt = NULL; + struct sk_buff *mypkt = NULL; sd_trace(("%s: Enter\n", __func__)); diff --git a/drivers/staging/brcm80211/brcmfmac/dhd.h b/drivers/staging/brcm80211/brcmfmac/dhd.h index 7785772ed91..69c6a027281 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd.h +++ b/drivers/staging/brcm80211/brcmfmac/dhd.h @@ -295,10 +295,12 @@ extern void dhd_detach(dhd_pub_t *dhdp); /* Indication from bus module to change flow-control state */ extern void dhd_txflowcontrol(dhd_pub_t *dhdp, int ifidx, bool on); -extern bool dhd_prec_enq(dhd_pub_t *dhdp, struct pktq *q, void *pkt, int prec); +extern bool dhd_prec_enq(dhd_pub_t *dhdp, struct pktq *q, + struct sk_buff *pkt, int prec); /* Receive frame for delivery to OS. Callee disposes of rxp. */ -extern void dhd_rx_frame(dhd_pub_t *dhdp, int ifidx, void *rxp, int numpkt); +extern void dhd_rx_frame(dhd_pub_t *dhdp, int ifidx, + struct sk_buff *rxp, int numpkt); /* Return pointer to interface name */ extern char *dhd_ifname(dhd_pub_t *dhdp, int idx); @@ -307,7 +309,7 @@ extern char *dhd_ifname(dhd_pub_t *dhdp, int idx); extern void dhd_sched_dpc(dhd_pub_t *dhdp); /* Notify tx completion */ -extern void dhd_txcomplete(dhd_pub_t *dhdp, void *txp, bool success); +extern void dhd_txcomplete(dhd_pub_t *dhdp, struct sk_buff *txp, bool success); /* Query ioctl */ extern int dhdcdc_query_ioctl(dhd_pub_t *dhd, int ifidx, uint cmd, void *buf, @@ -378,7 +380,7 @@ extern void dhd_vif_sendup(struct dhd_info *dhd, int ifidx, unsigned char * cp, int len); /* Send packet to dongle via data channel */ -extern int dhd_sendpkt(dhd_pub_t *dhdp, int ifidx, void *pkt); +extern int dhd_sendpkt(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pkt); /* Send event to host */ extern void dhd_sendup_event(dhd_pub_t *dhdp, wl_event_msg_t *event, diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_bus.h b/drivers/staging/brcm80211/brcmfmac/dhd_bus.h index 6629a229b4a..cd0d5400bf0 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_bus.h +++ b/drivers/staging/brcm80211/brcmfmac/dhd_bus.h @@ -36,7 +36,7 @@ extern void dhd_bus_stop(struct dhd_bus *bus, bool enforce_mutex); extern int dhd_bus_init(dhd_pub_t *dhdp, bool enforce_mutex); /* Send a data frame to the dongle. Callee disposes of txp. */ -extern int dhd_bus_txdata(struct dhd_bus *bus, void *txp); +extern int dhd_bus_txdata(struct dhd_bus *bus, struct sk_buff *txp); /* Send/receive a control message to/from the dongle. * Expects caller to enforce a single outstanding transaction. diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c b/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c index 8e4e10794dc..c23d30b1314 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c @@ -310,7 +310,7 @@ void dhd_prot_dump(dhd_pub_t *dhdp, struct bcmstrbuf *strbuf) bcm_bprintf(strbuf, "Protocol CDC: reqid %d\n", dhdp->prot->reqid); } -void dhd_prot_hdrpush(dhd_pub_t *dhd, int ifidx, void *pktbuf) +void dhd_prot_hdrpush(dhd_pub_t *dhd, int ifidx, struct sk_buff *pktbuf) { #ifdef BDC struct bdc_header *h; @@ -336,7 +336,7 @@ void dhd_prot_hdrpush(dhd_pub_t *dhd, int ifidx, void *pktbuf) BDC_SET_IF_IDX(h, ifidx); } -bool dhd_proto_fcinfo(dhd_pub_t *dhd, void *pktbuf, u8 * fcbits) +bool dhd_proto_fcinfo(dhd_pub_t *dhd, struct sk_buff *pktbuf, u8 * fcbits) { #ifdef BDC struct bdc_header *h; @@ -356,7 +356,7 @@ bool dhd_proto_fcinfo(dhd_pub_t *dhd, void *pktbuf, u8 * fcbits) return false; } -int dhd_prot_hdrpull(dhd_pub_t *dhd, int *ifidx, void *pktbuf) +int dhd_prot_hdrpull(dhd_pub_t *dhd, int *ifidx, struct sk_buff *pktbuf) { #ifdef BDC struct bdc_header *h; diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_common.c b/drivers/staging/brcm80211/brcmfmac/dhd_common.c index f7ffea69233..e212abb8a35 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_common.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_common.c @@ -327,9 +327,10 @@ void dhd_store_conn_status(u32 event, u32 status, u32 reason) } } -bool dhd_prec_enq(dhd_pub_t *dhdp, struct pktq *q, void *pkt, int prec) +bool dhd_prec_enq(dhd_pub_t *dhdp, struct pktq *q, struct sk_buff *pkt, + int prec) { - void *p; + struct sk_buff *p; int eprec = -1; /* precedence to evict from */ bool discard_oldest; diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c index 27d4e02d3aa..ec887fb32fa 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c @@ -1018,7 +1018,7 @@ static void dhd_set_multicast_list(struct net_device *dev) up(&dhd->sysioc_sem); } -int dhd_sendpkt(dhd_pub_t *dhdp, int ifidx, void *pktbuf) +int dhd_sendpkt(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pktbuf) { int ret; dhd_info_t *dhd = (dhd_info_t *) (dhdp->info); @@ -1132,13 +1132,15 @@ void dhd_txflowcontrol(dhd_pub_t *dhdp, int ifidx, bool state) netif_wake_queue(net); } -void dhd_rx_frame(dhd_pub_t *dhdp, int ifidx, void *pktbuf, int numpkt) +void dhd_rx_frame(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pktbuf, + int numpkt) { dhd_info_t *dhd = (dhd_info_t *) dhdp->info; struct sk_buff *skb; unsigned char *eth; uint len; - void *data, *pnext, *save_pktbuf; + void *data; + struct sk_buff *pnext, *save_pktbuf; int i; dhd_if_t *ifp; wl_event_msg_t event; @@ -1222,7 +1224,7 @@ void dhd_event(struct dhd_info *dhd, char *evpkt, int evlen, int ifidx) return; } -void dhd_txcomplete(dhd_pub_t *dhdp, void *txp, bool success) +void dhd_txcomplete(dhd_pub_t *dhdp, struct sk_buff *txp, bool success) { uint ifidx; dhd_info_t *dhd = (dhd_info_t *) (dhdp->info); diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_proto.h b/drivers/staging/brcm80211/brcmfmac/dhd_proto.h index cc42fa4a914..a5309e27b65 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_proto.h +++ b/drivers/staging/brcm80211/brcmfmac/dhd_proto.h @@ -46,15 +46,16 @@ extern int dhd_prot_init(dhd_pub_t *dhdp); /* Stop protocol: sync w/dongle state. */ extern void dhd_prot_stop(dhd_pub_t *dhdp); -extern bool dhd_proto_fcinfo(dhd_pub_t *dhd, void *pktbuf, u8 *fcbits); +extern bool dhd_proto_fcinfo(dhd_pub_t *dhd, struct sk_buff *pktbuf, + u8 *fcbits); /* Add any protocol-specific data header. * Caller must reserve prot_hdrlen prepend space. */ -extern void dhd_prot_hdrpush(dhd_pub_t *, int ifidx, void *txp); +extern void dhd_prot_hdrpush(dhd_pub_t *, int ifidx, struct sk_buff *txp); /* Remove any protocol-specific data header. */ -extern int dhd_prot_hdrpull(dhd_pub_t *, int *ifidx, void *rxp); +extern int dhd_prot_hdrpull(dhd_pub_t *, int *ifidx, struct sk_buff *rxp); /* Use protocol to issue ioctl to dongle */ extern int dhd_prot_ioctl(dhd_pub_t *dhd, int ifidx, wl_ioctl_t *ioc, diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c index d94b11a3271..12bb7c602f1 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c @@ -203,8 +203,8 @@ typedef struct dhd_bus { u8 rx_seq; /* Receive sequence number (expected) */ bool rxskip; /* Skip receive (awaiting NAK ACK) */ - void *glomd; /* Packet containing glomming descriptor */ - void *glom; /* Packet chain for glommed superframe */ + struct sk_buff *glomd; /* Packet containing glomming descriptor */ + struct sk_buff *glom; /* Packet chain for glommed superframe */ uint glomerr; /* Glom packet read errors */ u8 *rxbuf; /* Buffer for receiving control packets */ @@ -446,11 +446,13 @@ static uint process_nvram_vars(char *varbuf, uint len); static void dhd_dongle_setmemsize(struct dhd_bus *bus, int mem_size); static int dhd_bcmsdh_recv_buf(dhd_bus_t *bus, u32 addr, uint fn, - uint flags, u8 *buf, uint nbytes, void *pkt, - bcmsdh_cmplt_fn_t complete, void *handle); + uint flags, u8 *buf, uint nbytes, + struct sk_buff *pkt, bcmsdh_cmplt_fn_t complete, + void *handle); static int dhd_bcmsdh_send_buf(dhd_bus_t *bus, u32 addr, uint fn, - uint flags, u8 *buf, uint nbytes, void *pkt, - bcmsdh_cmplt_fn_t complete, void *handle); + uint flags, u8 *buf, uint nbytes, + struct sk_buff *pkt, bcmsdh_cmplt_fn_t complete, + void *handle); static bool dhdsdio_download_firmware(struct dhd_bus *bus, struct osl_info *osh, void *sdh); @@ -902,7 +904,8 @@ void dhd_enable_oob_intr(struct dhd_bus *bus, bool enable) /* Writes a HW/SW header into the packet and sends it. */ /* Assumes: (a) header space already there, (b) caller holds lock */ -static int dhdsdio_txpkt(dhd_bus_t *bus, void *pkt, uint chan, bool free_pkt) +static int dhdsdio_txpkt(dhd_bus_t *bus, struct sk_buff *pkt, uint chan, + bool free_pkt) { int ret; struct osl_info *osh; @@ -911,7 +914,7 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, void *pkt, uint chan, bool free_pkt) u32 swheader; uint retries = 0; bcmsdh_info_t *sdh; - void *new; + struct sk_buff *new; int i; DHD_TRACE(("%s: Enter\n", __func__)); @@ -1063,7 +1066,7 @@ done: return ret; } -int dhd_bus_txdata(struct dhd_bus *bus, void *pkt) +int dhd_bus_txdata(struct dhd_bus *bus, struct sk_buff *pkt) { int ret = BCME_ERROR; struct osl_info *osh; @@ -1164,7 +1167,7 @@ int dhd_bus_txdata(struct dhd_bus *bus, void *pkt) static uint dhdsdio_sendfromq(dhd_bus_t *bus, uint maxframes) { - void *pkt; + struct sk_buff *pkt; u32 intstatus = 0; uint retries = 0; int ret = 0, prec_out; @@ -3180,7 +3183,7 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq) u8 *dptr, num = 0; u16 sublen, check; - void *pfirst, *plast, *pnext, *save_pfirst; + struct sk_buff *pfirst, *plast, *pnext, *save_pfirst; struct osl_info *osh = bus->dhd->osh; int errcode; @@ -3590,7 +3593,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished) u8 fcbits; /* Extracted fcbits from software header */ u8 delta; - void *pkt; /* Packet for event or data frames */ + struct sk_buff *pkt; /* Packet for event or data frames */ u16 pad; /* Number of pad bytes to read */ u16 rdlen; /* Total number of bytes to read */ u8 rxseq; /* Next sequence number to expect */ @@ -4628,7 +4631,7 @@ static void dhdsdio_pktgen_init(dhd_bus_t *bus) static void dhdsdio_pktgen(dhd_bus_t *bus) { - void *pkt; + struct sk_buff *pkt; u8 *data; uint pktcount; uint fillbyte; @@ -4735,7 +4738,7 @@ static void dhdsdio_pktgen(dhd_bus_t *bus) static void dhdsdio_sdtest_set(dhd_bus_t *bus, bool start) { - void *pkt; + struct sk_buff *pkt; u8 *data; struct osl_info *osh = bus->dhd->osh; @@ -4760,7 +4763,7 @@ static void dhdsdio_sdtest_set(dhd_bus_t *bus, bool start) bus->pktgen_fail++; } -static void dhdsdio_testrcv(dhd_bus_t *bus, void *pkt, uint seq) +static void dhdsdio_testrcv(dhd_bus_t *bus, struct sk_buff *pkt, uint seq) { struct osl_info *osh = bus->dhd->osh; u8 *data; @@ -4962,7 +4965,7 @@ extern int dhd_bus_console_in(dhd_pub_t *dhdp, unsigned char *msg, uint msglen) dhd_bus_t *bus = dhdp->bus; u32 addr, val; int rv; - void *pkt; + struct sk_buff *pkt; /* Address could be zero if CONSOLE := 0 in dongle Makefile */ if (bus->console_addr == 0) @@ -5989,7 +5992,7 @@ err: static int dhd_bcmsdh_recv_buf(dhd_bus_t *bus, u32 addr, uint fn, uint flags, - u8 *buf, uint nbytes, void *pkt, + u8 *buf, uint nbytes, struct sk_buff *pkt, bcmsdh_cmplt_fn_t complete, void *handle) { int status; @@ -6003,7 +6006,7 @@ dhd_bcmsdh_recv_buf(dhd_bus_t *bus, u32 addr, uint fn, uint flags, static int dhd_bcmsdh_send_buf(dhd_bus_t *bus, u32 addr, uint fn, uint flags, - u8 *buf, uint nbytes, void *pkt, + u8 *buf, uint nbytes, struct sk_buff *pkt, bcmsdh_cmplt_fn_t complete, void *handle) { return bcmsdh_send_buf |