aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-26 08:23:39 -0700
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2012-04-16 14:49:56 -0700
commitd9fb6465802c2279ea14cc26eb66d17c133478b1 (patch)
tree976d0ac36c6fa9e4f0a09a08d4354b335ab692ab /drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
parentc14c73728b8feb01d9142f9241bf14601cfb86f7 (diff)
iwlwifi: remove get_cmd_string
The command strings are needed through the layers for debug and error messages, but can differ with opmode. As a result, we need to give the command names to the transport layer as configuration. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans-pcie.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-pcie.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
index 333a2784cf0..14a32c420fd 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
@@ -1544,6 +1544,8 @@ static void iwl_trans_pcie_configure(struct iwl_trans *trans,
trans_pcie->wd_timeout =
msecs_to_jiffies(trans_cfg->queue_watchdog_timeout);
+
+ trans_pcie->command_names = trans_cfg->command_names;
}
static void iwl_trans_pcie_free(struct iwl_trans *trans)
@@ -1635,6 +1637,7 @@ static int iwl_trans_pcie_wait_tx_queue_empty(struct iwl_trans *trans)
static const char *get_fh_string(int cmd)
{
+#define IWL_CMD(x) case x: return #x
switch (cmd) {
IWL_CMD(FH_RSCSR_CHNL0_STTS_WPTR_REG);
IWL_CMD(FH_RSCSR_CHNL0_RBDCB_BASE_REG);
@@ -1648,6 +1651,7 @@ static const char *get_fh_string(int cmd)
default:
return "UNKNOWN";
}
+#undef IWL_CMD
}
int iwl_dump_fh(struct iwl_trans *trans, char **buf, bool display)
@@ -1696,6 +1700,7 @@ int iwl_dump_fh(struct iwl_trans *trans, char **buf, bool display)
static const char *get_csr_string(int cmd)
{
+#define IWL_CMD(x) case x: return #x
switch (cmd) {
IWL_CMD(CSR_HW_IF_CONFIG_REG);
IWL_CMD(CSR_INT_COALESCING);
@@ -1723,6 +1728,7 @@ static const char *get_csr_string(int cmd)
default:
return "UNKNOWN";
}
+#undef IWL_CMD
}
void iwl_dump_csr(struct iwl_trans *trans)