History log of /drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
Revision Date Author Comments
ed90542b0ce5415050c6fbfca324bccaafa69f2f 24-Mar-2012 Eric Dumazet <eric.dumazet@gmail.com> iwlwifi: fix skb truesize underestimation

By default, iwlwifi uses order-1 pages (8 KB) to store incoming frames,
but doesnt say so in skb->truesize.

This makes very possible to exhaust kernel memory since these skb evade
normal socket memory accounting.

As struct ieee80211_hdr is going to be pulled before calling IP stack,
there is no need to use dev_alloc_skb() to reserve NET_SKB_PAD bytes.
alloc_skb() is ok in this driver, allowing more tailroom.

Pull beginning of frame in skb header, in the hope we can reuse order-1
pages in the driver immediately for small frames and reduce their
truesize to the minimum (linear skbs)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Neal Cardwell <ncardwell@google.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
69a10b29eb87cf186cac20921b4884e349b59c97 10-Mar-2012 Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> iwlwifi: move wait_command_queue from shared to trans

This wait queue really belongs to the transport
layer, as it is used for sending synchronous
commands to the HW.

However, only op_mode knows about errors and
exceptional conditions, so make this queue
accessible by the op_mode.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d663ee73f62903aed334eca25832a76c4a7e4c1c 10-Mar-2012 Johannes Berg <johannes.berg@intel.com> iwlwifi: abstract out missing SEQ_RX_FRAME workaround

Mohammed Shafi ran into [1] the SEQ_RX_FRAME workaround
warning with a statistics notification, this means we
can't just remove it as we'd hoped.

Abstract it out so that the higher layer can configure
this as a kind of "filter" in the transport.

[1] http://mid.gmane.org/CAD2nsn1_DzbRHuSbS_1rFNzuux_9pW1-pABEasQ01_y7-ndO5w@mail.gmail.com

Reported-by: Mohammed Shafi <shafi.wireless@gmail.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>
1745e4405b2c0da6db2ec4b6bc0ad930612d8295 09-Mar-2012 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: fix the delta for remove max_txq_num patch

BIg portion of "iwlwifi: remove max_txq_num from hw_params" was
missing during merge, here is the fix for it.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c6f600fcfe8a7e4f594fc4c80b2c7b66f248958b 08-Mar-2012 Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> iwlwifi: move command queue number out of the iwl_shared struct

The command queue number is required by the transport
layer, but it can be determined only by the op mode.
Move this parameter to the dvm op mode, and configure
the transport layer using an API.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
83626404a70da74c67f32f119e53c0ba032ba2d8 07-Mar-2012 Don Fry <donald.h.fry@intel.com> iwlwifi: more status bit factoring

Continue splitting the status bits between transport and op_mode.
All but a few are separated.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
8722c899a07f45457464803142bd1c2d2a2c3bd8 07-Mar-2012 Stanislaw Gruszka <sgruszka@redhat.com> iwlwifi: reintroduce iwl_enable_rfkill_int

If device is disabled by rfkill switch, do not enable all interrupts,
but only CSR_INT_BIT_RF_KILL to receive rfkill state change. Unblocking
other interrupts might cause problems, since driver can not be prepared
for receive them.

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>
3a73a30049f20a0ff3ef1c5c10170a9c5539e042 07-Mar-2012 Stanislaw Gruszka <sgruszka@redhat.com> iwlwifi: cleanup/fix memory barriers

wmb(), rmb() are not needed when writel(), readl() are used as
accessors for MMIO. We use them indirectly via iowrite32(),
ioread32().

What is needed mmiowb(), for synchronizing writes coming from
different CPUs on PCIe bridge (see in patch comments). This
fortunately is not needed on x86, where mmiowb() is just
defined as compiler barrier. As iwlwifi devices are most likely
not used on anything other than x86, this is not so important
fix.

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>
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>
13df1aab4aa3cd99693c0cdeb7177e5359218431 06-Mar-2012 Johannes Berg <johannes.berg@intel.com> iwlwifi: move all uCode load variables

All variables related to uCode loading (the
waitqueue and done indication) should be in
the PCI-E transport's private data as this
is transport specific. Move them there.

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>
1b29dc94ac2e96c9a31b566dc609bf1d4eb87cc2 06-Mar-2012 Johannes Berg <johannes.berg@intel.com> iwlwifi: clean up iwl-core.h inclusions

