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

Commit 87ce05a2 authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Wey-Yi Guy
Browse files

iwlwifi: remove the shared area



It is not needed 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 4b9844f5
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1507,7 +1507,6 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
	op_mode = hw->priv;
	op_mode->ops = &iwl_dvm_ops;
	priv = IWL_OP_MODE_GET_DVM(op_mode);
	priv->shrd = trans->shrd;
	priv->trans = trans;
	priv->dev = trans->dev;
	priv->cfg = cfg;
+0 −2
Original line number Diff line number Diff line
@@ -758,8 +758,6 @@ struct iwl_wipan_noa_data {

struct iwl_priv {

	/*data shared among all the driver's layers */
	struct iwl_shared *shrd;
	struct iwl_trans *trans;
	struct device *dev;		/* for debug prints only */
	const struct iwl_cfg *cfg;
+1 −6
Original line number Diff line number Diff line
@@ -77,7 +77,6 @@
/**
 * struct iwl_drv - drv common data
 * @fw: the iwl_fw structure
 * @shrd: pointer to common shared structure
 * @op_mode: the running op_mode
 * @trans: transport layer
 * @dev: for debug prints only
@@ -89,7 +88,6 @@
struct iwl_drv {
	struct iwl_fw fw;

	struct iwl_shared *shrd;
	struct iwl_op_mode *op_mode;
	struct iwl_trans *trans;
	struct device *dev;
@@ -885,8 +883,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
	device_release_driver(drv->trans->dev);
}

struct iwl_drv *iwl_drv_start(struct iwl_shared *shrd,
			      struct iwl_trans *trans,
struct iwl_drv *iwl_drv_start(struct iwl_trans *trans,
			      const struct iwl_cfg *cfg)
{
	struct iwl_drv *drv;
@@ -897,8 +894,6 @@ struct iwl_drv *iwl_drv_start(struct iwl_shared *shrd,
		dev_printk(KERN_ERR, trans->dev, "Couldn't allocate iwl_drv");
		return NULL;
	}
	/* For printing only - temporary until we change the logger */
	drv->shrd = shrd;
	drv->trans = trans;
	drv->dev = trans->dev;
	drv->cfg = cfg;
+3 −8
Original line number Diff line number Diff line
@@ -91,30 +91,25 @@
 */

struct iwl_drv;
struct iwl_trans;
/**
 * iwl_drv_start - start the drv
 *
 * @shrd: the shrd area
 * @trans_ops: the ops of the transport
 * @cfg: device specific constants / virtual functions
 *
 * TODO: review the parameters given to this function
 *
 * 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.
 */
struct iwl_drv *iwl_drv_start(struct iwl_shared *shrd,
			      struct iwl_trans *trans,
struct iwl_drv *iwl_drv_start(struct iwl_trans *trans,
			      const struct iwl_cfg *cfg);

/**
 * iwl_drv_stop - stop the drv
 *
 * @shrd: the shrd area
 *
 * TODO: review the parameters given to this function
 * @drv:
 *
 * Stop the driver. This should be called by bus specific system flows
 * implementations. For example, the bus specific remove function should first
+7 −25
Original line number Diff line number Diff line
@@ -268,30 +268,17 @@ MODULE_DEVICE_TABLE(pci, iwl_hw_card_ids);
static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
	const struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data);
	struct iwl_shared *shrd;
	struct iwl_trans *iwl_trans;
	struct iwl_trans_pcie *trans_pcie;
	int err;

	shrd = kzalloc(sizeof(*iwl_trans->shrd), GFP_KERNEL);
	if (!shrd) {
		dev_printk(KERN_ERR, &pdev->dev,
			   "Couldn't allocate iwl_shared");
		err = -ENOMEM;
		goto out_free_bus;
	}

	iwl_trans = iwl_trans_pcie_alloc(shrd, pdev, ent, cfg);
	if (iwl_trans == NULL) {
		err = -ENOMEM;
		goto out_free_bus;
	}
	iwl_trans = iwl_trans_pcie_alloc(pdev, ent, cfg);
	if (iwl_trans == NULL)
		return -ENOMEM;

	shrd->trans = iwl_trans;
	pci_set_drvdata(pdev, iwl_trans);

	trans_pcie = IWL_TRANS_GET_PCIE_TRANS(iwl_trans);
	trans_pcie->drv = iwl_drv_start(shrd, iwl_trans, cfg);
	trans_pcie->drv = iwl_drv_start(iwl_trans, cfg);
	if (!trans_pcie->drv)
		goto out_free_trans;

@@ -300,23 +287,18 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
out_free_trans:
	iwl_trans_free(iwl_trans);
	pci_set_drvdata(pdev, NULL);
out_free_bus:
	kfree(shrd);
	return err;
	return -EFAULT;
}

static void __devexit iwl_pci_remove(struct pci_dev *pdev)
{
	struct iwl_trans *trans = pci_get_drvdata(pdev);
	struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
	struct iwl_shared *shrd = trans->shrd;

	iwl_drv_stop(trans_pcie->drv);
	iwl_trans_free(trans);

	pci_set_drvdata(pdev, NULL);

	kfree(shrd);
}

#endif /* CONFIG_IWLWIFI_IDI */
Loading