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

Commit 6dcaac59 authored by Kalle Valo's avatar Kalle Valo
Browse files

Merge tag 'iwlwifi-next-for-kalle-2015-04-02' of...

Merge tag 'iwlwifi-next-for-kalle-2015-04-02' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

* some more work on LAR
* fixes for UMAC scan
* more work on debugging framework
* more work for 8000 devices
* cleanups and small bugfixes
parents 7abccdba 31755207
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -94,8 +94,8 @@
	IWL8000_FW_PRE "-" __stringify(api) ".ucode"

#define NVM_HW_SECTION_NUM_FAMILY_8000		10
#define DEFAULT_NVM_FILE_FAMILY_8000A		"iwl_nvm_8000.bin"
#define DEFAULT_NVM_FILE_FAMILY_8000		"iwl_nvm_8000B.bin"
#define DEFAULT_NVM_FILE_FAMILY_8000B		"nvmData-8000B"
#define DEFAULT_NVM_FILE_FAMILY_8000C		"nvmData-8000C"

/* Max SDIO RX aggregation size of the ADDBA request/response */
#define MAX_RX_AGG_SIZE_8260_SDIO	28
@@ -177,8 +177,8 @@ const struct iwl_cfg iwl8260_2ac_sdio_cfg = {
	.ht_params = &iwl8000_ht_params,
	.nvm_ver = IWL8000_NVM_VERSION,
	.nvm_calib_ver = IWL8000_TX_POWER_VERSION,
	.default_nvm_file = DEFAULT_NVM_FILE_FAMILY_8000,
	.default_nvm_file_8000A = DEFAULT_NVM_FILE_FAMILY_8000A,
	.default_nvm_file_B_step = DEFAULT_NVM_FILE_FAMILY_8000B,
	.default_nvm_file_C_step = DEFAULT_NVM_FILE_FAMILY_8000C,
	.max_rx_agg_size = MAX_RX_AGG_SIZE_8260_SDIO,
	.disable_dummy_notification = true,
	.max_ht_ampdu_exponent  = MAX_HT_AMPDU_EXPONENT_8260_SDIO,
@@ -192,8 +192,8 @@ const struct iwl_cfg iwl4165_2ac_sdio_cfg = {
	.ht_params = &iwl8000_ht_params,
	.nvm_ver = IWL8000_NVM_VERSION,
	.nvm_calib_ver = IWL8000_TX_POWER_VERSION,
	.default_nvm_file = DEFAULT_NVM_FILE_FAMILY_8000,
	.default_nvm_file_8000A = DEFAULT_NVM_FILE_FAMILY_8000A,
	.default_nvm_file_B_step = DEFAULT_NVM_FILE_FAMILY_8000B,
	.default_nvm_file_C_step = DEFAULT_NVM_FILE_FAMILY_8000C,
	.max_rx_agg_size = MAX_RX_AGG_SIZE_8260_SDIO,
	.bt_shared_single_ant = true,
	.disable_dummy_notification = true,
+3 −3
Original line number Diff line number Diff line
@@ -228,7 +228,7 @@ struct iwl_pwr_tx_backoff {

/**
 * struct iwl_cfg
 * @name: Offical name of the device
 * @name: Official name of the device
 * @fw_name_pre: Firmware filename prefix. The api version and extension
 *	(.ucode) will be added to filename before loading from disk. The
 *	filename is constructed as fw_name_pre<api>.ucode.
@@ -303,8 +303,8 @@ struct iwl_cfg {
	bool lp_xtal_workaround;
	const struct iwl_pwr_tx_backoff *pwr_tx_backoffs;
	bool no_power_up_nic_in_init;
	const char *default_nvm_file;
	const char *default_nvm_file_8000A;
	const char *default_nvm_file_B_step;
	const char *default_nvm_file_C_step;
	unsigned int max_rx_agg_size;
	bool disable_dummy_notification;
	unsigned int max_tx_agg_size;
+33 −9
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ static struct iwlwifi_opmode_table {
#define IWL_DEFAULT_SCAN_CHANNELS 40

/*
 * struct fw_sec: Just for the image parsing proccess.
 * struct fw_sec: Just for the image parsing process.
 * For the fw storage we are using struct fw_desc.
 */
struct fw_sec {
@@ -241,16 +241,10 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first)
	 * 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;
		char rev_step = 'A' + CSR_HW_REV_STEP(drv->trans->hw_rev);

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

	IWL_DEBUG_INFO(drv, "attempting to load firmware %s'%s'\n",
@@ -1108,6 +1102,7 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
	const unsigned int api_max = drv->cfg->ucode_api_max;
	unsigned int api_ok = drv->cfg->ucode_api_ok;
	const unsigned int api_min = drv->cfg->ucode_api_min;
	size_t trigger_tlv_sz[FW_DBG_TRIGGER_MAX];
	u32 api_ver;
	int i;
	bool load_module = false;
@@ -1227,8 +1222,37 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
		}
	}

	memset(&trigger_tlv_sz, 0xff, sizeof(trigger_tlv_sz));

	trigger_tlv_sz[FW_DBG_TRIGGER_MISSED_BEACONS] =
		sizeof(struct iwl_fw_dbg_trigger_missed_bcon);
	trigger_tlv_sz[FW_DBG_TRIGGER_CHANNEL_SWITCH] = 0;
	trigger_tlv_sz[FW_DBG_TRIGGER_FW_NOTIF] =
		sizeof(struct iwl_fw_dbg_trigger_cmd);
	trigger_tlv_sz[FW_DBG_TRIGGER_MLME] =
		sizeof(struct iwl_fw_dbg_trigger_mlme);
	trigger_tlv_sz[FW_DBG_TRIGGER_STATS] =
		sizeof(struct iwl_fw_dbg_trigger_stats);
	trigger_tlv_sz[FW_DBG_TRIGGER_RSSI] =
		sizeof(struct iwl_fw_dbg_trigger_low_rssi);
	trigger_tlv_sz[FW_DBG_TRIGGER_TXQ_TIMERS] =
		sizeof(struct iwl_fw_dbg_trigger_txq_timer);
	trigger_tlv_sz[FW_DBG_TRIGGER_TIME_EVENT] =
		sizeof(struct iwl_fw_dbg_trigger_time_event);

	for (i = 0; i < ARRAY_SIZE(drv->fw.dbg_trigger_tlv); i++) {
		if (pieces->dbg_trigger_tlv[i]) {
			/*
			 * If the trigger isn't long enough, WARN and exit.
			 * Someone is trying to debug something and he won't
			 * be able to catch the bug he is trying to chase.
			 * We'd better be noisy to be sure he knows what's
			 * going on.
			 */
			if (WARN_ON(pieces->dbg_trigger_tlv_len[i] <
				    (trigger_tlv_sz[i] +
				     sizeof(struct iwl_fw_dbg_trigger_tlv))))
				goto out_free_fw;
			drv->fw.dbg_trigger_tlv_len[i] =
				pieces->dbg_trigger_tlv_len[i];
			drv->fw.dbg_trigger_tlv[i] =
+1 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ struct iwl_cfg;
 * 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 occured.
 * 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);
+2 −2
Original line number Diff line number Diff line
@@ -248,7 +248,7 @@ static int iwl_read_otp_word(struct iwl_trans *trans, u16 addr,
	otpgp = iwl_read32(trans, CSR_OTP_GP_REG);
	if (otpgp & CSR_OTP_GP_REG_ECC_UNCORR_STATUS_MSK) {
		/* stop in this case */
		/* set the uncorrectable OTP ECC bit for acknowledgement */
		/* set the uncorrectable OTP ECC bit for acknowledgment */
		iwl_set_bit(trans, CSR_OTP_GP_REG,
			    CSR_OTP_GP_REG_ECC_UNCORR_STATUS_MSK);
		IWL_ERR(trans, "Uncorrectable OTP ECC error, abort OTP read\n");
@@ -256,7 +256,7 @@ static int iwl_read_otp_word(struct iwl_trans *trans, u16 addr,
	}
	if (otpgp & CSR_OTP_GP_REG_ECC_CORR_STATUS_MSK) {
		/* continue in this case */
		/* set the correctable OTP ECC bit for acknowledgement */
		/* set the correctable OTP ECC bit for acknowledgment */
		iwl_set_bit(trans, CSR_OTP_GP_REG,
			    CSR_OTP_GP_REG_ECC_CORR_STATUS_MSK);
		IWL_ERR(trans, "Correctable OTP ECC error, continue read\n");
Loading