mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 12:50:06 +01:00
2006-03-02 Robert Love <rml@novell.com>
Patch by Brian Magnuson <magnuson@rcn.com>: * src/nm-device-802-11-wireless.c: During scanning, only set the wireless mode to infrastructure if it is not currently in infrastructure mode. For some driver, setting the mode is a costly operation, apparently. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1536 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
c7e1bd54f1
commit
90819aa320
2 changed files with 13 additions and 2 deletions
|
|
@ -1,3 +1,10 @@
|
||||||
|
2006-03-02 Robert Love <rml@novell.com>
|
||||||
|
|
||||||
|
Patch by Brian Magnuson <magnuson@rcn.com>:
|
||||||
|
* src/nm-device-802-11-wireless.c: During scanning, only set the wireless
|
||||||
|
mode to infrastructure if it is not currently in infrastructure mode.
|
||||||
|
For some driver, setting the mode is a costly operation, apparently.
|
||||||
|
|
||||||
2006-03-01 Rodrigo Moya <rodrigo@novell.com>
|
2006-03-01 Rodrigo Moya <rodrigo@novell.com>
|
||||||
|
|
||||||
* Makefile.am: use the correct dir for autostart mechanism.
|
* Makefile.am: use the correct dir for autostart mechanism.
|
||||||
|
|
|
||||||
|
|
@ -1811,7 +1811,7 @@ nm_device_802_11_wireless_scan (gpointer user_data)
|
||||||
iface = nm_device_get_iface (NM_DEVICE (self));
|
iface = nm_device_get_iface (NM_DEVICE (self));
|
||||||
if ((sk = nm_dev_sock_open (NM_DEVICE (self), DEV_WIRELESS, __FUNCTION__, NULL)))
|
if ((sk = nm_dev_sock_open (NM_DEVICE (self), DEV_WIRELESS, __FUNCTION__, NULL)))
|
||||||
{
|
{
|
||||||
int orig_mode = IW_MODE_INFRA;
|
int orig_mode;
|
||||||
double orig_freq = 0;
|
double orig_freq = 0;
|
||||||
int orig_rate = 0;
|
int orig_rate = 0;
|
||||||
struct iwreq wrq;
|
struct iwreq wrq;
|
||||||
|
|
@ -1825,8 +1825,12 @@ nm_device_802_11_wireless_scan (gpointer user_data)
|
||||||
|
|
||||||
/* Must be in infrastructure mode during scan, otherwise we don't get a full
|
/* Must be in infrastructure mode during scan, otherwise we don't get a full
|
||||||
* list of scan results. Scanning doesn't work well in Ad-Hoc mode :(
|
* list of scan results. Scanning doesn't work well in Ad-Hoc mode :(
|
||||||
|
*
|
||||||
|
* We only set the mode if it needs setting, in case it is a costly operation
|
||||||
|
* for the driver.
|
||||||
*/
|
*/
|
||||||
nm_device_802_11_wireless_set_mode (self, IW_MODE_INFRA);
|
if (orig_mode != IW_MODE_INFRA)
|
||||||
|
nm_device_802_11_wireless_set_mode (self, IW_MODE_INFRA);
|
||||||
nm_device_802_11_wireless_set_frequency (self, 0);
|
nm_device_802_11_wireless_set_frequency (self, 0);
|
||||||
|
|
||||||
wrq.u.data.pointer = NULL;
|
wrq.u.data.pointer = NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue