staging: brcm80211: get rid of PKT[TO/FROM]NATIVE macros
These macros are not needed in a linux-only driver and have been removed. Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
0aa94b8484
commit
b8b5418b5b
|
@ -990,26 +990,9 @@ int brcmf_sendpkt(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pktbuf)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void *
|
|
||||||
osl_pkt_frmnative(struct sk_buff *skb)
|
|
||||||
{
|
|
||||||
return (void *)skb;
|
|
||||||
}
|
|
||||||
#define PKTFRMNATIVE(osh, skb) \
|
|
||||||
osl_pkt_frmnative((struct sk_buff *)(skb))
|
|
||||||
|
|
||||||
static inline struct sk_buff *
|
|
||||||
osl_pkt_tonative(void *pkt)
|
|
||||||
{
|
|
||||||
return (struct sk_buff *)pkt;
|
|
||||||
}
|
|
||||||
#define PKTTONATIVE(osh, pkt) \
|
|
||||||
osl_pkt_tonative((pkt))
|
|
||||||
|
|
||||||
static int dhd_start_xmit(struct sk_buff *skb, struct net_device *net)
|
static int dhd_start_xmit(struct sk_buff *skb, struct net_device *net)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
void *pktbuf;
|
|
||||||
dhd_info_t *dhd = *(dhd_info_t **) netdev_priv(net);
|
dhd_info_t *dhd = *(dhd_info_t **) netdev_priv(net);
|
||||||
int ifidx;
|
int ifidx;
|
||||||
|
|
||||||
|
@ -1048,17 +1031,7 @@ static int dhd_start_xmit(struct sk_buff *skb, struct net_device *net)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert to packet */
|
ret = brcmf_sendpkt(&dhd->pub, ifidx, skb);
|
||||||
pktbuf = PKTFRMNATIVE(dhd->pub.osh, skb);
|
|
||||||
if (!pktbuf) {
|
|
||||||
DHD_ERROR(("%s: PKTFRMNATIVE failed\n",
|
|
||||||
brcmf_ifname(&dhd->pub, ifidx)));
|
|
||||||
dev_kfree_skb_any(skb);
|
|
||||||
ret = -ENOMEM;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = brcmf_sendpkt(&dhd->pub, ifidx, pktbuf);
|
|
||||||
|
|
||||||
done:
|
done:
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@ -1086,11 +1059,10 @@ void brcmf_txflowcontrol(dhd_pub_t *dhdp, int ifidx, bool state)
|
||||||
netif_wake_queue(net);
|
netif_wake_queue(net);
|
||||||
}
|
}
|
||||||
|
|
||||||
void brcmf_rx_frame(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pktbuf,
|
void brcmf_rx_frame(dhd_pub_t *dhdp, int ifidx, struct sk_buff *skb,
|
||||||
int numpkt)
|
int numpkt)
|
||||||
{
|
{
|
||||||
dhd_info_t *dhd = (dhd_info_t *) dhdp->info;
|
dhd_info_t *dhd = (dhd_info_t *) dhdp->info;
|
||||||
struct sk_buff *skb;
|
|
||||||
unsigned char *eth;
|
unsigned char *eth;
|
||||||
uint len;
|
uint len;
|
||||||
void *data;
|
void *data;
|
||||||
|
@ -1101,14 +1073,12 @@ void brcmf_rx_frame(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pktbuf,
|
||||||
|
|
||||||
DHD_TRACE(("%s: Enter\n", __func__));
|
DHD_TRACE(("%s: Enter\n", __func__));
|
||||||
|
|
||||||
save_pktbuf = pktbuf;
|
save_pktbuf = skb;
|
||||||
|
|
||||||
for (i = 0; pktbuf && i < numpkt; i++, pktbuf = pnext) {
|
for (i = 0; skb && i < numpkt; i++, skb = pnext) {
|
||||||
|
|
||||||
pnext = pktbuf->next;
|
pnext = skb->next;
|
||||||
pktbuf->next = NULL;
|
skb->next = NULL;
|
||||||
|
|
||||||
skb = PKTTONATIVE(dhdp->osh, pktbuf);
|
|
||||||
|
|
||||||
/* Get the protocol, maintain skb around eth_type_trans()
|
/* Get the protocol, maintain skb around eth_type_trans()
|
||||||
* The main reason for this hack is for the limitation of
|
* The main reason for this hack is for the limitation of
|
||||||
|
|
Loading…
Reference in New Issue