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

Commit d7eb3c0a authored by Kalle Valo's avatar Kalle Valo
Browse files

Merge tag 'iwlwifi-next-for-kalle-2017-02-06' of...

Merge tag 'iwlwifi-next-for-kalle-2017-02-06' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

Second batch of improvements and fixes for v4.11.

  * A bunch of bugfixes for the DQA code;
  * Work on support for new A000 devices continues;
  * Some clean-ups and general improvements
parents cceb0a59 8364fbb4
Loading
Loading
Loading
Loading
+23 −7
Original line number Diff line number Diff line
@@ -72,9 +72,13 @@
#define IWL_A000_SMEM_OFFSET		0x400000
#define IWL_A000_SMEM_LEN		0x68000

#define IWL_A000_FW_PRE "iwlwifi-Qu-a0-jf-b0-"
#define IWL_A000_MODULE_FIRMWARE(api) \
	IWL_A000_FW_PRE "-" __stringify(api) ".ucode"
#define IWL_A000_JF_FW_PRE "iwlwifi-Qu-a0-jf-b0-"
#define IWL_A000_HR_FW_PRE "iwlwifi-Qu-a0-hr-a0-"

#define IWL_A000_HR_MODULE_FIRMWARE(api) \
	IWL_A000_HR_FW_PRE "-" __stringify(api) ".ucode"
#define IWL_A000_JF_MODULE_FIRMWARE(api) \
	IWL_A000_JF_FW_PRE "-" __stringify(api) ".ucode"

#define NVM_HW_SECTION_NUM_FAMILY_A000		10

