[PATCH] libertas: correctly balance locking in libertas_process_rx_command
authorDan Williams <dcbw@redhat.com>
Fri, 25 May 2007 21:33:28 +0000 (17:33 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 11 Jun 2007 18:28:43 +0000 (14:28 -0400)
adapter->lock should released after unlocking adapter->driver_lock to
balance the order in which they were locked at the top of the function.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/cmdresp.c

index 6bf50c1eeb93731ae5b31473c1dbf5716696b69c..c0c04711196fd2aa2406326640339a1151cc5021 100644 (file)
@@ -826,8 +826,8 @@ int libertas_process_rx_command(wlan_private * priv)
                                lbs_deb_cmd(
                                       "Disconnected, Going to invoke libertas_ps_wakeup\n");
 
-                               mutex_unlock(&adapter->lock);
                                spin_unlock_irqrestore(&adapter->driver_lock, flags);
+                               mutex_unlock(&adapter->lock);
                                libertas_ps_wakeup(priv, 0);
                                mutex_lock(&adapter->lock);
                                spin_lock_irqsave(&adapter->driver_lock, flags);