iwlwifi: pcie: fix tracking of cmd_in_flight
authorIlan Peer <ilan.peer@intel.com>
Wed, 13 May 2015 11:34:07 +0000 (14:34 +0300)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Thu, 28 May 2015 10:27:51 +0000 (13:27 +0300)
commitfc8a350d0b8df744fd6d3c55907b3886979d2638
treec862522f942b54f96f649fb764a1fce6c95d0db7
parent292208914d8ca5a41cf68c2f1d2810a2ea2044e9
iwlwifi: pcie: fix tracking of cmd_in_flight

The cmd_in_flight tracking was introduced to workaround faulty
power management hardware, by having the driver keep the NIC
awake as long as there are commands in flight. However, some of
the code handling this workaround was unconditionally executed,
which resulted with an inconsistent state where the driver assumed
that the NIC was awake although it wasn't.

Fix this by renaming 'cmd_in_flight' to 'cmd_hold_nic_awake' and
handling the NIC requested awake state only for hardwares for
which the workaround is needed.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/pcie/internal.h
drivers/net/wireless/iwlwifi/pcie/trans.c
drivers/net/wireless/iwlwifi/pcie/tx.c