The transport doesn't need to include iwl-core.h any more.

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>
0dde86b2f2999a25dcc62a27cb768c35a418890a 06-Mar-2012 Johannes Berg <johannes.berg@intel.com> iwlwifi: remove shadow_reg_enable from hw_params

There's no need to copy shadow_reg_enable into
hw_params since it is a pure hardware parameter
that will never change, we can access it from
the config directly.

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>
c9eec95cb429359efd39a3c87fb1544fe2b77bc5 06-Mar-2012 Johannes Berg <johannes.berg@intel.com> iwlwifi: move rfkill status handling out of transport

The transport layer should only check the
hardware RF kill status, not impose any
policy or reaction based on it, so move
that out of it into the op_mode.

For now keep the restriction on loading
firmware, that will have to be removed
later.

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>
965974a631756ab2729469b9ecadfe61ee44dfc5 06-Mar-2012 Johannes Berg <johannes.berg@intel.com> iwlwifi: remove iwl-wifi.h

This file was recently introduced, but then
directly abused -- it contained private data
that shouldn't have been used by anything
but the implementation of firmware requests
and some very core code. Now that it is no
longer accessed by any code but the code in
iwl-drv.c, we can dissolve it.

Also rename the iwl_nic struct to iwl_drv to
better reflect where and how it is used.

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>
0692fe41b36159be5d8c7d4eef0699e79c383c85 06-Mar-2012 Johannes Berg <johannes.berg@intel.com> iwlwifi: split out firmware store

Through the driver, struct iwl_fw will
store the firmware. Split this out into
a separate file, iwl-fw.h, and make all
other code use it. To do this, also move
the log pointers into it, and remove the
knowledge of "nic" from everything.

Now the op_mode has a fw pointer, and
(unfortunately) for now the shared data
also needs to keep one for the transport
to access dump the error log -- I think
that will move later.

Since I wanted to constify the firmware
pointers, some more changes were needed.

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>
df2f3216ccde52bb43df78e0b869a0dd1637cf15 05-Mar-2012 Johannes Berg <johannes.berg@intel.com> iwlwifi: refactor PCI-E RX path

Just make the code easier to read with less indentation.

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>
48a2d66f58d2bf1818acf5ff7ed9897a9977a96e 05-Mar-2012 Johannes Berg <johannes.berg@intel.com> iwlwifi: don't pass iwl_rx_mem_buffer to upper layers

struct iwl_rx_mem_buffer implementation details
(DMA address, list pointers) that the upper
layers don't need. Introduce iwl_rx_cmd_buffer
that is passed upstream and only contains the
needed data (the page). Additionally, access
this data only via accessor functions, allowing
us to change the implementation in the future.
These accessors are rxb_addr() (as before) and
rxb_steal_page() to take ownership of the data.

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>
a8bceb392a739321ec20d03a91a86ebdde9c07bb 05-Mar-2012 Johannes Berg <johannes.berg@intel.com> iwlwifi: remove per-device debug level

There's no need for the per-device debug
level that we expose in debugfs since the
module parameter is writable in sysfs.

At the same time, simplify code by changing
iwl_get_debug_level(shrd) & IWL_DL_ISR)
to
iwl_have_debug_level(IWL_DL_ISR)

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>
3e6895c50af9a9574a8bb97268d99be049fe46f0 14-Feb-2012 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: remove iwl_print_rx_config_cmd from shared

It is op_mode related

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
ff6e75cb20b6423c8947077a377ba318dd1a7554 12-Feb-2012 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: remove a few dereferences to iwl_priv from the tansport

The transport should not dereference the iwl_priv pointer. Remove a
few of those.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
bcb9321c8db86150004d615e03551911be84685e 09-Feb-2012 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: virtualize op_mode's fw_error

Export it as "nic_error" notification, the error handling will be in
the op_mode.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
7120d9894c363ee31fd529e5dd962452b639ab8e 09-Feb-2012 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: virtualize op_mode's set_hw_rf_kill

Export it as "hw_rf_kill" notification.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
db70f290e1a88f11815e50acd8ac1c36f89b0da2 09-Feb-2012 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: virtualize op_mode's rx

