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

Commit 64eeacb7 authored by Wey-Yi Guy's avatar Wey-Yi Guy
Browse files

iwlwifi: don't process the info from uCode if does not has ownership



When enable the testmode from user space and working with uCode, driver does
not own the uCode and should not process the notifications or pkts from uCode

Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent 1032c736
Loading
Loading
Loading
Loading
+15 −13
Original line number Diff line number Diff line
@@ -1172,9 +1172,10 @@ int iwl_rx_dispatch(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb,
		wake_up_all(&priv->shrd->notif_waitq);
	}

	if (priv->pre_rx_handler)
	if (priv->pre_rx_handler &&
	    priv->shrd->ucode_owner == IWL_OWNERSHIP_TM)
		priv->pre_rx_handler(priv, rxb);

	else {
		/* Based on type of command response or notification,
		 *   handle those that need handling via function in
		 *   rx_handlers table.  See iwl_setup_rx_handlers() */
@@ -1187,5 +1188,6 @@ int iwl_rx_dispatch(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb,
				"No handler needed for %s, 0x%02x\n",
				get_cmd_string(pkt->hdr.cmd), pkt->hdr.cmd);
		}
	}
	return err;
}