[PATCH 2/3] staging: brcm80211: change packet buffer type to native struct sk_buff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
Signed-off-by: Arend van Spriel <arend@xxxxxxxxxxxx>
---
 drivers/staging/brcm80211/brcmfmac/bcmsdh.c       |    2 +-
 drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c |    8 ++--
 drivers/staging/brcm80211/brcmfmac/dhd.h          |   10 +++--
 drivers/staging/brcm80211/brcmfmac/dhd_bus.h      |    2 +-
 drivers/staging/brcm80211/brcmfmac/dhd_cdc.c      |    6 ++--
 drivers/staging/brcm80211/brcmfmac/dhd_common.c   |    5 ++-
 drivers/staging/brcm80211/brcmfmac/dhd_linux.c    |   10 +++--
 drivers/staging/brcm80211/brcmfmac/dhd_proto.h    |    7 ++--
 drivers/staging/brcm80211/brcmfmac/dhd_sdio.c     |   39 +++++++++++---------
 drivers/staging/brcm80211/include/bcmsdbus.h      |    2 +-
 drivers/staging/brcm80211/include/bcmsdh.h        |    2 +-
 drivers/staging/brcm80211/include/bcmutils.h      |   28 ++++++++------
 drivers/staging/brcm80211/include/hnddma.h        |    2 +-
 drivers/staging/brcm80211/sys/wl_mac80211.c       |    7 ----
 drivers/staging/brcm80211/sys/wlc_ampdu.c         |   25 ++++++-------
 drivers/staging/brcm80211/sys/wlc_ampdu.h         |    8 ++--
 drivers/staging/brcm80211/sys/wlc_bmac.c          |    8 ++--
 drivers/staging/brcm80211/sys/wlc_mac80211.c      |   39 +++++++++++---------
 drivers/staging/brcm80211/sys/wlc_mac80211.h      |   16 ++++----
 drivers/staging/brcm80211/sys/wlc_pub.h           |    7 ++++
 drivers/staging/brcm80211/util/bcmutils.c         |   33 +++++++++--------
 drivers/staging/brcm80211/util/hnddma.c           |   17 +++++----
 22 files changed, 151 insertions(+), 132 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmfmac/bcmsdh.c b/drivers/staging/brcm80211/brcmfmac/bcmsdh.c
index 6171ebf..acf43a3 100644
--- a/drivers/staging/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh.c
@@ -445,23 +445,23 @@ u32 bcmsdh_reg_write(void *sdh, u32 addr, uint size, u32 data)
 		      __func__, data, addr, size));
 	return 0xFFFFFFFF;
 }
 
 bool bcmsdh_regfail(void *sdh)
 {
 	return ((bcmsdh_info_t *) sdh)->regfail;
 }
 
 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;
 	SDIOH_API_RC status;
 	uint incr_fix;
 	uint width;
 	uint bar0 = addr & ~SBSDIO_SB_OFT_ADDR_MASK;
 	int err = 0;
 
 	ASSERT(bcmsdh);
 	ASSERT(bcmsdh->init_success);
diff --git a/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
index babda77..3d3a428 100644
--- a/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
+++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
@@ -920,29 +920,29 @@ sdioh_request_word(sdioh_info_t *sd, uint cmd_type, uint rw, uint func,
 
 	if (err_ret) {
 		sd_err(("bcmsdh_sdmmc: Failed to %s word, Err: 0x%08x",
 			rw ? "Write" : "Read", err_ret));
 	}
 
 	return ((err_ret == 0) ? SDIOH_API_RC_SUCCESS : SDIOH_API_RC_FAIL);
 }
 
 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__));
 
 	ASSERT(pkt);
 	DHD_PM_RESUME_WAIT(sdioh_request_packet_wait);
 	DHD_PM_RESUME_RETURN_ERROR(SDIOH_API_RC_FAIL);
 
 	/* Claim host controller */
 	sdio_claim_host(gInstance->func[func]);
 	for (pnext = pkt; pnext; pnext = PKTNEXT(pnext)) {
 		uint pkt_len = PKTLEN(pnext);
@@ -1018,26 +1018,26 @@ sdioh_request_packet(sdioh_info_t *sd, uint fix_inc, uint write, uint func,
  * If it is a packet chain,
  * then all the packets in the chain must be properly aligned.
  * If the packet data is not
  * aligned, then there may only be one packet, and in this case,
  * it is copied to a new
  * aligned packet.
  *
  */
 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__));
 
 	DHD_PM_RESUME_WAIT(sdioh_request_buffer_wait);
 	DHD_PM_RESUME_RETURN_ERROR(SDIOH_API_RC_FAIL);
 	/* Case 1: we don't have a packet. */
 	if (pkt == NULL) {
 		sd_data(("%s: Creating new %s Packet, len=%d\n",
 			 __func__, write ? "TX" : "RX", buflen_u));
 		mypkt = PKTGET(sd->osh, buflen_u, write ? true : false);
 		if (!mypkt) {
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd.h b/drivers/staging/brcm80211/brcmfmac/dhd.h
index 7785772..69c6a02 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd.h
+++ b/drivers/staging/brcm80211/brcmfmac/dhd.h
@@ -287,35 +287,37 @@ void dhd_osl_detach(struct osl_info *osh);
  */
 extern dhd_pub_t *dhd_attach(struct osl_info *osh, struct dhd_bus *bus,
 				uint bus_hdrlen);
 extern int dhd_net_attach(dhd_pub_t *dhdp, int idx);
 
 /* Indication from bus module regarding removal/absence of dongle */
 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);
 
 /* Request scheduling of the bus dpc */
 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,
 			      uint len);
 
 /* OS independent layer functions */
 extern int dhd_os_proto_block(dhd_pub_t *pub);
 extern int dhd_os_proto_unblock(dhd_pub_t *pub);
 extern int dhd_os_ioctl_resp_wait(dhd_pub_t *pub, uint *condition,
 				  bool *pending);
 extern int dhd_os_ioctl_resp_wake(dhd_pub_t *pub);
@@ -370,23 +372,23 @@ extern int dhd_add_if(struct dhd_info *dhd, int ifidx, void *handle,
 		      char *name, u8 *mac_addr, u32 flags, u8 bssidx);
 extern void dhd_del_if(struct dhd_info *dhd, int ifidx);
 
 extern void dhd_vif_add(struct dhd_info *dhd, int ifidx, char *name);
 extern void dhd_vif_del(struct dhd_info *dhd, int ifidx);
 
 extern void dhd_event(struct dhd_info *dhd, char *evpkt, int evlen, int ifidx);
 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,
 			     void *data);
 extern int dhd_bus_devreset(dhd_pub_t *dhdp, u8 flag);
 extern uint dhd_bus_status(dhd_pub_t *dhdp);
 extern int dhd_bus_start(dhd_pub_t *dhdp);
 
 extern void print_buf(void *pbuf, int len, int bytes_per_line);
 
 typedef enum cust_gpio_modes {
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_bus.h b/drivers/staging/brcm80211/brcmfmac/dhd_bus.h
index 6629a22..cd0d540 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_bus.h
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_bus.h
@@ -28,23 +28,23 @@ extern void dhd_bus_unregister(void);
 /* Download firmware image and nvram image */
 extern bool dhd_bus_download_firmware(struct dhd_bus *bus,
 	      struct osl_info *osh, char *fw_path, char *nv_path);
 
 /* Stop bus module: clear pending frames, disable data flow */
 extern void dhd_bus_stop(struct dhd_bus *bus, bool enforce_mutex);
 
 /* Initialize bus module: prepare for communication w/dongle */
 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.
  */
 extern int dhd_bus_txctl(struct dhd_bus *bus, unsigned char *msg, uint msglen);
 extern int dhd_bus_rxctl(struct dhd_bus *bus, unsigned char *msg, uint msglen);
 
 /* Watchdog timer function */
 extern bool dhd_bus_watchdog(dhd_pub_t *dhd);
 
 #ifdef DHD_DEBUG
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c b/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c
index 8e4e107..c23d30b 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c
@@ -302,23 +302,23 @@ int
 dhd_prot_iovar_op(dhd_pub_t *dhdp, const char *name,
 		  void *params, int plen, void *arg, int len, bool set)
 {
 	return BCME_UNSUPPORTED;
 }
 
 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;
 #endif				/* BDC */
 
 	DHD_TRACE(("%s: Enter\n", __func__));
 
 #ifdef BDC
 	/* Push BDC header used to convey priority for buses that don't */
 
 	skb_push(pktbuf, BDC_HEADER_LEN);
@@ -328,43 +328,43 @@ void dhd_prot_hdrpush(dhd_pub_t *dhd, int ifidx, void *pktbuf)
 	h->flags = (BDC_PROTO_VER << BDC_FLAG_VER_SHIFT);
 	if (PKTSUMNEEDED(pktbuf))
 		h->flags |= BDC_FLAG_SUM_NEEDED;
 
 	h->priority = (PKTPRIO(pktbuf) & BDC_PRIORITY_MASK);
 	h->flags2 = 0;
 	h->rssi = 0;
 #endif				/* BDC */
 	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;
 
 	if (PKTLEN(pktbuf) < BDC_HEADER_LEN) {
 		DHD_ERROR(("%s: rx data too short (%d < %d)\n",
 			   __func__, PKTLEN(pktbuf), BDC_HEADER_LEN));
 		return BCME_ERROR;
 	}
 
 	h = (struct bdc_header *)PKTDATA(pktbuf);
 
 	*fcbits = h->priority >> BDC_PRIORITY_FC_SHIFT;
 	if ((h->flags2 & BDC_FLAG2_FC_FLAG) == BDC_FLAG2_FC_FLAG)
 		return true;
 #endif
 	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;
 #endif
 
 	DHD_TRACE(("%s: Enter\n", __func__));
 
 #ifdef BDC
 	/* Pop BDC header used to convey priority for buses that don't */
 
 	if (PKTLEN(pktbuf) < BDC_HEADER_LEN) {
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_common.c b/drivers/staging/brcm80211/brcmfmac/dhd_common.c
index f7ffea6..e212abb 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_common.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_common.c
@@ -319,25 +319,26 @@ void dhd_store_conn_status(u32 event, u32 status, u32 reason)
 	 * because an encryption/rsn mismatch results in both events, and
 	 * the important information is in the WLC_E_PRUNE.
 	 */
 	if (!(event == WLC_E_SET_SSID && status == WLC_E_STATUS_FAIL &&
 	      dhd_conn_event == WLC_E_PRUNE)) {
 		dhd_conn_event = event;
 		dhd_conn_status = status;
 		dhd_conn_reason = 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;
 
 	/* Fast case, precedence queue is not full and we are also not
 	 * exceeding total queue length
 	 */
 	if (!pktq_pfull(q, prec) && !pktq_full(q)) {
 		pktq_penq(q, prec, pkt);
 		return true;
 	}
 
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
index 27d4e02..ec887fb 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
@@ -1010,23 +1010,23 @@ static void dhd_set_multicast_list(struct net_device *dev)
 	int ifidx;
 
 	ifidx = dhd_net2idx(dhd, dev);
 	if (ifidx == DHD_BAD_IF)
 		return;
 
 	ASSERT(dhd->sysioc_tsk);
 	dhd->set_multicast = true;
 	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);
 
 	/* Reject if down */
 	if (!dhdp->up || (dhdp->busstate == DHD_BUS_DOWN))
 		return -ENODEV;
 
 	/* Update multicast statistic */
 	if (PKTLEN(pktbuf) >= ETHER_ADDR_LEN) {
 		u8 *pktdata = (u8 *) PKTDATA(pktbuf);
@@ -1124,29 +1124,31 @@ void dhd_txflowcontrol(dhd_pub_t *dhdp, int ifidx, bool state)
 	DHD_TRACE(("%s: Enter\n", __func__));
 
 	dhdp->txoff = state;
 	ASSERT(dhd && dhd->iflist[ifidx]);
 	net = dhd->iflist[ifidx]->net;
 	if (state == ON)
 		netif_stop_queue(net);
 	else
 		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;
 
 	DHD_TRACE(("%s: Enter\n", __func__));
 
 	save_pktbuf = pktbuf;
 
 	for (i = 0; pktbuf && i < numpkt; i++, pktbuf = pnext) {
 
 		pnext = PKTNEXT(pktbuf);
@@ -1214,23 +1216,23 @@ void dhd_rx_frame(dhd_pub_t *dhdp, int ifidx, void *pktbuf, int numpkt)
 			netif_rx_ni(skb);
 		}
 	}
 }
 
 void dhd_event(struct dhd_info *dhd, char *evpkt, int evlen, int ifidx)
 {
 	/* Linux version has nothing to do */
 	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);
 	struct ether_header *eh;
 	u16 type;
 
 	dhd_prot_hdrpull(dhdp, &ifidx, txp);
 
 	eh = (struct ether_header *)PKTDATA(txp);
 	type = ntoh16(eh->ether_type);
 
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_proto.h b/drivers/staging/brcm80211/brcmfmac/dhd_proto.h
index cc42fa4..a5309e2 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_proto.h
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_proto.h
@@ -38,31 +38,32 @@ extern int dhd_prot_attach(dhd_pub_t *dhdp);
 /* Unlink, frees allocated protocol memory (including dhd_prot) */
 extern void dhd_prot_detach(dhd_pub_t *dhdp);
 
 /* Initialize protocol: sync w/dongle state.
  * Sets dongle media info (iswl, drv_version, mac address).
  */
 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,
 			  void *buf, int len);
 
 /* Check for and handle local prot-specific iovar commands */
 extern int dhd_prot_iovar_op(dhd_pub_t *dhdp, const char *name,
 			     void *params, int plen, void *arg, int len,
 			     bool set);
 
 /* Add prot dump output to a buffer */
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
index d94b11a..12bb7c6 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
@@ -195,24 +195,24 @@ typedef struct dhd_bus {
 	struct pktq txq;	/* Queue length used for flow-control */
 	u8 flowcontrol;	/* per prio flow control bitmask */
 	u8 tx_seq;		/* Transmit sequence number (next) */
 	u8 tx_max;		/* Maximum transmit sequence allowed */
 
 	u8 hdrbuf[MAX_HDR_READ + DHD_SDALIGN];
 	u8 *rxhdr;		/* Header of current rx frame (in hdrbuf) */
 	u16 nextlen;		/* Next Read Len from last header */
 	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 */
 	uint rxblen;		/* Allocated length of rxbuf */
 	u8 *rxctl;		/* Aligned pointer into rxbuf */
 	u8 *databuf;		/* Buffer for receiving big glom packet */
 	u8 *dataptr;		/* Aligned pointer into databuf */
 	uint rxlen;		/* Length of valid data in buffer */
 
 	u8 sdpcm_ver;	/* Bus protocol reported by dongle */
 
@@ -438,27 +438,29 @@ static bool dhdsdio_chipmatch(u16 chipid);
 static bool dhdsdio_probe_attach(dhd_bus_t *bus, struct osl_info *osh,
 				 void *sdh, void *regsva, u16 devid);
 static bool dhdsdio_probe_malloc(dhd_bus_t *bus, struct osl_info *osh,
 				 void *sdh);
 static bool dhdsdio_probe_init(dhd_bus_t *bus, struct osl_info *osh, void *sdh);
 static void dhdsdio_release_dongle(dhd_bus_t *bus, struct osl_info * osh);
 
 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);
 static int _dhdsdio_download_firmware(struct dhd_bus *bus);
 
 static int dhdsdio_download_code_file(struct dhd_bus *bus, char *image_path);
 static int dhdsdio_download_nvram(struct dhd_bus *bus);
 #ifdef BCMEMBEDIMAGE
 static int dhdsdio_download_code_array(struct dhd_bus *bus);
 #endif
 
