提交 31ed07dc 编写于 作者: A Arend van Spriel 提交者: John W. Linville

brcmfmac: remove ifidx variable from brcmf_fws_process_skb()

The value can be obtained from the struct brcmf_if object pointer
and it is used only twice.
Reviewed-by: NHante Meuleman <meuleman@broadcom.com>
Reviewed-by: NPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: NArend van Spriel <arend@broadcom.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 9fc60224
...@@ -1718,7 +1718,6 @@ int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb) ...@@ -1718,7 +1718,6 @@ int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb)
struct brcmf_skbuff_cb *skcb = brcmf_skbcb(skb); struct brcmf_skbuff_cb *skcb = brcmf_skbcb(skb);
struct ethhdr *eh = (struct ethhdr *)(skb->data); struct ethhdr *eh = (struct ethhdr *)(skb->data);
ulong flags; ulong flags;
u8 ifidx = ifp->ifidx;
int fifo = BRCMF_FWS_FIFO_BCMC; int fifo = BRCMF_FWS_FIFO_BCMC;
bool multicast = is_multicast_ether_addr(eh->h_dest); bool multicast = is_multicast_ether_addr(eh->h_dest);
...@@ -1732,7 +1731,7 @@ int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb) ...@@ -1732,7 +1731,7 @@ int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb)
if (!brcmf_fws_fc_active(drvr->fws)) { if (!brcmf_fws_fc_active(drvr->fws)) {
/* If the protocol uses a data header, apply it */ /* If the protocol uses a data header, apply it */
brcmf_proto_hdrpush(drvr, ifidx, 0, skb); brcmf_proto_hdrpush(drvr, ifp->ifidx, 0, skb);
/* Use bus module to send data frame */ /* Use bus module to send data frame */
return brcmf_bus_txdata(drvr->bus_if, skb); return brcmf_bus_txdata(drvr->bus_if, skb);
...@@ -1742,7 +1741,7 @@ int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb) ...@@ -1742,7 +1741,7 @@ int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb)
skcb->if_flags = 0; skcb->if_flags = 0;
skcb->mac = brcmf_fws_find_mac_desc(drvr->fws, ifp, eh->h_dest); skcb->mac = brcmf_fws_find_mac_desc(drvr->fws, ifp, eh->h_dest);
skcb->state = BRCMF_FWS_SKBSTATE_NEW; skcb->state = BRCMF_FWS_SKBSTATE_NEW;
brcmf_skb_if_flags_set_field(skb, INDEX, ifidx); brcmf_skb_if_flags_set_field(skb, INDEX, ifp->ifidx);
if (!multicast) if (!multicast)
fifo = brcmf_fws_prio2fifo[skb->priority]; fifo = brcmf_fws_prio2fifo[skb->priority];
brcmf_skb_if_flags_set_field(skb, FIFO, fifo); brcmf_skb_if_flags_set_field(skb, FIFO, fifo);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册