summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-26 19:23:39 +0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2012-04-17 01:49:56 +0400
commitd9fb6465802c2279ea14cc26eb66d17c133478b1 (patch)
tree976d0ac36c6fa9e4f0a09a08d4354b335ab692ab /drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
parentc14c73728b8feb01d9142f9241bf14601cfb86f7 (diff)
downloadlinux-d9fb6465802c2279ea14cc26eb66d17c133478b1.tar.xz
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-int.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
index f98eff3abb13..70bdd0e2df38 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
@@ -273,6 +273,7 @@ struct iwl_trans_pcie {
bool rx_buf_size_8k;
u32 rx_page_order;
+ const char **command_names;
/* queue watchdog */
unsigned long wd_timeout;
@@ -417,4 +418,12 @@ static inline u8 get_cmd_index(struct iwl_queue *q, u32 index)
return index & (q->n_window - 1);
}
+static inline const char *
+trans_pcie_get_cmd_string(struct iwl_trans_pcie *trans_pcie, u8 cmd)
+{
+ if (!trans_pcie->command_names || !trans_pcie->command_names[cmd])
+ return "UNKNOWN";
+ return trans_pcie->command_names[cmd];
+}
+
#endif /* __iwl_trans_int_pcie_h__ */