|
@@ -1188,6 +1188,10 @@ static int iwl_pcie_set_cmd_in_flight(struct iwl_trans *trans,
|
|
|
|
|
|
lockdep_assert_held(&trans_pcie->reg_lock);
|
|
|
|
|
|
+ /* Make sure the NIC is still alive in the bus */
|
|
|
+ if (trans_pcie->scheduled_for_removal)
|
|
|
+ return -EIO;
|
|
|
+
|
|
|
if (!(cmd->flags & CMD_SEND_IN_IDLE) &&
|
|
|
!trans_pcie->ref_cmd_in_flight) {
|
|
|
trans_pcie->ref_cmd_in_flight = true;
|
|
@@ -1957,6 +1961,12 @@ cancel:
|
|
|
|
|
|
int iwl_trans_pcie_send_hcmd(struct iwl_trans *trans, struct iwl_host_cmd *cmd)
|
|
|
{
|
|
|
+ struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
|
|
+
|
|
|
+ /* Make sure the NIC is still alive in the bus */
|
|
|
+ if (trans_pcie->scheduled_for_removal)
|
|
|
+ return -EIO;
|
|
|
+
|
|
|
if (!(cmd->flags & CMD_SEND_IN_RFKILL) &&
|
|
|
test_bit(STATUS_RFKILL_OPMODE, &trans->status)) {
|
|
|
IWL_DEBUG_RF_KILL(trans, "Dropping CMD 0x%x: RF KILL\n",
|