History log of /drivers/net/wireless/ath/ath10k/htc.c
Revision Date Author Comments
8cc7f26c782e4f5c6c844eb32400bd6848b902db 13-Sep-2014 Kalle Valo <kvalo@qca.qualcomm.com> ath10k: miscellaneous checkpatch fixes

Fixes checkpatch warnings:

ath10k/htc.c:49: WARNING: Possible unnecessary 'out of memory' message
ath10k/htc.c:810: WARNING: Possible unnecessary 'out of memory' message
ath10k/htt.h:1034: CHECK: Please use a blank line after function/struct/union/enum declarations
ath10k/htt_rx.c:135: CHECK: Unnecessary parentheses around htt->rx_ring.alloc_idx.vaddr
ath10k/htt_rx.c:173: CHECK: Unnecessary parentheses around htt->rx_ring.alloc_idx.vaddr
ath10k/pci.c:633: WARNING: macros should not use a trailing semicolon
ath10k/wmi.c:3594: WARNING: quoted string split across lines

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
5b07e07fd0a9432b6910badfdb084112be4390af 13-Sep-2014 Kalle Valo <kvalo@qca.qualcomm.com> ath10k: fix checkpatch warnings about parenthesis alignment

CHECK: Alignment should match open parenthesis

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
7aa7a72a23679abf1cea9b3b65a8921244e769a7 25-Aug-2014 Michal Kazior <michal.kazior@tieto.com> ath10k: improve logging to include dev id

This makes it a lot easier to log and debug
messages if there's more than 1 ath10k device on a
system.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
b7967dc79fbd32ef198b429b2597459a4130207f 07-Aug-2014 Michal Kazior <michal.kazior@tieto.com> ath10k: remove htc->stopped

This is not necessary anymore. There are no more
uncontrolled htc tx entry points.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
da34fad65d84c3bb19eb1e6e5d143d4bf1454fba 16-Jul-2014 Michal Kazior <michal.kazior@tieto.com> ath10k: workaround boot issues with KVM/PCI-passthrough

Apparently iomap writes that unmask CE irqs aren't
propagated properly sometimes. Before failing try
to poll for the control response message as it may
have been delivered without an interrupt.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
95bf21f97f09b724ed7d5eb9f0b3c5c664f0329e 16-May-2014 Michal Kazior <michal.kazior@tieto.com> ath10k: fix core start sequence

It was possible to call hif_stop() 2 times through
ath10k_htc_connect_init() timeout failpath which
could lead to double free_irq() kernel splat for
multiple MSI interrupt case.

Re-order init sequence to avoid this problem. The
HTC stop shouldn't stop HIF implicitly since it
doesn't implicitly start it. Since the re-ordering
required some functions to be split/removed/renamed
rename a few functions to make more sense while at
it.

Reported-By: Ben Greear <greearb@candelatech.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
4bfee8e8c13fc9477eb9420efd5a5d12e32ac614 08-Apr-2014 Michal Kazior <michal.kazior@tieto.com> ath10k: improve htc tx credit debugging prints

This way it's easier to track and debug htc tx
credit issues.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
a16942e63008875a6a057ea2973becd261ed0c4e 27-Feb-2014 Michal Kazior <michal.kazior@tieto.com> ath10k: bypass htc for htt tx path

Going through full htc tx path for htt tx is a
waste of resources. By skipping it it's possible
to easily submit scatter-gather to the pci hif for
reduced host cpu load and improved performance.

The new approach uses dma pool to store the
following metadata for each tx request:
* msdu fragment list
* htc header
* htt tx command

The htt tx command contains a msdu prefetch.
Instead of copying it original mapped msdu address
is used to submit a second scatter-gather item to
hif to make a complete htt tx command.

The htt tx command itself hands over dma mapped
pointers to msdus and completion of the command
itself doesn't mean the frame has been sent and
can be unmapped/freed. This is why htc tx
completion is skipped for htt tx as all tx related
resources are freed upon htt tx completion
indication event (which also implicitly means htt
tx command itself was completed).

Since now each htt tx request effectively consists
of 2 copy engine items CE_HTT_H2T_MSG_SRC_NENTRIES
is updated to allow maximum of
TARGET_10X_NUM_MSDU_DESC msdus being queued. This
keeps the tx path resource management simple.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
726346fc713498a84c4d591fce9f1fbe38bf2a44 27-Feb-2014 Michal Kazior <michal.kazior@tieto.com> ath10k: replace send_head() with tx_sg()

PCI is capable of handling scatter-gather lists.
This can be used to avoid copying memory.

Change the name of the callback while at to
reflect its purpose.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
767d34fc67af3939b8ec09804e2b60a1daf94945 27-Feb-2014 Michal Kazior <michal.kazior@tieto.com> ath10k: remove DMA mapping wrappers

There's no real benefit from using them. DMA-API
already provides debugging. Some skbuffs are
already mapped directly with DMA-API since wrapper
arguments were insufficient and extending them
would be pointless.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
16735d022f72b20ddbb2274b8e109f69575e9b2b 14-Nov-2013 Wolfram Sang <wsa@the-dreams.de> tree-wide: use reinit_completion instead of INIT_COMPLETION

Use this new function to make code more comprehensible, since we are
reinitialzing the completion, not initializing.

[akpm@linux-foundation.org: linux-next resyncs]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13)
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
67e3c63fef6041f41e22335852de9d3924cff7a1 08-Nov-2013 Michal Kazior <michal.kazior@tieto.com> ath10k: fix core init failpath

