iwlagn: centralize and fix ucode restart
commite649437fd6e2bae6f7b8a36a302a1ec4faa5d906
authorJohannes Berg <johannes.berg@intel.com>
Tue, 5 Apr 2011 16:41:58 +0000 (5 09:41 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 7 Apr 2011 19:51:37 +0000 (7 15:51 -0400)
tree282932c057ba1eccdbc53e47413649c2a077f475
parent1fc352765fb461e4afafff4d650624df8ab6b6d6
iwlagn: centralize and fix ucode restart

The ucode restart has to take into account a number
of things, like clearing the HCMD_ACTIVE and other
status bits, and waking up the wait_command_queue.
Currently, however, there are a number of places
that neither do that, nor actually set the FW error
bit that leads to proper restart handling, which
means that in those cases things will probably just
hang completely.

To clean this up, make all ucode restart go through
a single function, except for the cases where it's
called during firmware loading.

Also fix a bug in wimax coexist restart avoidance,
it needs to first clear the status bits (and it has
to clear the HCMD_ACTIVE one as well) and then wake
up anything waiting on wait_command_queue.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl-tx.c