mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-07 15:01:44 +00:00
vlan: make __vlan_hwaccel_put_tag return void
Always returns the same skb it gets, so change to void. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Acked-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1abcd82c20
commit
b960a0ac69
3 changed files with 7 additions and 10 deletions
|
@ -1669,10 +1669,8 @@ static int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp)
|
||||||
fcoe->realdev->features & NETIF_F_HW_VLAN_CTAG_TX) {
|
fcoe->realdev->features & NETIF_F_HW_VLAN_CTAG_TX) {
|
||||||
/* must set skb->dev before calling vlan_put_tag */
|
/* must set skb->dev before calling vlan_put_tag */
|
||||||
skb->dev = fcoe->realdev;
|
skb->dev = fcoe->realdev;
|
||||||
skb = __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
|
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
|
||||||
vlan_dev_vlan_id(fcoe->netdev));
|
vlan_dev_vlan_id(fcoe->netdev));
|
||||||
if (!skb)
|
|
||||||
return -ENOMEM;
|
|
||||||
} else
|
} else
|
||||||
skb->dev = fcoe->netdev;
|
skb->dev = fcoe->netdev;
|
||||||
|
|
||||||
|
|
|
@ -347,13 +347,11 @@ static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb,
|
||||||
*
|
*
|
||||||
* Puts the VLAN TCI in @skb->vlan_tci and lets the device do the rest
|
* Puts the VLAN TCI in @skb->vlan_tci and lets the device do the rest
|
||||||
*/
|
*/
|
||||||
static inline struct sk_buff *__vlan_hwaccel_put_tag(struct sk_buff *skb,
|
static inline void __vlan_hwaccel_put_tag(struct sk_buff *skb,
|
||||||
__be16 vlan_proto,
|
__be16 vlan_proto, u16 vlan_tci)
|
||||||
u16 vlan_tci)
|
|
||||||
{
|
{
|
||||||
skb->vlan_proto = vlan_proto;
|
skb->vlan_proto = vlan_proto;
|
||||||
skb->vlan_tci = VLAN_TAG_PRESENT | vlan_tci;
|
skb->vlan_tci = VLAN_TAG_PRESENT | vlan_tci;
|
||||||
return skb;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -368,7 +366,8 @@ static inline struct sk_buff *vlan_put_tag(struct sk_buff *skb,
|
||||||
__be16 vlan_proto, u16 vlan_tci)
|
__be16 vlan_proto, u16 vlan_tci)
|
||||||
{
|
{
|
||||||
if (vlan_hw_offload_capable(skb->dev->features, vlan_proto)) {
|
if (vlan_hw_offload_capable(skb->dev->features, vlan_proto)) {
|
||||||
return __vlan_hwaccel_put_tag(skb, vlan_proto, vlan_tci);
|
__vlan_hwaccel_put_tag(skb, vlan_proto, vlan_tci);
|
||||||
|
return skb;
|
||||||
} else {
|
} else {
|
||||||
return __vlan_put_tag(skb, vlan_proto, vlan_tci);
|
return __vlan_put_tag(skb, vlan_proto, vlan_tci);
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,7 +150,7 @@ static netdev_tx_t vlan_dev_hard_start_xmit(struct sk_buff *skb,
|
||||||
u16 vlan_tci;
|
u16 vlan_tci;
|
||||||
vlan_tci = vlan->vlan_id;
|
vlan_tci = vlan->vlan_id;
|
||||||
vlan_tci |= vlan_dev_get_egress_qos_mask(dev, skb->priority);
|
vlan_tci |= vlan_dev_get_egress_qos_mask(dev, skb->priority);
|
||||||
skb = __vlan_hwaccel_put_tag(skb, vlan->vlan_proto, vlan_tci);
|
__vlan_hwaccel_put_tag(skb, vlan->vlan_proto, vlan_tci);
|
||||||
}
|
}
|
||||||
|
|
||||||
skb->dev = vlan->real_dev;
|
skb->dev = vlan->real_dev;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue