Commit 2d348d1f authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

net: Convert struct net_device uc_promisc to bool

No need to use int, its uses are boolean.
May save a few bytes one day.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 48daec03
...@@ -1132,7 +1132,7 @@ struct net_device { ...@@ -1132,7 +1132,7 @@ struct net_device {
spinlock_t addr_list_lock; spinlock_t addr_list_lock;
struct netdev_hw_addr_list uc; /* Unicast mac addresses */ struct netdev_hw_addr_list uc; /* Unicast mac addresses */
struct netdev_hw_addr_list mc; /* Multicast mac addresses */ struct netdev_hw_addr_list mc; /* Multicast mac addresses */
int uc_promisc; bool uc_promisc;
unsigned int promiscuity; unsigned int promiscuity;
unsigned int allmulti; unsigned int allmulti;
......
...@@ -4497,10 +4497,10 @@ void __dev_set_rx_mode(struct net_device *dev) ...@@ -4497,10 +4497,10 @@ void __dev_set_rx_mode(struct net_device *dev)
*/ */
if (!netdev_uc_empty(dev) && !dev->uc_promisc) { if (!netdev_uc_empty(dev) && !dev->uc_promisc) {
__dev_set_promiscuity(dev, 1); __dev_set_promiscuity(dev, 1);
dev->uc_promisc = 1; dev->uc_promisc = true;
} else if (netdev_uc_empty(dev) && dev->uc_promisc) { } else if (netdev_uc_empty(dev) && dev->uc_promisc) {
__dev_set_promiscuity(dev, -1); __dev_set_promiscuity(dev, -1);
dev->uc_promisc = 0; dev->uc_promisc = false;
} }
if (ops->ndo_set_multicast_list) if (ops->ndo_set_multicast_list)
......
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