]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - net/wireless/ethtool.c
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
[mirror_ubuntu-bionic-kernel.git] / net / wireless / ethtool.c
CommitLineData
4890e3be
JL
1#include <linux/utsname.h>
2#include <net/cfg80211.h>
3677713b 3#include "core.h"
e35e4d28 4#include "rdev-ops.h"
4890e3be 5
b7ffbd7e 6void cfg80211_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
4890e3be
JL
7{
8 struct wireless_dev *wdev = dev->ieee80211_ptr;
9
10 strlcpy(info->driver, wiphy_dev(wdev->wiphy)->driver->name,
11 sizeof(info->driver));
12
13 strlcpy(info->version, init_utsname()->release, sizeof(info->version));
14
dfce95f5 15 if (wdev->wiphy->fw_version[0])
7826d43f 16 strlcpy(info->fw_version, wdev->wiphy->fw_version,
dfce95f5
KV
17 sizeof(info->fw_version));
18 else
7826d43f 19 strlcpy(info->fw_version, "N/A", sizeof(info->fw_version));
4890e3be
JL
20
21 strlcpy(info->bus_info, dev_name(wiphy_dev(wdev->wiphy)),
22 sizeof(info->bus_info));
23}
b7ffbd7e 24EXPORT_SYMBOL(cfg80211_get_drvinfo);