History log of /drivers/net/wireless/ath/wil6210/pcie_bus.c
Revision Date Author Comments
73d839ae503d591bc0dc802490c00935b19250d1 10-Sep-2014 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> wil6210: fix for oops while stopping interface

When interface stopped while running intensive Rx traffic, the following oops
observed:

[89846.734683] Call trace:
[89846.737117] [<ffffffc00083aa64>] dev_gro_receive+0xac/0x358
[89846.742674] [<ffffffc00083ae94>] napi_gro_receive+0x24/0xa4
[89846.748251] [<ffffffbffc1c2f88>] $x+0xec/0x1f8 [wil6210] wil_netif_rx_any
[89846.753547] [<ffffffbffc1c4830>] $x+0x34/0x54 [wil6210] wil_release_reorder_frame
[89846.758755] [<ffffffbffc1c48ac>] wil_release_reorder_frames+0x5c/0x78 [wil6210]
[89846.766044] [<ffffffbffc1c4bf8>] wil_tid_ampdu_rx_free+0x20/0x48 [wil6210]
[89846.772901] [<ffffffbffc1bedc8>] $x+0x190/0x1e8 [wil6210]
[89846.778285] [<ffffffbffc1c0ed4>] wmi_event_worker+0x230/0x2f8 [wil6210]
[89846.784865] [<ffffffc0000b0bc8>] process_one_work+0x278/0x3fc
[89846.790591] [<ffffffc0000b1218>] worker_thread+0x200/0x330
[89846.796060] [<ffffffc0000b6664>] kthread+0xac/0xb8
[89846.800836] Code: b940c661 f9406a62 8b010041 f9400026 (f8636882)
[89846.807008] ---[ end trace d6fdc17cd27d18f6 ]---

Reason is the following: when removing Rx vring
(wil_netdev_ops.ndo_stop -> wil_stop -> wil_down -> __wil_down -> wil_rx_fini),
Rx interrupt occurs. It trigger Rx NAPI, calling wil_rx_handle() that reaps
(already cleaned) buffer, causing skb referring to garbage memory being set into reorder buffer.
Then, network stack trying to access this buffer and fails.

Prevent Rx NAPI from being scheduled if device going to stop. Bit wil_status_napi_en reflects
NAPI enablement state, check it when triggering Rx NAPI.

Testing shows that check for wil_status_napi_en sometimes gets negative, and new error message
get printed - in this case kernel oops would be observed. Original oops is no more reproducible.

This change requires also changes in the AP flows.
Properly enable/disable NAPI for the AP. Make sure Rx VRING is disabled
when resetting target.

For this, promote __wil_up() and __wil_down() to the module scope, and use it
in the relevant flows.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
f172b56309fbc4835b3f258df6865309dc02e80c 10-Sep-2014 Dedy Lansky <qca_dlansky@qca.qualcomm.com> wil6210: fix for memory corruption upon rmmod

Driver disabled PCI master before making sure HW is idle.
This caused memory corruption in case HW access system memory after
PCI master got disabled.
The fix is to change uninit sequence. Make sure FW/HW is idle before
disabling PCI

Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9cf10d623e4fc7d3d8bb6d6ce835e10933b3b114 10-Sep-2014 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> wil6210: add more debug printouts

added misc printouts in some init/uninit functions for better traceability

Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
f772ebfb941a58af9e7adf9117bc0bb4c7d22f28 10-Sep-2014 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> wil6210: platform specific module

New module (wil_platform) for handling platform specific tasks

Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
560ce3087292603dafb2603ee12cab0ff6c20aee 06-Aug-2014 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> wil6210: fix access after free in wil_pcie_remove()

'wil' released in wil_if_free(); save iomapped address aside to
properly unmap it.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6afd60055d8dd1f28bf6e9556ebc9996cceebaa8 06-Aug-2014 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> wil6210: Workaround for Sparrow with bad device id

If firmware broken on the boot time, Sparrow card enumerates as
device 0x302 instead of 0x310. Allow using this ID

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
02525a7925c9a3c55ceef7e9a30218dc47ced1ad 06-Aug-2014 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> wil6210: update copyright year 2014

Fix Copyright headers in all files changed in 2014, to mention 2014

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6508281b0b15c469a940ffa46bb9215c9e18eaf3 14-Jul-2014 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> wil6210: support for "sparrow" hardware