This is the op_mode's Rx handler.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
8655112d91f247f6b96c9b1285658c141238ce90 07-Feb-2012 Don Fry <donald.h.fry@intel.com> iwlwifi: move event and err pointers to iwl_nic

Move the ucode offset pointers to the iwl_nic as they are nic related.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
7b11488fbbbe06ada39a396dec16532db8c933e6 05-Feb-2012 Johannes Berg <johannes.berg@intel.com> iwlwifi: give PCIe its own lock

Instead of using a global lock, the PCIe transport
can use an own lock for its IRQ. This will make it
possible to not disable IRQs for the shared lock.
The lock is currently used throughout the code but
this can be improved even further by splitting up
the locking for the queues.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com>
1ee158d83853a9f5c1465be56d56ff56e6698e92 17-Feb-2012 Johannes Berg <johannes.berg@intel.com> iwlwifi: move workqueue to priv

In order to separate the different parts of the
driver better, we are reducing the shared data.
This moves the workqueue to "priv", and removes
it from the transport. To do this, simply use
schedule_work() in the transport.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
1df06bdc6fb26d13af18c5dbb3144f13cf55de3c 09-Jan-2012 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: stop_hw replace enable_rfkill_int

This trans_ops->stop_hw leaves the RFKILL interrupt enabled,
we can call that one instead of enable_rfkill_int. By that,
we reduce the numbers of acceesses to the NIC from the upper
layers.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
cf6142975bcbb731bc131ee9d2a68b7561076545 08-Jan-2012 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: consolidate the start_device flow

Now there is only one transport function that launch a specific fw:
trans_ops->start_fw. This one replaces trans_ops->start_device and
trans_ops->kick_nic. The code that actually loads the fw to the
device has been moved to the transport specific code.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.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>
a591697730a3c416cd384bc199eb5dde622c4c78 10-Jan-2012 Gregory Greenman <gregory.greenman@intel.com> iwlwifi: Connect IDI transport to driver.

This patch connects IDI transport to driver. It does so
by using a number of ifdefs at this stage.
IDI is a new transport that is under development.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
ed6a3803408f18da387463d569b4edc5078fd9aa 02-Jan-2012 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: add fw_alive to transport layer API, kill tx_start

Define a new handler in the transport layer API: fw_alive.
Move iwl_reset_ict to this new handler, and move the content
of tx_start to this handler.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
b49ba04a3a0382e7314d990707c21094c410425a 19-Jan-2012 Johannes Berg <johannes.berg@intel.com> iwlwifi: fix PCI-E transport "inta" race

When an interrupt comes in, we read the reason
bits and collect them into "trans_pcie->inta".
This happens with the spinlock held. However,
there's a bug resetting this variable -- that
happens after the spinlock has been released.
This means that it is possible for interrupts
to be missed if the reset happens after some
other interrupt reasons were already added to
the variable.

I found this by code inspection, looking for a
reason that we sometimes see random commands
time out. It seems possible that this causes
such behaviour, but I can't say for sure right
now since it happens extremely infrequently on
my test systems.

Cc: stable@vger.kernel.org [3.2]
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>
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>
106671369e6d046c0b3e1e72b18ad6dd9cb298b0 19-Dec-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: fix (remove) use of PAGE_SIZE

The ICT code erroneously uses PAGE_SIZE. The bug
is that PAGE_SIZE isn't necessarily 4096, so on
such platforms this code will not work correctly
as we'll try to attempt to read an index in the
table that the device never wrote, it always has
4096-byte pages.

Additionally, the manual alignment code here is
unnecessary -- Documentation/DMA-API-HOWTO.txt
states:
The cpu return address and the DMA bus master address are both
guaranteed to be aligned to the smallest PAGE_SIZE order which
is greater than or equal to the requested size. This invariant
exists (for example) to guarantee that if you allocate a chunk
which is smaller than or equal to 64 kilobytes, the extent of the
buffer you receive will not cross a 64K boundary.

Just use appropriate new constants and get rid of
the alignment code.

Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Cc: stable@vger.kernel.org
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>
b80667eee2af9c1a36ec45a06f9ff85dd8768412 09-Dec-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: add IRQ tracing

