diff options
author | Rick Jones <rick.jones2@hp.com> | 2011-11-15 19:40:49 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-17 21:44:50 +0100 |
commit | 1f80c230a7d291a10045a3cdc2efd18a4185674d (patch) | |
tree | dcf356277b35b0584196675f084ca330a9392123 /drivers/net/wireless/hostap | |
parent | minstrel_ht: Remove unused function parameters (diff) | |
download | linux-1f80c230a7d291a10045a3cdc2efd18a4185674d.tar.xz linux-1f80c230a7d291a10045a3cdc2efd18a4185674d.zip |
wireless: use strlcpy routine in .get_drvinfo
Convert various seemingly still compiled wireless drivers' .get_drvinfo
routines to use the preferred strlcpy() routine.
Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/hostap')
-rw-r--r-- | drivers/net/wireless/hostap/hostap_ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c index 12de46407c71..46a8c291c08a 100644 --- a/drivers/net/wireless/hostap/hostap_ioctl.c +++ b/drivers/net/wireless/hostap/hostap_ioctl.c @@ -3871,8 +3871,8 @@ static void prism2_get_drvinfo(struct net_device *dev, iface = netdev_priv(dev); local = iface->local; - strncpy(info->driver, "hostap", sizeof(info->driver) - 1); - snprintf(info->fw_version, sizeof(info->fw_version) - 1, + strlcpy(info->driver, "hostap", sizeof(info->driver)); + snprintf(info->fw_version, sizeof(info->fw_version), "%d.%d.%d", (local->sta_fw_ver >> 16) & 0xff, (local->sta_fw_ver >> 8) & 0xff, local->sta_fw_ver & 0xff); |