platform: wifi: drop old wifi data when an interface is renamed

Drop the old wifi data when the interface is renamed, otherwise WEXT
methods would use the old name.

https://bugzilla.gnome.org/show_bug.cgi?id=768433
This commit is contained in:
Beniamino Galvani
2016-07-06 17:59:08 +02:00
parent 79c48a559f
commit 45484af2af
3 changed files with 40 additions and 3 deletions

View File

@@ -72,6 +72,22 @@ wifi_utils_init (const char *iface, int ifindex, gboolean check_scan)
return ret;
}
int
wifi_utils_get_ifindex (WifiData *data)
{
g_return_val_if_fail (data != NULL, -1);
return data->ifindex;
}
const char *
wifi_utils_get_iface (WifiData *data)
{
g_return_val_if_fail (data != NULL, NULL);
return data->iface;
}
NMDeviceWifiCapabilities
wifi_utils_get_caps (WifiData *data)
{