The legacy IRQs could be read from a trace by their
IO accesses, but reading the ICT doesn't leave any
trace (pun intended ;-) ) so in order to see what
input they get we need to add specific tracepoints.

While at it, fix whitespace in two related places.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
3862241945026a8fa165ab73c57739df77b8e1fb 16-Dec-2011 Don Fry <donald.h.fry@intel.com> iwlwifi: move iwl_cfg from iwl_priv to iwl_shared

Move the configuration pointer from the upper level iwl_priv to the
lower level iwl_shared structure, with associated code fixes.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
ae6130fc9b5e9957aaf26355b80e0a5ef7f8f537 01-Dec-2011 Don Fry <donald.h.fry@intel.com> iwlwifi: move device_pointers from iwl_priv to iwl_shared

Move the low level ucode device_pointers structure to iwl_shared.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
d332f591daca5f5301782bad69f94e160b5fa665 30-Nov-2011 Wey-Yi Guy <wey-yi.w.guy@intel.com> iwlwifi: Display more uCode debug info

When uCode encounter problem, it pass a lot of debug data to help debugging
the issue. We only show partial data before, why not display all of those.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
a96b724d5ad7d44184d6a871bc1d35b005f2d53e 02-Dec-2011 Don Fry <donald.h.fry@intel.com> iwlwifi: move ucode_type from iwl_priv to iwl_shared

Move the ucode_type variable from the iwl_priv to the iwl_shared
structure with associated code changes.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
3d6acefc0a24bf90746c1f259e9d65d1ed7ea5e2 29-Nov-2011 Don Fry <donald.h.fry@intel.com> iwlwifi: move ucode_type from iwl_priv to iwl_shared

Move the ucode_type variable from the iwl_priv to the iwl_shared
structure with associated code changes.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
5703ddb01328c8ee3fa315273ea3b29f6524fb38 10-Nov-2011 Don Fry <donald.h.fry@intel.com> iwlagn: move ucode_write_complete from priv to trans structure

ucode_write_complete is used for ucode loading. Move it as part of
restructuring work out of the priv structure.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6a686c600268b71619f93d35f9373e2b6ab5947b 10-Oct-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: move iwl_enable_rfkill_int and kill iwl-helpers.h

Move iwl_enable_rfkill_int to iwl-core.h, and remove the empty
iwl-helpers.h

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>
d56da92092c7808fea0b6ad85fd97095067a2616 22-Sep-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: remove warning in iwl_rx_handle

Txid was used without being initialized.

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>
247c61d625154e18a105d663281c52376a882762 21-Sep-2011 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlagn: remove the callback in host commands

Before this patch, the upper layer could register a callback for each
host command. This mechanism allowed the upper layer to have
different callbacks for the same command ID. In fact, it wasn't used
and the rx_handlers is enough: same callback for all the command with
a specific command ID.

The iwl_send_add_station needs the access the command that was sent
while handling the response (regardless if the command was sent in
SYNC or ASYNC mode). So now, all the handlers receive the host
command that was sent. This implies a change in the handler signature.

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>
effd4d9aece9184f526e6556786a94d335e38b71 15-Sep-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: do not use interruptible waits

Since the dawn of its time, iwlwifi has used
interruptible waits to wait for synchronous
commands and firmware loading.

This leads to "interesting" bugs, because it
can't actually handle the interruptions; for
example when a command sending is interrupted
it will assume the command completed fully,
and then leave it pending, which leads to all
kinds of trouble when the command finishes
later.

Since there's no easy way to gracefully deal
with interruptions, fix the driver to not use
interruptible waits.

This at least fixes the error
iwlagn 0000:02:00.0: Error: Response NULL in 'REPLY_SCAN_ABORT_CMD'

I have seen in P2P testing, but it is likely
that there are other errors caused by this.

Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: stable@kernel.org [2.6.24+]
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>
c17d0681b8a4d93217464d8026361c7b44b3ca99 15-Sep-2011 Johannes Berg <johannes.berg@intel.com> iwlagn: move PCI-E transport files

Move all the PCI-E specific transport files to
be iwl-trans-pcie*; specifically iwl-trans.c
which is really iwl-trans-pcie.c.

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>