HIF was not stopped properly in
ath10k_core_start() upon failure. This could cause
memory leaks of CE completions entries and
possibly other issues as well.

Move the HIF start/stop out of
ath10k_htc_wait_target(). The ctl_resp completion
is already prepared in ath10k_htc_init.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2415fc16391af204170f5478072fb1a2c66b87f3 08-Nov-2013 Michal Kazior <michal.kazior@tieto.com> ath10k: guard against CE corruption from firmware

In case firmware crashes it may report CE
completions for entries that were never
submitted/filled with meaningful data. This in
turn led to NULL dereferences.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
27bb178dae7b8165ffe7028fbd6f616fb7157c6d 18-Sep-2013 Michal Kazior <michal.kazior@tieto.com> ath10k: avoid needless memset on TX path

This reduces number of memory accesses and
hopefully contributes to better performance in the
future.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12acbc43c1c302022984bf0af89ac5f0a24b133a 13-Sep-2013 Michal Kazior <michal.kazior@tieto.com> ath10k: simplify HTC command submitting

The patch removes HTC endpoint tx workers in
favour of direct command submission. This makes a
lot more sense for data path.

mac80211 queues are effectively stopped/woken up
in a more timely fashion preventing build up of
frames. It's possible to push more traffic than
the device/system is able to handle and have no
hiccups or performance degradation with UDP
traffic.

WMI commands will now report errors properly and
possibly block as they actively can wait for tx
credits to become available.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
88e65fc33752f54dfbabc766de15f3be6989f1d1 13-Sep-2013 Michal Kazior <michal.kazior@tieto.com> ath10k: add HTC TX credits replenishing notification

This will allow higher layers to anticipate and
act upon TX credits renewal. This will be
important for some future rework of WMI command
submission.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
eeed3765f327755b499c81eaf453e9d52a27c01c 13-Sep-2013 Michal Kazior <michal.kazior@tieto.com> ath10k: simplify HTC credits calculation

Credit calculation was overly complex
unnecessarily. Now skb dequeing is more unified.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
42a2efbc578339f2e314703a818efaefb4b4af81 08-Sep-2013 Kalle Valo <kvalo@qca.qualcomm.com> ath10k: add boot debug messages to htc.c

To unify the boot debug level.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
0e1cbf9a6f85eb272bd6bc410db39b4e506d230f 13-Aug-2013 Michal Kazior <michal.kazior@tieto.com> ath10k: fix HTT service setup

The "disable credit flow" flag was set too late
and it never was in the HTC service request
message.

This patch prevents firmware from reporting
(useless) HTC credits for HTT service. HTT service
doesn't use nor need credits.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
21bf9112b596cb91e4f63de859ea514f081031fd 22-Jul-2013 Michal Kazior <michal.kazior@tieto.com> ath10k: don't reset HTC endpoints unnecessarily

Endpoints are re-initialized upon HTC start anyway
so there's no need to do that twice in case of
restarting HTC (i.e. in case of hardware
recovery).

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
08fe9b40d055d4ace995a5e1e93c7c17573f17a5 22-Jul-2013 Michal Kazior <michal.kazior@tieto.com> ath10k: prevent HTC from being used after stopping

It was possible to submit new HTC commands
after/while HTC stopped. This led to memory
corruption in some rare cases.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
affd321733eebc92b12cd329505f63e94ae80c93 16-Jul-2013 Michal Kazior <michal.kazior@tieto.com> ath10k: implement device recovery

Restart the hardware if FW crashes.

If FW crashes during recovery we leave the
hardware in a "wedged" state to avoid recursive
recoveries.

When in "wedged" state userspace may bring
interfaces down (to issue stop()) and then bring
one interface (to issue start()) to reload
hardware manually.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
cd003fad17d9258efdc5dd658666731377cfebd1 05-Jul-2013 Michal Kazior <michal.kazior@tieto.com> ath10k: embed HTC struct inside ath10k

This reduces number of allocations and simplifies
memory managemnt.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
e799bbffdd6e67305b057e3c13c0eed23523bdad 05-Jul-2013 Michal Kazior <michal.kazior@tieto.com> ath10k: rename hif callback

The `set_callbacks` is a more appopriate name for
the function. Let's leave `init` for something
else.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
342004bea753434fb8e0d486afa8fc72b2be4bd7 05-Jul-2013 Michal Kazior <michal.kazior@tieto.com> ath10k: lower print level for a message

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
5e3dd157d7e70f0e3cea3f2573ed69fb156a19d5 12-Jun-2013 Kalle Valo <kvalo@qca.qualcomm.com> ath10k: mac80211 driver for Qualcomm Atheros 802.11ac CQA98xx devices

Here's a new mac80211 driver for Qualcomm Atheros 802.11ac QCA98xx devices.
A major difference from ath9k is that there's now a firmware and
that's why we had to implement a new driver.

The wiki page for the driver is:

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

The driver has had many authors, they are listed here alphabetically:

Bartosz Markowski <bartosz.markowski@tieto.com>
Janusz Dziedzic <janusz.dziedzic@tieto.com>
Kalle Valo <kvalo@qca.qualcomm.com>
Marek Kwaczynski <marek.kwaczynski@tieto.com>
Marek Puzyniak <marek.puzyniak@tieto.com>
Michal Kazior <michal.kazior@tieto.com>
Sujith Manoharan <c_manoha@qca.qualcomm.com>

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>