diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2007-08-02 11:50:12 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:49:50 -0400 |
commit | 3cf840914bd467fa4cc76af1a01bba4d2813131c (patch) | |
tree | ce3adcd8be98a4e1cf5c0968ec8742fbd8fac029 /drivers/net/wireless/libertas/scan.c | |
parent | c95c7f930ec6fee029c8e7957ab95b3967578070 (diff) |
[PATCH] libertas: access mesh_dev more carefully
The CF/SDIO firmware doesn't support Mesh, so priv->mesh_dev is
NULL there. Protect all accesses.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/scan.c')
-rw-r--r-- | drivers/net/wireless/libertas/scan.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index 683fa1ba5cac..7f045ec2441d 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c | |||
@@ -793,8 +793,10 @@ int wlan_scan_networks(wlan_private * priv, | |||
793 | if (!scancurrentchanonly) { | 793 | if (!scancurrentchanonly) { |
794 | netif_stop_queue(priv->dev); | 794 | netif_stop_queue(priv->dev); |
795 | netif_carrier_off(priv->dev); | 795 | netif_carrier_off(priv->dev); |
796 | netif_stop_queue(priv->mesh_dev); | 796 | if (priv->mesh_dev) { |
797 | netif_carrier_off(priv->mesh_dev); | 797 | netif_stop_queue(priv->mesh_dev); |
798 | netif_carrier_off(priv->mesh_dev); | ||
799 | } | ||
798 | } | 800 | } |
799 | 801 | ||
800 | ret = wlan_scan_channel_list(priv, | 802 | ret = wlan_scan_channel_list(priv, |
@@ -820,8 +822,10 @@ int wlan_scan_networks(wlan_private * priv, | |||
820 | if (priv->adapter->connect_status == LIBERTAS_CONNECTED) { | 822 | if (priv->adapter->connect_status == LIBERTAS_CONNECTED) { |
821 | netif_carrier_on(priv->dev); | 823 | netif_carrier_on(priv->dev); |
822 | netif_wake_queue(priv->dev); | 824 | netif_wake_queue(priv->dev); |
823 | netif_carrier_on(priv->mesh_dev); | 825 | if (priv->mesh_dev) { |
824 | netif_wake_queue(priv->mesh_dev); | 826 | netif_carrier_on(priv->mesh_dev); |
827 | netif_wake_queue(priv->mesh_dev); | ||
828 | } | ||
825 | } | 829 | } |
826 | 830 | ||
827 | out: | 831 | out: |