ath9k_htc: Fix WMI command race
authorSujith <Sujith.Manoharan@atheros.com>
Fri, 23 Apr 2010 04:58:19 +0000 (10:28 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 26 Apr 2010 18:21:21 +0000 (14:21 -0400)
commit0d36d71da2a3e5b28b4e7743c0041515cca798ef
tree7ff0d830e72a4a15ffe05b17f3afa0987448466e
parentba44370175d2e743065382508ed7823cc83cea0a
ath9k_htc: Fix WMI command race

My patch "ath9k_htc: Handle WMI timeouts properly" introduced
a race condition in WMI command processing. The last issued command
should be stored _before_ issuing a WMI command. Not doing this
would result in the WMI event IRQ dropping correct command responses
as invalid.

Fix this race by storing the command id correctly.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/wmi.c