Search Linux Wireless

[mac80211] mac80211: Support multiple VIFS per AP in debugfs.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ben Greear <greearb@xxxxxxxxxxxxxxx>

MAC address of AP isn't unique..need to add the device
name as well.

Signed-off-by: Ben Greear <greearb@xxxxxxxxxxxxxxx>
---
:100644 100644 76839d4... 4cf451c... M	net/mac80211/debugfs_sta.c
 net/mac80211/debugfs_sta.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 76839d4..4cf451c 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -301,14 +301,18 @@ STA_OPS(ht_capa);
 void ieee80211_sta_debugfs_add(struct sta_info *sta)
 {
 	struct dentry *stations_dir = sta->local->debugfs.stations;
-	u8 mac[3*ETH_ALEN];
+	u8 mac[3*ETH_ALEN + IFNAMSIZ + 2];
 
 	sta->debugfs.add_has_run = true;
 
 	if (!stations_dir)
 		return;
 
-	snprintf(mac, sizeof(mac), "%pM", sta->sta.addr);
+	if (sta->sdata)
+		snprintf(mac, sizeof(mac), "%pM-%s",
+			 sta->sta.addr, sta->sdata->name);
+	else
+		snprintf(mac, sizeof(mac), "%pM-NULL", sta->sta.addr);
 
 	/*
 	 * This might fail due to a race condition:
-- 
1.7.2.2

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux