aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-pci.c
Commit message (Collapse)AuthorAge
* iwlagn: sysfs couldn't find the priv pointerEmmanuel Grumbach2011-08-02
| | | | | | | | | | | | | | | | | This bug has been introduced by: d593411084a56124aa9d80aafa15db8463b2d8f7 Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Date: Mon Jul 11 10:48:51 2011 +0300 iwlagn: simplify the bus architecture Revert part of the buggy patch: dev_get_drvdata will now return iwl_priv as it did before the patch. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Tested-by: Daniel Halperin <dhalperi@cs.washington.edu> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: add comment to warn about WoWLAN in resume / suspend flowsEmmanuel Grumbach2011-07-21
| | | | | | | | | | | WoWLAN may need the NIC even after suspend. One should not do anything to the NIC in the bus level, since one cannot check whether WoWLAN is enabled or not. Same for resume. Add a simple comment to the code to warn about this. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: iwl_bus holds drv_data as void * instead of iwl_privEmmanuel Grumbach2011-07-21
| | | | | | | | | | The price to pay is the access to the log system. Therefore logs from bus layer are sent by dev_printk instead of IWL_XXXX. Rename bus->priv to bus->drv_data to make the separation even clearer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: simplify the bus architectureEmmanuel Grumbach2011-07-21
| | | | | | | | | | | | | | | | | | | Call iwl_probe with a ready iwl_bus struct. This means that the bus layer assigns the irq, dev and iwl_bus_ops pointers to iwl_bus before giving it to iwl_probe. The device specific struct is allocated together with the common iwl_bus struct by the bus specific layer. The pointer to the aggregate struct is passed to the upper layer that holds a pointer to iwl_bus instead of an embedded iw_bus. The private data given to the PCI subsystem is now iwl_bus and not iwl_priv. Provide bus_* inliners on the way in order to simplify the syntax. Rename iwl-pci.h -> iwl-bus.h since it is bus agnostic and represent the external of the bus layer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: remove unnecessary read of PCI_CAP_ID_EXPJon Mason2011-07-06
| | | | | | | | | | The PCIE capability offset is saved during PCI bus walking. It will remove an unnecessary search in the PCI configuration space if this value is referenced instead of reacquiring it. Signed-off-by: Jon Mason <jdmason@kudzu.us> Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: introduce transport layer and implement rx_initEmmanuel Grumbach2011-07-01
| | | | | | | | | The transport layer is responsible for all the queues, DMA rings etc... This is the beginning of the separation of all the code that is tighly related to HW design to the aforementioned transport layer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: use pci_dev->revision, againSergei Shtylyov2011-06-27
| | | | | | | | | | | Commit ff938e43d39e926de74b32a3656c190f979ab642 (net: use pci_dev->revision, again) already converted this driver to using the 'revision' field of 'struct pci_dev' but commit 084dd79172cb3aad11d2b7ee5628d57badca7c6e (iwlagn: move PCI related operations from probe and remove to PCI layer) has again added the code to read the PCI revision ID register... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: fix rmmod crashStanislaw Gruszka2011-06-27
| | | | | | | | | | | | | priv->bus.bus_specific pointer is used after priv structures was freed, in iwl_pci_remove(), what make ugly rmmod crash. This bug was introduced by current pci changes. On the way remove fake check, if prober error code is returned from .probe() function, .remove() will never be called be null drvdata. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: use PM ops macroJohannes Berg2011-06-24
| | | | | | | | | Simplify the code and use SIMPLE_DEV_PM_OPS to define iwl_dev_pm_ops instead of doing the same thing manually. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: add a get_irq method to iwl_bus_ops and use itEmmanuel Grumbach2011-06-18
| | | | | | | | In order to remove a few more dereference to priv->pdev that will be killed [Asoon, there is now a method to get the IRQ number. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: add a method to get the HW ID description as a string to iwl_bus_opsEmmanuel Grumbach2011-06-18
| | | | | Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: move PCI power related functions to the PCI layerWey-Yi Guy2011-06-18
| | | | | | | | Continue to popule the PCI layer and the iwl_bus_ops with the power related stuff. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: move PCI related operations from probe and remove to PCI layerEmmanuel Grumbach2011-06-18
| | | | | | | | | | | Since we have now a PCI layer, all the init and deinit code that is PCI related should move to there. Also move the IO functions: read8/read32/write32. They need hw_base which is killed from priv. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: add get_dev to iwl_bus_opsEmmanuel Grumbach2011-06-18
| | | | | | | | | | | | Bus specific layer must know how to return the struct device* of the device. Implement that as a callback of iwl_bus_ops and use that callback instead of using the priv->pdev pointer which is meant to disappear soon. Since the struct device * is needed in hot path, iwl_bus holds a pointer to it instead of calling get_dev all the time. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: introduce iwl_bus and iwl_bus_opsEmmanuel Grumbach2011-06-18
| | | | | | | | | iwl_bus will represent a bus, and iwl_bus_ops all the operations that can be done on this bus. For the moment only set_prv_data is implemented. More to come... Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: add a iwl_pci.[ch] files that will contain all PCI specific codeEmmanuel Grumbach2011-06-18
Move some PCI functionality to the new iwl_pci.[ch] files: * the PCI_DEVICE_TABLE * the pci_driver struct definition * the PCI probe / remove functions * the PCI suspend / resume functions All these functions are now split: the trigger comes from the PCI layer which calls to the bus generic code located in the other files. This is the beginning only. There are still a lot of PCI related code needs to be gathered. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>