aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2012-01-06 16:16:27 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-01-24 14:08:35 -0500
commit017664fe8e11ec93dfe3faca5b7ff21071011e6a (patch)
treea6eb510a64eb73f4467be70bc37b60d28c0e771d /drivers
parent07839b143a360f9dcf38afb5600cf049f8cbee0e (diff)
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: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rx.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
index b22b2976f899..eda95ae88ef1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
@@ -1172,20 +1172,22 @@ int iwl_rx_dispatch(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb,
1172 wake_up_all(&priv->shrd->notif_waitq); 1172 wake_up_all(&priv->shrd->notif_waitq);
1173 } 1173 }
1174 1174
1175 if (priv->pre_rx_handler) 1175 if (priv->pre_rx_handler &&
1176 priv->shrd->ucode_owner == IWL_OWNERSHIP_TM)
1176 priv->pre_rx_handler(priv, rxb); 1177 priv->pre_rx_handler(priv, rxb);
1177 1178 else {
1178 /* Based on type of command response or notification, 1179 /* Based on type of command response or notification,
1179 * handle those that need handling via function in 1180 * handle those that need handling via function in
1180 * rx_handlers table. See iwl_setup_rx_handlers() */ 1181 * rx_handlers table. See iwl_setup_rx_handlers() */
1181 if (priv->rx_handlers[pkt->hdr.cmd]) { 1182 if (priv->rx_handlers[pkt->hdr.cmd]) {
1182 priv->rx_handlers_stats[pkt->hdr.cmd]++; 1183 priv->rx_handlers_stats[pkt->hdr.cmd]++;
1183 err = priv->rx_handlers[pkt->hdr.cmd] (priv, rxb, cmd); 1184 err = priv->rx_handlers[pkt->hdr.cmd] (priv, rxb, cmd);
1184 } else { 1185 } else {
1185 /* No handling needed */ 1186 /* No handling needed */
1186 IWL_DEBUG_RX(priv, 1187 IWL_DEBUG_RX(priv,
1187 "No handler needed for %s, 0x%02x\n", 1188 "No handler needed for %s, 0x%02x\n",
1188 get_cmd_string(pkt->hdr.cmd), pkt->hdr.cmd); 1189 get_cmd_string(pkt->hdr.cmd), pkt->hdr.cmd);
1190 }
1189 } 1191 }
1190 return err; 1192 return err;
1191} 1193}