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

Commit 035f7ff2 authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Wey-Yi Guy
Browse files

iwlwifi: transport holds its pointer to the config



Instead of using the shared area that we be killed.
Remove the pointer to config from shared since it is not
used any more.

Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent 68f360dc
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -890,8 +890,6 @@ struct iwl_drv *iwl_drv_start(struct iwl_shared *shrd,
	struct iwl_drv *drv;
	int ret;

	shrd->cfg = cfg;

	drv = kzalloc(sizeof(*drv), GFP_KERNEL);
	if (!drv) {
		dev_printk(KERN_ERR, trans->dev, "Couldn't allocate iwl_drv");
+2 −2
Original line number Diff line number Diff line
@@ -433,7 +433,7 @@ static int iwl_init_otp_access(struct iwl_trans *trans)
		 * CSR auto clock gate disable bit -
		 * this is only applicable for HW with OTP shadow RAM
		 */
		if (cfg(trans)->base_params->shadow_ram_support)
		if (trans->cfg->base_params->shadow_ram_support)
			iwl_set_bit(trans, CSR_DBG_LINK_PWR_MGMT_REG,
				CSR_RESET_LINK_PWR_MGMT_DISABLED);
	}
@@ -554,7 +554,7 @@ static int iwl_find_otp_image(struct iwl_trans *trans,
		}
		/* more in the link list, continue */
		usedblocks++;
	} while (usedblocks <= cfg(trans)->base_params->max_ll_items);
	} while (usedblocks <= trans->cfg->base_params->max_ll_items);

	/* OTP has no valid blocks */
	IWL_DEBUG_EEPROM(trans, "OTP has no valid blocks\n");
+1 −1
Original line number Diff line number Diff line
@@ -281,7 +281,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
		goto out_free_bus;
	}

	iwl_trans = iwl_trans_pcie_alloc(shrd, pdev, ent);
	iwl_trans = iwl_trans_pcie_alloc(shrd, pdev, ent, cfg);
	if (iwl_trans == NULL) {
		err = -ENOMEM;
		goto out_free_bus;
+0 −3
Original line number Diff line number Diff line
@@ -150,16 +150,13 @@ struct iwl_mod_params {
/**
 * struct iwl_shared - shared fields for all the layers of the driver
 *
 * @cfg: see struct iwl_cfg
 * @trans: pointer to the transport layer data
 */
struct iwl_shared {
	const struct iwl_cfg *cfg;
	struct iwl_trans *trans;
};

/*Whatever _m is (iwl_trans, iwl_priv, these macros will work */
#define cfg(_m)		((_m)->shrd->cfg)
#define trans(_m)	((_m)->shrd->trans)

static inline bool iwl_have_debug_level(u32 level)
+3 −3
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ void iwl_rx_queue_update_write_ptr(struct iwl_trans *trans,
	if (q->need_update == 0)
		goto exit_unlock;

	if (cfg(trans)->base_params->shadow_reg_enable) {
	if (trans->cfg->base_params->shadow_reg_enable) {
		/* shadow register enabled */
		/* Device expects a multiple of 8 */
		q->write_actual = (q->write & ~0x7);
@@ -543,7 +543,7 @@ static void iwl_rx_handle(struct iwl_trans *trans)
static void iwl_irq_handle_error(struct iwl_trans *trans)
{
	/* W/A for WiFi/WiMAX coex and WiMAX own the RF */
	if (cfg(trans)->internal_wimax_coex &&
	if (trans->cfg->internal_wimax_coex &&
	    (!(iwl_read_prph(trans, APMG_CLK_CTRL_REG) &
			APMS_CLK_VAL_MRB_FUNC_MODE) ||
	     (iwl_read_prph(trans, APMG_PS_CTRL_REG) &
@@ -680,7 +680,7 @@ void iwl_irq_tasklet(struct iwl_trans *trans)
	if (inta & CSR_INT_BIT_WAKEUP) {
		IWL_DEBUG_ISR(trans, "Wakeup interrupt\n");
		iwl_rx_queue_update_write_ptr(trans, &trans_pcie->rxq);
		for (i = 0; i < cfg(trans)->base_params->num_of_queues; i++)
		for (i = 0; i < trans->cfg->base_params->num_of_queues; i++)
			iwl_txq_update_write_ptr(trans,
						 &trans_pcie->txq[i]);

Loading