History log of /drivers/net/wireless/iwlwifi/iwl-io.h
Revision Date Author Comments
bfe4b80e9f7385f34986736cdc094be56782109a 07-Mar-2012 Stanislaw Gruszka <sgruszka@redhat.com> iwlwifi: always check if got h/w access before write

Before we write to the device registers always check if
iwl_grap_nic_access() was successful.

On the way change return type of grab_nic_access() to bool, and add
likely()/unlikely() statement.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6c1011e1918be17f7f8ccca5442cd517f9c29d17 06-Mar-2012 Johannes Berg <johannes.berg@intel.com> iwlwifi: make tracing use device as identifier

Tracing used the priv pointer as an identifier,
which has the problem that we don't have it in
all code, and also some people say no pointers
should be "leaked" to userspace.

Use the device name instead, it is more useful
anyway.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
1042db2af183b96cdce5972014d85e8bca0634ad 03-Jan-2012 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: give trans to all the read / write functions

From now on, the transport layer in charge of providing access to the
device. So change all the driver to give a pointer to the transport
to all the low level functions that actually access the device.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
0390549571cb614ac5cd3327b63f95155a75c673 03-Jan-2012 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: the read / write register ops move to transport

Most of the accesses to the registers are done from the transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
fb4961dbc27d40cdbed297aa9bd74fa4a0e2ba6c 06-Jan-2012 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: update Copyright

Update Copyright to 2012

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4e3182626a914443a5e0fbe014813f03e51a75df 27-Dec-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: update Copyright

Update Copyright to 2012

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
ee8ba8800b4f20845aa542ce53f3bc29064674b5 09-Dec-2011 Hsu, Kenny <kenny.hsu@intel.com> iwlwifi: add IO function for continuous write of target memory

Add new IO function _iwl_write_targ_mem_words() to support
target memory write for a continuous area. It will return
error code -EBUSY if iwl_grab_nic_access() fails to indicate
the memory write does not be performed. Meanwhile the existing
function iwl_write_targ_mem() also been updated by using
_iwl_write_targ_mem_words() in a single word case.

Signed-off-by: Kenny Hsu <kenny.hsu@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
83ed90155f98bd949735c2cc22d832b557a6d7d1 26-Aug-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: all function iwl-io.c receive iwl_bus

Which means that iwl-io.c doesn't need to include iwl-dev.h any more.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d593411084a56124aa9d80aafa15db8463b2d8f7 11-Jul-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: simplify the bus architecture

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>
084dd79172cb3aad11d2b7ee5628d57badca7c6e 31-May-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: move PCI related operations from probe and remove to PCI layer

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>
4119904f3ebf30c25afb42195740f9ee5dc7749c 19-Apr-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: introduce silent grabbing of NIC access

There are a few cases like the WoWLAN support
I'm writing that require attempting to access
the NIC when it is known that it might not be
accessible, e.g. after the system woke up and
the platform might have reset the device.

To avoid messages in this case, introduce the
new function iwl_grab_nic_access_silent(), it
will only return an error status.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
e46f6538c24f01bb68dc374358ce85a0af666682 13-Apr-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: simplify error table reading

The current code to read the error table header
just hardcodes all the offsets, which is a bit
hard to understand. We can read in the entire
header (as much as we need) into a structure,
and then take the data from there, which makes
it easier to understand. To read a bigger blob
we also don't need to grab NIC access for each
word read, making the code more efficient.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
02a7fa00a6d145037d549c779ad7692deb504acc 05-Apr-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: move IO functions out of line

This generates a massive reduction in module size:
with debug:
text data bss dec hex filename
670300 13136 420 683856 a6f50 iwlagn.ko (before)
388347 13136 408 401891 621e3 iwlagn.ko (after)

without debug:
text data bss dec hex filename
528575 13072 420 542067 84573 iwlagn.ko (before)
294192 13072 408 307672 4b1d8 iwlagn.ko (after)

This also removes all the IO debug functionality since
it can easily be replaced by tracing, and makes the
code unnecessarily complex.

I haven't done any CPU utilisation measurements, but
given that the hotpaths don't use much IO it is not
likely to have a negative impact; in fact, the size
reduction will reduce cache pressure which possibly
improves performance.

Finally, an unused function or two were removed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
901069c71415a76d731857ccda814e18ded062f7 05-Apr-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlagn: change Copyright to 2011

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
91dd6c27a29f97d81d2f71651d3b6bb55a4c1788 24-Mar-2010 Frans Pop <elendil@planet.nl> iwlwifi: remove trailing space in messages

