Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228216
b: refs/heads/master
c: 54991ad
h: refs/heads/master
v: v3
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Nov 29, 2010
1 parent 39dec66 commit 98362fa
Show file tree
Hide file tree
Showing 12 changed files with 184 additions and 194 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: c26b1378a71de617fb5ba7da8b6fdc882caed0e8
refs/heads/master: 54991ad6d05186bd0324dbdc9c64c5b7952e74c4
32 changes: 16 additions & 16 deletions trunk/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,8 +944,8 @@ sdioh_request_packet(sdioh_info_t *sd, uint fix_inc, uint write, uint func,

/* Claim host controller */
sdio_claim_host(gInstance->func[func]);
for (pnext = pkt; pnext; pnext = PKTNEXT(pnext)) {
uint pkt_len = PKTLEN(pnext);
for (pnext = pkt; pnext; pnext = pnext->next) {
uint pkt_len = pnext->len;
pkt_len += 3;
pkt_len &= 0xFFFFFFFC;

Expand All @@ -962,23 +962,23 @@ sdioh_request_packet(sdioh_info_t *sd, uint fix_inc, uint write, uint func,
* is supposed to give
* us something we can work with.
*/
ASSERT(((u32) (PKTDATA(pkt)) & DMA_ALIGN_MASK) == 0);
ASSERT(((u32) (pkt->data) & DMA_ALIGN_MASK) == 0);

if ((write) && (!fifo)) {
err_ret = sdio_memcpy_toio(gInstance->func[func], addr,
((u8 *) PKTDATA(pnext)),
((u8 *) (pnext->data)),
pkt_len);
} else if (write) {
err_ret = sdio_memcpy_toio(gInstance->func[func], addr,
((u8 *) PKTDATA(pnext)),
((u8 *) (pnext->data)),
pkt_len);
} else if (fifo) {
err_ret = sdio_readsb(gInstance->func[func],
((u8 *) PKTDATA(pnext)),
((u8 *) (pnext->data)),
addr, pkt_len);
} else {
err_ret = sdio_memcpy_fromio(gInstance->func[func],
((u8 *) PKTDATA(pnext)),
((u8 *) (pnext->data)),
addr, pkt_len);
}

Expand Down Expand Up @@ -1048,41 +1048,41 @@ sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write,

/* For a write, copy the buffer data into the packet. */
if (write)
bcopy(buffer, PKTDATA(mypkt), buflen_u);
bcopy(buffer, mypkt->data, buflen_u);

Status =
sdioh_request_packet(sd, fix_inc, write, func, addr, mypkt);

/* For a read, copy the packet data back to the buffer. */
if (!write)
bcopy(PKTDATA(mypkt), buffer, buflen_u);
bcopy(mypkt->data, buffer, buflen_u);

PKTFREE(sd->osh, mypkt, write ? true : false);
} else if (((u32) (PKTDATA(pkt)) & DMA_ALIGN_MASK) != 0) {
} else if (((u32) (pkt->data) & DMA_ALIGN_MASK) != 0) {
/* Case 2: We have a packet, but it is unaligned. */

/* In this case, we cannot have a chain. */
ASSERT(PKTNEXT(pkt) == NULL);
ASSERT(pkt->next == NULL);

sd_data(("%s: Creating aligned %s Packet, len=%d\n",
__func__, write ? "TX" : "RX", PKTLEN(pkt)));
mypkt = PKTGET(sd->osh, PKTLEN(pkt), write ? true : false);
__func__, write ? "TX" : "RX", pkt->len));
mypkt = PKTGET(sd->osh, pkt->len, write ? true : false);
if (!mypkt) {
sd_err(("%s: PKTGET failed: len %d\n",
__func__, PKTLEN(pkt)));
__func__, pkt->len));
return SDIOH_API_RC_FAIL;
}

/* For a write, copy the buffer data into the packet. */
if (write)
bcopy(PKTDATA(pkt), PKTDATA(mypkt), PKTLEN(pkt));
bcopy(pkt->data, mypkt->data, pkt->len);

Status =
sdioh_request_packet(sd, fix_inc, write, func, addr, mypkt);

/* For a read, copy the packet data back to the buffer. */
if (!write)
bcopy(PKTDATA(mypkt), PKTDATA(pkt), PKTLEN(mypkt));
bcopy(mypkt->data, pkt->data, mypkt->len);

