Commit c26b1378 authored by Arend van Spriel's avatar Arend van Spriel Committed by Greg Kroah-Hartman

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: default avatarBrett Rudley <brudley@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b6eb5c0f
...@@ -453,7 +453,7 @@ bool bcmsdh_regfail(void *sdh) ...@@ -453,7 +453,7 @@ bool bcmsdh_regfail(void *sdh)
int int
bcmsdh_recv_buf(void *sdh, u32 addr, uint fn, uint flags, 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_cmplt_fn_t complete, void *handle)
{ {
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh; bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
......
...@@ -928,13 +928,13 @@ sdioh_request_word(sdioh_info_t *sd, uint cmd_type, uint rw, uint func, ...@@ -928,13 +928,13 @@ sdioh_request_word(sdioh_info_t *sd, uint cmd_type, uint rw, uint func,
static SDIOH_API_RC static SDIOH_API_RC
sdioh_request_packet(sdioh_info_t *sd, uint fix_inc, uint write, uint func, 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); bool fifo = (fix_inc == SDIOH_DATA_FIX);
u32 SGCount = 0; u32 SGCount = 0;
int err_ret = 0; int err_ret = 0;
void *pnext; struct sk_buff *pnext;
sd_trace(("%s: Enter\n", __func__)); sd_trace(("%s: Enter\n", __func__));
...@@ -1026,10 +1026,10 @@ sdioh_request_packet(sdioh_info_t *sd, uint fix_inc, uint write, uint func, ...@@ -1026,10 +1026,10 @@ sdioh_request_packet(sdioh_info_t *sd, uint fix_inc, uint write, uint func,
extern SDIOH_API_RC extern SDIOH_API_RC
sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write, 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, uint func, uint addr, uint reg_width, uint buflen_u,
u8 *buffer, void *pkt) u8 *buffer, struct sk_buff *pkt)
{ {
SDIOH_API_RC Status; SDIOH_API_RC Status;
void *mypkt = NULL; struct sk_buff *mypkt = NULL;
sd_trace(("%s: Enter\n", __func__)); sd_trace(("%s: Enter\n", __func__));
......
...@@ -295,10 +295,12 @@ extern void dhd_detach(dhd_pub_t *dhdp); ...@@ -295,10 +295,12 @@ extern void dhd_detach(dhd_pub_t *dhdp);
/* Indication from bus module to change flow-control state */ /* Indication from bus module to change flow-control state */
extern void dhd_txflowcontrol(dhd_pub_t *dhdp, int ifidx, bool on); 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. */ /* 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 */ /* Return pointer to interface name */
extern char *dhd_ifname(dhd_pub_t *dhdp, int idx); extern char *dhd_ifname(dhd_pub_t *dhdp, int idx);
...@@ -307,7 +309,7 @@ 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); extern void dhd_sched_dpc(dhd_pub_t *dhdp);
/* Notify tx completion */ /* 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 */ /* Query ioctl */
extern int dhdcdc_query_ioctl(dhd_pub_t *dhd, int ifidx, uint cmd, void *buf, 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, ...@@ -378,7 +380,7 @@ extern void dhd_vif_sendup(struct dhd_info *dhd, int ifidx, unsigned char * cp,
int len); int len);
/* Send packet to dongle via data channel */ /* 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 */ /* Send event to host */
extern void dhd_sendup_event(dhd_pub_t *dhdp, wl_event_msg_t *event, extern void dhd_sendup_event(dhd_pub_t *dhdp, wl_event_msg_t *event,
......
...@@ -36,7 +36,7 @@ extern void dhd_bus_stop(struct dhd_bus *bus, bool enforce_mutex); ...@@ -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); extern int dhd_bus_init(dhd_pub_t *dhdp, bool enforce_mutex);
/* Send a data frame to the dongle. Callee disposes of txp. */ /* 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. /* Send/receive a control message to/from the dongle.
* Expects caller to enforce a single outstanding transaction. * Expects caller to enforce a single outstanding transaction.
......
...@@ -310,7 +310,7 @@ void dhd_prot_dump(dhd_pub_t *dhdp, struct bcmstrbuf *strbuf) ...@@ -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); 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 #ifdef BDC
struct bdc_header *h; struct bdc_header *h;
...@@ -336,7 +336,7 @@ void dhd_prot_hdrpush(dhd_pub_t *dhd, int ifidx, void *pktbuf) ...@@ -336,7 +336,7 @@ void dhd_prot_hdrpush(dhd_pub_t *dhd, int ifidx, void *pktbuf)
BDC_SET_IF_IDX(h, ifidx); 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 #ifdef BDC
struct bdc_header *h; struct bdc_header *h;
...@@ -356,7 +356,7 @@ bool dhd_proto_fcinfo(dhd_pub_t *dhd, void *pktbuf, u8 * fcbits) ...@@ -356,7 +356,7 @@ bool dhd_proto_fcinfo(dhd_pub_t *dhd, void *pktbuf, u8 * fcbits)
return false; 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 #ifdef BDC
struct bdc_header *h; struct bdc_header *h;
......
...@@ -327,9 +327,10 @@ void dhd_store_conn_status(u32 event, u32 status, u32 reason) ...@@ -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 */ int eprec = -1; /* precedence to evict from */
bool discard_oldest; bool discard_oldest;
......
...@@ -1018,7 +1018,7 @@ static void dhd_set_multicast_list(struct net_device *dev) ...@@ -1018,7 +1018,7 @@ static void dhd_set_multicast_list(struct net_device *dev)
up(&dhd->sysioc_sem); 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; int ret;
dhd_info_t *dhd = (dhd_info_t *) (dhdp->info); dhd_info_t *dhd = (dhd_info_t *) (dhdp->info);
...@@ -1132,13 +1132,15 @@ void dhd_txflowcontrol(dhd_pub_t *dhdp, int ifidx, bool state) ...@@ -1132,13 +1132,15 @@ void dhd_txflowcontrol(dhd_pub_t *dhdp, int ifidx, bool state)
netif_wake_queue(net); 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; dhd_info_t *dhd = (dhd_info_t *) dhdp->info;
struct sk_buff *skb; struct sk_buff *skb;
unsigned char *eth; unsigned char *eth;
uint len; uint len;
void *data, *pnext, *save_pktbuf; void *data;
struct sk_buff *pnext, *save_pktbuf;
int i; int i;
dhd_if_t *ifp; dhd_if_t *ifp;
wl_event_msg_t event; wl_event_msg_t event;
...@@ -1222,7 +1224,7 @@ void dhd_event(struct dhd_info *dhd, char *evpkt, int evlen, int ifidx) ...@@ -1222,7 +1224,7 @@ void dhd_event(struct dhd_info *dhd, char *evpkt, int evlen, int ifidx)
return; 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; uint ifidx;
dhd_info_t *dhd = (dhd_info_t *) (dhdp->info); dhd_info_t *dhd = (dhd_info_t *) (dhdp->info);
......
...@@ -46,15 +46,16 @@ extern int dhd_prot_init(dhd_pub_t *dhdp); ...@@ -46,15 +46,16 @@ extern int dhd_prot_init(dhd_pub_t *dhdp);
/* Stop protocol: sync w/dongle state. */ /* Stop protocol: sync w/dongle state. */
extern void dhd_prot_stop(dhd_pub_t *dhdp); 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. /* Add any protocol-specific data header.
* Caller must reserve prot_hdrlen prepend space. * 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. */ /* 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 */ /* Use protocol to issue ioctl to dongle */
extern int dhd_prot_ioctl(dhd_pub_t *dhd, int ifidx, wl_ioctl_t *ioc, extern int dhd_prot_ioctl(dhd_pub_t *dhd, int ifidx, wl_ioctl_t *ioc,
......
...@@ -203,8 +203,8 @@ typedef struct dhd_bus { ...@@ -203,8 +203,8 @@ typedef struct dhd_bus {
u8 rx_seq; /* Receive sequence number (expected) */ u8 rx_seq; /* Receive sequence number (expected) */
bool rxskip; /* Skip receive (awaiting NAK ACK) */ bool rxskip; /* Skip receive (awaiting NAK ACK) */
void *glomd; /* Packet containing glomming descriptor */ struct sk_buff *glomd; /* Packet containing glomming descriptor */
void *glom; /* Packet chain for glommed superframe */ struct sk_buff *glom; /* Packet chain for glommed superframe */
uint glomerr; /* Glom packet read errors */ uint glomerr; /* Glom packet read errors */
u8 *rxbuf; /* Buffer for receiving control packets */ u8 *rxbuf; /* Buffer for receiving control packets */
...@@ -446,11 +446,13 @@ static uint process_nvram_vars(char *varbuf, uint len); ...@@ -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 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, static int dhd_bcmsdh_recv_buf(dhd_bus_t *bus, u32 addr, uint fn,
uint flags, u8 *buf, uint nbytes, void *pkt, uint flags, u8 *buf, uint nbytes,
bcmsdh_cmplt_fn_t complete, void *handle); 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, static int dhd_bcmsdh_send_buf(dhd_bus_t *bus, u32 addr, uint fn,
uint flags, u8 *buf, uint nbytes, void *pkt, uint flags, u8 *buf, uint nbytes,
bcmsdh_cmplt_fn_t complete, void *handle); struct sk_buff *pkt, bcmsdh_cmplt_fn_t complete,
void *handle);
static bool dhdsdio_download_firmware(struct dhd_bus *bus, struct osl_info *osh, static bool dhdsdio_download_firmware(struct dhd_bus *bus, struct osl_info *osh,
void *sdh); void *sdh);
...@@ -902,7 +904,8 @@ void dhd_enable_oob_intr(struct dhd_bus *bus, bool enable) ...@@ -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. */ /* Writes a HW/SW header into the packet and sends it. */
/* Assumes: (a) header space already there, (b) caller holds lock */ /* 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; int ret;
struct osl_info *osh; struct osl_info *osh;
...@@ -911,7 +914,7 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, void *pkt, uint chan, bool free_pkt) ...@@ -911,7 +914,7 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, void *pkt, uint chan, bool free_pkt)
u32 swheader; u32 swheader;
uint retries = 0; uint retries = 0;
bcmsdh_info_t *sdh; bcmsdh_info_t *sdh;
void *new; struct sk_buff *new;
int i; int i;
DHD_TRACE(("%s: Enter\n", __func__)); DHD_TRACE(("%s: Enter\n", __func__));
...@@ -1063,7 +1066,7 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, void *pkt, uint chan, bool free_pkt) ...@@ -1063,7 +1066,7 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, void *pkt, uint chan, bool free_pkt)
return ret; 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; int ret = BCME_ERROR;
struct osl_info *osh; struct osl_info *osh;
...@@ -1164,7 +1167,7 @@ int dhd_bus_txdata(struct dhd_bus *bus, void *pkt) ...@@ -1164,7 +1167,7 @@ int dhd_bus_txdata(struct dhd_bus *bus, void *pkt)
static uint dhdsdio_sendfromq(dhd_bus_t *bus, uint maxframes) static uint dhdsdio_sendfromq(dhd_bus_t *bus, uint maxframes)
{ {
void *pkt; struct sk_buff *pkt;
u32 intstatus = 0; u32 intstatus = 0;
uint retries = 0; uint retries = 0;
int ret = 0, prec_out; int ret = 0, prec_out;
...@@ -3180,7 +3183,7 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq) ...@@ -3180,7 +3183,7 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
u8 *dptr, num = 0; u8 *dptr, num = 0;
u16 sublen, check; u16 sublen, check;
void *pfirst, *plast, *pnext, *save_pfirst; struct sk_buff *pfirst, *plast, *pnext, *save_pfirst;
struct osl_info *osh = bus->dhd->osh; struct osl_info *osh = bus->dhd->osh;
int errcode; int errcode;
...@@ -3590,7 +3593,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished) ...@@ -3590,7 +3593,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
u8 fcbits; /* Extracted fcbits from software header */ u8 fcbits; /* Extracted fcbits from software header */
u8 delta; 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 pad; /* Number of pad bytes to read */
u16 rdlen; /* Total number of bytes to read */ u16 rdlen; /* Total number of bytes to read */
u8 rxseq; /* Next sequence number to expect */ u8 rxseq; /* Next sequence number to expect */
...@@ -4628,7 +4631,7 @@ static void dhdsdio_pktgen_init(dhd_bus_t *bus) ...@@ -4628,7 +4631,7 @@ static void dhdsdio_pktgen_init(dhd_bus_t *bus)
static void dhdsdio_pktgen(dhd_bus_t *bus) static void dhdsdio_pktgen(dhd_bus_t *bus)
{ {
void *pkt; struct sk_buff *pkt;
u8 *data; u8 *data;
uint pktcount; uint pktcount;
uint fillbyte; uint fillbyte;
...@@ -4735,7 +4738,7 @@ static void dhdsdio_pktgen(dhd_bus_t *bus) ...@@ -4735,7 +4738,7 @@ static void dhdsdio_pktgen(dhd_bus_t *bus)
static void dhdsdio_sdtest_set(dhd_bus_t *bus, bool start) static void dhdsdio_sdtest_set(dhd_bus_t *bus, bool start)
{ {
void *pkt; struct sk_buff *pkt;
u8 *data; u8 *data;
struct osl_info *osh = bus->dhd->osh; struct osl_info *osh = bus->dhd->osh;
...@@ -4760,7 +4763,7 @@ static void dhdsdio_sdtest_set(dhd_bus_t *bus, bool start) ...@@ -4760,7 +4763,7 @@ static void dhdsdio_sdtest_set(dhd_bus_t *bus, bool start)
bus->pktgen_fail++; 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; struct osl_info *osh = bus->dhd->osh;
u8 *data; u8 *data;
...@@ -4962,7 +4965,7 @@ extern int dhd_bus_console_in(dhd_pub_t *dhdp, unsigned char *msg, uint msglen) ...@@ -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; dhd_bus_t *bus = dhdp->bus;
u32 addr, val; u32 addr, val;
int rv; int rv;
void *pkt; struct sk_buff *pkt;
/* Address could be zero if CONSOLE := 0 in dongle Makefile */ /* Address could be zero if CONSOLE := 0 in dongle Makefile */
if (bus->console_addr == 0) if (bus->console_addr == 0)
...@@ -5989,7 +5992,7 @@ static int _dhdsdio_download_firmware(struct dhd_bus *bus) ...@@ -5989,7 +5992,7 @@ static int _dhdsdio_download_firmware(struct dhd_bus *bus)
static int static int
dhd_bcmsdh_recv_buf(dhd_bus_t *bus, u32 addr, uint fn, uint flags, 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) bcmsdh_cmplt_fn_t complete, void *handle)
{ {
int status; int status;
...@@ -6003,7 +6006,7 @@ dhd_bcmsdh_recv_buf(dhd_bus_t *bus, u32 addr, uint fn, uint flags, ...@@ -6003,7 +6006,7 @@ dhd_bcmsdh_recv_buf(dhd_bus_t *bus, u32 addr, uint fn, uint flags,
static int static int
dhd_bcmsdh_send_buf(dhd_bus_t *bus, u32 addr, uint fn, uint flags, 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) bcmsdh_cmplt_fn_t complete, void *handle)
{ {
return bcmsdh_send_buf return bcmsdh_send_buf
......
...@@ -79,7 +79,7 @@ extern SDIOH_API_RC sdioh_request_buffer(sdioh_info_t *si, uint pio_dma, ...@@ -79,7 +79,7 @@ extern SDIOH_API_RC sdioh_request_buffer(sdioh_info_t *si, uint pio_dma,
uint fix_inc, uint rw, uint fnc_num, uint fix_inc, uint rw, uint fnc_num,
u32 addr, uint regwidth, u32 addr, uint regwidth,
u32 buflen, u8 *buffer, u32 buflen, u8 *buffer,
void *pkt); struct sk_buff *pkt);
/* get cis data */ /* get cis data */
extern SDIOH_API_RC sdioh_cis_read(sdioh_info_t *si, uint fuc, u8 *cis, extern SDIOH_API_RC sdioh_cis_read(sdioh_info_t *si, uint fuc, u8 *cis,
......
...@@ -122,7 +122,7 @@ extern int bcmsdh_send_buf(void *sdh, u32 addr, uint fn, uint flags, ...@@ -122,7 +122,7 @@ extern int bcmsdh_send_buf(void *sdh, u32 addr, uint fn, uint flags,
u8 *buf, uint nbytes, void *pkt, u8 *buf, uint nbytes, void *pkt,
bcmsdh_cmplt_fn_t complete, void *handle); bcmsdh_cmplt_fn_t complete, void *handle);
extern int bcmsdh_recv_buf(void *sdh, u32 addr, uint fn, uint flags, 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); bcmsdh_cmplt_fn_t complete, void *handle);
/* Flags bits */ /* Flags bits */
......
...@@ -55,10 +55,10 @@ ...@@ -55,10 +55,10 @@
#endif #endif
typedef struct pktq_prec { typedef struct pktq_prec {
void *head; /* first packet to dequeue */ struct sk_buff *head; /* first packet to dequeue */
void *tail; /* last packet to dequeue */ struct sk_buff *tail; /* last packet to dequeue */
u16 len; /* number of queued packets */ u16 len; /* number of queued packets */
u16 max; /* maximum number of queued packets */ u16 max; /* maximum number of queued packets */
} pktq_prec_t; } pktq_prec_t;
/* multi-priority pkt queue */ /* multi-priority pkt queue */
...@@ -104,10 +104,13 @@ ...@@ -104,10 +104,13 @@
#define pktq_ppeek(pq, prec) ((pq)->q[prec].head) #define pktq_ppeek(pq, prec) ((pq)->q[prec].head)
#define pktq_ppeek_tail(pq, prec) ((pq)->q[prec].tail) #define pktq_ppeek_tail(pq, prec) ((pq)->q[prec].tail)
extern void *pktq_penq(struct pktq *pq, int prec, void *p); extern struct sk_buff *pktq_penq(struct pktq *pq, int prec,
extern void *pktq_penq_head(struct pktq *pq, int prec, void *p); struct sk_buff *p);
extern void *pktq_pdeq(struct pktq *pq, int prec); extern struct sk_buff *pktq_penq_head(struct pktq *pq, int prec,
extern void *pktq_pdeq_tail(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 */ /* Empty the queue at particular precedence level */
#ifdef BRCM_FULLMAC #ifdef BRCM_FULLMAC
extern void pktq_pflush(struct osl_info *osh, struct pktq *pq, int prec, extern void pktq_pflush(struct osl_info *osh, struct pktq *pq, int prec,
...@@ -119,8 +122,8 @@ ...@@ -119,8 +122,8 @@
/* operations on a set of precedences in packet queue */ /* operations on a set of precedences in packet queue */
extern int pktq_mlen(struct pktq *pq, uint prec_bmp); extern int pktq_mlen(struct pktq *pq, uint prec_bmp);
extern void *pktq_mdeq(struct pktq *pq, uint prec_bmp, int *prec_out); extern struct sk_buff *pktq_mdeq(struct pktq *pq, uint prec_bmp, int *prec_out);
/* operations on packet queue as a whole */ /* operations on packet queue as a whole */
...@@ -139,7 +142,7 @@ ...@@ -139,7 +142,7 @@
extern void pktq_init(struct pktq *pq, int num_prec, int max_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 */ /* 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 #ifdef BRCM_FULLMAC
extern void pktq_flush(struct osl_info *osh, struct pktq *pq, bool dir); extern void pktq_flush(struct osl_info *osh, struct pktq *pq, bool dir);
#else #else
...@@ -164,7 +167,8 @@ ...@@ -164,7 +167,8 @@
extern char *getvar(char *vars, const char *name); extern char *getvar(char *vars, const char *name);
extern int getintvar(char *vars, const char *name); extern int getintvar(char *vars, const char *name);
#ifdef BCMDBG #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 */ #endif /* BCMDBG */
#define bcm_perf_enable() #define bcm_perf_enable()
#define bcmstats(fmt) #define bcmstats(fmt)
......
...@@ -41,7 +41,7 @@ typedef void (*di_txsuspend_t) (hnddma_t *dmah); ...@@ -41,7 +41,7 @@ typedef void (*di_txsuspend_t) (hnddma_t *dmah);
typedef void (*di_txresume_t) (hnddma_t *dmah); typedef void (*di_txresume_t) (hnddma_t *dmah);
typedef bool(*di_txsuspended_t) (hnddma_t *dmah); typedef bool(*di_txsuspended_t) (hnddma_t *dmah);
typedef bool(*di_txsuspendedidle_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, typedef int (*di_txunframed_t) (hnddma_t *dmah, void *p, uint len,
bool commit); bool commit);
typedef void *(*di_getpos_t) (hnddma_t *di, bool direction); typedef void *(*di_getpos_t) (hnddma_t *di, bool direction);
......
...@@ -48,13 +48,6 @@ ...@@ -48,13 +48,6 @@
#include <d11ucode_ext.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(unsigned long data);
static void _wl_timer(wl_timer_t *t); static void _wl_timer(wl_timer_t *t);
......
...@@ -146,11 +146,10 @@ static void scb_ampdu_update_config_all(ampdu_info_t *ampdu); ...@@ -146,11 +146,10 @@ static void scb_ampdu_update_config_all(ampdu_info_t *ampdu);
#define wlc_ampdu_txflowcontrol(a, b, c) do {} while (0) #define wlc_ampdu_txflowcontrol(a, b, c) do {} while (0)
static void wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb, static void wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb,
void *p, tx_status_t *txs, struct sk_buff *p, tx_status_t *txs,
u32 frmtxstatus, u32 frmtxstatus, u32 frmtxstatus2);
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; d11txh_t *txh;
struct dot11_header *h; struct dot11_header *h;
...@@ -471,7 +470,8 @@ static void wlc_ffpld_calc_mcs2ampdu_table(ampdu_info_t *ampdu, int f) ...@@ -471,7 +470,8 @@ static void wlc_ffpld_calc_mcs2ampdu_table(ampdu_info_t *ampdu, int f)
} }
static void BCMFASTPATH 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_t *scb_ampdu;
scb_ampdu_tid_ini_t *ini; scb_ampdu_tid_ini_t *ini;
...@@ -488,11 +488,12 @@ wlc_ampdu_agg(ampdu_info_t *ampdu, struct scb *scb, void *p, uint prec) ...@@ -488,11 +488,12 @@ wlc_ampdu_agg(ampdu_info_t *ampdu, struct scb *scb, void *p, uint prec)
} }
int BCMFASTPATH 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; wlc_info_t *wlc;
struct osl_info *osh; struct osl_info *osh;
void *p, *pkt[AMPDU_MAX_MPDU]; struct sk_buff *p, *pkt[AMPDU_MAX_MPDU];
u8 tid, ndelim; u8 tid, ndelim;
int err = 0; int err = 0;
u8 preamble_type = WLC_GF_PREAMBLE; u8 preamble_type = WLC_GF_PREAMBLE;
...@@ -884,7 +885,7 @@ wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **pdu, int prec) ...@@ -884,7 +885,7 @@ wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **pdu, int prec)
} }
void BCMFASTPATH 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) tx_status_t *txs)
{ {
scb_ampdu_t *scb_ampdu; scb_ampdu_t *scb_ampdu;
...@@ -948,14 +949,12 @@ rate_status(wlc_info_t *wlc, struct ieee80211_tx_info *tx_info, ...@@ -948,14 +949,12 @@ rate_status(wlc_info_t *wlc, struct ieee80211_tx_info *tx_info,
} }
} }
extern void wlc_txq_enq(wlc_info_t *wlc, struct scb *scb, void *sdu,
uint prec);
#define SHORTNAME "AMPDU status" #define SHORTNAME "AMPDU status"
static void BCMFASTPATH static void BCMFASTPATH
wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb, void *p, wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb,
tx_status_t *txs, u32 s1, u32 s2) struct sk_buff *p, tx_status_t *txs,
u32 s1, u32 s2)
{ {
scb_ampdu_t *scb_ampdu; scb_ampdu_t *scb_ampdu;
wlc_info_t *wlc = ampdu->wlc; wlc_info_t *wlc = ampdu->wlc;
......
...@@ -21,10 +21,10 @@ extern ampdu_info_t *wlc_ampdu_attach(wlc_info_t *wlc); ...@@ -21,10 +21,10 @@ extern ampdu_info_t *wlc_ampdu_attach(wlc_info_t *wlc);
extern void wlc_ampdu_detach(ampdu_info_t *ampdu); extern void wlc_ampdu_detach(ampdu_info_t *ampdu);
extern bool wlc_ampdu_cap(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_ampdu_set(ampdu_info_t *ampdu, bool on);
extern int wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **aggp, extern int wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi,
int prec); struct sk_buff **aggp, int prec);
extern void wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, void *p, extern void wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb,
tx_status_t *txs); struct sk_buff *p, tx_status_t *txs);
extern void wlc_ampdu_reset(ampdu_info_t *ampdu); extern void wlc_ampdu_reset(ampdu_info_t *ampdu);
extern void wlc_ampdu_macaddr_upd(wlc_info_t *wlc); extern void wlc_ampdu_macaddr_upd(wlc_info_t *wlc);
extern void wlc_ampdu_shm_upd(ampdu_info_t *ampdu); extern void wlc_ampdu_shm_upd(ampdu_info_t *ampdu);
......
...@@ -270,9 +270,9 @@ static u32 WLBANDINITFN(wlc_setband_inact) (wlc_info_t *wlc, uint bandunit) ...@@ -270,9 +270,9 @@ static u32 WLBANDINITFN(wlc_setband_inact) (wlc_info_t *wlc, uint bandunit)
static bool BCMFASTPATH static bool BCMFASTPATH
wlc_bmac_recv(wlc_hw_info_t *wlc_hw, uint fifo, bool bound) wlc_bmac_recv(wlc_hw_info_t *wlc_hw, uint fifo, bool bound)
{ {
void *p; struct sk_buff *p;
void *head = NULL; struct sk_buff *head = NULL;
void *tail = NULL; struct sk_buff *tail = NULL;
uint n = 0; uint n = 0;
uint bound_limit = bound ? wlc_hw->wlc->pub->tunables->rxbnd : -1; uint bound_limit = bound ? wlc_hw->wlc->pub->tunables->rxbnd : -1;
u32 tsf_h, tsf_l; u32 tsf_h, tsf_l;
...@@ -3316,7 +3316,7 @@ bool BCMFASTPATH wlc_isr(wlc_info_t *wlc, bool *wantdpc) ...@@ -3316,7 +3316,7 @@ bool BCMFASTPATH wlc_isr(wlc_info_t *wlc, bool *wantdpc)
/* process tx completion events for corerev < 5 */ /* process tx completion events for corerev < 5 */
static bool wlc_bmac_txstatus_corerev4(wlc_hw_info_t *wlc_hw) static bool wlc_bmac_txstatus_corerev4(wlc_hw_info_t *wlc_hw)
{ {
void *status_p; struct sk_buff *status_p;
tx_status_t *txs; tx_status_t *txs;
struct osl_info *osh; struct osl_info *osh;
bool fatal = false; bool fatal = false;
......
...@@ -221,16 +221,15 @@ static const u8 acbitmap2maxprio[] = { ...@@ -221,16 +221,15 @@ static const u8 acbitmap2maxprio[] = {
#define WLC_REPLAY_CNTRS_VALUE WPA_CAP_16_REPLAY_CNTRS #define WLC_REPLAY_CNTRS_VALUE WPA_CAP_16_REPLAY_CNTRS
/* local prototypes */ /* 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, 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, struct scb *scb, uint frag,
uint nfrags, uint queue, uint nfrags, uint queue,
uint next_frag_len, uint next_frag_len,
wsec_key_t *key, wsec_key_t *key,
ratespec_t rspec_override); 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_bss_default_init(wlc_info_t *wlc);
static void wlc_ucode_mac_upd(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, static ratespec_t mac80211_wlc_set_nrate(wlc_info_t *wlc, wlcband_t *cur_band,
...@@ -258,7 +257,7 @@ static void wlc_compute_mimo_plcp(ratespec_t rate, uint length, u8 *plcp); ...@@ -258,7 +257,7 @@ 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, static u16 wlc_compute_frame_dur(wlc_info_t *wlc, ratespec_t rate,
u8 preamble_type, uint next_frag_len); u8 preamble_type, uint next_frag_len);
static void wlc_recvctl(wlc_info_t *wlc, struct osl_info *osh, d11rxhdr_t *rxh, 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, static uint wlc_calc_frame_len(wlc_info_t *wlc, ratespec_t rate,
u8 preamble_type, uint dur); u8 preamble_type, uint dur);
static uint wlc_calc_ack_time(wlc_info_t *wlc, ratespec_t rate, static uint wlc_calc_ack_time(wlc_info_t *wlc, ratespec_t rate,
...@@ -5000,10 +4999,10 @@ wlc_prec_enq(wlc_info_t *wlc, struct pktq *q, void *pkt, int prec) ...@@ -5000,10 +4999,10 @@ wlc_prec_enq(wlc_info_t *wlc, struct pktq *q, void *pkt, int prec)
} }
bool BCMFASTPATH bool BCMFASTPATH
wlc_prec_enq_head(wlc_info_t *wlc, struct pktq *q, void *pkt, int prec, wlc_prec_enq_head(wlc_info_t *wlc, struct pktq *q, struct sk_buff *pkt,
bool head) int prec, bool head)
{ {
void *p; struct sk_buff *p;
int eprec = -1; /* precedence to evict from */ int eprec = -1; /* precedence to evict from */
/* Determine precedence from which to evict packet, if any */ /* Determine precedence from which to evict packet, if any */
...@@ -5064,7 +5063,8 @@ wlc_prec_enq_head(wlc_info_t *wlc, struct pktq *q, void *pkt, int prec, ...@@ -5064,7 +5063,8 @@ wlc_prec_enq_head(wlc_info_t *wlc, struct pktq *q, void *pkt, int prec,
return true; 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_info_t *wlc = (wlc_info_t *) ctx;
wlc_txq_info_t *qi = wlc->active_queue; /* Check me */ wlc_txq_info_t *qi = wlc->active_queue; /* Check me */
...@@ -5104,7 +5104,8 @@ void BCMFASTPATH wlc_txq_enq(void *ctx, struct scb *scb, void *sdu, uint prec) ...@@ -5104,7 +5104,8 @@ void BCMFASTPATH wlc_txq_enq(void *ctx, struct scb *scb, void *sdu, uint prec)
} }
bool BCMFASTPATH 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; u8 prio;
uint fifo; uint fifo;
...@@ -5141,7 +5142,7 @@ wlc_sendpkt_mac80211(wlc_info_t *wlc, void *sdu, struct ieee80211_hw *hw) ...@@ -5141,7 +5142,7 @@ wlc_sendpkt_mac80211(wlc_info_t *wlc, void *sdu, struct ieee80211_hw *hw)
void BCMFASTPATH wlc_send_q(wlc_info_t *wlc, wlc_txq_info_t *qi) 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; int prec;
u16 prec_map; u16 prec_map;
int err = 0, i, count; int err = 0, i, count;
...@@ -5228,7 +5229,8 @@ bcmc_fid_generate(wlc_info_t *wlc, wlc_bsscfg_t *bsscfg, d11txh_t *txh) ...@@ -5228,7 +5229,8 @@ bcmc_fid_generate(wlc_info_t *wlc, wlc_bsscfg_t *bsscfg, d11txh_t *txh)
} }
void BCMFASTPATH 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; u16 frameid = INVALIDFID;
d11txh_t *txh; d11txh_t *txh;
...@@ -5641,7 +5643,7 @@ wlc_rspec_to_rts_rspec(wlc_info_t *wlc, ratespec_t rspec, bool use_rspec, ...@@ -5641,7 +5643,7 @@ wlc_rspec_to_rts_rspec(wlc_info_t *wlc, ratespec_t rspec, bool use_rspec,
*/ */
static u16 BCMFASTPATH static u16 BCMFASTPATH
wlc_d11hdrs_mac80211(wlc_info_t *wlc, struct ieee80211_hw *hw, 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, uint nfrags, uint queue, uint next_frag_len,
wsec_key_t *key, ratespec_t rspec_override) wsec_key_t *key, ratespec_t rspec_override)
{ {
...@@ -6507,7 +6509,7 @@ static void wlc_war16165(wlc_info_t *wlc, bool tx) ...@@ -6507,7 +6509,7 @@ static void wlc_war16165(wlc_info_t *wlc, bool tx)
bool BCMFASTPATH bool BCMFASTPATH
wlc_dotxstatus(wlc_info_t *wlc, tx_status_t *txs, u32 frm_tx2) wlc_dotxstatus(wlc_info_t *wlc, tx_status_t *txs, u32 frm_tx2)
{ {
void *p; struct sk_buff *p;
uint queue; uint queue;
d11txh_t *txh; d11txh_t *txh;
struct scb *scb = NULL; struct scb *scb = NULL;
...@@ -6790,7 +6792,7 @@ void wlc_bcn_li_upd(wlc_info_t *wlc) ...@@ -6790,7 +6792,7 @@ void wlc_bcn_li_upd(wlc_info_t *wlc)
} }
static void 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) struct ieee80211_rx_status *rx_status)
{ {
u32 tsf_l, tsf_h; u32 tsf_l, tsf_h;
...@@ -6900,7 +6902,8 @@ prep_mac80211_status(wlc_info_t *wlc, d11rxhdr_t *rxh, void *p, ...@@ -6900,7 +6902,8 @@ prep_mac80211_status(wlc_info_t *wlc, d11rxhdr_t *rxh, void *p,
} }
static void 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; int len_mpdu;
struct ieee80211_rx_status rx_status; struct ieee80211_rx_status rx_status;
...@@ -6963,7 +6966,7 @@ void wlc_bss_list_free(wlc_info_t *wlc, wlc_bss_list_t *bss_list) ...@@ -6963,7 +6966,7 @@ void wlc_bss_list_free(wlc_info_t *wlc, wlc_bss_list_t *bss_list)
* Param 'bound' indicates max. # frames to process before break out. * Param 'bound' indicates max. # frames to process before break out.
*/ */
/* WLC_HIGH_API */ /* 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; d11rxhdr_t *rxh;
struct dot11_header *h; struct dot11_header *h;
...@@ -7789,7 +7792,7 @@ wlc_bss_update_probe_resp(wlc_info_t *wlc, wlc_bsscfg_t *cfg, bool suspend) ...@@ -7789,7 +7792,7 @@ wlc_bss_update_probe_resp(wlc_info_t *wlc, wlc_bsscfg_t *cfg, bool suspend)
} }
/* prepares pdu for transmission. returns BCM error codes */ /* 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; struct osl_info *osh;
uint fifo; uint fifo;
......
...@@ -818,11 +818,13 @@ struct antsel_info { ...@@ -818,11 +818,13 @@ struct antsel_info {
extern void wlc_high_dpc(wlc_info_t *wlc, u32 macintstatus); extern void wlc_high_dpc(wlc_info_t *wlc, u32 macintstatus);
extern void wlc_fatal_error(wlc_info_t *wlc); extern void wlc_fatal_error(wlc_info_t *wlc);
extern void wlc_bmac_rpc_watchdog(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 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, extern void wlc_txfifo(wlc_info_t *wlc, uint fifo, struct sk_buff *p,
s8 txpktpend); bool commit, s8 txpktpend);
extern void wlc_txfifo_complete(wlc_info_t *wlc, uint fifo, 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_info_init(wlc_info_t *wlc, int unit);
extern void wlc_print_txstatus(tx_status_t *txs); extern void wlc_print_txstatus(tx_status_t *txs);
extern int wlc_xmtfifo_sz_get(wlc_info_t *wlc, uint fifo, uint *blocks); extern int wlc_xmtfifo_sz_get(wlc_info_t *wlc, uint fifo, uint *blocks);
...@@ -879,7 +881,7 @@ extern void wlc_txflowcontrol_override(wlc_info_t *wlc, wlc_txq_info_t *qi, ...@@ -879,7 +881,7 @@ extern void wlc_txflowcontrol_override(wlc_info_t *wlc, wlc_txq_info_t *qi,
extern bool wlc_txflowcontrol_prio_isset(wlc_info_t *wlc, wlc_txq_info_t *qi, extern bool wlc_txflowcontrol_prio_isset(wlc_info_t *wlc, wlc_txq_info_t *qi,
int prio); int prio);
extern void wlc_send_q(wlc_info_t *wlc, wlc_txq_info_t *qi); 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, extern u16 wlc_calc_lsig_len(wlc_info_t *wlc, ratespec_t ratespec,
uint mac_len); uint mac_len);
...@@ -923,8 +925,8 @@ extern bool wlc_ismpc(wlc_info_t *wlc); ...@@ -923,8 +925,8 @@ extern bool wlc_ismpc(wlc_info_t *wlc);
extern bool wlc_is_non_delay_mpc(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 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(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, extern bool wlc_prec_enq_head(wlc_info_t *wlc, struct pktq *q,
int prec, bool head); struct sk_buff *pkt, int prec, bool head);
extern u16 wlc_phytxctl1_calc(wlc_info_t *wlc, ratespec_t rspec); 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, extern void wlc_compute_plcp(wlc_info_t *wlc, ratespec_t rate, uint length,
u8 *plcp); u8 *plcp);
...@@ -953,8 +955,6 @@ extern void wlc_mimops_action_ht_send(wlc_info_t *wlc, wlc_bsscfg_t *bsscfg, ...@@ -953,8 +955,6 @@ extern void wlc_mimops_action_ht_send(wlc_info_t *wlc, wlc_bsscfg_t *bsscfg,
extern void wlc_switch_shortslot(wlc_info_t *wlc, bool shortslot); extern void wlc_switch_shortslot(wlc_info_t *wlc, bool shortslot);
extern void wlc_set_bssid(wlc_bsscfg_t *cfg); extern void wlc_set_bssid(wlc_bsscfg_t *cfg);
extern void wlc_edcf_setparams(wlc_bsscfg_t *cfg, bool suspend); 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 void wlc_set_ratetable(wlc_info_t *wlc);
extern int wlc_set_mac(wlc_bsscfg_t *cfg); extern int wlc_set_mac(wlc_bsscfg_t *cfg);
......
...@@ -512,6 +512,8 @@ extern bool wlc_isr(struct wlc_info *wlc, bool *wantdpc); ...@@ -512,6 +512,8 @@ extern bool wlc_isr(struct wlc_info *wlc, bool *wantdpc);
extern bool wlc_dpc(struct wlc_info *wlc, bool bounded); 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, extern bool wlc_send80211_raw(struct wlc_info *wlc, wlc_if_t *wlcif, void *p,
uint ac); 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, extern int wlc_iovar_op(struct wlc_info *wlc, const char *name, void *params,
int p_len, void *arg, int len, bool set, int p_len, void *arg, int len, bool set,
struct wlc_if *wlcif); struct wlc_if *wlcif);
...@@ -520,6 +522,11 @@ extern int wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len, ...@@ -520,6 +522,11 @@ extern int wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,
/* helper functions */ /* helper functions */
extern void wlc_statsupd(struct wlc_info *wlc); extern void wlc_statsupd(struct wlc_info *wlc);
extern int wlc_get_header_len(void); 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); extern wlc_pub_t *wlc_pub(void *wlc);
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include <proto/802.11.h> #include <proto/802.11.h>
/* copy a buffer into a pkt buffer chain */ /* 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) unsigned char *buf)
{ {
uint n, ret = 0; uint n, ret = 0;
...@@ -61,7 +61,7 @@ uint pktfrombuf(struct osl_info *osh, void *p, uint offset, int len, ...@@ -61,7 +61,7 @@ uint pktfrombuf(struct osl_info *osh, void *p, uint offset, int len,
return ret; return ret;
} }
/* return total length of buffer chain */ /* 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; uint total;
...@@ -75,7 +75,8 @@ uint BCMFASTPATH pkttotlen(struct osl_info *osh, void *p) ...@@ -75,7 +75,8 @@ uint BCMFASTPATH pkttotlen(struct osl_info *osh, void *p)
* osl multiple-precedence packet queue * osl multiple-precedence packet queue
* hi_prec is always >= the number of the highest non-empty precedence * 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; struct pktq_prec *q;
...@@ -103,7 +104,8 @@ void *BCMFASTPATH pktq_penq(struct pktq *pq, int prec, void *p) ...@@ -103,7 +104,8 @@ void *BCMFASTPATH pktq_penq(struct pktq *pq, int prec, void *p)
return p; 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; struct pktq_prec *q;
...@@ -130,10 +132,10 @@ void *BCMFASTPATH pktq_penq_head(struct pktq *pq, int prec, void *p) ...@@ -130,10 +132,10 @@ void *BCMFASTPATH pktq_penq_head(struct pktq *pq, int prec, void *p)
return p; 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; struct pktq_prec *q;
void *p; struct sk_buff *p;
ASSERT(prec >= 0 && prec < pq->num_prec); ASSERT(prec >= 0 && prec < pq->num_prec);
...@@ -156,10 +158,10 @@ void *BCMFASTPATH pktq_pdeq(struct pktq *pq, int prec) ...@@ -156,10 +158,10 @@ void *BCMFASTPATH pktq_pdeq(struct pktq *pq, int prec)
return p; 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; struct pktq_prec *q;
void *p, *prev; struct sk_buff *p, *prev;
ASSERT(prec >= 0 && prec < pq->num_prec); ASSERT(prec >= 0 && prec < pq->num_prec);
...@@ -189,7 +191,7 @@ void *BCMFASTPATH pktq_pdeq_tail(struct pktq *pq, int prec) ...@@ -189,7 +191,7 @@ void *BCMFASTPATH pktq_pdeq_tail(struct pktq *pq, int prec)
void pktq_pflush(struct osl_info *osh, struct pktq *pq, int prec, bool dir) void pktq_pflush(struct osl_info *osh, struct pktq *pq, int prec, bool dir)
{ {
struct pktq_prec *q; struct pktq_prec *q;
void *p; struct sk_buff *p;
q = &pq->q[prec]; q = &pq->q[prec];
p = q->head; p = q->head;
...@@ -218,7 +220,7 @@ pktq_pflush(struct osl_info *osh, struct pktq *pq, int prec, bool dir, ...@@ -218,7 +220,7 @@ pktq_pflush(struct osl_info *osh, struct pktq *pq, int prec, bool dir,
ifpkt_cb_t fn, int arg) ifpkt_cb_t fn, int arg)
{ {
struct pktq_prec *q; struct pktq_prec *q;
void *p, *prev = NULL; struct sk_buff *p, *prev = NULL;
q = &pq->q[prec]; q = &pq->q[prec];
p = q->head; p = q->head;
...@@ -275,7 +277,7 @@ void pktq_init(struct pktq *pq, int num_prec, int max_len) ...@@ -275,7 +277,7 @@ void pktq_init(struct pktq *pq, int num_prec, int max_len)
pq->q[prec].max = pq->max; 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; int prec;
...@@ -306,10 +308,11 @@ int pktq_mlen(struct pktq *pq, uint prec_bmp) ...@@ -306,10 +308,11 @@ int pktq_mlen(struct pktq *pq, uint prec_bmp)
return len; return len;
} }
/* Priority dequeue from a specific set of precedences */ /* 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; struct pktq_prec *q;
void *p; struct sk_buff *p;
int prec; int prec;
if (pq->len == 0) if (pq->len == 0)
...@@ -407,9 +410,9 @@ int getintvar(char *vars, const char *name) ...@@ -407,9 +410,9 @@ int getintvar(char *vars, const char *name)
#if defined(BCMDBG) #if defined(BCMDBG)
/* pretty hex print a pkt buffer chain */ /* 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')) if (msg && (msg[0] != '\0'))
printf("%s:\n", msg); printf("%s:\n", msg);
......
...@@ -232,7 +232,7 @@ static bool dma32_alloc(dma_info_t *di, uint direction); ...@@ -232,7 +232,7 @@ static bool dma32_alloc(dma_info_t *di, uint direction);
static bool dma32_txreset(dma_info_t *di); static bool dma32_txreset(dma_info_t *di);
static bool dma32_rxreset(dma_info_t *di); static bool dma32_rxreset(dma_info_t *di);
static bool dma32_txsuspendedidle(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_getnexttxp(dma_info_t *di, txd_range_t range);
static void *dma32_getnextrxp(dma_info_t *di, bool forceall); static void *dma32_getnextrxp(dma_info_t *di, bool forceall);
static void dma32_txrotate(dma_info_t *di); static void dma32_txrotate(dma_info_t *di);
...@@ -254,7 +254,7 @@ static bool dma64_alloc(dma_info_t *di, uint direction); ...@@ -254,7 +254,7 @@ static bool dma64_alloc(dma_info_t *di, uint direction);
static bool dma64_txreset(dma_info_t *di); static bool dma64_txreset(dma_info_t *di);
static bool dma64_rxreset(dma_info_t *di); static bool dma64_rxreset(dma_info_t *di);
static bool dma64_txsuspendedidle(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 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_getpos(dma_info_t *di, bool direction);
static void *dma64_getnexttxp(dma_info_t *di, txd_range_t range); static void *dma64_getnexttxp(dma_info_t *di, txd_range_t range);
...@@ -979,7 +979,7 @@ _dma_rx_param_get(dma_info_t *di, u16 *rxoffset, u16 *rxbufsize) ...@@ -979,7 +979,7 @@ _dma_rx_param_get(dma_info_t *di, u16 *rxoffset, u16 *rxbufsize)
*/ */
static void *BCMFASTPATH _dma_rx(dma_info_t *di) static void *BCMFASTPATH _dma_rx(dma_info_t *di)
{ {
void *p, *head, *tail; struct sk_buff *p, *head, *tail;
uint len; uint len;
uint pkt_len; uint pkt_len;
int resid = 0; int resid = 0;
...@@ -1054,7 +1054,7 @@ static void *BCMFASTPATH _dma_rx(dma_info_t *di) ...@@ -1054,7 +1054,7 @@ static void *BCMFASTPATH _dma_rx(dma_info_t *di)
*/ */
static bool BCMFASTPATH _dma_rxfill(dma_info_t *di) static bool BCMFASTPATH _dma_rxfill(dma_info_t *di)
{ {
void *p; struct sk_buff *p;
u16 rxin, rxout; u16 rxin, rxout;
u32 flags = 0; u32 flags = 0;
uint n; uint n;
...@@ -1652,9 +1652,9 @@ static bool dma32_txsuspendedidle(dma_info_t *di) ...@@ -1652,9 +1652,9 @@ static bool dma32_txsuspendedidle(dma_info_t *di)
* WARNING: call must check the return value for error. * WARNING: call must check the return value for error.
* the error(toss frames) could be fatal and cause many subsequent hard to debug problems * 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; unsigned char *data;
uint len; uint len;
u16 txout; u16 txout;
...@@ -2301,9 +2301,10 @@ static int dma64_txunframed(dma_info_t *di, void *buf, uint len, bool commit) ...@@ -2301,9 +2301,10 @@ static int dma64_txunframed(dma_info_t *di, void *buf, uint len, bool commit)
* WARNING: call must check the return value for error. * WARNING: call must check the return value for error.
* the error(toss frames) could be fatal and cause many subsequent hard to debug problems * 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; unsigned char *data;
uint len; uint len;
u16 txout; u16 txout;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment