mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 13:50:13 +01:00
wifi: don't request periodic scans when connection is BSSID-locked (bgo #513820)
In this case the large user of periodic scanning, intra-ESS roaming, isn't used due to the specific AP lock, so don't scan periodically.
This commit is contained in:
parent
9f4f97bea2
commit
080ee1f2db
1 changed files with 13 additions and 1 deletions
|
|
@ -1740,13 +1740,15 @@ scanning_allowed (NMDeviceWifi *self)
|
|||
|| nm_supplicant_interface_get_scanning (priv->supplicant.iface))
|
||||
return FALSE;
|
||||
|
||||
/* Don't scan when a shared connection is active; it makes drivers mad */
|
||||
req = nm_device_get_act_request (NM_DEVICE (self));
|
||||
if (req) {
|
||||
NMConnection *connection;
|
||||
NMSettingIP4Config *s_ip4;
|
||||
NMSettingWireless *s_wifi;
|
||||
const char *ip4_method = NULL;
|
||||
const GByteArray *bssid;
|
||||
|
||||
/* Don't scan when a shared connection is active; it makes drivers mad */
|
||||
connection = nm_act_request_get_connection (req);
|
||||
s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
|
||||
if (s_ip4)
|
||||
|
|
@ -1754,6 +1756,16 @@ scanning_allowed (NMDeviceWifi *self)
|
|||
|
||||
if (s_ip4 && !strcmp (ip4_method, NM_SETTING_IP4_CONFIG_METHOD_SHARED))
|
||||
return FALSE;
|
||||
|
||||
/* Don't scan when the connection is locked to a specifc AP, since
|
||||
* intra-ESS roaming (which requires periodic scanning) isn't being
|
||||
* used due to the specific AP lock. (bgo #513820)
|
||||
*/
|
||||
s_wifi = (NMSettingWireless *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS);
|
||||
g_assert (s_wifi);
|
||||
bssid = nm_setting_wireless_get_bssid (s_wifi);
|
||||
if (bssid && bssid->len == ETH_ALEN)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue