ath10k: simplify scan debug prints

This also reduces the cruft of printing scan event
names in capitals.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: introduce a stricter scan state machine

This aims at fixing some rare scan bugs related to
firmware reporting unexpected scan event
sequences.

One such bug was if spectral scan phyerr reporting
prevented firmware from properly propagating scan
events to host. This led to scan timeout. After
that next scan would trigger scan completed event
first (before scan started event) leading to
ar->scan.in_progress and timeout timer states to
be overwritten incorrectly and making the very
next scan to hang forever.

Reported-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: fixes 2014-08-07, part 1

Hi,

This is part 1 (of 3) of my patches. Split for
your reviewing pleasure.

This one is mostly non-functional (just cleanups)
except the removal of soc powersave.


Michal Kazior (6):
  ath10k: embed ar_pci inside ar
  ath10k: remove target soc ps code
  ath10k: remove pci features var
  ath10k: group some pci probing helpers
  ath10k: remove htc->stopped
  ath10k: move fw init print

 drivers/net/wireless/ath/ath10k/ce.c   |  68 +------
 drivers/net/wireless/ath/ath10k/core.c |  50 ++---
 drivers/net/wireless/ath/ath10k/core.h |   6 +-
 drivers/net/wireless/ath/ath10k/htc.c  |  16 --
 drivers/net/wireless/ath/ath10k/htc.h  |   5 +-
 drivers/net/wireless/ath/ath10k/mac.c  |   4 +-
 drivers/net/wireless/ath/ath10k/mac.h  |   2 +-
 drivers/net/wireless/ath/ath10k/pci.c  | 358 +++++++++++----------------------
 drivers/net/wireless/ath/ath10k/pci.h  |  78 ++-----
 9 files changed, 163 insertions(+), 424 deletions(-)

--
1.8.5.3


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: embed ar_pci inside ar

Use the common convention of embedding private
structures inside parent structures. This
reduces allocations and simplifies pci probing
code.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: remove target soc ps code

The soc powersave was disabled by default. It
never was fully tested. Some hw apparently had
problems with it and the implementation itself had
a possible race.

Just remove the refcounting and simply wake up the
device when probing and put to sleep when
removing.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: remove pci features var

The ATH10K_PCI_FEATURE_MSI_X was originally
introduced to support both chips QCA988Xv1 and
QCA988Xv2. Since v1 isn't supported anymore it
doesn't make sense to keep the feature flag
around. Since this is the last one remove the
whole thing.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: group some pci probing helpers

Make probe/remove functions shorter and easier to
understand.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.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>
ath10k: move fw init print

Firmware probing is done only once when driver is
registered and firmware version is guaranteed to
remain the same until driver is unregistered.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: fix legacy irq workaround

Wrong register was being set up. This could
prevent firmware from booting in some rare cases
when using legacy interrupts.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: setup irq method in probe

It doesn't make sense to re-init irqs completely
whenever transport is started/stopped. Do it just
once upon probing/removing.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: remove early irq handling

It's not really necessary to have a dedicated irq
handler just for the sake of catching early fw
crashes. It is now safe to use one handler even
during early stages of device boot up.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: split ce irq/handler setup

It doesn't make much sense to overwrite send_cb
and recv_cb callbacks over and over again whenever
transport starts. Just make sure to unmask copy
engine interrupts when starting.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: unmask ce irqs after posting rx buffers

It doesn't make much sense to enable the
interrupts before posting rx buffers.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: rework posting pci rx buffers

It was possible on a host system running low on
memory to end up with no rx buffers on pci pipes.

This also cleans up the code a bit and, as a side
effect, makes it possible to call
ath10k_hif_start() more than once.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: dont reset the chip on hif_stop

The copy engine structures are never changed until
driver unregisters the device so it is not
necessary to reset the device chip anymore when
stopping.

This reduces driver register time approx. by 200ms.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: ignore ar_pci->started in pipe cleanup

Structures used by these functions are now
guaranteed to remain accessible until driver is
unregistered.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: remove ar_pci->started

There are basically no more uses for
ar_pci->started. It is also perfectly safe to call
hif_stop without hif_start.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: flush hif buffers before recovery

Transport buffers weren't flushed and processed
before queueing hw recovery request to mac80211.

This could in theory result in an unwanted htt/wmi
rx events being processed while mac80211 recovers
the device and possibly interfere or even crash
the system.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>