aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-trans.h
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-07-08 12:45:17 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-07-22 12:21:10 -0400
commit48eb7b34ff027392985fae213c4d1d0fcc425b9c (patch)
tree29099ec53abb87436115fe463cdce84bab032946 /drivers/net/wireless/iwlwifi/iwl-trans.h
parent074279abb93566b3c33c3ef4aecf3e587251880b (diff)
iwlwifi: split fw-error-dump between transport and mvm
The mvm op_mode won't allocate the buffer for the transport any more. The transport allocates its own buffer and mvm is in charge of splicing the buffers in the debugfs hook. This makes the repartition easier to handle. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h
index 34d49e171fb4..656371a668da 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.h
@@ -394,6 +394,11 @@ struct iwl_trans_config {
394 const char *const *command_names; 394 const char *const *command_names;
395}; 395};
396 396
397struct iwl_trans_dump_data {
398 u32 len;
399 u8 data[];
400};
401
397struct iwl_trans; 402struct iwl_trans;
398 403
399/** 404/**
@@ -461,10 +466,8 @@ struct iwl_trans;
461 * @unref: release a reference previously taken with @ref. Note that 466 * @unref: release a reference previously taken with @ref. Note that
462 * initially the reference count is 1, making an initial @unref 467 * initially the reference count is 1, making an initial @unref
463 * necessary to allow low power states. 468 * necessary to allow low power states.
464 * @dump_data: fill a data dump with debug data, maybe containing last 469 * @dump_data: return a vmalloc'ed buffer with debug data, maybe containing last
465 * TX'ed commands and similar. When called with a NULL buffer and 470 * TX'ed commands and similar. The buffer will be vfree'd by the caller.
466 * zero buffer length, provide only the (estimated) required buffer
467 * length. Return the used buffer length.
468 * Note that the transport must fill in the proper file headers. 471 * Note that the transport must fill in the proper file headers.
469 */ 472 */
470struct iwl_trans_ops { 473struct iwl_trans_ops {
@@ -518,7 +521,7 @@ struct iwl_trans_ops {
518 void (*unref)(struct iwl_trans *trans); 521 void (*unref)(struct iwl_trans *trans);
519 522
520#ifdef CONFIG_IWLWIFI_DEBUGFS 523#ifdef CONFIG_IWLWIFI_DEBUGFS
521 u32 (*dump_data)(struct iwl_trans *trans, void *buf, u32 buflen); 524 struct iwl_trans_dump_data *(*dump_data)(struct iwl_trans *trans);
522#endif 525#endif
523}; 526};
524 527
@@ -685,12 +688,12 @@ static inline void iwl_trans_unref(struct iwl_trans *trans)
685} 688}
686 689
687#ifdef CONFIG_IWLWIFI_DEBUGFS 690#ifdef CONFIG_IWLWIFI_DEBUGFS
688static inline u32 iwl_trans_dump_data(struct iwl_trans *trans, 691static inline struct iwl_trans_dump_data *
689 void *buf, u32 buflen) 692iwl_trans_dump_data(struct iwl_trans *trans)
690{ 693{
691 if (!trans->ops->dump_data) 694 if (!trans->ops->dump_data)
692 return 0; 695 return NULL;
693 return trans->ops->dump_data(trans, buf, buflen); 696 return trans->ops->dump_data(trans);
694} 697}
695#endif 698#endif
696 699