@@ -116,11 +120,22 @@ static const struct iwl_ht_params iwl_a000_ht_params = {
	.mq_rx_supported = true,					\
	.vht_mu_mimo_supported = true,					\
	.mac_addr_from_csr = true,					\
	.use_tfh = true
	.use_tfh = true,						\
	.rf_id = true

const struct iwl_cfg iwla000_2ac_cfg_hr = {
		.name = "Intel(R) Dual Band Wireless AC a000",
		.fw_name_pre = IWL_A000_HR_FW_PRE,
		IWL_DEVICE_A000,
		.ht_params = &iwl_a000_ht_params,
		.nvm_ver = IWL_A000_NVM_VERSION,
		.nvm_calib_ver = IWL_A000_TX_POWER_VERSION,
		.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
};

const struct iwl_cfg iwla000_2ac_cfg = {
const struct iwl_cfg iwla000_2ac_cfg_jf = {
		.name = "Intel(R) Dual Band Wireless AC a000",
		.fw_name_pre = IWL_A000_FW_PRE,
		.fw_name_pre = IWL_A000_JF_FW_PRE,
		IWL_DEVICE_A000,
		.ht_params = &iwl_a000_ht_params,
		.nvm_ver = IWL_A000_NVM_VERSION,
@@ -128,4 +143,5 @@ const struct iwl_cfg iwla000_2ac_cfg = {
		.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
};

MODULE_FIRMWARE(IWL_A000_MODULE_FIRMWARE(IWL_A000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL_A000_HR_MODULE_FIRMWARE(IWL_A000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL_A000_JF_MODULE_FIRMWARE(IWL_A000_UCODE_API_MAX));
+2 −1
Original line number Diff line number Diff line
@@ -455,7 +455,8 @@ extern const struct iwl_cfg iwl9260_2ac_cfg;
extern const struct iwl_cfg iwl9270_2ac_cfg;
extern const struct iwl_cfg iwl9460_2ac_cfg;
extern const struct iwl_cfg iwl9560_2ac_cfg;
extern const struct iwl_cfg iwla000_2ac_cfg;
extern const struct iwl_cfg iwla000_2ac_cfg_hr;
extern const struct iwl_cfg iwla000_2ac_cfg_jf;
#endif /* CONFIG_IWLMVM */

#endif /* __IWL_CONFIG_H__ */
+1 −0
Original line number Diff line number Diff line
@@ -349,6 +349,7 @@ enum {
/* RF_ID value */
#define CSR_HW_RF_ID_TYPE_JF		(0x00105000)
#define CSR_HW_RF_ID_TYPE_LC		(0x00101000)
#define CSR_HW_RF_ID_TYPE_HR		(0x00109000)

/* EEPROM REG */
#define CSR_EEPROM_REG_READ_VALID_MSK	(0x00000001)
+11 −14
Original line number Diff line number Diff line
@@ -102,7 +102,6 @@ static struct dentry *iwl_dbgfs_root;
 * @op_mode: the running op_mode
 * @trans: transport layer
 * @dev: for debug prints only
 * @cfg: configuration struct
 * @fw_index: firmware revision to try loading
 * @firmware_name: composite filename of ucode file to load
 * @request_firmware_complete: the firmware has been obtained from user space
@@ -114,7 +113,6 @@ struct iwl_drv {
	struct iwl_op_mode *op_mode;
	struct iwl_trans *trans;
	struct device *dev;
	const struct iwl_cfg *cfg;

	int fw_index;                   /* firmware we're trying to load */
	char firmware_name[64];         /* name of firmware file to load */
@@ -213,18 +211,18 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw,

static int iwl_request_firmware(struct iwl_drv *drv, bool first)
{
	const char *name_pre = drv->cfg->fw_name_pre;
	const char *name_pre = drv->trans->cfg->fw_name_pre;
	char tag[8];

	if (first) {
		drv->fw_index = drv->cfg->ucode_api_max;
		drv->fw_index = drv->trans->cfg->ucode_api_max;
		sprintf(tag, "%d", drv->fw_index);
	} else {
		drv->fw_index--;
		sprintf(tag, "%d", drv->fw_index);
	}

	if (drv->fw_index < drv->cfg->ucode_api_min) {
	if (drv->fw_index < drv->trans->cfg->ucode_api_min) {
		IWL_ERR(drv, "no suitable firmware found!\n");
		return -ENOENT;
	}
@@ -1207,7 +1205,7 @@ _iwl_op_mode_start(struct iwl_drv *drv, struct iwlwifi_opmode_table *op)
	dbgfs_dir = drv->dbgfs_op_mode;
#endif

	op_mode = ops->start(drv->trans, drv->cfg, &drv->fw, dbgfs_dir);
	op_mode = ops->start(drv->trans, drv->trans->cfg, &drv->fw, dbgfs_dir);

#ifdef CONFIG_IWLWIFI_DEBUGFS
	if (!op_mode) {
@@ -1247,8 +1245,8 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
	struct iwlwifi_opmode_table *op;
	int err;
	struct iwl_firmware_pieces *pieces;
	const unsigned int api_max = drv->cfg->ucode_api_max;
	const unsigned int api_min = drv->cfg->ucode_api_min;
	const unsigned int api_max = drv->trans->cfg->ucode_api_max;
	const unsigned int api_min = drv->trans->cfg->ucode_api_min;
	size_t trigger_tlv_sz[FW_DBG_TRIGGER_MAX];
	u32 api_ver;
	int i;
@@ -1310,7 +1308,8 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
	 * In mvm uCode there is no difference between data and instructions
	 * sections.
	 */
	if (fw->type == IWL_FW_DVM && validate_sec_sizes(drv, pieces, drv->cfg))
	if (fw->type == IWL_FW_DVM && validate_sec_sizes(drv, pieces,
							 drv->trans->cfg))
		goto try_again;

	/* Allocate ucode buffers for card's bus-master loading ... */
@@ -1408,14 +1407,14 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
		fw->init_evtlog_size = (pieces->init_evtlog_size - 16)/12;
	else
		fw->init_evtlog_size =
			drv->cfg->base_params->max_event_log_size;
			drv->trans->cfg->base_params->max_event_log_size;
	fw->init_errlog_ptr = pieces->init_errlog_ptr;
	fw->inst_evtlog_ptr = pieces->inst_evtlog_ptr;
	if (pieces->inst_evtlog_size)
		fw->inst_evtlog_size = (pieces->inst_evtlog_size - 16)/12;
	else
		fw->inst_evtlog_size =
			drv->cfg->base_params->max_event_log_size;
			drv->trans->cfg->base_params->max_event_log_size;
	fw->inst_errlog_ptr = pieces->inst_errlog_ptr;

	/*
@@ -1504,8 +1503,7 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
	kfree(pieces);
}

struct iwl_drv *iwl_drv_start(struct iwl_trans *trans,
			      const struct iwl_cfg *cfg)
struct iwl_drv *iwl_drv_start(struct iwl_trans *trans)
{
	struct iwl_drv *drv;
	int ret;
@@ -1518,7 +1516,6 @@ struct iwl_drv *iwl_drv_start(struct iwl_trans *trans,

	drv->trans = trans;
	drv->dev = trans->dev;
	drv->cfg = cfg;

	init_completion(&drv->request_firmware_complete);
	INIT_LIST_HEAD(&drv->list);
+1 −3
Original line number Diff line number Diff line
@@ -118,15 +118,13 @@ struct iwl_cfg;
 * iwl_drv_start - start the drv
 *
 * @trans_ops: the ops of the transport
 * @cfg: device specific constants / virtual functions
 *
 * starts the driver: fetches the firmware. This should be called by bus
 * specific system flows implementations. For example, the bus specific probe
 * function should do bus related operations only, and then call to this
 * function. It returns the driver object or %NULL if an error occurred.
 */
struct iwl_drv *iwl_drv_start(struct iwl_trans *trans,
			      const struct iwl_cfg *cfg);
struct iwl_drv *iwl_drv_start(struct iwl_trans *trans);

/**
 * iwl_drv_stop - stop the drv
Loading