[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>
This commit is contained in:
Holger Schurig
2007-08-02 11:50:12 -04:00
committed by David S. Miller
parent c95c7f930e
commit 3cf840914b
4 changed files with 34 additions and 18 deletions

View File

@ -793,8 +793,10 @@ int wlan_scan_networks(wlan_private * priv,
if (!scancurrentchanonly) {
netif_stop_queue(priv->dev);
netif_carrier_off(priv->dev);
netif_stop_queue(priv->mesh_dev);
netif_carrier_off(priv->mesh_dev);
if (priv->mesh_dev) {
netif_stop_queue(priv->mesh_dev);
netif_carrier_off(priv->mesh_dev);
}
}
ret = wlan_scan_channel_list(priv,
@ -820,8 +822,10 @@ int wlan_scan_networks(wlan_private * priv,
if (priv->adapter->connect_status == LIBERTAS_CONNECTED) {
netif_carrier_on(priv->dev);
netif_wake_queue(priv->dev);
netif_carrier_on(priv->mesh_dev);
netif_wake_queue(priv->mesh_dev);
if (priv->mesh_dev) {
netif_carrier_on(priv->mesh_dev);
netif_wake_queue(priv->mesh_dev);
}
}
out: