Commit 017664fe authored by Wey-Yi Guy's avatar Wey-Yi Guy Committed by John W. Linville

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>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 07839b14
...@@ -1172,20 +1172,22 @@ int iwl_rx_dispatch(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb, ...@@ -1172,20 +1172,22 @@ int iwl_rx_dispatch(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb,
wake_up_all(&priv->shrd->notif_waitq); 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); priv->pre_rx_handler(priv, rxb);
else {
/* Based on type of command response or notification, /* Based on type of command response or notification,
* handle those that need handling via function in * handle those that need handling via function in
* rx_handlers table. See iwl_setup_rx_handlers() */ * rx_handlers table. See iwl_setup_rx_handlers() */
if (priv->rx_handlers[pkt->hdr.cmd]) { if (priv->rx_handlers[pkt->hdr.cmd]) {
priv->rx_handlers_stats[pkt->hdr.cmd]++; priv->rx_handlers_stats[pkt->hdr.cmd]++;
err = priv->rx_handlers[pkt->hdr.cmd] (priv, rxb, cmd); err = priv->rx_handlers[pkt->hdr.cmd] (priv, rxb, cmd);
} else { } else {
/* No handling needed */ /* No handling needed */
IWL_DEBUG_RX(priv, IWL_DEBUG_RX(priv,
"No handler needed for %s, 0x%02x\n", "No handler needed for %s, 0x%02x\n",
get_cmd_string(pkt->hdr.cmd), pkt->hdr.cmd); get_cmd_string(pkt->hdr.cmd), pkt->hdr.cmd);
}
} }
return err; return err;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment