Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c24d992a authored by Avinash Patil's avatar Avinash Patil Committed by John W. Linville
Browse files

mwifiex: avoid waking up device in awake state



We have received interrupt from device means FW is not sleeping.
In this case make sure wakeup handler for PCIe is not invoked by
setting adapter->pm_wakeup_fw_try to false.

Signed-off-by: default avatarAvinash Patil <patila@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b2fda1f6
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -1983,12 +1983,13 @@ static void mwifiex_interrupt_status(struct mwifiex_adapter *adapter)
				}
				}
			}
			}
		} else if (!adapter->pps_uapsd_mode &&
		} else if (!adapter->pps_uapsd_mode &&
			   adapter->ps_state == PS_STATE_SLEEP) {
			   adapter->ps_state == PS_STATE_SLEEP &&
			   mwifiex_pcie_ok_to_access_hw(adapter)) {
				/* Potentially for PCIe we could get other
				/* Potentially for PCIe we could get other
				 * interrupts like shared. Don't change power
				 * interrupts like shared. Don't change power
				 * state until cookie is set */
				 * state until cookie is set */
				if (mwifiex_pcie_ok_to_access_hw(adapter))
				adapter->ps_state = PS_STATE_AWAKE;
				adapter->ps_state = PS_STATE_AWAKE;
				adapter->pm_wakeup_fw_try = false;
		}
		}
	}
	}
}
}