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

Commit 8ca151b5 authored by Johannes Berg's avatar Johannes Berg
Browse files

iwlwifi: add the MVM driver



Newer firmware revisions have a completely new
firmware API. This is the new driver for this
new API.

I've listed the people who directly contributed
code, but many others from various teams have
contributed in other ways.

Cc: Alexander Bondar <alexander.bondar@intel.com>
Cc: Amit Beka <amit.beka@intel.com>
Cc: Amnon Paz <amnonx.paz@intel.com>
Cc: Assaf Krauss <assaf.krauss@intel.com>
Cc: David Spinadel <david.spinadel@intel.com>
Cc: Dor Shaish <dor.shaish@intel.com>
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Cc: Eytan Lifshitz <eytan.lifshitz@intel.com>
Cc: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent b1e1adfa
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -43,8 +43,20 @@ config IWLWIFI
	  module will be called iwlwifi.

config IWLDVM
	tristate "Intel Wireless WiFi"
	tristate "Intel Wireless WiFi DVM Firmware support"
	depends on IWLWIFI
	help
	  This is the driver supporting the DVM firmware which is
	  currently the only firmware available for existing devices.

config IWLMVM
	tristate "Intel Wireless WiFi MVM Firmware support"
	depends on IWLWIFI
	help
	  This is the driver supporting the MVM firmware which is
	  currently only available for 7000 series devices.

	  Say yes if you have such a device.

menu "Debugging Options"
	depends on IWLWIFI
+1 −0
Original line number Diff line number Diff line
@@ -17,5 +17,6 @@ ccflags-y += -D__CHECK_ENDIAN__ -I$(src)


obj-$(CONFIG_IWLDVM)	+= dvm/
obj-$(CONFIG_IWLMVM)	+= mvm/

CFLAGS_iwl-devtrace.o := -I$(src)
+2 −0
Original line number Diff line number Diff line
@@ -116,6 +116,7 @@ do { \
#define IWL_DL_HCMD		0x00000004
#define IWL_DL_STATE		0x00000008
/* 0x000000F0 - 0x00000010 */
#define IWL_DL_TE		0x00000020
#define IWL_DL_EEPROM		0x00000040
#define IWL_DL_RADIO		0x00000080
/* 0x00000F00 - 0x00000100 */
@@ -156,6 +157,7 @@ do { \
#define IWL_DEBUG_LED(p, f, a...)	IWL_DEBUG(p, IWL_DL_LED, f, ## a)
#define IWL_DEBUG_WEP(p, f, a...)	IWL_DEBUG(p, IWL_DL_WEP, f, ## a)
#define IWL_DEBUG_HC(p, f, a...)	IWL_DEBUG(p, IWL_DL_HCMD, f, ## a)
#define IWL_DEBUG_TE(p, f, a...)	IWL_DEBUG(p, IWL_DL_TE, f, ## a)
#define IWL_DEBUG_EEPROM(d, f, a...)	IWL_DEBUG_DEV(d, IWL_DL_EEPROM, f, ## a)
#define IWL_DEBUG_CALIB(p, f, a...)	IWL_DEBUG(p, IWL_DL_CALIB, f, ## a)
#define IWL_DEBUG_FW(p, f, a...)	IWL_DEBUG(p, IWL_DL_FW, f, ## a)
+10 −5
Original line number Diff line number Diff line
@@ -139,8 +139,10 @@ struct iwl_drv {
#endif
};

#define DVM_OP_MODE	0
#define MVM_OP_MODE	1
enum {
	DVM_OP_MODE =	0,
	MVM_OP_MODE =	1,
};

/* Protects the table contents, i.e. the ops pointer & drv list */
static struct mutex iwlwifi_opmode_table_mtx;
@@ -149,8 +151,8 @@ static struct iwlwifi_opmode_table {
	const struct iwl_op_mode_ops *ops;	/* pointer to op_mode ops */
	struct list_head drv;		/* list of devices using this op_mode */
} iwlwifi_opmode_table[] = {		/* ops set when driver is initialized */
	{ .name = "iwldvm", .ops = NULL },
	{ .name = "iwlmvm", .ops = NULL },
	[DVM_OP_MODE] = { .name = "iwldvm", .ops = NULL },
	[MVM_OP_MODE] = { .name = "iwlmvm", .ops = NULL },
};

/*
@@ -963,6 +965,9 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
	release_firmware(ucode_raw);

	mutex_lock(&iwlwifi_opmode_table_mtx);
	if (fw->mvm_fw)
		op = &iwlwifi_opmode_table[MVM_OP_MODE];
	else
		op = &iwlwifi_opmode_table[DVM_OP_MODE];

	/* add this device to the list of devices using this op_mode */
+1 −0
Original line number Diff line number Diff line
@@ -166,6 +166,7 @@ struct iwl_tlv_calib_ctrl {
 * @inst_evtlog_ptr: event log offset for runtime ucode.
 * @inst_evtlog_size: event log size for runtime ucode.
 * @inst_errlog_ptr: error log offfset for runtime ucode.
 * @mvm_fw: indicates this is MVM firmware
 */
struct iwl_fw {
	u32 ucode_ver;
Loading