Merge tag 'secureexec-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux/fpc-iii.git] / net / wireless / ethtool.c
blobe9e91298c70de7bdab61b31b795df213c5a71461
1 #include <linux/utsname.h>
2 #include <net/cfg80211.h>
3 #include "core.h"
4 #include "rdev-ops.h"
6 void cfg80211_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
8 struct wireless_dev *wdev = dev->ieee80211_ptr;
10 strlcpy(info->driver, wiphy_dev(wdev->wiphy)->driver->name,
11 sizeof(info->driver));
13 strlcpy(info->version, init_utsname()->release, sizeof(info->version));
15 if (wdev->wiphy->fw_version[0])
16 strlcpy(info->fw_version, wdev->wiphy->fw_version,
17 sizeof(info->fw_version));
18 else
19 strlcpy(info->fw_version, "N/A", sizeof(info->fw_version));
21 strlcpy(info->bus_info, dev_name(wiphy_dev(wdev->wiphy)),
22 sizeof(info->bus_info));
24 EXPORT_SYMBOL(cfg80211_get_drvinfo);