@@ -894,32 +896,33 @@ void dhd_enable_oob_intr(struct dhd_bus *bus, bool enable)
 }
 #endif				/* defined(OOB_INTR_ONLY) */
 
 #define BUS_WAKE(bus) \
 	do { \
 		if ((bus)->sleeping) \
 			dhdsdio_bussleep((bus), false); \
 	} while (0);
 
 /* 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;
 	u8 *frame;
 	u16 len, pad = 0;
 	u32 swheader;
 	uint retries = 0;
 	bcmsdh_info_t *sdh;
-	void *new;
+	struct sk_buff *new;
 	int i;
 
 	DHD_TRACE(("%s: Enter\n", __func__));
 
 	sdh = bus->sdh;
 	osh = bus->dhd->osh;
 
 	if (bus->dhd->dongle_reset) {
 		ret = BCME_NOTREADY;
 		goto done;
 	}
@@ -1055,23 +1058,23 @@ done:
 	skb_pull(pkt, SDPCM_HDRLEN + pad);
 	dhd_os_sdunlock(bus->dhd);
 	dhd_txcomplete(bus->dhd, pkt, ret != 0);
 	dhd_os_sdlock(bus->dhd);
 
 	if (free_pkt)
 		PKTFREE(osh, pkt, true);
 
 	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;
 	uint datalen, prec;
 
 	DHD_TRACE(("%s: Enter\n", __func__));
 
 	osh = bus->dhd->osh;
 	datalen = PKTLEN(pkt);
 
 #ifdef SDTEST
@@ -1156,23 +1159,23 @@ int dhd_bus_txdata(struct dhd_bus *bus, void *pkt)
 			dhdsdio_clkctl(bus, CLK_NONE, true);
 		}
 
 		dhd_os_sdunlock(bus->dhd);
 	}
 
 	return ret;
 }
 
 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;
 	uint cnt = 0;
 	uint datalen;
 	u8 tx_prec_map;
 
 	dhd_pub_t *dhd = bus->dhd;
 	sdpcmd_regs_t *regs = bus->regs;
 
 	DHD_TRACE(("%s: Enter\n", __func__));
@@ -3172,23 +3175,23 @@ gotpkt:
 done:
 	/* Awake any waiters */
 	dhd_os_ioctl_resp_wake(bus->dhd);
 }
 
 static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
 {
 	u16 dlen, totlen;
 	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;
 	u8 chan, seq, doff, sfdoff;
 	u8 txmax;
 
 	int ifidx = 0;
 	bool usechain = bus->use_rxchain;
 
 	/* If packets, issue read(s) and send up packet chain */
 	/* Return sequence numbers consumed? */
@@ -3582,23 +3585,23 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
 /* Return true if there may be more frames to read */
 static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
 {
 	struct osl_info *osh = bus->dhd->osh;
 	bcmsdh_info_t *sdh = bus->sdh;
 
 	u16 len, check;	/* Extracted hardware header fields */
 	u8 chan, seq, doff;	/* Extracted software header fields */
 	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 */
 	uint rxleft = 0;	/* Remaining number of frames allowed */
 	int sdret;		/* Return code from bcmsdh calls */
 	u8 txmax;		/* Maximum tx sequence offered */
 	bool len_consistent;	/* Result of comparing readahead len and
 					 len from hw-hdr */
 	u8 *rxbuf;
 	int ifidx = 0;
 	uint rxcount = 0;	/* Total frames read */
@@ -4620,23 +4623,23 @@ static void dhdsdio_pktgen_init(dhd_bus_t *bus)
 	bus->pktgen_freq = 1;
 	bus->pktgen_print = 10000 / dhd_watchdog_ms;
 	bus->pktgen_count = (dhd_pktgen * dhd_watchdog_ms + 999) / 1000;
 
 	/* Default to echo mode */
 	bus->pktgen_mode = DHD_PKTGEN_ECHO;
 	bus->pktgen_stop = 1;
 }
 
 static void dhdsdio_pktgen(dhd_bus_t *bus)
 {
-	void *pkt;
+	struct sk_buff *pkt;
 	u8 *data;
 	uint pktcount;
 	uint fillbyte;
 	struct osl_info *osh = bus->dhd->osh;
 	u16 len;
 
 	/* Display current count if appropriate */
 	if (bus->pktgen_print && (++bus->pktgen_ptick >= bus->pktgen_print)) {
 		bus->pktgen_ptick = 0;
 		printf("%s: send attempts %d rcvd %d\n",
 		       __func__, bus->pktgen_sent, bus->pktgen_rcvd);
@@ -4727,23 +4730,23 @@ static void dhdsdio_pktgen(dhd_bus_t *bus)
 		if (++bus->pktgen_len > bus->pktgen_maxlen)
 			bus->pktgen_len = (u16) bus->pktgen_minlen;
 
 		/* Special case for burst mode: just send one request! */
 		if (bus->pktgen_mode == DHD_PKTGEN_RXBURST)
 			break;
 	}
 }
 
 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;
 
 	/* Allocate the packet */
 	pkt = PKTGET(osh, SDPCM_HDRLEN + SDPCM_TEST_HDRLEN + DHD_SDALIGN,
 			true);
 	if (!pkt) {
 		DHD_ERROR(("%s: PKTGET failed!\n", __func__));
 		return;
 	}
 	PKTALIGN(osh, pkt, (SDPCM_HDRLEN + SDPCM_TEST_HDRLEN), DHD_SDALIGN);
@@ -4752,23 +4755,23 @@ static void dhdsdio_sdtest_set(dhd_bus_t *bus, bool start)
 	/* Fill in the test header */
 	*data++ = SDPCM_TEST_SEND;
 	*data++ = start;
 	*data++ = (bus->pktgen_maxlen >> 0);
 	*data++ = (bus->pktgen_maxlen >> 8);
 
 	/* Send it */
 	if (dhdsdio_txpkt(bus, pkt, SDPCM_TEST_CHANNEL, true))
 		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;
 	uint pktlen;
 
 	u8 cmd;
 	u8 extra;
 	u16 len;
 	u16 offset;
 
 	/* Check for min length */
@@ -4954,23 +4957,23 @@ extern bool dhd_bus_watchdog(dhd_pub_t *dhdp)
 	dhd_os_sdunlock(bus->dhd);
 
 	return bus->ipend;
 }
 
 #ifdef DHD_DEBUG
 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)
 		return BCME_UNSUPPORTED;
 
 	/* Exclusive bus access */
 	dhd_os_sdlock(bus->dhd);
 
 	/* Don't allow input if dongle is in reset */
 	if (bus->dhd->dongle_reset) {
 		dhd_os_sdunlock(bus->dhd);
@@ -5981,37 +5984,37 @@ static int _dhdsdio_download_firmware(struct dhd_bus *bus)
 		goto err;
 	}
 
 	bcmerror = 0;
 
 err:
 	return bcmerror;
 }
 
 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;
 
 	/* 4329: GSPI check */
 	status =
 	    bcmsdh_recv_buf(bus->sdh, addr, fn, flags, buf, nbytes, pkt,
 			    complete, handle);
 	return status;
 }
 
 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
 		(bus->sdh, addr, fn, flags, buf, nbytes, pkt, complete,
 		 handle);
 }
 
 uint dhd_bus_chip(struct dhd_bus *bus)
 {
 	ASSERT(bus->sih != NULL);
 	return bus->sih->chip;
diff --git a/drivers/staging/brcm80211/include/bcmsdbus.h b/drivers/staging/brcm80211/include/bcmsdbus.h
index 4f040e4..89059dd 100644
--- a/drivers/staging/brcm80211/include/bcmsdbus.h
+++ b/drivers/staging/brcm80211/include/bcmsdbus.h
@@ -71,23 +71,23 @@ extern SDIOH_API_RC sdioh_request_byte(sdioh_info_t *si, uint rw, uint fnc,
 
 /* read or write 2/4 bytes using cmd53 */
 extern SDIOH_API_RC sdioh_request_word(sdioh_info_t *si, uint cmd_type,
 				       uint rw, uint fnc, uint addr,
 				       u32 *word, uint nbyte);
 
 /* read or write any buffer using cmd53 */
 extern SDIOH_API_RC sdioh_request_buffer(sdioh_info_t *si, uint pio_dma,
 					 uint fix_inc, uint rw, uint fnc_num,
 					 u32 addr, uint regwidth,
 					 u32 buflen, u8 *buffer,
-					 void *pkt);
+					 struct sk_buff *pkt);
 
 /* get cis data */
 extern SDIOH_API_RC sdioh_cis_read(sdioh_info_t *si, uint fuc, u8 *cis,
 				   u32 length);
 
 extern SDIOH_API_RC sdioh_cfg_read(sdioh_info_t *si, uint fuc, u32 addr,
 				   u8 *data);
 extern SDIOH_API_RC sdioh_cfg_write(sdioh_info_t *si, uint fuc, u32 addr,
 				    u8 *data);
 
 /* query number of io functions */
diff --git a/drivers/staging/brcm80211/include/bcmsdh.h b/drivers/staging/brcm80211/include/bcmsdh.h
index 69aa061..0e1f799 100644
--- a/drivers/staging/brcm80211/include/bcmsdh.h
+++ b/drivers/staging/brcm80211/include/bcmsdh.h
@@ -114,23 +114,23 @@ extern bool bcmsdh_regfail(void *sdh);
  *   pkt:      pointer to packet associated with buf (if any)
  *   complete: callback function for command completion (async only)
  *   handle:   handle for completion callback (first arg in callback)
  * Returns 0 or error code.
  * NOTE: Async operation is not currently supported.
  */
 typedef void (*bcmsdh_cmplt_fn_t) (void *handle, int status, bool sync_waiting);
 extern int bcmsdh_send_buf(void *sdh, u32 addr, uint fn, uint flags,
 			   u8 *buf, uint nbytes, void *pkt,
 			   bcmsdh_cmplt_fn_t complete, void *handle);
 extern 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);
 
 /* Flags bits */
 #define SDIO_REQ_4BYTE	0x1	/* Four-byte target (backplane) width (vs. two-byte) */
 #define SDIO_REQ_FIXED	0x2	/* Fixed address (FIFO) (vs. incrementing address) */
 #define SDIO_REQ_ASYNC	0x4	/* Async request (vs. sync request) */
 
 /* Pending (non-error) return code */
 #define BCME_PENDING	1
 
 /* Read/write to memory block (F1, no FIFO) via CMD53 (sync only).
diff --git a/drivers/staging/brcm80211/include/bcmutils.h b/drivers/staging/brcm80211/include/bcmutils.h
index 632bceb..e673dfd 100644
--- a/drivers/staging/brcm80211/include/bcmutils.h
+++ b/drivers/staging/brcm80211/include/bcmutils.h
@@ -47,26 +47,26 @@
 }
 
 /* osl multi-precedence packet queue */
 #ifndef PKTQ_LEN_DEFAULT
 #define PKTQ_LEN_DEFAULT        128	/* Max 128 packets */
 #endif
 #ifndef PKTQ_MAX_PREC
 #define PKTQ_MAX_PREC           16	/* Maximum precedence levels */
 #endif
 
 	typedef struct pktq_prec {
-		void *head;	/* first packet to dequeue */
-		void *tail;	/* last packet to dequeue */
-		u16 len;	/* number of queued packets */
-		u16 max;	/* maximum number of queued packets */
+		struct sk_buff *head;	/* first packet to dequeue */
+		struct sk_buff *tail;	/* last packet to dequeue */
+		u16 len;		/* number of queued packets */
+		u16 max;		/* maximum number of queued packets */
 	} pktq_prec_t;
 
 /* multi-priority pkt queue */
 	struct pktq {
 		u16 num_prec;	/* number of precedences in use */
 		u16 hi_prec;	/* rapid dequeue hint (>= highest non-empty prec) */
 		u16 max;	/* total max packets */
 		u16 len;	/* total number of packets */
 		/* q array must be last since # of elements can be either PKTQ_MAX_PREC or 1 */
 		struct pktq_prec q[PKTQ_MAX_PREC];
 	};
