aboutsummaryrefslogtreecommitdiff
path: root/sys/net80211
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2020-08-07 12:24:23 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2020-08-07 12:24:23 +0000
commit7d1d4407f569fad7d495bdb492cc088d0aed48e3 (patch)
treeb6b9e435e86f88b203602ed3ea9c15974e9f652c /sys/net80211
parent43233543248c0c0ffa0e5621c31bbb1bab77fd58 (diff)
downloadsrc-7d1d4407f569fad7d495bdb492cc088d0aed48e3.tar.gz
src-7d1d4407f569fad7d495bdb492cc088d0aed48e3.zip
net80211/ifconfig: print hardware device name for wlan interfaces
Add IEEE80211_IOC_IC_NAME to query the ic_name field and in ifconfig to print the parent interface again. This functionality was lost around r287197. It helps in case of multiple wlan interfaces and multiple underlying hardware devices to keep track which wlan interface belongs to which physical device. Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate") Reviewed by: adrian, Idwer Vollering MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25832
Notes
Notes: svn path=/head/; revision=364011
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211_ioctl.c7
-rw-r--r--sys/net80211/ieee80211_ioctl.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c
index 0c3794f62669..3ed58ab1801d 100644
--- a/sys/net80211/ieee80211_ioctl.c
+++ b/sys/net80211/ieee80211_ioctl.c
@@ -785,6 +785,13 @@ ieee80211_ioctl_get80211(struct ieee80211vap *vap, u_long cmd,
int error = 0;
switch (ireq->i_type) {
+ case IEEE80211_IOC_IC_NAME:
+ len = strlen(ic->ic_name) + 1;
+ if (len > ireq->i_len)
+ return (EINVAL);
+ ireq->i_len = len;
+ error = copyout(ic->ic_name, ireq->i_data, ireq->i_len);
+ break;
case IEEE80211_IOC_SSID:
switch (vap->iv_state) {
case IEEE80211_S_INIT:
diff --git a/sys/net80211/ieee80211_ioctl.h b/sys/net80211/ieee80211_ioctl.h
index eb933a5c0532..573661d5323d 100644
--- a/sys/net80211/ieee80211_ioctl.h
+++ b/sys/net80211/ieee80211_ioctl.h
@@ -743,6 +743,9 @@ struct ieee80211req {
#define IEEE80211_IOC_QUIET_OFFSET 207 /* Quiet Offset */
#define IEEE80211_IOC_QUIET_DUR 208 /* Quiet Duration */
#define IEEE80211_IOC_QUIET_COUNT 209 /* Quiet Count */
+
+#define IEEE80211_IOC_IC_NAME 210 /* HW device name. */
+
/*
* Parameters for controlling a scan requested with
* IEEE80211_IOC_SCAN_REQ.