2009-10-01 02:50:17 +08:00
|
|
|
#include <linux/utsname.h>
|
|
|
|
#include <net/cfg80211.h>
|
2011-03-08 05:17:59 +08:00
|
|
|
#include "core.h"
|
2012-06-27 22:19:42 +08:00
|
|
|
#include "rdev-ops.h"
|
2009-10-01 02:50:17 +08:00
|
|
|
|
2014-06-04 23:31:56 +08:00
|
|
|
void cfg80211_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
|
2009-10-01 02:50:17 +08: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));
|
|
|
|
|
2009-09-25 02:02:42 +08:00
|
|
|
if (wdev->wiphy->fw_version[0])
|
2013-01-06 08:44:26 +08:00
|
|
|
strlcpy(info->fw_version, wdev->wiphy->fw_version,
|
2009-09-25 02:02:42 +08:00
|
|
|
sizeof(info->fw_version));
|
|
|
|
else
|
2013-01-06 08:44:26 +08:00
|
|
|
strlcpy(info->fw_version, "N/A", sizeof(info->fw_version));
|
2009-10-01 02:50:17 +08:00
|
|
|
|
|
|
|
strlcpy(info->bus_info, dev_name(wiphy_dev(wdev->wiphy)),
|
|
|
|
sizeof(info->bus_info));
|
|
|
|
}
|
2014-06-04 23:31:56 +08:00
|
|
|
EXPORT_SYMBOL(cfg80211_get_drvinfo);
|