@@ -96,58 +96,61 @@
 /* operations on a specific precedence in packet queue */
 
 #define pktq_psetmax(pq, prec, _max)    ((pq)->q[prec].max = (_max))
 #define pktq_plen(pq, prec)             ((pq)->q[prec].len)
 #define pktq_pavail(pq, prec)           ((pq)->q[prec].max - (pq)->q[prec].len)
 #define pktq_pfull(pq, prec)            ((pq)->q[prec].len >= (pq)->q[prec].max)
 #define pktq_pempty(pq, prec)           ((pq)->q[prec].len == 0)
 
 #define pktq_ppeek(pq, prec)            ((pq)->q[prec].head)
 #define pktq_ppeek_tail(pq, prec)       ((pq)->q[prec].tail)
 
-	extern void *pktq_penq(struct pktq *pq, int prec, void *p);
-	extern void *pktq_penq_head(struct pktq *pq, int prec, void *p);
-	extern void *pktq_pdeq(struct pktq *pq, int prec);
-	extern void *pktq_pdeq_tail(struct pktq *pq, int prec);
+extern struct sk_buff *pktq_penq(struct pktq *pq, int prec,
+				 struct sk_buff *p);
+extern struct sk_buff *pktq_penq_head(struct pktq *pq, int prec,
+				      struct sk_buff *p);
+extern struct sk_buff *pktq_pdeq(struct pktq *pq, int prec);
+extern struct sk_buff *pktq_pdeq_tail(struct pktq *pq, int prec);
+
 /* Empty the queue at particular precedence level */
 #ifdef BRCM_FULLMAC
 	extern void pktq_pflush(struct osl_info *osh, struct pktq *pq, int prec,
 		bool dir);
 #else
 	extern void pktq_pflush(struct osl_info *osh, struct pktq *pq, int prec,
 		bool dir, ifpkt_cb_t fn, int arg);
 #endif /* BRCM_FULLMAC */
 
 /* operations on a set of precedences in packet queue */
 
-	extern int pktq_mlen(struct pktq *pq, uint prec_bmp);
-	extern void *pktq_mdeq(struct pktq *pq, uint prec_bmp, int *prec_out);
+extern int pktq_mlen(struct pktq *pq, uint prec_bmp);
+extern struct sk_buff *pktq_mdeq(struct pktq *pq, uint prec_bmp, int *prec_out);
 
 /* operations on packet queue as a whole */
 
 #define pktq_len(pq)                    ((int)(pq)->len)
 #define pktq_max(pq)                    ((int)(pq)->max)
 #define pktq_avail(pq)                  ((int)((pq)->max - (pq)->len))
 #define pktq_full(pq)                   ((pq)->len >= (pq)->max)
 #define pktq_empty(pq)                  ((pq)->len == 0)
 
 /* operations for single precedence queues */
 #define pktenq(pq, p)		pktq_penq(((struct pktq *)pq), 0, (p))
 #define pktenq_head(pq, p)	pktq_penq_head(((struct pktq *)pq), 0, (p))
 #define pktdeq(pq)		pktq_pdeq(((struct pktq *)pq), 0)
 #define pktdeq_tail(pq)		pktq_pdeq_tail(((struct pktq *)pq), 0)
 #define pktqinit(pq, len) pktq_init(((struct pktq *)pq), 1, len)
 
 	extern void pktq_init(struct pktq *pq, int num_prec, int max_len);
 /* prec_out may be NULL if caller is not interested in return value */
-	extern void *pktq_peek_tail(struct pktq *pq, int *prec_out);
+	extern struct sk_buff *pktq_peek_tail(struct pktq *pq, int *prec_out);
 #ifdef BRCM_FULLMAC
 	extern void pktq_flush(struct osl_info *osh, struct pktq *pq, bool dir);
 #else
 	extern void pktq_flush(struct osl_info *osh, struct pktq *pq, bool dir,
 		ifpkt_cb_t fn, int arg);
 #endif
 
 /* externs */
 /* packet */
 	extern uint pktfrombuf(struct osl_info *osh, struct sk_buff *p,
 			       uint offset, int len, unsigned char *buf);
@@ -156,23 +159,24 @@
 /* ethernet address */
 	extern int bcm_ether_atoe(char *p, struct ether_addr *ea);
 
 /* ip address */
 	struct ipv4_addr;
 	extern char *bcm_ip_ntoa(struct ipv4_addr *ia, char *buf);
 
 /* variable access */
 	extern char *getvar(char *vars, const char *name);
 	extern int getintvar(char *vars, const char *name);
 #ifdef BCMDBG
-	extern void prpkt(const char *msg, struct osl_info *osh, void *p0);
+	extern void prpkt(const char *msg, struct osl_info *osh,
+			  struct sk_buff *p0);
 #endif				/* BCMDBG */
 #define bcm_perf_enable()
 #define bcmstats(fmt)
 #define	bcmlog(fmt, a1, a2)
 #define	bcmdumplog(buf, size)	(*buf = '\0')
 #define	bcmdumplogent(buf, idx)	-1
 
 #define bcmtslog(tstamp, fmt, a1, a2)
 #define bcmprinttslogs()
 #define bcmprinttstamp(us)
 
