M7350/kernel/net/wireless/ethtool.c

25 lines
697 B
C
Raw Permalink Normal View History

2024-09-09 08:52:07 +00:00
#include <linux/utsname.h>
#include <net/cfg80211.h>
#include "core.h"
2024-09-09 08:57:42 +00:00
#include "rdev-ops.h"
2024-09-09 08:52:07 +00:00
2024-09-09 08:57:42 +00:00
void cfg80211_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
2024-09-09 08:52:07 +00:00
{
struct wireless_dev *wdev = dev->ieee80211_ptr;
strlcpy(info->driver, wiphy_dev(wdev->wiphy)->driver->name,
sizeof(info->driver));
strlcpy(info->version, init_utsname()->release, sizeof(info->version));
if (wdev->wiphy->fw_version[0])
2024-09-09 08:57:42 +00:00
strlcpy(info->fw_version, wdev->wiphy->fw_version,
2024-09-09 08:52:07 +00:00
sizeof(info->fw_version));
else
2024-09-09 08:57:42 +00:00
strlcpy(info->fw_version, "N/A", sizeof(info->fw_version));
2024-09-09 08:52:07 +00:00
strlcpy(info->bus_info, dev_name(wiphy_dev(wdev->wiphy)),
sizeof(info->bus_info));
}
2024-09-09 08:57:42 +00:00
EXPORT_SYMBOL(cfg80211_get_drvinfo);