diff options
Diffstat (limited to 'drivers/net/wimax/i2400m')
-rw-r--r-- | drivers/net/wimax/i2400m/netdev.c | 10 | ||||
-rw-r--r-- | drivers/net/wimax/i2400m/usb.c | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wimax/i2400m/netdev.c b/drivers/net/wimax/i2400m/netdev.c index 1d76ae855f07..cedd4d30d996 100644 --- a/drivers/net/wimax/i2400m/netdev.c +++ b/drivers/net/wimax/i2400m/netdev.c | |||
@@ -596,12 +596,12 @@ static void i2400m_get_drvinfo(struct net_device *net_dev, | |||
596 | { | 596 | { |
597 | struct i2400m *i2400m = net_dev_to_i2400m(net_dev); | 597 | struct i2400m *i2400m = net_dev_to_i2400m(net_dev); |
598 | 598 | ||
599 | strncpy(info->driver, KBUILD_MODNAME, sizeof(info->driver) - 1); | 599 | strlcpy(info->driver, KBUILD_MODNAME, sizeof(info->driver)); |
600 | strncpy(info->fw_version, | 600 | strlcpy(info->fw_version, i2400m->fw_name ? : "", |
601 | i2400m->fw_name ? : "", sizeof(info->fw_version) - 1); | 601 | sizeof(info->fw_version)); |
602 | if (net_dev->dev.parent) | 602 | if (net_dev->dev.parent) |
603 | strncpy(info->bus_info, dev_name(net_dev->dev.parent), | 603 | strlcpy(info->bus_info, dev_name(net_dev->dev.parent), |
604 | sizeof(info->bus_info) - 1); | 604 | sizeof(info->bus_info)); |
605 | } | 605 | } |
606 | 606 | ||
607 | static const struct ethtool_ops i2400m_ethtool_ops = { | 607 | static const struct ethtool_ops i2400m_ethtool_ops = { |
diff --git a/drivers/net/wimax/i2400m/usb.c b/drivers/net/wimax/i2400m/usb.c index 080f36303a4f..cd15a93d9084 100644 --- a/drivers/net/wimax/i2400m/usb.c +++ b/drivers/net/wimax/i2400m/usb.c | |||
@@ -346,9 +346,9 @@ static void i2400mu_get_drvinfo(struct net_device *net_dev, | |||
346 | struct i2400mu *i2400mu = container_of(i2400m, struct i2400mu, i2400m); | 346 | struct i2400mu *i2400mu = container_of(i2400m, struct i2400mu, i2400m); |
347 | struct usb_device *udev = i2400mu->usb_dev; | 347 | struct usb_device *udev = i2400mu->usb_dev; |
348 | 348 | ||
349 | strncpy(info->driver, KBUILD_MODNAME, sizeof(info->driver) - 1); | 349 | strlcpy(info->driver, KBUILD_MODNAME, sizeof(info->driver)); |
350 | strncpy(info->fw_version, | 350 | strlcpy(info->fw_version, i2400m->fw_name ? : "", |
351 | i2400m->fw_name ? : "", sizeof(info->fw_version) - 1); | 351 | sizeof(info->fw_version)); |
352 | usb_make_path(udev, info->bus_info, sizeof(info->bus_info)); | 352 | usb_make_path(udev, info->bus_info, sizeof(info->bus_info)); |
353 | } | 353 | } |
354 | 354 | ||