From: Eliad Peller Date: Mon, 3 Sep 2012 15:27:58 +0000 (+0300) Subject: wlcore: protect wlcore_op_set_key with mutex X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~47^2~30^2~38^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af390f4dd35373b3ca32bafc12d7f2ad12840529;p=pandora-kernel.git wlcore: protect wlcore_op_set_key with mutex wlcore_op_set_key() calls wl18xx_set_key(), which in turn executes some of his function calls without acquiring wl->mutex and making sure the fw is awake. Adding mutex_lock()/ps_elp_wakeup() calls is not enough, as wl18xx_set_key() calls wl1271_tx_flush() which can't be called while the mutex is taken. Add the required calls to wlcore_op_set_key, but limit the queues_stop and flushing to the only encryption types in which a spare block might be needed (GEM and TKIP). [Arik - move state != ON check] Signed-off-by: Eliad Peller Signed-off-by: Arik Nemtsov Signed-off-by: Luciano Coelho --- Reading git-diff-tree failed