Commit 99f7c5e0 authored by Nikolay Aleksandrov's avatar Nikolay Aleksandrov Committed by David S. Miller

net: bridge: vlan options: rename br_vlan_opts_eq to br_vlan_opts_eq_range

It is more appropriate name as it shows the intent of why we need to
check the options' state. It also allows us to give meaning to the two
arguments of the function: the first is the current vlan (v_curr) being
checked if it could enter the range ending in the second one (range_end).
Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0419c450
...@@ -1199,8 +1199,8 @@ static inline void br_vlan_notify(const struct net_bridge *br, ...@@ -1199,8 +1199,8 @@ static inline void br_vlan_notify(const struct net_bridge *br,
/* br_vlan_options.c */ /* br_vlan_options.c */
#ifdef CONFIG_BRIDGE_VLAN_FILTERING #ifdef CONFIG_BRIDGE_VLAN_FILTERING
bool br_vlan_opts_eq(const struct net_bridge_vlan *v1, bool br_vlan_opts_eq_range(const struct net_bridge_vlan *v_curr,
const struct net_bridge_vlan *v2); const struct net_bridge_vlan *range_end);
bool br_vlan_opts_fill(struct sk_buff *skb, const struct net_bridge_vlan *v); bool br_vlan_opts_fill(struct sk_buff *skb, const struct net_bridge_vlan *v);
size_t br_vlan_opts_nl_size(void); size_t br_vlan_opts_nl_size(void);
int br_vlan_process_options(const struct net_bridge *br, int br_vlan_process_options(const struct net_bridge *br,
......
...@@ -1694,7 +1694,7 @@ bool br_vlan_can_enter_range(const struct net_bridge_vlan *v_curr, ...@@ -1694,7 +1694,7 @@ bool br_vlan_can_enter_range(const struct net_bridge_vlan *v_curr,
{ {
return v_curr->vid - range_end->vid == 1 && return v_curr->vid - range_end->vid == 1 &&
range_end->flags == v_curr->flags && range_end->flags == v_curr->flags &&
br_vlan_opts_eq(v_curr, range_end); br_vlan_opts_eq_range(v_curr, range_end);
} }
static int br_vlan_dump_dev(const struct net_device *dev, static int br_vlan_dump_dev(const struct net_device *dev,
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
#include "br_private.h" #include "br_private.h"
/* check if the options between two vlans are equal */ /* check if the options' state of v_curr allow it to enter the range */
bool br_vlan_opts_eq(const struct net_bridge_vlan *v1, bool br_vlan_opts_eq_range(const struct net_bridge_vlan *v_curr,
const struct net_bridge_vlan *v2) const struct net_bridge_vlan *range_end)
{ {
return v1->state == v2->state; return v_curr->state == range_end->state;
} }
bool br_vlan_opts_fill(struct sk_buff *skb, const struct net_bridge_vlan *v) bool br_vlan_opts_fill(struct sk_buff *skb, const struct net_bridge_vlan *v)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment