ASSERT(datalign < (align)); \
ASSERT(PKTLEN((p)) >= ((len) + datalign)); \
if (datalign) \
- PKTPULL((p), datalign); \
+ skb_pull((p), datalign); \
PKTSETLEN((p), (len)); \
} while (0)
ASSERT(((unsigned long)frame % DHD_SDALIGN) == 0);
pad = 0;
} else {
- PKTPUSH(pkt, pad);
+ skb_push(pkt, pad);
frame = (u8 *) PKTDATA(pkt);
ASSERT((pad + SDPCM_HDRLEN) <= (int)PKTLEN(pkt));
done:
/* restore pkt buffer pointer before calling tx complete routine */
- PKTPULL(pkt, SDPCM_HDRLEN + pad);
+ skb_pull(pkt, SDPCM_HDRLEN + pad);
dhd_os_sdunlock(bus->dhd);
dhd_txcomplete(bus->dhd, pkt, ret != 0);
dhd_os_sdlock(bus->dhd);
/* Push the test header if doing loopback */
if (bus->ext_loop) {
u8 *data;
- PKTPUSH(pkt, SDPCM_TEST_HDRLEN);
+ skb_push(pkt, SDPCM_TEST_HDRLEN);
data = PKTDATA(pkt);
*data++ = SDPCM_TEST_ECHOREQ;
*data++ = (u8) bus->loopid++;
#endif /* SDTEST */
/* Add space for the header */
- PKTPUSH(pkt, SDPCM_HDRLEN);
+ skb_push(pkt, SDPCM_HDRLEN);
ASSERT(IS_ALIGNED((unsigned long)PKTDATA(pkt), 2));
prec = PRIO2PREC((PKTPRIO(pkt) & PRIOMASK));
/* Priority based enq */
dhd_os_sdlock_txq(bus->dhd);
if (dhd_prec_enq(bus->dhd, &bus->txq, pkt, prec) == false) {
- PKTPULL(pkt, SDPCM_HDRLEN);
+ skb_pull(pkt, SDPCM_HDRLEN);
dhd_txcomplete(bus->dhd, pkt, false);
PKTFREE(osh, pkt, true);
DHD_ERROR(("%s: out of bus->txq !!!\n", __func__));
bus->tx_max = txmax;
/* Remove superframe header, remember offset */
- PKTPULL(pfirst, doff);
+ skb_pull(pfirst, doff);
sfdoff = doff;
/* Validate all the subframe headers */
a couple retries */
if (bus->glomerr++ < 3) {
/* Restore superframe header space */
- PKTPUSH(pfirst, sfdoff);
+ skb_push(pfirst, sfdoff);
dhdsdio_rxfail(bus, true, true);
} else {
bus->glomerr = 0;
#endif
PKTSETLEN(pfirst, sublen);
- PKTPULL(pfirst, doff);
+ skb_pull(pfirst, doff);
if (PKTLEN(pfirst) == 0) {
PKTFREE(bus->dhd->osh, pfirst, false);
/* Leave room for what we already read, and align remainder */
ASSERT(firstread < (PKTLEN(pkt)));
- PKTPULL(pkt, firstread);
+ skb_pull(pkt, firstread);
PKTALIGN(osh, pkt, rdlen, DHD_SDALIGN);
/* Read the remaining frame data */
}
/* Copy the already-read portion */
- PKTPUSH(pkt, firstread);
+ skb_push(pkt, firstread);
bcopy(bus->rxhdr, PKTDATA(pkt), firstread);
#ifdef DHD_DEBUG
#endif
PKTSETLEN(pkt, len);
ASSERT(doff == SDPCM_HDRLEN);
- PKTPULL(pkt, SDPCM_HDRLEN);
+ skb_pull(pkt, SDPCM_HDRLEN);
bus->glomd = pkt;
} else {
DHD_ERROR(("%s: glom superframe w/o "
/* Fill in packet len and prio, deliver upward */
PKTSETLEN(pkt, len);
- PKTPULL(pkt, doff);
+ skb_pull(pkt, doff);
#ifdef SDTEST
/* Test channel packets are processed separately */
status & TX_STATUS_FRM_RTX_MASK) >>
TX_STATUS_FRM_RTX_SHIFT;
- PKTPULL(p, D11_PHY_HDR_LEN);
- PKTPULL(p, D11_TXH_LEN);
+ skb_pull(p, D11_PHY_HDR_LEN);
+ skb_pull(p, D11_TXH_LEN);
ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw,
p);
ieee80211_tx_info_clear_status(tx_info);
tx_info->flags |=
IEEE80211_TX_STAT_AMPDU_NO_BACK;
- PKTPULL(p, D11_PHY_HDR_LEN);
- PKTPULL(p, D11_TXH_LEN);
+ skb_pull(p, D11_PHY_HDR_LEN);
+ skb_pull(p, D11_TXH_LEN);
WL_ERROR(("%s: BA Timeout, seq %d, in_transit %d\n", SHORTNAME, seq, ini->tx_in_transit));
ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw,
p);
ASSERT(tx_info);
/* add PLCP */
- plcp = PKTPUSH(p, D11_PHY_HDR_LEN);
+ plcp = skb_push(p, D11_PHY_HDR_LEN);
/* add Broadcom tx descriptor header */
- txh = (d11txh_t *) PKTPUSH(p, D11_TXH_LEN);
+ txh = (d11txh_t *) skb_push(p, D11_TXH_LEN);
bzero((char *)txh, D11_TXH_LEN);
/* setup frameid */
PKTSETLINK(p, NULL);
wlc->txretried = 0;
/* remove PLCP & Broadcom tx descriptor header */
- PKTPULL(p, D11_PHY_HDR_LEN);
- PKTPULL(p, D11_TXH_LEN);
+ skb_pull(p, D11_PHY_HDR_LEN);
+ skb_pull(p, D11_TXH_LEN);
ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw, p);
WLCNTINCR(wlc->pub->_cnt->ieee_tx_status);
} else {
/* mac header+body length, exclude CRC and plcp header */
len_mpdu = PKTLEN(p) - D11_PHY_HDR_LEN - DOT11_FCS_LEN;
- PKTPULL(p, D11_PHY_HDR_LEN);
+ skb_pull(p, D11_PHY_HDR_LEN);
PKTSETLEN(p, len_mpdu);
ASSERT(!PKTNEXT(p));
rxh = (d11rxhdr_t *) PKTDATA(p);
/* strip off rxhdr */
- PKTPULL(p, wlc->hwrxoff);
+ skb_pull(p, wlc->hwrxoff);
/* fixup rx header endianness */
ltoh16_buf((void *)rxh, sizeof(d11rxhdr_t));
wlc->pub->unit, PKTLEN(p)));
goto toss;
}
- PKTPULL(p, 2);
+ skb_pull(p, 2);
}
h = (struct dot11_header *)(PKTDATA(p) + D11_PHY_HDR_LEN);