mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-23 13:10:33 +01:00
2006-02-05 Dan Williams <dcbw@redhat.com>
Refine handling of non-broadcast networks. * src/NetworkManagerAPList.c - (nm_ap_list_merge_scanned_ap): unconditionally copy the 'broadcast' property from scanned AP to the AP from the device list * src/nm-device-802-11-wireless.c - (supplicant_send_network_config): use ap_scan=1 for all networks except non-SSID-broadcasting and Ad-Hoc networks. Use ap_scan=2 for those. Also, don't set scan_ssid for Ad-Hoc networks since those don't have APs. - (add_new_ap_to_device_list): if there's no valid SSID, mark the AP as non-SSID-broadcasting - (process_scan_results): don't handle non-SSID-broadcasting here git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1452 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
c23f1b14de
commit
f10cff435d
3 changed files with 33 additions and 6 deletions
17
ChangeLog
17
ChangeLog
|
|
@ -1,3 +1,20 @@
|
|||
2006-02-05 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
Refine handling of non-broadcast networks.
|
||||
|
||||
* src/NetworkManagerAPList.c
|
||||
- (nm_ap_list_merge_scanned_ap): unconditionally copy the 'broadcast'
|
||||
property from scanned AP to the AP from the device list
|
||||
|
||||
* src/nm-device-802-11-wireless.c
|
||||
- (supplicant_send_network_config): use ap_scan=1 for all networks
|
||||
except non-SSID-broadcasting and Ad-Hoc networks. Use
|
||||
ap_scan=2 for those. Also, don't set scan_ssid for Ad-Hoc
|
||||
networks since those don't have APs.
|
||||
- (add_new_ap_to_device_list): if there's no valid SSID, mark the
|
||||
AP as non-SSID-broadcasting
|
||||
- (process_scan_results): don't handle non-SSID-broadcasting here
|
||||
|
||||
2006-02-05 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* src/nm-device-802-11-wireless.c
|
||||
|
|
|
|||
|
|
@ -478,6 +478,7 @@ gboolean nm_ap_list_merge_scanned_ap (NMDevice80211Wireless *dev, NMAccessPointL
|
|||
strength_changed = TRUE;
|
||||
}
|
||||
nm_ap_set_last_seen (list_ap, merge_ap_seen);
|
||||
nm_ap_set_broadcast (list_ap, nm_ap_get_broadcast (merge_ap));
|
||||
|
||||
/* Have to change AP's name _after_ dbus signal for old network name
|
||||
* has gone out.
|
||||
|
|
@ -509,6 +510,7 @@ gboolean nm_ap_list_merge_scanned_ap (NMDevice80211Wireless *dev, NMAccessPointL
|
|||
nm_ap_set_address (list_ap, nm_ap_get_address (merge_ap));
|
||||
}
|
||||
nm_ap_set_last_seen (list_ap, merge_ap_seen);
|
||||
nm_ap_set_broadcast (list_ap, nm_ap_get_broadcast (merge_ap));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2319,6 +2319,7 @@ supplicant_send_network_config (NMDevice80211Wireless *self,
|
|||
struct wpa_ctrl * ctrl;
|
||||
gboolean user_created;
|
||||
char * hex_essid;
|
||||
char * ap_scan = "AP_SCAN 1";
|
||||
|
||||
g_return_val_if_fail (self != NULL, FALSE);
|
||||
g_return_val_if_fail (req != NULL, FALSE);
|
||||
|
|
@ -2329,9 +2330,14 @@ supplicant_send_network_config (NMDevice80211Wireless *self,
|
|||
ctrl = self->priv->sup_ctrl;
|
||||
g_assert (ctrl);
|
||||
|
||||
/* Ad-Hoc and non-broadcasting networks need AP_SCAN 2 */
|
||||
user_created = nm_ap_get_user_created (ap);
|
||||
if (!nm_ap_get_broadcast (ap) || user_created)
|
||||
ap_scan = "AP_SCAN 2";
|
||||
|
||||
/* Tell wpa_supplicant that we'll do the scanning */
|
||||
if (!nm_utils_supplicant_request_with_check (ctrl, "OK", __func__, NULL,
|
||||
"AP_SCAN 2"))
|
||||
ap_scan))
|
||||
goto out;
|
||||
|
||||
/* Standard network setup info */
|
||||
|
|
@ -2357,8 +2363,10 @@ supplicant_send_network_config (NMDevice80211Wireless *self,
|
|||
"SET_NETWORK %i ssid %s", nwid, hex_essid))
|
||||
goto out;
|
||||
|
||||
/* For non-broadcast networks, we need to set "scan_ssid 1" to scan with probe request frames. */
|
||||
if (!nm_ap_get_broadcast (ap))
|
||||
/* For non-broadcast networks, we need to set "scan_ssid 1" to scan with probe request frames.
|
||||
* However, don't try to probe Ad-Hoc networks.
|
||||
*/
|
||||
if (!nm_ap_get_broadcast (ap) && !user_created)
|
||||
{
|
||||
if (!nm_utils_supplicant_request_with_check (ctrl, "OK", __func__, NULL,
|
||||
"SET_NETWORK %i scan_ssid 1", nwid))
|
||||
|
|
@ -2366,7 +2374,6 @@ supplicant_send_network_config (NMDevice80211Wireless *self,
|
|||
}
|
||||
|
||||
/* Ad-Hoc ? */
|
||||
user_created = nm_ap_get_user_created (ap);
|
||||
if (user_created)
|
||||
{
|
||||
if (!nm_utils_supplicant_request_with_check (ctrl, "OK", __func__, NULL,
|
||||
|
|
@ -2922,7 +2929,10 @@ add_new_ap_to_device_list (NMDevice80211Wireless *dev,
|
|||
*/
|
||||
app_data = nm_device_get_app_data (NM_DEVICE (dev));
|
||||
if (!nm_ap_get_essid (ap))
|
||||
{
|
||||
nm_ap_set_broadcast (ap, FALSE);
|
||||
nm_ap_list_copy_one_essid_by_address (ap, app_data->allowed_ap_list);
|
||||
}
|
||||
|
||||
/* Add the AP to the device's AP list */
|
||||
ap_list = nm_device_802_11_wireless_ap_list_get (dev);
|
||||
|
|
@ -3021,8 +3031,6 @@ process_scan_results (NMDevice80211Wireless *dev,
|
|||
set = FALSE;
|
||||
if (set)
|
||||
nm_ap_set_essid (ap, essid);
|
||||
else
|
||||
nm_ap_set_broadcast (ap, FALSE);
|
||||
g_free (essid);
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue