diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2013-11-10 16:05:49 +0400 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2014-01-14 10:19:51 -0800 |
commit | 35e14b443aa906ffb4ff8bd884e393c1bbdb6670 (patch) | |
tree | 0fb0f287623fcadf5abe4e3097526954c54d16c4 /arch/xtensa | |
parent | f6ac5a177db24379e7a7a7d44b1ae7d1036042ec (diff) | |
download | linux-35e14b443aa906ffb4ff8bd884e393c1bbdb6670.tar.bz2 |
xtensa: ISS: always use fixed tuntap config
The code doesn't handle dynamic TAP interface allocation, so there's no
point tracking this case.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa')
-rw-r--r-- | arch/xtensa/platforms/iss/network.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/arch/xtensa/platforms/iss/network.c b/arch/xtensa/platforms/iss/network.c index b33ed0c53547..668ed624b2c2 100644 --- a/arch/xtensa/platforms/iss/network.c +++ b/arch/xtensa/platforms/iss/network.c @@ -56,7 +56,6 @@ static LIST_HEAD(devices); struct tuntap_info { char dev_name[IFNAMSIZ]; - int fixed_config; int fd; }; @@ -164,11 +163,6 @@ static int tuntap_open(struct iss_net_private *lp) int err = -EINVAL; int fd; - /* We currently only support a fixed configuration. */ - - if (!lp->tp.info.tuntap.fixed_config) - return -EINVAL; - fd = simc_open("/dev/net/tun", 02, 0); /* O_RDWR */ if (fd < 0) { pr_err("Failed to open /dev/net/tun, returned %d (errno = %d)\n", @@ -220,8 +214,7 @@ static int tuntap_poll(struct iss_net_private *lp) } /* - * Currently only a device name is supported. - * ethX=tuntap[,[mac address][,[device name]]] + * ethX=tuntap,[mac address],device name */ static int tuntap_probe(struct iss_net_private *lp, int index, char *init) @@ -247,12 +240,13 @@ static int tuntap_probe(struct iss_net_private *lp, int index, char *init) return 0; } - if (dev_name) { - strlcpy(lp->tp.info.tuntap.dev_name, dev_name, - sizeof(lp->tp.info.tuntap.dev_name)); - lp->tp.info.tuntap.fixed_config = 1; - } else - strcpy(lp->tp.info.tuntap.dev_name, TRANSPORT_TUNTAP_NAME); + if (!dev_name) { + pr_err("%s: missing tuntap device name\n", dev->name); + return 0; + } + + strlcpy(lp->tp.info.tuntap.dev_name, dev_name, + sizeof(lp->tp.info.tuntap.dev_name)); setup_etheraddr(dev, mac_str); |