mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
net: rename vlan_tx_* helpers since "tx" is misleading there
The same macros are used for rx as well. So rename it. Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
d8b9605d26
commit
df8a39defa
77 changed files with 195 additions and 190 deletions
|
|
@ -66,17 +66,17 @@ static int brnf_pass_vlan_indev __read_mostly = 0;
|
|||
#endif
|
||||
|
||||
#define IS_IP(skb) \
|
||||
(!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_IP))
|
||||
(!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_IP))
|
||||
|
||||
#define IS_IPV6(skb) \
|
||||
(!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_IPV6))
|
||||
(!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_IPV6))
|
||||
|
||||
#define IS_ARP(skb) \
|
||||
(!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_ARP))
|
||||
(!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_ARP))
|
||||
|
||||
static inline __be16 vlan_proto(const struct sk_buff *skb)
|
||||
{
|
||||
if (vlan_tx_tag_present(skb))
|
||||
if (skb_vlan_tag_present(skb))
|
||||
return skb->protocol;
|
||||
else if (skb->protocol == htons(ETH_P_8021Q))
|
||||
return vlan_eth_hdr(skb)->h_vlan_encapsulated_proto;
|
||||
|
|
@ -436,11 +436,11 @@ static struct net_device *brnf_get_logical_dev(struct sk_buff *skb, const struct
|
|||
struct net_device *vlan, *br;
|
||||
|
||||
br = bridge_parent(dev);
|
||||
if (brnf_pass_vlan_indev == 0 || !vlan_tx_tag_present(skb))
|
||||
if (brnf_pass_vlan_indev == 0 || !skb_vlan_tag_present(skb))
|
||||
return br;
|
||||
|
||||
vlan = __vlan_find_dev_deep_rcu(br, skb->vlan_proto,
|
||||
vlan_tx_tag_get(skb) & VLAN_VID_MASK);
|
||||
skb_vlan_tag_get(skb) & VLAN_VID_MASK);
|
||||
|
||||
return vlan ? vlan : br;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -628,8 +628,8 @@ static inline int br_vlan_get_tag(const struct sk_buff *skb, u16 *vid)
|
|||
{
|
||||
int err = 0;
|
||||
|
||||
if (vlan_tx_tag_present(skb))
|
||||
*vid = vlan_tx_tag_get(skb) & VLAN_VID_MASK;
|
||||
if (skb_vlan_tag_present(skb))
|
||||
*vid = skb_vlan_tag_get(skb) & VLAN_VID_MASK;
|
||||
else {
|
||||
*vid = 0;
|
||||
err = -EINVAL;
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ bool br_allowed_ingress(struct net_bridge *br, struct net_port_vlans *v,
|
|||
* sent from vlan device on the bridge device, it does not have
|
||||
* HW accelerated vlan tag.
|
||||
*/
|
||||
if (unlikely(!vlan_tx_tag_present(skb) &&
|
||||
if (unlikely(!skb_vlan_tag_present(skb) &&
|
||||
skb->protocol == proto)) {
|
||||
skb = skb_vlan_untag(skb);
|
||||
if (unlikely(!skb))
|
||||
|
|
@ -200,7 +200,7 @@ bool br_allowed_ingress(struct net_bridge *br, struct net_port_vlans *v,
|
|||
/* Protocol-mismatch, empty out vlan_tci for new tag */
|
||||
skb_push(skb, ETH_HLEN);
|
||||
skb = vlan_insert_tag_set_proto(skb, skb->vlan_proto,
|
||||
vlan_tx_tag_get(skb));
|
||||
skb_vlan_tag_get(skb));
|
||||
if (unlikely(!skb))
|
||||
return false;
|
||||
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ ebt_vlan_mt(const struct sk_buff *skb, struct xt_action_param *par)
|
|||
/* VLAN encapsulated Type/Length field, given from orig frame */
|
||||
__be16 encap;
|
||||
|
||||
if (vlan_tx_tag_present(skb)) {
|
||||
TCI = vlan_tx_tag_get(skb);
|
||||
if (skb_vlan_tag_present(skb)) {
|
||||
TCI = skb_vlan_tag_get(skb);
|
||||
encap = skb->protocol;
|
||||
} else {
|
||||
const struct vlan_hdr *fp;
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ ebt_basic_match(const struct ebt_entry *e, const struct sk_buff *skb,
|
|||
__be16 ethproto;
|
||||
int verdict, i;
|
||||
|
||||
if (vlan_tx_tag_present(skb))
|
||||
if (skb_vlan_tag_present(skb))
|
||||
ethproto = htons(ETH_P_8021Q);
|
||||
else
|
||||
ethproto = h->h_proto;
|
||||
|
|
|
|||
Loading…
Reference in a new issue