New hardware release appears; it require some changes to properly support it.
Introduce struct wil_board and "board" attribute in wil6210_priv;
keep hardware variant information in this structure.
fill it on probe(). Used in the reset flow.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2bdc0700263ff2c557fa566881721394abfc2ea4 16-Jun-2014 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> wil6210: work around for platforms with broken INTx

There are platforms where INTx can't be routed by ACPI,
this leads to pci_enable_device failure. Re-try pretending we have
MSI already configured; in this case pci_enable_device do not try
to configure INTx. However, MSI could still work.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
84d94d520495d443a6e8202d7f1e190106edbef6 16-Jun-2014 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> wil6210: remove unused #include

In the pcie_bus.c, knowledge about debugfs is not necessary

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
94b7b64c73515bc7689bd9d80e6d2fea536a3cef 16-Jun-2014 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> wil6210: Allow driver load if FW not ready

Usable for debugging, to be able to obtain FW traces

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
39c52ee8cb6d473dda6c33431339ca2bc984d66d 27-May-2014 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> wil6210: improve pointers printing

use proper format %pad for the dma_addr_t arguments;
prefix %p with 0x, as %p don't print is by itself

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15e23124cea7315a5bef1c60f8368af035cd06c5 08-Apr-2014 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> wil6210: fix printouts for better readability

Reshuffle prints to consolidate firmware/hardware information
report upon card init

Convert print for unhandled MISC ISR bits to "debug" - it is
normal situation and not an "error"

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
097638a08acde0320c44969a5dff3af105c341a0 17-Mar-2014 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> wil6210: fix race between disconnect and Tx NAPI

When disconnecting some CID, corresponded Tx vring get released. During vring
release, all descriptors get freed. It is possible that Tx NAPI working on the same
vring simultaneously. If it happens, descriptor may be double freed.

To protect from the race above, make sure NAPI won't process the same vring.
Introduce 'enabled' flag in the struct vring_tx_data. Proceed with Tx NAPI only if
'enabled' flag set. Prior to Tx vring release, clear this flag and make sure NAPI
get synchronized.

NAPI enablement status protected by wil->mutex, add protection where it was
missing and check for it.

During reset, disconnect all peers first, then proceed with the Rx vring. It allows for
the disconnect flow to observe proper 'wil->status' and correctly notify cfg80211 about
connection status change

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
f4b5a8032d513a11ef919305048f00e812605318 17-Mar-2014 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> wil6210: fix for HW bug in interrupt setup logic

Hardware bug triggered by the MSI init while INTx asserted for some reason.
De-assert INTx prior to MSI set-up

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
36b10a7239ce0d384a54ab1053d83b3bbb26501b 17-Mar-2014 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> wil6210: update target reset to support new HW

Support for new chip revision. Revision read from the
internal register, PCIE config's "revision id" register
do not indicate HW version properly

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b4b39061da4d28c15341378e615948936e6d148f 18-Feb-2014 Alexander Gordeev <agordeev@redhat.com> wil6210: Use pci_enable_msi_range() instead of pci_enable_msi_block()

As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: wil6210@qca.qualcomm.com
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Acked-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3f06534183a0dd68a40fb286da0025d95a586eb0 10-Sep-2013 Jingoo Han <jg1.han@samsung.com> wireless: wil6210: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c7996ef852d2c8382b381268b53657175cc2dbc0 13-Mar-2013 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> wil6210: headers clean-up

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7743882d6f59b675809b59b5ac570677c94c426f 28-Jan-2013 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> wil6210: fix checkpatch CamelCase warnings

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2057ebb2bd5da3aab1603d546f7a019b9a971ee8 28-Jan-2013 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> wil6210: remove raw wil_dbg() calls

Introduce debug category "MISC", convert all raw wil_dbg() to this category.
This improves dynamic debug manageability

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2be7d22f062535de59babdb4b5e9de9ff31e817e 20-Dec-2012 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> wireless: add new wil6210 802.11ad 60GHz driver

This adds support for the 60 GHz 802.11ad Wilocity card
through a new driver, wil6210. Wilocity implemented the
firmware, QCA maintains the device driver.

Currently supported:

- STA: with security
- AP: limited to 1 connected STA, security disabled
- Monitor: due to a hardware/firmware limitation
either control or non-control frames are monitored

Using a STA and AP with this drive, one can assemble
a fully functional BSS. Throughput of 1.2Gbps is achieved
with iperf.

The wil6210 cards have on-board flash memory for the
firmware, the cards comes pre-flashed and no firmware
download is required.

For more details see:

http://wireless.kernel.org/en/users/Drivers/wil6210

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>