diff --git a/drivers/staging/brcm80211/include/hnddma.h b/drivers/staging/brcm80211/include/hnddma.h
index 854a399..05dd9ba 100644
--- a/drivers/staging/brcm80211/include/hnddma.h
+++ b/drivers/staging/brcm80211/include/hnddma.h
@@ -33,23 +33,23 @@ typedef enum txd_range {
 typedef void (*di_detach_t) (hnddma_t *dmah);
 typedef bool(*di_txreset_t) (hnddma_t *dmah);
 typedef bool(*di_rxreset_t) (hnddma_t *dmah);
 typedef bool(*di_rxidle_t) (hnddma_t *dmah);
 typedef void (*di_txinit_t) (hnddma_t *dmah);
 typedef bool(*di_txenabled_t) (hnddma_t *dmah);
 typedef void (*di_rxinit_t) (hnddma_t *dmah);
 typedef void (*di_txsuspend_t) (hnddma_t *dmah);
 typedef void (*di_txresume_t) (hnddma_t *dmah);
 typedef bool(*di_txsuspended_t) (hnddma_t *dmah);
 typedef bool(*di_txsuspendedidle_t) (hnddma_t *dmah);
-typedef int (*di_txfast_t) (hnddma_t *dmah, void *p, bool commit);
+typedef int (*di_txfast_t) (hnddma_t *dmah, struct sk_buff *p, bool commit);
 typedef int (*di_txunframed_t) (hnddma_t *dmah, void *p, uint len,
 				bool commit);
 typedef void *(*di_getpos_t) (hnddma_t *di, bool direction);
 typedef void (*di_fifoloopbackenable_t) (hnddma_t *dmah);
 typedef bool(*di_txstopped_t) (hnddma_t *dmah);
 typedef bool(*di_rxstopped_t) (hnddma_t *dmah);
 typedef bool(*di_rxenable_t) (hnddma_t *dmah);
 typedef bool(*di_rxenabled_t) (hnddma_t *dmah);
 typedef void *(*di_rx_t) (hnddma_t *dmah);
 typedef bool(*di_rxfill_t) (hnddma_t *dmah);
 typedef void (*di_txreclaim_t) (hnddma_t *dmah, txd_range_t range);
diff --git a/drivers/staging/brcm80211/sys/wl_mac80211.c b/drivers/staging/brcm80211/sys/wl_mac80211.c
index 6c162b9..76f611d 100644
--- a/drivers/staging/brcm80211/sys/wl_mac80211.c
+++ b/drivers/staging/brcm80211/sys/wl_mac80211.c
@@ -40,29 +40,22 @@
 #include <wlc_pub.h>
 #include <wlc_scb.h>
 #include <wl_dbg.h>
 #include <wl_export.h>
 
 #include <wl_mac80211.h>
 #include <linux/firmware.h>
 #include <wl_ucode.h>
 #include <d11ucode_ext.h>
 
 
-extern void wlc_wme_setparams(wlc_info_t *wlc, u16 aci, void *arg,
-			      bool suspend);
-bool wlc_sendpkt_mac80211(wlc_info_t *wlc, void *sdu, struct ieee80211_hw *hw);
-void wlc_mac_bcn_promisc_change(wlc_info_t *wlc, bool promisc);
-void wlc_set_addrmatch(wlc_info_t *wlc, int match_reg_offset,
-		       const struct ether_addr *addr);
-
 static void wl_timer(unsigned long data);
 static void _wl_timer(wl_timer_t *t);
 
 
 static int ieee_hw_init(struct ieee80211_hw *hw);
 static int ieee_hw_rate_init(struct ieee80211_hw *hw);
 
 static int wl_linux_watchdog(void *ctx);
 
 /* Flags we support */
 #define MAC_FILTERS (FIF_PROMISC_IN_BSS | \
diff --git a/drivers/staging/brcm80211/sys/wlc_ampdu.c b/drivers/staging/brcm80211/sys/wlc_ampdu.c
index 1fa56ce..f2acda7 100644
--- a/drivers/staging/brcm80211/sys/wlc_ampdu.c
+++ b/drivers/staging/brcm80211/sys/wlc_ampdu.c
@@ -138,27 +138,26 @@ static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(ampdu_info_t *ampdu,
 						   scb_ampdu_t *scb_ampdu,
 						   u8 tid, bool override);
 static void ampdu_cleanup_tid_ini(ampdu_info_t *ampdu, scb_ampdu_t *scb_ampdu,
 				  u8 tid, bool force);
 static void ampdu_update_max_txlen(ampdu_info_t *ampdu, u8 dur);
 static void scb_ampdu_update_config(ampdu_info_t *ampdu, struct scb *scb);
 static void scb_ampdu_update_config_all(ampdu_info_t *ampdu);
 
 #define wlc_ampdu_txflowcontrol(a, b, c)	do {} while (0)
 
 static void wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb,
-					  void *p, tx_status_t *txs,
-					  u32 frmtxstatus,
-					  u32 frmtxstatus2);
+					  struct sk_buff *p, tx_status_t *txs,
+					  u32 frmtxstatus, u32 frmtxstatus2);
 
-static inline u16 pkt_txh_seqnum(wlc_info_t *wlc, void *p)
+static inline u16 pkt_txh_seqnum(wlc_info_t *wlc, struct sk_buff *p)
 {
 	d11txh_t *txh;
 	struct dot11_header *h;
 	txh = (d11txh_t *) PKTDATA(p);
 	h = (struct dot11_header *)((u8 *) (txh + 1) + D11_PHY_HDR_LEN);
 	return ltoh16(h->seq) >> SEQNUM_SHIFT;
 }
 
 ampdu_info_t *wlc_ampdu_attach(wlc_info_t *wlc)
 {
 	ampdu_info_t *ampdu;
@@ -463,44 +462,46 @@ static void wlc_ffpld_calc_mcs2ampdu_table(ampdu_info_t *ampdu, int f)
 		phy_rate = MCS_RATE(i, true, false) >> 7;
 		if (phy_rate > dma_rate) {
 			tmp = ((fifo->ampdu_pld_size * phy_rate) /
 			       ((phy_rate - dma_rate) * FFPLD_MPDU_SIZE)) + 1;
 			tmp = min_t(u32, tmp, 255);
 			fifo->mcs2ampdu_table[i] = (u8) tmp;
 		}
 	}
 }
 
 static void BCMFASTPATH
-wlc_ampdu_agg(ampdu_info_t *ampdu, struct scb *scb, void *p, uint prec)
+wlc_ampdu_agg(ampdu_info_t *ampdu, struct scb *scb, struct sk_buff *p,
+	      uint prec)
 {
 	scb_ampdu_t *scb_ampdu;
 	scb_ampdu_tid_ini_t *ini;
 	u8 tid = (u8) PKTPRIO(p);
 
 	scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb);
 
 	/* initialize initiator on first packet; sends addba req */
 	ini = SCB_AMPDU_INI(scb_ampdu, tid);
 	if (ini->magic != INI_MAGIC) {
 		ini = wlc_ampdu_init_tid_ini(ampdu, scb_ampdu, tid, false);
 	}
 	return;
 }
 
 int BCMFASTPATH
-wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **pdu, int prec)
+wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, struct sk_buff **pdu,
+	      int prec)
 {
 	wlc_info_t *wlc;
 	struct osl_info *osh;
-	void *p, *pkt[AMPDU_MAX_MPDU];
+	struct sk_buff *p, *pkt[AMPDU_MAX_MPDU];
 	u8 tid, ndelim;
 	int err = 0;
 	u8 preamble_type = WLC_GF_PREAMBLE;
 	u8 fbr_preamble_type = WLC_GF_PREAMBLE;
 	u8 rts_preamble_type = WLC_LONG_PREAMBLE;
 	u8 rts_fbr_preamble_type = WLC_LONG_PREAMBLE;
 
 	bool rr = true, fbr = false;
 	uint i, count = 0, fifo, seg_cnt = 0;
 	u16 plen, len, seq = 0, mcl, mch, index, frameid, dma_len = 0;
 	u32 ampdu_len, maxlen = 0;
@@ -876,23 +877,23 @@ wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **pdu, int prec)
 		}
 		for (i = 0; i < count; i++)
 			wlc_txfifo(wlc, fifo, pkt[i], i == (count - 1),
 				   ampdu->txpkt_weight);
 
 	}
 	/* endif (count) */
 	return err;
 }
 
 void BCMFASTPATH
-wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, void *p,
+wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, struct sk_buff *p,
 		     tx_status_t *txs)
 {
 	scb_ampdu_t *scb_ampdu;
 	wlc_info_t *wlc = ampdu->wlc;
 	scb_ampdu_tid_ini_t *ini;
 	u32 s1 = 0, s2 = 0;
 	struct ieee80211_tx_info *tx_info;
 
 	tx_info = IEEE80211_SKB_CB(p);
 	ASSERT(tx_info->flags & IEEE80211_TX_CTL_AMPDU);
 	ASSERT(scb);
@@ -940,30 +941,28 @@ rate_status(wlc_info_t *wlc, struct ieee80211_tx_info *tx_info,
 {
 	struct ieee80211_tx_rate *txrate = tx_info->status.rates;
 	int i;
 
 	/* clear the rest of the rates */
 	for (i = 2; i < IEEE80211_TX_MAX_RATES; i++) {
 		txrate[i].idx = -1;
 		txrate[i].count = 0;
 	}
 }
 
-extern void wlc_txq_enq(wlc_info_t *wlc, struct scb *scb, void *sdu,
-			uint prec);
-
 #define SHORTNAME "AMPDU status"
 
 static void BCMFASTPATH
-wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb, void *p,
-			      tx_status_t *txs, u32 s1, u32 s2)
+wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb,
+			      struct sk_buff *p, tx_status_t *txs,
+			      u32 s1, u32 s2)
 {
 	scb_ampdu_t *scb_ampdu;
 	wlc_info_t *wlc = ampdu->wlc;
 	scb_ampdu_tid_ini_t *ini;
 	u8 bitmap[8], queue, tid;
 	d11txh_t *txh;
 	u8 *plcp;
 	struct dot11_header *h;
 	u16 seq, start_seq = 0, bindex, index, mcl;
 	u8 mcs = 0;
 	bool ba_recd = false, ack_recd = false;
diff --git a/drivers/staging/brcm80211/sys/wlc_ampdu.h b/drivers/staging/brcm80211/sys/wlc_ampdu.h
index 939cae0..c86411b 100644
--- a/drivers/staging/brcm80211/sys/wlc_ampdu.h
+++ b/drivers/staging/brcm80211/sys/wlc_ampdu.h
@@ -13,24 +13,24 @@
  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
 #ifndef _wlc_ampdu_h_
 #define _wlc_ampdu_h_
 
 extern ampdu_info_t *wlc_ampdu_attach(wlc_info_t *wlc);
 extern void wlc_ampdu_detach(ampdu_info_t *ampdu);
 extern bool wlc_ampdu_cap(ampdu_info_t *ampdu);
 extern int wlc_ampdu_set(ampdu_info_t *ampdu, bool on);
-extern int wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **aggp,
-			 int prec);
-extern void wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, void *p,
-				 tx_status_t *txs);
+extern int wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi,
+			 struct sk_buff **aggp, int prec);
+extern void wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb,
+				 struct sk_buff *p, tx_status_t *txs);
 extern void wlc_ampdu_reset(ampdu_info_t *ampdu);
 extern void wlc_ampdu_macaddr_upd(wlc_info_t *wlc);
 extern void wlc_ampdu_shm_upd(ampdu_info_t *ampdu);
 
 extern u8 wlc_ampdu_null_delim_cnt(ampdu_info_t *ampdu, struct scb *scb,
 				      ratespec_t rspec, int phylen);
 extern void scb_ampdu_cleanup(ampdu_info_t *ampdu, struct scb *scb);
 
 #endif				/* _wlc_ampdu_h_ */
