aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/pcie/trans.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2012-10-25 11:25:52 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-10-31 12:02:06 -0400
commitf946b529502399d09471c5d13845fefbfe8555a6 (patch)
tree597c826ef9bfb679fd765796fd3d83845c76d1cc /drivers/net/wireless/iwlwifi/pcie/trans.c
parent3e2c159260eed10c44f0dd028c328a40a27ad235 (diff)
iwlwifi: handle RFKILL logic in the transport layer
No HCMD can be sent while RFKILL is asserted. If a SYNC command is running while RFKILL is asserted the fw will silently discard it. This means that the driver needs to wake the process that sleeps on the CMD_SYNC. Since the RFKILL interrupt is handled in the transport layer and the code that sleeps in CMD_SYNC is also in the transport layer, all this logic can be handled there. This simplifies the work of the op_mode. So the transport layer will now return -ERFKILL when a CMD is sent and RFKILL is asserted. This will be the case even when the CMD is SYNC. The transport layer will return -ERFKILL straight away. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/pcie/trans.c')
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/trans.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c
index b8a155af12cc..288d2297f77d 100644
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@ -1246,6 +1246,7 @@ static void iwl_trans_pcie_stop_device(struct iwl_trans *trans)
1246 clear_bit(STATUS_INT_ENABLED, &trans_pcie->status); 1246 clear_bit(STATUS_INT_ENABLED, &trans_pcie->status);
1247 clear_bit(STATUS_DEVICE_ENABLED, &trans_pcie->status); 1247 clear_bit(STATUS_DEVICE_ENABLED, &trans_pcie->status);
1248 clear_bit(STATUS_TPOWER_PMI, &trans_pcie->status); 1248 clear_bit(STATUS_TPOWER_PMI, &trans_pcie->status);
1249 clear_bit(STATUS_RFKILL, &trans_pcie->status);
1249} 1250}
1250 1251
1251static void iwl_trans_pcie_wowlan_suspend(struct iwl_trans *trans) 1252static void iwl_trans_pcie_wowlan_suspend(struct iwl_trans *trans)
@@ -2206,7 +2207,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
2206 } 2207 }
2207 2208
2208 /* Initialize the wait queue for commands */ 2209 /* Initialize the wait queue for commands */
2209 init_waitqueue_head(&trans->wait_command_queue); 2210 init_waitqueue_head(&trans_pcie->wait_command_queue);
2210 spin_lock_init(&trans->reg_lock); 2211 spin_lock_init(&trans->reg_lock);
2211 2212
2212 snprintf(trans->dev_cmd_pool_name, sizeof(trans->dev_cmd_pool_name), 2213 snprintf(trans->dev_cmd_pool_name, sizeof(trans->dev_cmd_pool_name),