Use the device name instead of the "external name" as the interface in network

monitor messages. Due to how our compatibility layer works the latter is always
just "wlan" (and even if it worked as expected it'd be mapped to the BSD short
names i.e. "iwn" or "iwnX"). The device name is of the format "net/<driver>/X",
which is what we use as interface names througout the API (minus the "/dev/").


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42771 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2011-09-27 14:11:03 +00:00
parent 0d890a6821
commit 2815c2d2c6

View File

@ -590,7 +590,7 @@ ieee80211_notify_node_join(struct ieee80211_node* ni, int newassoc)
KMessage message;
message.SetTo(messageBuffer, sizeof(messageBuffer), B_NETWORK_MONITOR);
message.AddInt32("opcode", B_NETWORK_WLAN_JOINED);
message.AddString("interface", ifp->if_xname);
message.AddString("interface", ifp->device_name);
// TODO: add data about the node
sNotificationModule->send_notification(&message);
@ -614,7 +614,7 @@ ieee80211_notify_node_leave(struct ieee80211_node* ni)
KMessage message;
message.SetTo(messageBuffer, sizeof(messageBuffer), B_NETWORK_MONITOR);
message.AddInt32("opcode", B_NETWORK_WLAN_LEFT);
message.AddString("interface", ifp->if_xname);
message.AddString("interface", ifp->device_name);
// TODO: add data about the node
sNotificationModule->send_notification(&message);
@ -635,7 +635,7 @@ ieee80211_notify_scan_done(struct ieee80211vap* vap)
KMessage message;
message.SetTo(messageBuffer, sizeof(messageBuffer), B_NETWORK_MONITOR);
message.AddInt32("opcode", B_NETWORK_WLAN_SCANNED);
message.AddString("interface", vap->iv_ifp->if_xname);
message.AddString("interface", vap->iv_ifp->device_name);
sNotificationModule->send_notification(&message);
}