Includes minor improvements in debugging messages in iwl-4965.c,
function iwl4965_is_temp_calib_needed().

Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: Zhu Yi <yi.zhu@intel.com>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Cc: Intel Linux Wireless <ilw@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
ed391f4ebf8f701d3566423ce8f17e614cde9806 23-Mar-2010 Tejun Heo <tj@kernel.org> iwlwifi: don't include iwl-dev.h from iwl-devtrace.h

iwl-devtrace.h is used to declare and define trace points and
including iwl-dev.h from the file, which in turn includes other
generic headers, can lead to problems like generating duplicate copies
of generic trace points depending on the order of includes. Don't
include iwl-dev.h from iwl-devtrace.h but include it from its users -
iwl-io.h and iwl-devtrace.c.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Cc: Zhu Yi <yi.zhu@intel.com>
Cc: Intel Linux Wireless <ilw@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
1f44780827c6bbbcd1f12d5c6b6ce84f49a96bc0 15-Jan-2010 Reinette Chatre <reinette.chatre@intel.com> iwlwifi: update copyright year to 2010

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4e03185fb8e85d5624d3a68feced70cc9c9e2136 20-Nov-2009 Ben Cahill <ben.m.cahill@intel.com> iwlwifi: Add iwl_write8()

To support byte writes to CSR_INT_COALESCING and CSR_INT_PERIODIC registers,
add iwl_write8(), including debug/trace support.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a7e6611034530fce62f5499f77dd4fb6cde4d130 06-Nov-2009 Ben Cahill <ben.m.cahill@intel.com> iwlwifi: Add comments about MAC_ACCESS_REQ

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
be1a71a128ed91372d4ad8d54d8fd972a1a356eb 02-Oct-2009 Johannes Berg <johannes@sipsolutions.net> iwlwifi: device tracing

In order to have an easier way to debug issues, create
trace events (using the ftrace framework) that will
allow us to follow exactly what the driver is doing
with the device.

The text format isn't all that useful, but the binary
format can also be obtained easily via debugfs and
then analysed on the fly or offline with debugging
tools.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a8b50a0a966d7ac313f624c6ab4996231a5fe25a 22-May-2009 Mohamed Abbas <mohamed.abbas@intel.com> iwlcore: register locks

Add new lock to be used when accessing some registers. Also move
the register lock and iwl_grab_nic_access inside the function for register access. This
will prevent from forgetting to hold locks and nic access in the right way and make code
easier to maintain.

We over use the priv->lock spin lock and I guess we need to add new
one for Tx queue after that we might need to change most of these lock to
BH and just keep priv->lock as irq type.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
18d426c4a8991d1d6c0dc33a62b610b8a6ffc1d2 11-Mar-2009 Reinette Chatre <reinette.chatre@intel.com> iwlwifi: print contents of control register when error occurs

hopefully the register contents will guide us to why this failure occured

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e1623446bb1de1834ff1c57b3e8ed341d5d4a927 27-Jan-2009 Tomas Winkler <tomas.winkler@intel.com> iwlwifi: don't use implicit priv in IWL_DEBUG

Call IWL_DEBUG macro with explicit priv argument.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e9414b6b3f34dcc3683e66dffa4f5f167d49df51 21-Jan-2009 Abbas, Mohamed <mohamed.abbas@intel.com> iwl3945: fix deep sleep when removing the driver.

A warning message "MAC is in deep sleep" sometimes happen when user removes
the driver. This warning is related to card not being ready. In __iwl3945_down
function some of the going down steps are in wrong order, to fix this this patch
do the following:
1- make sure we are calling iwl3945_apm_reset and iwl3945_apm_stop
in the right order.

2- make sure we set CSR_GP_CNTRL_REG_FLAG_INIT_DONE in apm_reset before
poll on CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY.

3- set correct polling counter.

This fixes bug
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1834

Signed-off-by: mohamed abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
01f8162a854df7f9c259c839ad3c1168ac13b7b8 08-Jan-2009 Reinette Chatre <reinette.chatre@intel.com> iwlwifi: update copyright year to 2009

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15b1687cb4f45b87ddbe4dfc7759ff5bb69497d2 19-Dec-2008 Winkler, Tomas <tomas.winkler@intel.com> iwlwifi: replace IWL_ERROR with IWL_ERR

IWL_ERR doesn't use hidden priv pointer.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4087f6f68cdbd2845c7e54236bae1b058a7b827b 17-Dec-2008 Wu, Fengguang <fengguang.wu@intel.com> iwlwifi: use meaningful vars in _iwl_poll_bit()

Rename vars in _iwl_poll_bit() to better reflect the truth.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
759ef89fb096c4a6ef078d3cfd5682ac037bd789 09-Dec-2008 Winkler, Tomas <tomas.winkler@intel.com> iwlwifi: change email contact information