PKTFREE(sd->osh, mypkt, write ? true : false);
} else { /* case 3: We have a packet and
Expand Down
18 changes: 9 additions & 9 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,13 +323,13 @@ void dhd_prot_hdrpush(dhd_pub_t *dhd, int ifidx, struct sk_buff *pktbuf)

skb_push(pktbuf, BDC_HEADER_LEN);

h = (struct bdc_header *)PKTDATA(pktbuf);
h = (struct bdc_header *)(pktbuf->data);

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->priority = (pktbuf->priority & BDC_PRIORITY_MASK);
h->flags2 = 0;
h->rssi = 0;
#endif /* BDC */
Expand All @@ -341,13 +341,13 @@ 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) {
if (pktbuf->len < BDC_HEADER_LEN) {
DHD_ERROR(("%s: rx data too short (%d < %d)\n",
__func__, PKTLEN(pktbuf), BDC_HEADER_LEN));
__func__, pktbuf->len, BDC_HEADER_LEN));
return BCME_ERROR;
}

h = (struct bdc_header *)PKTDATA(pktbuf);
h = (struct bdc_header *)(pktbuf->data);

*fcbits = h->priority >> BDC_PRIORITY_FC_SHIFT;
if ((h->flags2 & BDC_FLAG2_FC_FLAG) == BDC_FLAG2_FC_FLAG)
Expand All @@ -367,13 +367,13 @@ int dhd_prot_hdrpull(dhd_pub_t *dhd, int *ifidx, struct sk_buff *pktbuf)
#ifdef BDC
/* Pop BDC header used to convey priority for buses that don't */

if (PKTLEN(pktbuf) < BDC_HEADER_LEN) {
if (pktbuf->len < BDC_HEADER_LEN) {
DHD_ERROR(("%s: rx data too short (%d < %d)\n", __func__,
PKTLEN(pktbuf), BDC_HEADER_LEN));
pktbuf->len, BDC_HEADER_LEN));
return BCME_ERROR;
}

h = (struct bdc_header *)PKTDATA(pktbuf);
h = (struct bdc_header *)(pktbuf->data);

*ifidx = BDC_GET_IF_IDX(h);
if (*ifidx >= DHD_MAX_IFS) {
Expand All @@ -396,7 +396,7 @@ int dhd_prot_hdrpull(dhd_pub_t *dhd, int *ifidx, struct sk_buff *pktbuf)
PKTSETSUMGOOD(pktbuf, true);
}

PKTSETPRIO(pktbuf, (h->priority & BDC_PRIORITY_MASK));
pktbuf->priority = h->priority & BDC_PRIORITY_MASK;

skb_pull(pktbuf, BDC_HEADER_LEN);
#endif /* BDC */
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1028,8 +1028,8 @@ int dhd_sendpkt(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pktbuf)
return -ENODEV;

/* Update multicast statistic */
if (PKTLEN(pktbuf) >= ETHER_ADDR_LEN) {
u8 *pktdata = (u8 *) PKTDATA(pktbuf);
if (pktbuf->len >= ETHER_ADDR_LEN) {
u8 *pktdata = (u8 *) (pktbuf->data);
struct ether_header *eh = (struct ether_header *)pktdata;

if (ETHER_ISMULTI(eh->ether_dhost))
Expand Down Expand Up @@ -1151,8 +1151,8 @@ void dhd_rx_frame(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pktbuf,

for (i = 0; pktbuf && i < numpkt; i++, pktbuf = pnext) {

pnext = PKTNEXT(pktbuf);
PKTSETNEXT(pktbuf, NULL);
pnext = pktbuf->next;
pktbuf->next = NULL;

skb = PKTTONATIVE(dhdp->osh, pktbuf);

Expand Down Expand Up @@ -1233,7 +1233,7 @@ void dhd_txcomplete(dhd_pub_t *dhdp, struct sk_buff *txp, bool success)

dhd_prot_hdrpull(dhdp, &ifidx, txp);

eh = (struct ether_header *)PKTDATA(txp);
eh = (struct ether_header *)(txp->data);
type = ntoh16(eh->ether_type);

if (type == ETHER_TYPE_802_1X)
Expand Down
Loading

0 comments on commit 98362fa

Please sign in to comment.