iwlwifi: mvm: add rxf and txf to dump data
authorLiad Kaufman <liad.kaufman@intel.com>
Mon, 15 Dec 2014 15:54:16 +0000 (17:54 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Thu, 22 Jan 2015 15:54:05 +0000 (17:54 +0200)
When the FW is in error status - try to read the RXF and
TXF (all of them) and add them to the dump data.

This shouldn't happen in non-error statuses, as we don't
want to stop the RXF/TXF while they are running.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/iwl-fw-error-dump.h
drivers/net/wireless/iwlwifi/iwl-prph.h
drivers/net/wireless/iwlwifi/mvm/fw-api.h
drivers/net/wireless/iwlwifi/mvm/fw.c
drivers/net/wireless/iwlwifi/mvm/mac80211.c
drivers/net/wireless/iwlwifi/mvm/mvm.h
drivers/net/wireless/iwlwifi/mvm/ops.c

index ec115bd..919a254 100644 (file)
@@ -134,6 +134,27 @@ struct iwl_fw_error_dump_txcmd {
        u8 data[];
 } __packed;
 
+/**
+ * struct iwl_fw_error_dump_fifo - RX/TX FIFO data
+ * @fifo_num: number of FIFO (starting from 0)
+ * @available_bytes: num of bytes available in FIFO (may be less than FIFO size)
+ * @wr_ptr: position of write pointer
+ * @rd_ptr: position of read pointer
+ * @fence_ptr: position of fence pointer
+ * @fence_mode: the current mode of the fence (before locking) -
+ *     0=follow RD pointer ; 1 = freeze
+ * @data: all of the FIFO's data
+ */
+struct iwl_fw_error_dump_fifo {
+       __le32 fifo_num;
+       __le32 available_bytes;
+       __le32 wr_ptr;
+       __le32 rd_ptr;
+       __le32 fence_ptr;
+       __le32 fence_mode;
+       u8 data[];
+} __packed;
+
 enum iwl_fw_error_dump_family {
        IWL_FW_ERROR_DUMP_FAMILY_7 = 7,
        IWL_FW_ERROR_DUMP_FAMILY_8 = 8,
Simple merge