wlcore: correctly check state before regdomain conf
authorArik Nemtsov <arik@wizery.com>
Tue, 12 Mar 2013 15:19:45 +0000 (17:19 +0200)
committerLuciano Coelho <coelho@ti.com>
Mon, 25 Mar 2013 10:33:13 +0000 (12:33 +0200)
commit75592be5e35b31eb28dacf578cfe82f0e9bc0ac0
treeae3e76a49dc4e6907ab2c71c60011774c51ea59b
parent0e752df6fda25993acc30e1162808fbb2543be03
wlcore: correctly check state before regdomain conf

The wlcore state was checked without the mutex being taken. This leads
to WARN_ONs sometimes if a notification arrives when the driver
is on, but the mutex is only taken after it is off. This usually
happens if stopping the driver while connected to a network.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/ti/wlcore/main.c