Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228287
b: refs/heads/master
c: f09e023
h: refs/heads/master
i:
  228285: 56bce8e
  228283: 08d41ab
  228279: 703c988
  228271: 4c9862f
  228255: df1db47
  228223: 05d2601
v: v3
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Dec 7, 2010
1 parent ee707d3 commit e5591c0
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c6a9e1fc715763175842014a83a9ea70f7e19ace
refs/heads/master: f09e02322ed36feafba6e3a6373e0bcd93730ce6
8 changes: 4 additions & 4 deletions trunk/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1039,9 +1039,9 @@ sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write,
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);
mypkt = pkt_buf_get_skb(sd->osh, buflen_u);
if (!mypkt) {
sd_err(("%s: PKTGET failed: len %d\n",
sd_err(("%s: pkt_buf_get_skb failed: len %d\n",
__func__, buflen_u));
return SDIOH_API_RC_FAIL;
}
Expand All @@ -1066,9 +1066,9 @@ sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write,

sd_data(("%s: Creating aligned %s Packet, len=%d\n",
__func__, write ? "TX" : "RX", pkt->len));
mypkt = PKTGET(sd->osh, pkt->len, write ? true : false);
mypkt = pkt_buf_get_skb(sd->osh, pkt->len);
if (!mypkt) {
sd_err(("%s: PKTGET failed: len %d\n",
sd_err(("%s: pkt_buf_get_skb failed: len %d\n",
__func__, pkt->len));
return SDIOH_API_RC_FAIL;
}
Expand Down
24 changes: 12 additions & 12 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, struct sk_buff *pkt, uint chan,
DHD_INFO(("%s: insufficient headroom %d for %d pad\n",
__func__, skb_headroom(pkt), pad));
bus->dhd->tx_realloc++;
new = PKTGET(osh, (pkt->len + DHD_SDALIGN), true);
new = pkt_buf_get_skb(osh, (pkt->len + DHD_SDALIGN));
if (!new) {
DHD_ERROR(("%s: couldn't allocate new %d-byte "
"packet\n",
Expand Down Expand Up @@ -3240,9 +3240,9 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
}

/* Allocate/chain packet for next subframe */
pnext = PKTGET(osh, sublen + DHD_SDALIGN, false);
pnext = pkt_buf_get_skb(osh, sublen + DHD_SDALIGN);
if (pnext == NULL) {
DHD_ERROR(("%s: PKTGET failed, num %d len %d\n",
DHD_ERROR(("%s: pkt_buf_get_skb failed, num %d len %d\n",
__func__, num, sublen));
break;
}
Expand Down Expand Up @@ -3680,7 +3680,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
*/
/* Allocate a packet buffer */
dhd_os_sdlock_rxq(bus->dhd);
pkt = PKTGET(osh, rdlen + DHD_SDALIGN, false);
pkt = pkt_buf_get_skb(osh, rdlen + DHD_SDALIGN);
if (!pkt) {
if (bus->bus == SPI_BUS) {
bus->usebufpool = false;
Expand Down Expand Up @@ -3726,7 +3726,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
} else {
/* Give up on data,
request rtx of events */
DHD_ERROR(("%s (nextlen): PKTGET failed: len %d rdlen %d " "expected rxseq %d\n",
DHD_ERROR(("%s (nextlen): pkt_buf_get_skb failed: len %d rdlen %d " "expected rxseq %d\n",
__func__, len, rdlen, rxseq));
/* Just go try again w/normal
header read */
Expand Down Expand Up @@ -4091,10 +4091,10 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
}

dhd_os_sdlock_rxq(bus->dhd);
pkt = PKTGET(osh, (rdlen + firstread + DHD_SDALIGN), false);
pkt = pkt_buf_get_skb(osh, (rdlen + firstread + DHD_SDALIGN));
if (!pkt) {
/* Give up on data, request rtx of events */
DHD_ERROR(("%s: PKTGET failed: rdlen %d chan %d\n",
DHD_ERROR(("%s: pkt_buf_get_skb failed: rdlen %d chan %d\n",
__func__, rdlen, chan));
bus->dhd->rx_dropped++;
dhd_os_sdunlock_rxq(bus->dhd);
Expand Down Expand Up @@ -4663,11 +4663,11 @@ static void dhdsdio_pktgen(dhd_bus_t *bus)

/* Allocate an appropriate-sized packet */
len = bus->pktgen_len;
pkt = PKTGET(osh,
pkt = pkt_buf_get_skb(osh,
(len + SDPCM_HDRLEN + SDPCM_TEST_HDRLEN + DHD_SDALIGN),
true);
if (!pkt) {
DHD_ERROR(("%s: PKTGET failed!\n", __func__));
DHD_ERROR(("%s: pkt_buf_get_skb failed!\n", __func__));
break;
}
PKTALIGN(osh, pkt, (len + SDPCM_HDRLEN + SDPCM_TEST_HDRLEN),
Expand Down Expand Up @@ -4743,10 +4743,10 @@ static void dhdsdio_sdtest_set(dhd_bus_t *bus, bool start)
struct osl_info *osh = bus->dhd->osh;

/* Allocate the packet */
pkt = PKTGET(osh, SDPCM_HDRLEN + SDPCM_TEST_HDRLEN + DHD_SDALIGN,
pkt = pkt_buf_get_skb(osh, SDPCM_HDRLEN + SDPCM_TEST_HDRLEN + DHD_SDALIGN,
true);
if (!pkt) {
DHD_ERROR(("%s: PKTGET failed!\n", __func__));
DHD_ERROR(("%s: pkt_buf_get_skb failed!\n", __func__));
return;
}
PKTALIGN(osh, pkt, (SDPCM_HDRLEN + SDPCM_TEST_HDRLEN), DHD_SDALIGN);
Expand Down Expand Up @@ -5008,7 +5008,7 @@ extern int dhd_bus_console_in(dhd_pub_t *dhdp, unsigned char *msg, uint msglen)
/* Bump dongle by sending an empty event pkt.
* sdpcm_sendup (RX) checks for virtual console input.
*/
pkt = PKTGET(bus->dhd->osh, 4 + SDPCM_RESERVE, true);
pkt = pkt_buf_get_skb(bus->dhd->osh, 4 + SDPCM_RESERVE);
if ((pkt != NULL) && bus->clkstate == CLK_AVAIL)
dhdsdio_txpkt(bus, pkt, SDPCM_EVENT_CHANNEL, true);

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/staging/brcm80211/include/osl.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,9 @@ extern void osl_dma_unmap(struct osl_info *osh, uint pa, uint size,
#define bcopy(src, dst, len) memcpy((dst), (src), (len))

/* packet primitives */
#define PKTGET(osh, len, send) osl_pktget((osh), (len))
#define PKTFREE(osh, skb, send) osl_pktfree((osh), (skb), (send))

extern void *osl_pktget(struct osl_info *osh, uint len);
extern struct sk_buff *pkt_buf_get_skb(struct osl_info *osh, uint len);
extern void osl_pktfree(struct osl_info *osh, void *skb, bool send);

#endif /* _osl_h_ */
2 changes: 1 addition & 1 deletion trunk/drivers/staging/brcm80211/util/hnddma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ static bool BCMFASTPATH _dma_rxfill(dma_info_t *di)
size to be allocated
*/

p = osl_pktget(di->osh, di->rxbufsize + extra_offset);
p = pkt_buf_get_skb(di->osh, di->rxbufsize + extra_offset);

if (p == NULL) {
DMA_ERROR(("%s: dma_rxfill: out of rxbufs\n",
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/brcm80211/util/linux_osl.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void osl_detach(struct osl_info *osh)
kfree(osh);
}

void *BCMFASTPATH osl_pktget(struct osl_info *osh, uint len)
struct sk_buff *BCMFASTPATH pkt_buf_get_skb(struct osl_info *osh, uint len)
{
struct sk_buff *skb;

Expand All @@ -91,7 +91,7 @@ void *BCMFASTPATH osl_pktget(struct osl_info *osh, uint len)
osh->pktalloced++;
}

return (void *)skb;
return skb;
}

/* Free the driver packet. Free the tag if present */
Expand Down

0 comments on commit e5591c0

Please sign in to comment.