kni: rename variable with namespace prefix
All global variables in kernel should be prefixed by the same
to avoid any symbol conflics. Rename dflt_carrier to kni_default_carrier.
Fixes: 89397a01ce
("kni: set default carrier state of interface")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
parent
e8a17faa5e
commit
c793dce985
@ -32,7 +32,7 @@
|
||||
#define MBUF_BURST_SZ 32
|
||||
|
||||
/* Default carrier state for created KNI network interfaces */
|
||||
extern uint32_t dflt_carrier;
|
||||
extern uint32_t kni_dflt_carrier;
|
||||
|
||||
/**
|
||||
* A structure describing the private information for a kni device.
|
||||
|
@ -39,7 +39,7 @@ static uint32_t multiple_kthread_on;
|
||||
|
||||
/* Default carrier state for created KNI network interfaces */
|
||||
static char *carrier;
|
||||
uint32_t dflt_carrier;
|
||||
uint32_t kni_dflt_carrier;
|
||||
|
||||
#define KNI_DEV_IN_USE_BIT_NUM 0 /* Bit number for device in use */
|
||||
|
||||
@ -554,14 +554,14 @@ static int __init
|
||||
kni_parse_carrier_state(void)
|
||||
{
|
||||
if (!carrier) {
|
||||
dflt_carrier = 0;
|
||||
kni_dflt_carrier = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (strcmp(carrier, "off") == 0)
|
||||
dflt_carrier = 0;
|
||||
kni_dflt_carrier = 0;
|
||||
else if (strcmp(carrier, "on") == 0)
|
||||
dflt_carrier = 1;
|
||||
kni_dflt_carrier = 1;
|
||||
else
|
||||
return -1;
|
||||
|
||||
@ -588,7 +588,7 @@ kni_init(void)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (dflt_carrier == 0)
|
||||
if (kni_dflt_carrier == 0)
|
||||
pr_debug("Default carrier state set to off.\n");
|
||||
else
|
||||
pr_debug("Default carrier state set to on.\n");
|
||||
|
@ -158,7 +158,7 @@ kni_net_open(struct net_device *dev)
|
||||
struct kni_dev *kni = netdev_priv(dev);
|
||||
|
||||
netif_start_queue(dev);
|
||||
if (dflt_carrier == 1)
|
||||
if (kni_dflt_carrier == 1)
|
||||
netif_carrier_on(dev);
|
||||
else
|
||||
netif_carrier_off(dev);
|
||||
|
Loading…
Reference in New Issue
Block a user