[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:
committed by
David S. Miller
parent
c95c7f930e
commit
3cf840914b
@ -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:
|
||||
|
Reference in New Issue
Block a user