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

Commit d3d3e001 authored by John W. Linville's avatar John W. Linville
Browse files
parents 7a0a260a 48849a41
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@
#define IWL8000_NVM_VERSION		0x0a1d
#define IWL8000_TX_POWER_VERSION	0xffff /* meaningless */

#define IWL8000_FW_PRE "iwlwifi-8000-"
#define IWL8000_FW_PRE "iwlwifi-8000"
#define IWL8000_MODULE_FIRMWARE(api) IWL8000_FW_PRE __stringify(api) ".ucode"

#define NVM_HW_SECTION_NUM_FAMILY_8000		10
+18 −0
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@
#include <linux/vmalloc.h>

#include "iwl-drv.h"
#include "iwl-csr.h"
#include "iwl-debug.h"
#include "iwl-trans.h"
#include "iwl-op-mode.h"
@@ -244,6 +245,23 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first)
	snprintf(drv->firmware_name, sizeof(drv->firmware_name), "%s%s.ucode",
		 name_pre, tag);

	/*
	 * Starting 8000B - FW name format has changed. This overwrites the
	 * previous name and uses the new format.
	 */
	if (drv->trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) {
		char rev_step[2] = {
			'A' + CSR_HW_REV_STEP(drv->trans->hw_rev), 0
		};

		/* A-step doesn't have an indication */
		if (CSR_HW_REV_STEP(drv->trans->hw_rev) == SILICON_A_STEP)
			rev_step[0] = 0;

		snprintf(drv->firmware_name, sizeof(drv->firmware_name),
			 "%s%s-%s.ucode", name_pre, rev_step, tag);
	}

	IWL_DEBUG_INFO(drv, "attempting to load firmware %s'%s'\n",
		       (drv->fw_index == UCODE_EXPERIMENTAL_INDEX)
				? "EXPERIMENTAL " : "",
+16 −1
Original line number Diff line number Diff line
@@ -145,9 +145,24 @@ enum iwl_ucode_tlv_api {
/**
 * enum iwl_ucode_tlv_capa - ucode capabilities
 * @IWL_UCODE_TLV_CAPA_D0I3_SUPPORT: supports D0i3
 * @IWL_UCODE_TLV_CAPA_TXPOWER_INSERTION_SUPPORT: supports insertion of current
 *	tx power value into TPC Report action frame and Link Measurement Report
 *	action frame
 * @IWL_UCODE_TLV_CAPA_DS_PARAM_SET_IE_SUPPORT: supports adding DS params
 *	element in probe requests.
 * @IWL_UCODE_TLV_CAPA_WFA_TPC_REP_IE_SUPPORT: supports adding TPC Report IE in
 *	probe requests.
 * @IWL_UCODE_TLV_CAPA_QUIET_PERIOD_SUPPORT: supports Quiet Period requests
 * @IWL_UCODE_TLV_CAPA_DQA_SUPPORT: supports dynamic queue allocation (DQA),
 *	which also implies support for the scheduler configuration command
 */
enum iwl_ucode_tlv_capa {
	IWL_UCODE_TLV_CAPA_D0I3_SUPPORT			= BIT(0),
	IWL_UCODE_TLV_CAPA_TXPOWER_INSERTION_SUPPORT	= BIT(8),
	IWL_UCODE_TLV_CAPA_DS_PARAM_SET_IE_SUPPORT	= BIT(9),
	IWL_UCODE_TLV_CAPA_WFA_TPC_REP_IE_SUPPORT	= BIT(10),
	IWL_UCODE_TLV_CAPA_QUIET_PERIOD_SUPPORT		= BIT(11),
	IWL_UCODE_TLV_CAPA_DQA_SUPPORT			= BIT(12),
};

/* The default calibrate table size if not specified by firmware file */
+2 −1
Original line number Diff line number Diff line
@@ -90,9 +90,10 @@
#define IWL_MVM_BT_COEX_EN_RED_TXP_THRESH	62
#define IWL_MVM_BT_COEX_DIS_RED_TXP_THRESH	65
#define IWL_MVM_BT_COEX_SYNC2SCO		1
#define IWL_MVM_BT_COEX_CORUNNING		1
#define IWL_MVM_BT_COEX_CORUNNING		0
#define IWL_MVM_BT_COEX_MPLUT			1
#define IWL_MVM_FW_MCAST_FILTER_PASS_ALL	0
#define IWL_MVM_QUOTA_THRESHOLD			8
#define IWL_MVM_RS_RSSI_BASED_INIT_RATE         0

#endif /* __MVM_CONSTANTS_H */
+25 −0
Original line number Diff line number Diff line
@@ -326,6 +326,29 @@ static ssize_t iwl_dbgfs_set_nic_temperature_write(struct iwl_mvm *mvm,
	return count;
}

static ssize_t iwl_dbgfs_nic_temp_read(struct file *file,
				       char __user *user_buf,
				       size_t count, loff_t *ppos)
{
	struct iwl_mvm *mvm = file->private_data;
	char buf[16];
	int pos, temp;

	if (!mvm->ucode_loaded)
		return -EIO;

	mutex_lock(&mvm->mutex);
	temp = iwl_mvm_get_temp(mvm);
	mutex_unlock(&mvm->mutex);

	if (temp < 0)
		return temp;

	pos = scnprintf(buf , sizeof(buf), "%d\n", temp);

	return simple_read_from_buffer(user_buf, count, ppos, buf, pos);
}

static ssize_t iwl_dbgfs_stations_read(struct file *file, char __user *user_buf,
				       size_t count, loff_t *ppos)
{
@@ -1378,6 +1401,7 @@ MVM_DEBUGFS_WRITE_FILE_OPS(tx_flush, 16);
MVM_DEBUGFS_WRITE_FILE_OPS(sta_drain, 8);
MVM_DEBUGFS_READ_WRITE_FILE_OPS(sram, 64);
MVM_DEBUGFS_READ_WRITE_FILE_OPS(set_nic_temperature, 64);
MVM_DEBUGFS_READ_FILE_OPS(nic_temp);
MVM_DEBUGFS_READ_FILE_OPS(stations);
MVM_DEBUGFS_READ_FILE_OPS(bt_notif);
MVM_DEBUGFS_READ_FILE_OPS(bt_cmd);
@@ -1420,6 +1444,7 @@ int iwl_mvm_dbgfs_register(struct iwl_mvm *mvm, struct dentry *dbgfs_dir)
	MVM_DEBUGFS_ADD_FILE(sram, mvm->debugfs_dir, S_IWUSR | S_IRUSR);
	MVM_DEBUGFS_ADD_FILE(set_nic_temperature, mvm->debugfs_dir,
			     S_IWUSR | S_IRUSR);
	MVM_DEBUGFS_ADD_FILE(nic_temp, dbgfs_dir, S_IRUSR);
	MVM_DEBUGFS_ADD_FILE(stations, dbgfs_dir, S_IRUSR);
	MVM_DEBUGFS_ADD_FILE(fw_error_dump, dbgfs_dir, S_IRUSR);
	MVM_DEBUGFS_ADD_FILE(bt_notif, dbgfs_dir, S_IRUSR);
Loading