This patch replaces personal emails with hopefully
always valid Intel Linux Wireless, which will be routed
to a current maintainer

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a8ec42c1431e8a43f910fb27af4882416cf5d6b1 05-Dec-2008 Zhu, Yi <yi.zhu@intel.com> iwlwifi: use rmb/wmb to protect indirect mmio operation

This patch protects iwlwifi indirect mmio operations with rmb() and
wmb(). It makes sure CPU reordering won't affect our indirect mmio
access.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
73d7b5acc461bdc99e0135779d15e1874c6e00a6 05-Dec-2008 Zhu, Yi <yi.zhu@intel.com> iwlwifi: iwl_poll_{direct_}bit cleanup

The patch merges implementation of iwl_poll_bit() and
iwl_poll_direct_bit() by letting the latter be a special case of
the former.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
f056658bb9c3085d5ec52fbdd45b38d55b899cc9 05-Dec-2008 Zhu, Yi <yi.zhu@intel.com> iwlwifi: fix time interval misuse in iwl_poll_{direct_}bit

The patch fixes the misuse of microsecond with millisecond in the
polling mechanism of the iwlwifi driver. The impact of this problem
is the unacceptable latency for the whole system (especially during
bringing down the wlan interface).

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c3056065400aeb437390e1a86b85f9c32fb1c1df 12-Nov-2008 Abhijeet Kolekar <abhijeet.kolekar@intel.com> iwlwifi : fix checkpatch.pl errors

Patch fixes checkpatch.pl errors for iwlwifi.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a96a27f97f2bbfc1fca54bc3c0b0d41484152740 24-Oct-2008 Tomas Winkler <tomas.winkler@intel.com> iwlwifi: run through spell checker

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7c95168aba66bd11bf9efaf45e16e83ae869401d 03-Sep-2008 Tomas Winkler <tomas.winkler@intel.com> iwlwifi: remove rfkill warning from iwl-io

The patch removes the warning since registers might be accessed also
during rfkill.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
f5efde3b1deb301ff31d61bbe5a33f3115c39284 03-Sep-2008 Tomas Winkler <tomas.winkler@intel.com> iwlwifi: replace readl and writel with io/read/write/32

This patch replaces readl and writel with more cross platform ioread32
and iowrite32.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
775ea378fa04f39164f170f308ec467ee4ab6d34 26-Mar-2008 Tomas Winkler <tomas.winkler@intel.com> iwlwifi: improve NIC i/o debug prints information

This patch gives the function's caller name in case NIC
access reference count was not used by it.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
3395f6e9cf48469d7ee05703cad1502002741c16 26-Mar-2008 Tomas Winkler <tomas.winkler@intel.com> iwlwifi: rename iwl-4965-io.h to iwl-io.h

This patch renames iwl-4965-io.h back to iw-io.h
it also remove 4965 from all functions it supplies

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5d08cd1dfdc57dc834c47eb9f023fcf861f3d6bf 25-Oct-2007 Christoph Hellwig <hch@lst.de> iwlwifi: keep 3945 and 4965 headers separate

The iwl3945 and iwl4965 devices share some common structure, but with a
lot of difference split all over. Currently the two drivers share a lot
of headers and use ugly preprocessor magic to manage the difference.

This patch keeps two entirely separate copies of the headers to get rid
of these hacks an ease future development.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ac17a947a4f47b642097d6814d6dcc60c297eb17 25-Oct-2007 Tomas Winkler <tomas.winkler@intel.com> iwlwifi: replacing wording restricted to nic access in iwl-io

This patch replaces wording 'restricted' with more appropriate 'nic access'
NIC access is grabbed to prevent NIC entering power save mode
General cleanup of iwl-io.h

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
af7cca2a441f6e2ebeb2a920ef5af1bec8df96e8 25-Oct-2007 Tomas Winkler <tomas.winkler@intel.com> iwlwifi: rename restricted_mem to targ_mem

This patch renames restricted_mem suffix with more proper
name targ_mem for function accessing memory on the nic in target mode

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d860965200c867e7e3e81ede8572cffff8c7eb24 25-Oct-2007 Tomas Winkler <tomas.winkler@intel.com> iwlwifi: replace restricted_reg with prph

This patch renames restricted_reg suffix with more proper
name prhp for function accessing registers on the periphery bus.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b481de9ca074528fe8c429604e2777db8b89806a 26-Sep-2007 Zhu Yi <yi.zhu@intel.com> [IWLWIFI]: add iwlwifi wireless drivers

This patch adds the mac80211 based wireless drivers for the Intel
PRO/Wireless 3945ABG/BG Network Connection and Intel Wireless WiFi
Link AGN (4965) adapters.

[ Move driver into it's own directory -DaveM ]

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>