Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34dd5feb authored by Zhu Yi's avatar Zhu Yi Committed by John W. Linville
Browse files

iwmc3200wifi: add ftrace event tracing support



Add event tracer for iwmc3200wifi driver. When enabled, all the
commands and responses between the driver and firmware (also
including Tx/Rx frames) will be recorded in the ftrace ring buffer.

Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 04d1c227
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ config IWM
config IWM_DEBUG
	bool "Enable full debugging output in iwmc3200wifi"
	depends on IWM && DEBUG_FS
	---help---
	help
	  This option will enable debug tracing and setting for iwm

	  You can set the debug level and module through debugfs. By
@@ -30,3 +30,10 @@ config IWM_DEBUG
	  Or, if you want the full debug, for all modules:
	  echo 0xff > /sys/kernel/debug/iwm/phyN/debug/level
	  echo 0xff > /sys/kernel/debug/iwm/phyN/debug/modules

config IWM_TRACING
	bool "Enable event tracing for iwmc3200wifi"
	depends on IWM && EVENT_TRACING
	help
	  Say Y here to trace all the commands and responses between
	  the driver and firmware (including TX/RX frames) with ftrace.
+3 −0
Original line number Diff line number Diff line
@@ -3,3 +3,6 @@ iwmc3200wifi-objs += main.o netdev.o rx.o tx.o sdio.o hal.o fw.o
iwmc3200wifi-objs += commands.o cfg80211.o eeprom.o

iwmc3200wifi-$(CONFIG_IWM_DEBUG) += debugfs.o
iwmc3200wifi-$(CONFIG_IWM_TRACING) += trace.o

CFLAGS_trace.o := -I$(src)
+3 −0
Original line number Diff line number Diff line
@@ -104,6 +104,7 @@
#include "hal.h"
#include "umac.h"
#include "debug.h"
#include "trace.h"

static int iwm_nonwifi_cmd_init(struct iwm_priv *iwm,
				struct iwm_nonwifi_cmd *cmd,
@@ -276,6 +277,7 @@ static int iwm_send_udma_nonwifi_cmd(struct iwm_priv *iwm,
		    udma_cmd->handle_by_hw, cmd->seq_num, udma_cmd->addr,
		    udma_cmd->op1_sz, udma_cmd->op2);

	trace_iwm_tx_nonwifi_cmd(iwm, udma_hdr);
	return iwm_bus_send_chunk(iwm, buf->start, buf->len);
}

@@ -362,6 +364,7 @@ static int iwm_send_udma_wifi_cmd(struct iwm_priv *iwm,
		return ret;
	}

	trace_iwm_tx_wifi_cmd(iwm, umac_hdr);
	return iwm_bus_send_chunk(iwm, buf->start, buf->len);
}

+2 −1
Original line number Diff line number Diff line
@@ -75,7 +75,8 @@ do { \


/* UDMA IN OP CODE -- cmd bits [3:0] */
#define UDMA_IN_OPCODE_MASK			0xF
#define UDMA_HDI_IN_NW_CMD_OPCODE_POS		0
#define UDMA_HDI_IN_NW_CMD_OPCODE_SEED		0xF

#define UDMA_IN_OPCODE_GENERAL_RESP		0x0
#define UDMA_IN_OPCODE_READ_RESP		0x1
+1 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@
#include "umac.h"
#include "lmac.h"
#include "eeprom.h"
#include "trace.h"

#define IWM_COPYRIGHT "Copyright(c) 2009 Intel Corporation"
#define IWM_AUTHOR "<ilw@linux.intel.com>"
Loading