diff --git a/drivers/staging/brcm80211/sys/wlc_bmac.c b/drivers/staging/brcm80211/sys/wlc_bmac.c
index 4b27086..2a2ad49 100644
--- a/drivers/staging/brcm80211/sys/wlc_bmac.c
+++ b/drivers/staging/brcm80211/sys/wlc_bmac.c
@@ -262,25 +262,25 @@ static u32 WLBANDINITFN(wlc_setband_inact) (wlc_info_t *wlc, uint bandunit)
 	return macintmask;
 }
 
 /* Process received frames */
 /*
  * Return true if more frames need to be processed. false otherwise.
  * Param 'bound' indicates max. # frames to process before break out.
  */
 static bool BCMFASTPATH
 wlc_bmac_recv(wlc_hw_info_t *wlc_hw, uint fifo, bool bound)
 {
-	void *p;
-	void *head = NULL;
-	void *tail = NULL;
+	struct sk_buff *p;
+	struct sk_buff *head = NULL;
+	struct sk_buff *tail = NULL;
 	uint n = 0;
 	uint bound_limit = bound ? wlc_hw->wlc->pub->tunables->rxbnd : -1;
 	u32 tsf_h, tsf_l;
 	wlc_d11rxhdr_t *wlc_rxhdr = NULL;
 
 	WL_TRACE(("wl%d: %s\n", wlc_hw->unit, __func__));
 	/* gather received frames */
 	while ((p = dma_rx(wlc_hw->di[fifo]))) {
 
 		if (!tail)
 			head = tail = p;
@@ -3308,23 +3308,23 @@ bool BCMFASTPATH wlc_isr(wlc_info_t *wlc, bool *wantdpc)
 	/* save interrupt status bits */
 	ASSERT(wlc->macintstatus == 0);
 	wlc->macintstatus = macintstatus;
 
 	return true;
 
 }
 
 /* process tx completion events for corerev < 5 */
 static bool wlc_bmac_txstatus_corerev4(wlc_hw_info_t *wlc_hw)
 {
-	void *status_p;
+	struct sk_buff *status_p;
 	tx_status_t *txs;
 	struct osl_info *osh;
 	bool fatal = false;
 
 	WL_TRACE(("wl%d: wlc_txstatusrecv\n", wlc_hw->unit));
 
 	osh = wlc_hw->osh;
 
 	while (!fatal && (status_p = dma_rx(wlc_hw->di[RX_TXSTATUS_FIFO]))) {
 
 		txs = (tx_status_t *) PKTDATA(status_p);
diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.c b/drivers/staging/brcm80211/sys/wlc_mac80211.c
index 37a87d8..d99fcb5 100644
--- a/drivers/staging/brcm80211/sys/wlc_mac80211.c
+++ b/drivers/staging/brcm80211/sys/wlc_mac80211.c
@@ -213,32 +213,31 @@ static const u8 acbitmap2maxprio[] = {
 	PRIO_8021D_VO, PRIO_8021D_VO, PRIO_8021D_VO, PRIO_8021D_VO,
 	PRIO_8021D_VO, PRIO_8021D_VO, PRIO_8021D_VO, PRIO_8021D_VO
 };
 
 /* currently the best mechanism for determining SIFS is the band in use */
 #define SIFS(band) ((band)->bandtype == WLC_BAND_5G ? APHY_SIFS_TIME : BPHY_SIFS_TIME);
 
 /* value for # replay counters currently supported */
 #define WLC_REPLAY_CNTRS_VALUE	WPA_CAP_16_REPLAY_CNTRS
 
 /* local prototypes */
-extern void wlc_txq_enq(void *ctx, struct scb *scb, void *sdu, uint prec);
 static u16 BCMFASTPATH wlc_d11hdrs_mac80211(wlc_info_t *wlc,
-					       struct ieee80211_hw *hw, void *p,
+					       struct ieee80211_hw *hw,
+					       struct sk_buff *p,
 					       struct scb *scb, uint frag,
 					       uint nfrags, uint queue,
 					       uint next_frag_len,
 					       wsec_key_t *key,
 					       ratespec_t rspec_override);
-bool wlc_sendpkt_mac80211(wlc_info_t *wlc, void *sdu, struct ieee80211_hw *hw);
-void wlc_wme_setparams(wlc_info_t *wlc, u16 aci, void *arg, bool suspend);
+
 static void wlc_bss_default_init(wlc_info_t *wlc);
 static void wlc_ucode_mac_upd(wlc_info_t *wlc);
 static ratespec_t mac80211_wlc_set_nrate(wlc_info_t *wlc, wlcband_t *cur_band,
 					 u32 int_val);
 static void wlc_tx_prec_map_init(wlc_info_t *wlc);
 static void wlc_watchdog(void *arg);
 static void wlc_watchdog_by_timer(void *arg);
 static int wlc_set_rateset(wlc_info_t *wlc, wlc_rateset_t *rs_arg);
 static int wlc_iovar_rangecheck(wlc_info_t *wlc, u32 val,
 				const bcm_iovar_t *vi);
 static u8 wlc_local_constraint_qdbm(wlc_info_t *wlc);
@@ -250,23 +249,23 @@ static void wlc_txq_free(wlc_info_t *wlc, struct osl_info *osh,
 static void wlc_txflowcontrol_signal(wlc_info_t *wlc, wlc_txq_info_t *qi,
 				     bool on, int prio);
 static void wlc_txflowcontrol_reset(wlc_info_t *wlc);
 static u16 wlc_compute_airtime(wlc_info_t *wlc, ratespec_t rspec,
 				  uint length);
 static void wlc_compute_cck_plcp(ratespec_t rate, uint length, u8 *plcp);
 static void wlc_compute_ofdm_plcp(ratespec_t rate, uint length, u8 *plcp);
 static void wlc_compute_mimo_plcp(ratespec_t rate, uint length, u8 *plcp);
 static u16 wlc_compute_frame_dur(wlc_info_t *wlc, ratespec_t rate,
 				    u8 preamble_type, uint next_frag_len);
 static void wlc_recvctl(wlc_info_t *wlc, struct osl_info *osh, d11rxhdr_t *rxh,
-			void *p);
+			struct sk_buff *p);
 static uint wlc_calc_frame_len(wlc_info_t *wlc, ratespec_t rate,
 			       u8 preamble_type, uint dur);
 static uint wlc_calc_ack_time(wlc_info_t *wlc, ratespec_t rate,
 			      u8 preamble_type);
 static uint wlc_calc_cts_time(wlc_info_t *wlc, ratespec_t rate,
 			      u8 preamble_type);
 /* interrupt, up/down, band */
 static void wlc_setband(wlc_info_t *wlc, uint bandunit);
 static chanspec_t wlc_init_chanspec(wlc_info_t *wlc);
 static void wlc_bandinit_ordered(wlc_info_t *wlc, chanspec_t chanspec);
 static void wlc_bsinit(wlc_info_t *wlc);
@@ -4992,26 +4991,26 @@ u16 wlc_rate_shm_offset(wlc_info_t *wlc, u8 rate)
  * from the packet priority.
  *
  * Returns true if packet consumed (queued), false if not.
  */
 bool BCMFASTPATH
 wlc_prec_enq(wlc_info_t *wlc, struct pktq *q, void *pkt, int prec)
 {
 	return wlc_prec_enq_head(wlc, q, pkt, prec, false);
 }
 
 bool BCMFASTPATH
-wlc_prec_enq_head(wlc_info_t *wlc, struct pktq *q, void *pkt, int prec,
-		  bool head)
+wlc_prec_enq_head(wlc_info_t *wlc, struct pktq *q, struct sk_buff *pkt,
+		  int prec, bool head)
 {
-	void *p;
+	struct sk_buff *p;
 	int eprec = -1;		/* precedence to evict from */
 
 	/* Determine precedence from which to evict packet, if any */
 	if (pktq_pfull(q, prec))
 		eprec = prec;
 	else if (pktq_full(q)) {
 		p = pktq_peek_tail(q, &eprec);
 		ASSERT(p != NULL);
 		if (eprec > prec) {
 			WL_ERROR(("%s: Failing: eprec %d > prec %d\n", __func__,
 				  eprec, prec));
@@ -5056,23 +5055,24 @@ wlc_prec_enq_head(wlc_info_t *wlc, struct pktq *q, void *pkt, int prec,
 
 	/* Enqueue */
 	if (head)
 		p = pktq_penq_head(q, prec, pkt);
 	else
 		p = pktq_penq(q, prec, pkt);
 	ASSERT(p != NULL);
 
 	return true;
 }
 
-void BCMFASTPATH wlc_txq_enq(void *ctx, struct scb *scb, void *sdu, uint prec)
+void BCMFASTPATH wlc_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu,
+			     uint prec)
 {
 	wlc_info_t *wlc = (wlc_info_t *) ctx;
 	wlc_txq_info_t *qi = wlc->active_queue;	/* Check me */
 	struct pktq *q = &qi->q;
 	int prio;
 
 	prio = PKTPRIO(sdu);
 
 	ASSERT(pktq_max(q) >= wlc->pub->tunables->datahiwat);
 
 	if (!wlc_prec_enq(wlc, q, sdu, prec)) {
@@ -5096,23 +5096,24 @@ void BCMFASTPATH wlc_txq_enq(void *ctx, struct scb *scb, void *sdu, uint prec)
 			wlc_txflowcontrol(wlc, qi, ON, ALLPRIO);
 		}
 	} else if (wlc->pub->_priofc) {
 		if (pktq_plen(q, wlc_prio2prec_map[prio]) >=
 		    wlc->pub->tunables->datahiwat) {
 			wlc_txflowcontrol(wlc, qi, ON, prio);
 		}
 	}
 }
 
 bool BCMFASTPATH
-wlc_sendpkt_mac80211(wlc_info_t *wlc, void *sdu, struct ieee80211_hw *hw)
+wlc_sendpkt_mac80211(wlc_info_t *wlc, struct sk_buff *sdu,
+		     struct ieee80211_hw *hw)
 {
 	u8 prio;
 	uint fifo;
 	void *pkt;
 	struct scb *scb = &global_scb;
 	struct dot11_header *d11_header = (struct dot11_header *)PKTDATA(sdu);
 	u16 type, fc;
 
 	ASSERT(sdu);
 
 	fc = ltoh16(d11_header->fc);
@@ -5133,23 +5134,23 @@ wlc_sendpkt_mac80211(wlc_info_t *wlc, void *sdu, struct ieee80211_hw *hw)
 	    (wlc_d11hdrs_mac80211(wlc, hw, pkt, scb, 0, 1, fifo, 0, NULL, 0)))
 		return -EINVAL;
 	wlc_txq_enq(wlc, scb, pkt, WLC_PRIO_TO_PREC(prio));
 	wlc_send_q(wlc, wlc->active_queue);
 
 	WLCNTINCR(wlc->pub->_cnt->ieee_tx);
 	return 0;
 }
 
 void BCMFASTPATH wlc_send_q(wlc_info_t *wlc, wlc_txq_info_t *qi)
 {
-	void *pkt[DOT11_MAXNUMFRAGS];
+	struct sk_buff *pkt[DOT11_MAXNUMFRAGS];
 	int prec;
 	u16 prec_map;
 	int err = 0, i, count;
 	uint fifo;
 	struct pktq *q = &qi->q;
 	struct ieee80211_tx_info *tx_info;
 
 	/* only do work for the active queue */
 	if (qi != wlc->active_queue)
 		return;
 
@@ -5220,23 +5221,24 @@ bcmc_fid_generate(wlc_info_t *wlc, wlc_bsscfg_t *bsscfg, d11txh_t *txh)
 
 	frameid = ltoh16(txh->TxFrameID) & ~(TXFID_SEQ_MASK | TXFID_QUEUE_MASK);
 	frameid |=
 	    (((wlc->
 	       mc_fid_counter++) << TXFID_SEQ_SHIFT) & TXFID_SEQ_MASK) |
 	    TX_BCMC_FIFO;
 
 	return frameid;
 }
 
 void BCMFASTPATH
-wlc_txfifo(wlc_info_t *wlc, uint fifo, void *p, bool commit, s8 txpktpend)
+wlc_txfifo(wlc_info_t *wlc, uint fifo, struct sk_buff *p, bool commit,
+	   s8 txpktpend)
 {
 	u16 frameid = INVALIDFID;
 	d11txh_t *txh;
 
 	ASSERT(fifo < NFIFO);
 	txh = (d11txh_t *) PKTDATA(p);
 
 	/* When a BC/MC frame is being committed to the BCMC fifo via DMA (NOT PIO), update
 	 * ucode or BSS info as appropriate.
 	 */
 	if (fifo == TX_BCMC_FIFO) {
@@ -5633,23 +5635,23 @@ wlc_rspec_to_rts_rspec(wlc_info_t *wlc, ratespec_t rspec, bool use_rspec,
 /*
  * Add d11txh_t, cck_phy_hdr_t.
  *
  * 'p' data must start with 802.11 MAC header
  * 'p' must allow enough bytes of local headers to be "pushed" onto the packet
  *
  * headroom == D11_PHY_HDR_LEN + D11_TXH_LEN (D11_TXH_LEN is now 104 bytes)
  *
  */
 static u16 BCMFASTPATH
 wlc_d11hdrs_mac80211(wlc_info_t *wlc, struct ieee80211_hw *hw,
-		     void *p, struct scb *scb, uint frag,
+		     struct sk_buff *p, struct scb *scb, uint frag,
 		     uint nfrags, uint queue, uint next_frag_len,
 		     wsec_key_t *key, ratespec_t rspec_override)
 {
 	struct dot11_header *h;
 	d11txh_t *txh;
 	u8 *plcp, plcp_fallback[D11_PHY_HDR_LEN];
 	struct osl_info *osh;
 	int len, phylen, rts_phylen;
 	u16 fc, type, frameid, mch, phyctl, xfts, mainrates;
 	u16 seq = 0, mcl = 0, status = 0;
 	ratespec_t rspec[2] = { WLC_RATE_1M, WLC_RATE_1M }, rts_rspec[2] = {
@@ -6499,23 +6501,23 @@ static void wlc_war16165(wlc_info_t *wlc, bool tx)
 		wlc->txpend16165war--;
 		if (wlc->txpend16165war == 0)
 			wlc_set_ps_ctrl(wlc);
 	}
 }
 
 /* process an individual tx_status_t */
 /* WLC_HIGH_API */
 bool BCMFASTPATH
 wlc_dotxstatus(wlc_info_t *wlc, tx_status_t *txs, u32 frm_tx2)
 {
-	void *p;
+	struct sk_buff *p;
 	uint queue;
 	d11txh_t *txh;
 	struct scb *scb = NULL;
 	bool free_pdu;
 	struct osl_info *osh;
 	int tx_rts, tx_frame_count, tx_rts_count;
 	uint totlen, supr_status;
 	bool lastframe;
 	struct dot11_header *h;
 	u16 fc;
 	u16 mcl;
@@ -6782,23 +6784,23 @@ void wlc_bcn_li_upd(wlc_info_t *wlc)
 		return;
 
 	/* wake up every DTIM is the default */
 	if (wlc->bcn_li_dtim == 1)
 		wlc_write_shm(wlc, M_BCN_LI, 0);
 	else
 		wlc_write_shm(wlc, M_BCN_LI,
 			      (wlc->bcn_li_dtim << 8) | wlc->bcn_li_bcn);
 }
 
 static void
-prep_mac80211_status(wlc_info_t *wlc, d11rxhdr_t *rxh, void *p,
+prep_mac80211_status(wlc_info_t *wlc, d11rxhdr_t *rxh, struct sk_buff *p,
 		     struct ieee80211_rx_status *rx_status)
 {
 	u32 tsf_l, tsf_h;
 	wlc_d11rxhdr_t *wlc_rxh = (wlc_d11rxhdr_t *) rxh;
 	int preamble;
 	int channel;
 	ratespec_t rspec;
 	unsigned char *plcp;
 
 	wlc_read_tsf(wlc, &tsf_l, &tsf_h);	/* mactime */
 	rx_status->mactime = tsf_h;
@@ -6892,23 +6894,24 @@ prep_mac80211_status(wlc_info_t *wlc, d11rxhdr_t *rxh, void *p,
 	if (rxh->RxStatus1 & RXS_DECERR) {
 		rx_status->flag |= RX_FLAG_FAILED_PLCP_CRC;
 		WL_ERROR(("%s:  RX_FLAG_FAILED_PLCP_CRC\n", __func__));
 	}
 	if (rxh->RxStatus1 & RXS_FCSERR) {
 		rx_status->flag |= RX_FLAG_FAILED_FCS_CRC;
 		WL_ERROR(("%s:  RX_FLAG_FAILED_FCS_CRC\n", __func__));
 	}
 }
 
 static void
-wlc_recvctl(wlc_info_t *wlc, struct osl_info *osh, d11rxhdr_t *rxh, void *p)
+wlc_recvctl(wlc_info_t *wlc, struct osl_info *osh, d11rxhdr_t *rxh,
+	    struct sk_buff *p)
 {
 	int len_mpdu;
 	struct ieee80211_rx_status rx_status;
 #if defined(BCMDBG)
 	struct sk_buff *skb = p;
 #endif				/* BCMDBG */
 	/* Todo:
 	 * Cache plcp for first MPDU of AMPD and use chacched version for INTERMEDIATE.
 	 * Test for INTERMEDIATE  like so:
 	 * if (!(plcp[0] | plcp[1] | plcp[2]))
 	 */
@@ -6955,23 +6958,23 @@ void wlc_bss_list_free(wlc_info_t *wlc, wlc_bss_list_t *bss_list)
 		}
 	}
 	bss_list->count = 0;
 }
 
 /* Process received frames */
 /*
  * Return true if more frames need to be processed. false otherwise.
  * Param 'bound' indicates max. # frames to process before break out.
  */
 /* WLC_HIGH_API */
-void BCMFASTPATH wlc_recv(wlc_info_t *wlc, void *p)
+void BCMFASTPATH wlc_recv(wlc_info_t *wlc, struct sk_buff *p)
 {
 	d11rxhdr_t *rxh;
 	struct dot11_header *h;
 	struct osl_info *osh;
 	u16 fc;
 	uint len;
 	bool is_amsdu;
 
 	WL_TRACE(("wl%d: wlc_recv\n", wlc->pub->unit));
 
 	osh = wlc->osh;
@@ -7781,23 +7784,23 @@ wlc_bss_update_probe_resp(wlc_info_t *wlc, wlc_bsscfg_t *cfg, bool suspend)
 		len += (-D11_PHY_HDR_LEN + DOT11_FCS_LEN);
 		wlc_mod_prb_rsp_rate_table(wlc, (u16) len);
 
 		if (suspend)
 			wlc_enable_mac(wlc);
 	} else {		/* Generating probe resp in sw; update local template */
 		ASSERT(0 && "No software probe response support without MBSS");
 	}
 }
 
 /* prepares pdu for transmission. returns BCM error codes */
-int wlc_prep_pdu(wlc_info_t *wlc, void *pdu, uint *fifop)
+int wlc_prep_pdu(wlc_info_t *wlc, struct sk_buff *pdu, uint *fifop)
 {
 	struct osl_info *osh;
 	uint fifo;
 	d11txh_t *txh;
 	struct dot11_header *h;
 	struct scb *scb;
 	u16 fc;
 
 	osh = wlc->osh;
 
 	ASSERT(pdu);
diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.h b/drivers/staging/brcm80211/sys/wlc_mac80211.h
index 0068800..72a9236 100644
--- a/drivers/staging/brcm80211/sys/wlc_mac80211.h
+++ b/drivers/staging/brcm80211/sys/wlc_mac80211.h
@@ -810,27 +810,29 @@ struct antsel_info {
 #define TXPKTPENDCLR(wlc, fifo)		((wlc)->core->txpktpend[(fifo)] = 0)
 #define TXAVAIL(wlc, fifo)		(*(wlc)->core->txavail[(fifo)])
 #define GETNEXTTXP(wlc, _queue)								\
 		dma_getnexttxp((wlc)->hw->di[(_queue)], HNDDMA_RANGE_TRANSMITTED)
 
 #define WLC_IS_MATCH_SSID(wlc, ssid1, ssid2, len1, len2) \
 	((len1 == len2) && !bcmp(ssid1, ssid2, len1))
 
 extern void wlc_high_dpc(wlc_info_t *wlc, u32 macintstatus);
 extern void wlc_fatal_error(wlc_info_t *wlc);
 extern void wlc_bmac_rpc_watchdog(wlc_info_t *wlc);
-extern void wlc_recv(wlc_info_t *wlc, void *p);
+extern void wlc_recv(wlc_info_t *wlc, struct sk_buff *p);
 extern bool wlc_dotxstatus(wlc_info_t *wlc, tx_status_t *txs, u32 frm_tx2);
-extern void wlc_txfifo(wlc_info_t *wlc, uint fifo, void *p, bool commit,
-		       s8 txpktpend);
+extern void wlc_txfifo(wlc_info_t *wlc, uint fifo, struct sk_buff *p,
+		       bool commit, s8 txpktpend);
 extern void wlc_txfifo_complete(wlc_info_t *wlc, uint fifo, s8 txpktpend);
+extern void wlc_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu,
+			uint prec);
 extern void wlc_info_init(wlc_info_t *wlc, int unit);
 extern void wlc_print_txstatus(tx_status_t *txs);
 extern int wlc_xmtfifo_sz_get(wlc_info_t *wlc, uint fifo, uint *blocks);
 extern void wlc_write_template_ram(wlc_info_t *wlc, int offset, int len,
 				   void *buf);
 extern void wlc_write_hw_bcntemplates(wlc_info_t *wlc, void *bcn, int len,
 				      bool both);
 #if defined(BCMDBG)
 extern void wlc_get_rcmta(wlc_info_t *wlc, int idx, struct ether_addr *addr);
 #endif
 extern void wlc_set_rcmta(wlc_info_t *wlc, int idx,
@@ -871,23 +873,23 @@ extern int wlc_set_gmode(wlc_info_t *wlc, u8 gmode, bool config);
 
 extern void wlc_mac_bcn_promisc_change(wlc_info_t *wlc, bool promisc);
 extern void wlc_mac_bcn_promisc(wlc_info_t *wlc);
 extern void wlc_mac_promisc(wlc_info_t *wlc);
 extern void wlc_txflowcontrol(wlc_info_t *wlc, wlc_txq_info_t *qi, bool on,
 			      int prio);
 extern void wlc_txflowcontrol_override(wlc_info_t *wlc, wlc_txq_info_t *qi,
 				       bool on, uint override);
 extern bool wlc_txflowcontrol_prio_isset(wlc_info_t *wlc, wlc_txq_info_t *qi,
 					 int prio);
 extern void wlc_send_q(wlc_info_t *wlc, wlc_txq_info_t *qi);
-extern int wlc_prep_pdu(wlc_info_t *wlc, void *pdu, uint *fifo);
+extern int wlc_prep_pdu(wlc_info_t *wlc, struct sk_buff *pdu, uint *fifo);
 
 extern u16 wlc_calc_lsig_len(wlc_info_t *wlc, ratespec_t ratespec,
 				uint mac_len);
 extern ratespec_t wlc_rspec_to_rts_rspec(wlc_info_t *wlc, ratespec_t rspec,
 					 bool use_rspec, u16 mimo_ctlchbw);
 extern u16 wlc_compute_rtscts_dur(wlc_info_t *wlc, bool cts_only,
 				     ratespec_t rts_rate, ratespec_t frame_rate,
 				     u8 rts_preamble_type,
 				     u8 frame_preamble_type, uint frame_len,
 				     bool ba);
 
@@ -915,24 +917,24 @@ extern void wlc_copyfrom_shm(wlc_info_t *wlc, uint offset, void *buf, int len);
 extern void wlc_update_beacon(wlc_info_t *wlc);
 extern void wlc_bss_update_beacon(wlc_info_t *wlc, struct wlc_bsscfg *bsscfg);
 
 extern void wlc_update_probe_resp(wlc_info_t *wlc, bool suspend);
 extern void wlc_bss_update_probe_resp(wlc_info_t *wlc, wlc_bsscfg_t *cfg,
 				      bool suspend);
 
 extern bool wlc_ismpc(wlc_info_t *wlc);
 extern bool wlc_is_non_delay_mpc(wlc_info_t *wlc);
 extern void wlc_radio_mpc_upd(wlc_info_t *wlc);
 extern bool wlc_prec_enq(wlc_info_t *wlc, struct pktq *q, void *pkt, int prec);
-extern bool wlc_prec_enq_head(wlc_info_t *wlc, struct pktq *q, void *pkt,
-			      int prec, bool head);
+extern bool wlc_prec_enq_head(wlc_info_t *wlc, struct pktq *q,
+			      struct sk_buff *pkt, int prec, bool head);
 extern u16 wlc_phytxctl1_calc(wlc_info_t *wlc, ratespec_t rspec);
 extern void wlc_compute_plcp(wlc_info_t *wlc, ratespec_t rate, uint length,
 			     u8 *plcp);
 extern uint wlc_calc_frame_time(wlc_info_t *wlc, ratespec_t ratespec,
 				u8 preamble_type, uint mac_len);
 
 extern void wlc_set_chanspec(wlc_info_t *wlc, chanspec_t chanspec);
 
 extern bool wlc_timers_init(wlc_info_t *wlc, int unit);
 
 extern const bcm_iovar_t wlc_iovars[];
@@ -945,24 +947,22 @@ extern int wlc_doiovar(void *hdl, const bcm_iovar_t *vi, u32 actionid,
 extern void wlc_print_ies(wlc_info_t *wlc, u8 *ies, uint ies_len);
 #endif
 
 extern int wlc_set_nmode(wlc_info_t *wlc, s32 nmode);
 extern void wlc_ht_mimops_cap_update(wlc_info_t *wlc, u8 mimops_mode);
 extern void wlc_mimops_action_ht_send(wlc_info_t *wlc, wlc_bsscfg_t *bsscfg,
 				      u8 mimops_mode);
 
 extern void wlc_switch_shortslot(wlc_info_t *wlc, bool shortslot);
 extern void wlc_set_bssid(wlc_bsscfg_t *cfg);
 extern void wlc_edcf_setparams(wlc_bsscfg_t *cfg, bool suspend);
-extern void wlc_wme_setparams(wlc_info_t *wlc, u16 aci, void *arg,
-			      bool suspend);
 
 extern void wlc_set_ratetable(wlc_info_t *wlc);
 extern int wlc_set_mac(wlc_bsscfg_t *cfg);
 extern void wlc_beacon_phytxctl_txant_upd(wlc_info_t *wlc,
 					  ratespec_t bcn_rate);
 extern void wlc_mod_prb_rsp_rate_table(wlc_info_t *wlc, uint frame_len);
 extern ratespec_t wlc_lowest_basic_rspec(wlc_info_t *wlc, wlc_rateset_t *rs);
 extern u16 wlc_compute_bcntsfoff(wlc_info_t *wlc, ratespec_t rspec,
 				    bool short_preamble, bool phydelay);
 extern void wlc_radio_disable(wlc_info_t *wlc);
 extern void wlc_bcn_li_upd(wlc_info_t *wlc);
diff --git a/drivers/staging/brcm80211/sys/wlc_pub.h b/drivers/staging/brcm80211/sys/wlc_pub.h
index 4b1ab1d..b3ad4c0 100644
--- a/drivers/staging/brcm80211/sys/wlc_pub.h
+++ b/drivers/staging/brcm80211/sys/wlc_pub.h
@@ -504,30 +504,37 @@ extern bool wlc_chipmatch(u16 vendor, u16 device);
 extern void wlc_init(struct wlc_info *wlc);
 extern void wlc_reset(struct wlc_info *wlc);
 
 extern void wlc_intrson(struct wlc_info *wlc);
 extern u32 wlc_intrsoff(struct wlc_info *wlc);
 extern void wlc_intrsrestore(struct wlc_info *wlc, u32 macintmask);
 extern bool wlc_intrsupd(struct wlc_info *wlc);
 extern bool wlc_isr(struct wlc_info *wlc, bool *wantdpc);
 extern bool wlc_dpc(struct wlc_info *wlc, bool bounded);
 extern bool wlc_send80211_raw(struct wlc_info *wlc, wlc_if_t *wlcif, void *p,
 			      uint ac);
+extern bool wlc_sendpkt_mac80211(wlc_info_t *wlc, struct sk_buff *sdu,
+				 struct ieee80211_hw *hw);
 extern int wlc_iovar_op(struct wlc_info *wlc, const char *name, void *params,
 			int p_len, void *arg, int len, bool set,
 			struct wlc_if *wlcif);
 extern int wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,
 		     struct wlc_if *wlcif);
 /* helper functions */
 extern void wlc_statsupd(struct wlc_info *wlc);
 extern int wlc_get_header_len(void);
+extern void wlc_mac_bcn_promisc_change(wlc_info_t *wlc, bool promisc);
+extern void wlc_set_addrmatch(wlc_info_t *wlc, int match_reg_offset,
+			      const struct ether_addr *addr);
+extern void wlc_wme_setparams(wlc_info_t *wlc, u16 aci, void *arg,
+			      bool suspend);
 
 extern wlc_pub_t *wlc_pub(void *wlc);
 
 /* common functions for every port */
 extern int wlc_bmac_up_prep(struct wlc_hw_info *wlc_hw);
 extern int wlc_bmac_up_finish(struct wlc_hw_info *wlc_hw);
 extern int wlc_bmac_down_prep(struct wlc_hw_info *wlc_hw);
 extern int wlc_bmac_down_finish(struct wlc_hw_info *wlc_hw);
 
 extern u32 wlc_reg_read(struct wlc_info *wlc, void *r, uint size);
 extern void wlc_reg_write(struct wlc_info *wlc, void *r, u32 v, uint size);
diff --git a/drivers/staging/brcm80211/util/bcmutils.c b/drivers/staging/brcm80211/util/bcmutils.c
index 83f96cd..701ea01 100644
--- a/drivers/staging/brcm80211/util/bcmutils.c
+++ b/drivers/staging/brcm80211/util/bcmutils.c
@@ -25,23 +25,23 @@
 #include <osl.h>
 #include <bcmutils.h>
 #include <siutils.h>
 #include <bcmnvram.h>
 #include <bcmendian.h>
 #include <bcmdevs.h>
 #include <proto/ethernet.h>
 #include <proto/802.1d.h>
 #include <proto/802.11.h>
 
 /* copy a buffer into a pkt buffer chain */
-uint pktfrombuf(struct osl_info *osh, void *p, uint offset, int len,
+uint pktfrombuf(struct osl_info *osh, struct sk_buff *p, uint offset, int len,
 		unsigned char *buf)
 {
 	uint n, ret = 0;
 
 	/* skip 'offset' bytes */
 	for (; p && offset; p = PKTNEXT(p)) {
 		if (offset < (uint) PKTLEN(p))
 			break;
 		offset -= PKTLEN(p);
 	}
 
@@ -53,37 +53,38 @@ uint pktfrombuf(struct osl_info *osh, void *p, uint offset, int len,
 		n = min((uint) PKTLEN(p) - offset, (uint) len);
 		bcopy(buf, PKTDATA(p) + offset, n);
 		buf += n;
 		len -= n;
 		ret += n;
 		offset = 0;
 	}
 
 	return ret;
 }
 /* return total length of buffer chain */
-uint BCMFASTPATH pkttotlen(struct osl_info *osh, void *p)
+uint BCMFASTPATH pkttotlen(struct osl_info *osh, struct sk_buff *p)
 {
 	uint total;
 
 	total = 0;
 	for (; p; p = PKTNEXT(p))
 		total += PKTLEN(p);
 	return total;
 }
 
 /*
  * osl multiple-precedence packet queue
  * hi_prec is always >= the number of the highest non-empty precedence
  */
-void *BCMFASTPATH pktq_penq(struct pktq *pq, int prec, void *p)
+struct sk_buff *BCMFASTPATH pktq_penq(struct pktq *pq, int prec,
+				      struct sk_buff *p)
 {
 	struct pktq_prec *q;
 
 	ASSERT(prec >= 0 && prec < pq->num_prec);
 	ASSERT(PKTLINK(p) == NULL);	/* queueing chains not allowed */
 
 	ASSERT(!pktq_full(pq));
 	ASSERT(!pktq_pfull(pq, prec));
 
 	q = &pq->q[prec];
 
@@ -95,23 +96,24 @@ void *BCMFASTPATH pktq_penq(struct pktq *pq, int prec, void *p)
 	q->tail = p;
 	q->len++;
 
 	pq->len++;
 
 	if (pq->hi_prec < prec)
 		pq->hi_prec = (u8) prec;
 
 	return p;
 }
 
-void *BCMFASTPATH pktq_penq_head(struct pktq *pq, int prec, void *p)
+struct sk_buff *BCMFASTPATH pktq_penq_head(struct pktq *pq, int prec,
+					   struct sk_buff *p)
 {
 	struct pktq_prec *q;
 
 	ASSERT(prec >= 0 && prec < pq->num_prec);
 	ASSERT(PKTLINK(p) == NULL);	/* queueing chains not allowed */
 
 	ASSERT(!pktq_full(pq));
 	ASSERT(!pktq_pfull(pq, prec));
 
 	q = &pq->q[prec];
 
@@ -122,52 +124,52 @@ void *BCMFASTPATH pktq_penq_head(struct pktq *pq, int prec, void *p)
 	q->head = p;
 	q->len++;
 
 	pq->len++;
 
 	if (pq->hi_prec < prec)
 		pq->hi_prec = (u8) prec;
 
 	return p;
 }
 
-void *BCMFASTPATH pktq_pdeq(struct pktq *pq, int prec)
+struct sk_buff *BCMFASTPATH pktq_pdeq(struct pktq *pq, int prec)
 {
 	struct pktq_prec *q;
-	void *p;
+	struct sk_buff *p;
 
 	ASSERT(prec >= 0 && prec < pq->num_prec);
 
 	q = &pq->q[prec];
 
 	p = q->head;
 	if (p == NULL)
 		return NULL;
 
 	q->head = PKTLINK(p);
 	if (q->head == NULL)
 		q->tail = NULL;
 
 	q->len--;
 
 	pq->len--;
 
 	PKTSETLINK(p, NULL);
 
 	return p;
 }
 
-void *BCMFASTPATH pktq_pdeq_tail(struct pktq *pq, int prec)
+struct sk_buff *BCMFASTPATH pktq_pdeq_tail(struct pktq *pq, int prec)
 {
 	struct pktq_prec *q;
-	void *p, *prev;
+	struct sk_buff *p, *prev;
 
 	ASSERT(prec >= 0 && prec < pq->num_prec);
 
 	q = &pq->q[prec];
 
 	p = q->head;
 	if (p == NULL)
 		return NULL;
 
 	for (prev = NULL; p != q->tail; p = PKTLINK(p))
 		prev = p;
@@ -181,23 +183,23 @@ void *BCMFASTPATH pktq_pdeq_tail(struct pktq *pq, int prec)
 	q->len--;
 
 	pq->len--;
 
 	return p;
 }
 
 #ifdef BRCM_FULLMAC
 void pktq_pflush(struct osl_info *osh, struct pktq *pq, int prec, bool dir)
 {
 	struct pktq_prec *q;
-	void *p;
+	struct sk_buff *p;
 
 	q = &pq->q[prec];
 	p = q->head;
 	while (p) {
 		q->head = PKTLINK(p);
 		PKTSETLINK(p, NULL);
 		PKTFREE(osh, p, dir);
 		q->len--;
 		pq->len--;
 		p = q->head;
 	}
@@ -210,23 +212,23 @@ void pktq_flush(struct osl_info *osh, struct pktq *pq, bool dir)
 	int prec;
 	for (prec = 0; prec < pq->num_prec; prec++)
 		pktq_pflush(osh, pq, prec, dir);
 	ASSERT(pq->len == 0);
 }
 #else /* !BRCM_FULLMAC */
 void
 pktq_pflush(struct osl_info *osh, struct pktq *pq, int prec, bool dir,
 	    ifpkt_cb_t fn, int arg)
 {
 	struct pktq_prec *q;
-	void *p, *prev = NULL;
+	struct sk_buff *p, *prev = NULL;
 
 	q = &pq->q[prec];
 	p = q->head;
 	while (p) {
 		if (fn == NULL || (*fn) (p, arg)) {
 			bool head = (p == q->head);
 			if (head)
 				q->head = PKTLINK(p);
 			else
 				PKTSETLINK(prev, PKTLINK(p));
 			PKTSETLINK(p, NULL);
@@ -267,23 +269,23 @@ void pktq_init(struct pktq *pq, int num_prec, int max_len)
 	bzero(pq,
 	      offsetof(struct pktq, q) + (sizeof(struct pktq_prec) * num_prec));
 
 	pq->num_prec = (u16) num_prec;
 
 	pq->max = (u16) max_len;
 
 	for (prec = 0; prec < num_prec; prec++)
 		pq->q[prec].max = pq->max;
 }
 
-void *pktq_peek_tail(struct pktq *pq, int *prec_out)
+struct sk_buff *pktq_peek_tail(struct pktq *pq, int *prec_out)
 {
 	int prec;
 
 	if (pq->len == 0)
 		return NULL;
 
 	for (prec = 0; prec < pq->hi_prec; prec++)
 		if (pq->q[prec].head)
 			break;
 
 	if (prec_out)
@@ -298,26 +300,27 @@ int pktq_mlen(struct pktq *pq, uint prec_bmp)
 	int prec, len;
 
 	len = 0;
 
 	for (prec = 0; prec <= pq->hi_prec; prec++)
 		if (prec_bmp & (1 << prec))
 			len += pq->q[prec].len;
 
 	return len;
 }
 /* Priority dequeue from a specific set of precedences */
-void *BCMFASTPATH pktq_mdeq(struct pktq *pq, uint prec_bmp, int *prec_out)
+struct sk_buff *BCMFASTPATH pktq_mdeq(struct pktq *pq, uint prec_bmp,
+				      int *prec_out)
 {
 	struct pktq_prec *q;
-	void *p;
+	struct sk_buff *p;
 	int prec;
 
 	if (pq->len == 0)
 		return NULL;
 
 	while ((prec = pq->hi_prec) > 0 && pq->q[prec].head == NULL)
 		pq->hi_prec--;
 
 	while ((prec_bmp & (1 << prec)) == 0 || pq->q[prec].head == NULL)
 		if (prec-- == 0)
 			return NULL;
@@ -399,25 +402,25 @@ int getintvar(char *vars, const char *name)
 	char *val;
 
 	val = getvar(vars, name);
 	if (val == NULL)
 		return 0;
 
 	return simple_strtoul(val, NULL, 0);
 }
 
 #if defined(BCMDBG)
 /* pretty hex print a pkt buffer chain */
-void prpkt(const char *msg, struct osl_info *osh, void *p0)
+void prpkt(const char *msg, struct osl_info *osh, struct sk_buff *p0)
 {
-	void *p;
+	struct sk_buff *p;
 
 	if (msg && (msg[0] != '\0'))
 		printf("%s:\n", msg);
 
 	for (p = p0; p; p = PKTNEXT(p))
 		prhex(NULL, PKTDATA(p), PKTLEN(p));
 }
 #endif				/* defined(BCMDBG) */
 
 static char bcm_undeferrstr[BCME_STRLEN];
 
diff --git a/drivers/staging/brcm80211/util/hnddma.c b/drivers/staging/brcm80211/util/hnddma.c
index f1e9cfc..33d2c9a 100644
--- a/drivers/staging/brcm80211/util/hnddma.c
+++ b/drivers/staging/brcm80211/util/hnddma.c
@@ -224,45 +224,45 @@ static void _dma_fifoloopbackenable(dma_info_t *di);
 static uint _dma_ctrlflags(dma_info_t *di, uint mask, uint flags);
 static u8 dma_align_sizetobits(uint size);
 static void *dma_ringalloc(struct osl_info *osh, u32 boundary, uint size,
 			   u16 *alignbits, uint *alloced,
 			   dmaaddr_t *descpa, osldma_t **dmah);
 
 /* Prototypes for 32-bit routines */
 static bool dma32_alloc(dma_info_t *di, uint direction);
 static bool dma32_txreset(dma_info_t *di);
 static bool dma32_rxreset(dma_info_t *di);
 static bool dma32_txsuspendedidle(dma_info_t *di);
-static int dma32_txfast(dma_info_t *di, void *p0, bool commit);
+static int dma32_txfast(dma_info_t *di, struct sk_buff *p0, bool commit);
 static void *dma32_getnexttxp(dma_info_t *di, txd_range_t range);
 static void *dma32_getnextrxp(dma_info_t *di, bool forceall);
 static void dma32_txrotate(dma_info_t *di);
 static bool dma32_rxidle(dma_info_t *di);
 static void dma32_txinit(dma_info_t *di);
 static bool dma32_txenabled(dma_info_t *di);
 static void dma32_txsuspend(dma_info_t *di);
 static void dma32_txresume(dma_info_t *di);
 static bool dma32_txsuspended(dma_info_t *di);
 static void dma32_txreclaim(dma_info_t *di, txd_range_t range);
 static bool dma32_txstopped(dma_info_t *di);
 static bool dma32_rxstopped(dma_info_t *di);
 static bool dma32_rxenabled(dma_info_t *di);
 
 static bool _dma32_addrext(struct osl_info *osh, dma32regs_t *dma32regs);
 
 /* Prototypes for 64-bit routines */
 static bool dma64_alloc(dma_info_t *di, uint direction);
 static bool dma64_txreset(dma_info_t *di);
 static bool dma64_rxreset(dma_info_t *di);
 static bool dma64_txsuspendedidle(dma_info_t *di);
-static int dma64_txfast(dma_info_t *di, void *p0, bool commit);
+static int dma64_txfast(dma_info_t *di, struct sk_buff *p0, bool commit);
 static int dma64_txunframed(dma_info_t *di, void *p0, uint len, bool commit);
 static void *dma64_getpos(dma_info_t *di, bool direction);
 static void *dma64_getnexttxp(dma_info_t *di, txd_range_t range);
 static void *dma64_getnextrxp(dma_info_t *di, bool forceall);
 static void dma64_txrotate(dma_info_t *di);
 
 static bool dma64_rxidle(dma_info_t *di);
 static void dma64_txinit(dma_info_t *di);
 static bool dma64_txenabled(dma_info_t *di);
 static void dma64_txsuspend(dma_info_t *di);
 static void dma64_txresume(dma_info_t *di);
@@ -971,23 +971,23 @@ _dma_rx_param_get(dma_info_t *di, u16 *rxoffset, u16 *rxbufsize)
 /* !! rx entry routine
  * returns a pointer to the next frame received, or NULL if there are no more
  *   if DMA_CTRL_RXMULTI is defined, DMA scattering(multiple buffers) is supported
  *      with pkts chain
  *   otherwise, it's treated as giant pkt and will be tossed.
  *   The DMA scattering starts with normal DMA header, followed by first buffer data.
  *   After it reaches the max size of buffer, the data continues in next DMA descriptor
  *   buffer WITHOUT DMA header
  */
 static void *BCMFASTPATH _dma_rx(dma_info_t *di)
 {
-	void *p, *head, *tail;
+	struct sk_buff *p, *head, *tail;
 	uint len;
 	uint pkt_len;
 	int resid = 0;
 
  next_frame:
 	head = _dma_getnextrxp(di, false);
 	if (head == NULL)
 		return NULL;
 
 	len = ltoh16(*(u16 *) (PKTDATA(head)));
 	DMA_TRACE(("%s: dma_rx len %d\n", di->name, len));
@@ -1046,23 +1046,23 @@ static void *BCMFASTPATH _dma_rx(dma_info_t *di)
 
 	return head;
 }
 
 /* post receive buffers
  *  return false is refill failed completely and ring is empty
  *  this will stall the rx dma and user might want to call rxfill again asap
  *  This unlikely happens on memory-rich NIC, but often on memory-constrained dongle
  */
 static bool BCMFASTPATH _dma_rxfill(dma_info_t *di)
 {
-	void *p;
+	struct sk_buff *p;
 	u16 rxin, rxout;
 	u32 flags = 0;
 	uint n;
 	uint i;
 	dmaaddr_t pa;
 	uint extra_offset = 0;
 	bool ring_empty;
 
 	ring_empty = false;
 
 	/*
@@ -1644,25 +1644,25 @@ static bool dma32_txsuspendedidle(dma_info_t *di)
 	return ((R_REG(di->osh, &di->d32txregs->status) & XS_XS_MASK) ==
 		XS_XS_IDLE);
 }
 
 /* !! tx entry routine
  * supports full 32bit dma engine buffer addressing so
  * dma buffers can cross 4 Kbyte page boundaries.
  *
  * WARNING: call must check the return value for error.
  *   the error(toss frames) could be fatal and cause many subsequent hard to debug problems
  */
-static int dma32_txfast(dma_info_t *di, void *p0, bool commit)
+static int dma32_txfast(dma_info_t *di, struct sk_buff *p0, bool commit)
 {
-	void *p, *next;
+	struct sk_buff *p, *next;
 	unsigned char *data;
 	uint len;
 	u16 txout;
 	u32 flags = 0;
 	dmaaddr_t pa;
 
 	DMA_TRACE(("%s: dma_txfast\n", di->name));
 
 	txout = di->txout;
 
 	/*
@@ -2293,25 +2293,26 @@ static int dma64_txunframed(dma_info_t *di, void *buf, uint len, bool commit)
  outoftxd:
 	DMA_ERROR(("%s: %s: out of txds !!!\n", di->name, __func__));
 	di->hnddma.txavail = 0;
 	di->hnddma.txnobuf++;
 	return -1;
 }
 
 /* !! tx entry routine
  * WARNING: call must check the return value for error.
  *   the error(toss frames) could be fatal and cause many subsequent hard to debug problems
  */
-static int BCMFASTPATH dma64_txfast(dma_info_t *di, void *p0, bool commit)
+static int BCMFASTPATH dma64_txfast(dma_info_t *di, struct sk_buff *p0,
+				    bool commit)
 {
-	void *p, *next;
+	struct sk_buff *p, *next;
 	unsigned char *data;
 	uint len;
 	u16 txout;
 	u32 flags = 0;
 	dmaaddr_t pa;
 
 	DMA_TRACE(("%s: dma_txfast\n", di->name));
 
 	txout = di->txout;
 
 	/*
-- 
1.7.1


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux