GitHub/LineageOS/G12/android_kernel_amlogic_linux-4.9.git
11 years agoath10k: fix RX performance when using AP 10.X FW
Michal Kazior [Tue, 8 Oct 2013 03:00:36 +0000 (20:00 -0700)]
ath10k: fix RX performance when using AP 10.X FW

Due to oversight AP 10.X support was merged with
Ethernet RX decap mode.

Only Native Wifi RX decap mode guarantees IP
header is properly aligned and avoids sk_buff data
realignment (which is very expensive
performance-wise) in mac80211.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: fix possible memory leak in new FW loading
Michal Kazior [Fri, 4 Oct 2013 06:13:20 +0000 (08:13 +0200)]
ath10k: fix possible memory leak in new FW loading

Some failpaths did `return` instead of a `goto`
leaking requested firmware.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: fix printf format string
Michal Kazior [Fri, 4 Oct 2013 06:13:19 +0000 (08:13 +0200)]
ath10k: fix printf format string

size_t corresponds to %zu not %d. Compiler was
complaining about it.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: remove num_sends_allowed
Michal Kazior [Wed, 2 Oct 2013 09:03:41 +0000 (11:03 +0200)]
ath10k: remove num_sends_allowed

The value provided by num_sends_allowed is now
derived from CE source ringbuffer state.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: remove ce_sendlist_send
Michal Kazior [Wed, 2 Oct 2013 09:03:40 +0000 (11:03 +0200)]
ath10k: remove ce_sendlist_send

It is completely pointless to keep this function
around. It doesn't do anything different than
ce_send except it introduces more overhead.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: split vdev_id calculation from tx function
Michal Kazior [Wed, 2 Oct 2013 09:03:39 +0000 (11:03 +0200)]
ath10k: split vdev_id calculation from tx function

Tidy up ath10k_tx().

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: split tid calculation from tx function
Michal Kazior [Wed, 2 Oct 2013 09:03:38 +0000 (11:03 +0200)]
ath10k: split tid calculation from tx function

Tidy up ath10k_tx().

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: extend the max_scan time
Bartosz Markowski [Wed, 2 Oct 2013 06:48:52 +0000 (08:48 +0200)]
ath10k: extend the max_scan time

It was observed few times, the artificial max_scan limit we
are using mainly to detect FW hangs, can be not enough for
instance while being associated and during heavy traffic.

What we do if the FW won't return with scan results within
the max_time time is a scan abort.

This is especially visible with 10.X fw which in combination
with dual band HW (scanning 32 channels) can end up with
hw_scan close to 10 seconds.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: enable 10.x firmware branch support
Bartosz Markowski [Wed, 2 Oct 2013 06:48:51 +0000 (08:48 +0200)]
ath10k: enable 10.x firmware branch support

Since the WMI API has been added and we can detect from the
FW IEs what firmware variant we deal with, turn on support
for 10.x firmware branch in ath10k_wmi_attach().

kvalo: improve the commit log

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath6kl: fix compilation warning in ath6kl_htc_pipe_conn_service
Vladimir Murzin [Sun, 29 Sep 2013 13:54:31 +0000 (15:54 +0200)]
ath6kl: fix compilation warning in ath6kl_htc_pipe_conn_service

Fix the warning

drivers/net/wireless/ath/ath6kl/htc_pipe.c: In function
'ath6kl_htc_pipe_conn_service':
drivers/net/wireless/ath/ath6kl/htc_pipe.c:1293:26: warning: integer overflow
in expression [-Woverflow]

by giving a hint to compiler about unsigned nature of
HTC_CONN_FLGS_SET_RECV_ALLOC_MASK

Signed-off-by: Vladimir Murzin <murzin.v@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: implement firmware IE container support
Kalle Valo [Fri, 27 Sep 2013 16:55:07 +0000 (19:55 +0300)]
ath10k: implement firmware IE container support

Firmware IE containers can dynamically provide various information what
firmware supports. Also it can embed more than one image so updating firmware
is easy, user just needs to update one file in /lib/firmware/.

The firmware API 2 or higher will use the IE container format, the current API
1 will not use the new format but it still is supported for some time. FW API 2
files are named as firmware-2.bin (which contains both firmware and otp images)
and API 1 files are firmware.bin and otp.bin.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: store separate pointers for firmware data
Kalle Valo [Fri, 27 Sep 2013 16:55:01 +0000 (19:55 +0300)]
ath10k: store separate pointers for firmware data

Needed for firmware IE formatted images.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: rename board_data in struct ath10k
Kalle Valo [Fri, 27 Sep 2013 16:54:55 +0000 (19:54 +0300)]
ath10k: rename board_data in struct ath10k

I will use board_data for something else in the following patch
so I need to rename it.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: handle FW API differences for scan structures
Bartosz Markowski [Thu, 26 Sep 2013 15:47:17 +0000 (17:47 +0200)]
ath10k: handle FW API differences for scan structures

The wmi_start_scan_cmd has an extra filed in our main
firmware track, reflact that to not have a mismatch in
case of 10.x track.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: introduce dynamic pdev parameters
Bartosz Markowski [Thu, 26 Sep 2013 15:47:16 +0000 (17:47 +0200)]
ath10k: introduce dynamic pdev parameters

This is done exactly the same way as for vdev.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: introduce dynamic vdev parameters
Bartosz Markowski [Thu, 26 Sep 2013 15:47:15 +0000 (17:47 +0200)]
ath10k: introduce dynamic vdev parameters

Both firmwares (main and 10.x) have different set of vdev
parameters. To stay in sync with FW API, this patch introduces
a dynamic registering method.

ath10k_wmi_vdev_set_param() takes now indirect u32 value
to identify the Vdev parameter it want's to set.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: add TARGET values for 10.x firmware
Bartosz Markowski [Thu, 26 Sep 2013 15:47:14 +0000 (17:47 +0200)]
ath10k: add TARGET values for 10.x firmware

Introduce all TARGET specific values for 10.x firmware.
Some of them are common for both firmwares we will support,
but to avoid confusion, define everything with prefix 10X_.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: split wmi_cmd_init path
Bartosz Markowski [Thu, 26 Sep 2013 15:47:13 +0000 (17:47 +0200)]
ath10k: split wmi_cmd_init path

Due to API differences in initialization structures for
main and 10.x firmwares we need to split the wmi_init_cmd
and wmi_resource_config  structures.

This will be usefull also when setting the correct TARGET values,
like: number of peers, vdevs, pdevs etc.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: bring back the WMI path for mgmt frames
Bartosz Markowski [Thu, 26 Sep 2013 15:47:12 +0000 (17:47 +0200)]
ath10k: bring back the WMI path for mgmt frames

This is still the only way to submit mgmt frames in case
of 10.X firmware.

This patch introduces wmi_mgmt_tx queue, because of the
fact WMI command can block. This is a problem for
ath10k_tx_htt(), since it's called from atomic context.
The skb queue and worker are introduced to move the mgmt
frame handling out of .tx callback context and not block.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: implement host memory chunks
Bartosz Markowski [Thu, 26 Sep 2013 15:47:11 +0000 (17:47 +0200)]
ath10k: implement host memory chunks

10.X firmware can request a memory pool from host to offload
it's own resources. This is a feature designed especially
for AP mode where the target has to deal with large number
of peers.

So we allocate and map a consistent DMA memory which FW can
use to store e.g. peer rate contol maps.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: drop the fw versioning sanity check
Bartosz Markowski [Thu, 26 Sep 2013 15:47:10 +0000 (17:47 +0200)]
ath10k: drop the fw versioning sanity check

It was corrupted and leading to compilation warning
core.c: In function 'ath10k_check_fw_version':
core.c:79: warning: comparison is always true due to limited range of data type

Since we are going to support new FW track in the driver,
the sanity check for fw version number would be an overkill
then. This is just for information purposes anyway.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: split ath10k_wmi_service_ready_event_rx
Bartosz Markowski [Thu, 26 Sep 2013 15:47:09 +0000 (17:47 +0200)]
ath10k: split ath10k_wmi_service_ready_event_rx

Since the both firmwares we are going to support,
have significantly different APIs (WMI and shared
structures), it's easier to actually split the whole
event handling functions, instead cutting them inside.

The fork starts now on ath10k_wmi_process_rx().

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: implement WMI events handling frame for both firmwares
Bartosz Markowski [Thu, 26 Sep 2013 15:47:08 +0000 (17:47 +0200)]
ath10k: implement WMI events handling frame for both firmwares

We still use the same function handlers for both main and 10.X
paths. Next step is to track down and make the split needed.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: warn if give WMI command is not supported
Bartosz Markowski [Thu, 26 Sep 2013 15:47:07 +0000 (17:47 +0200)]
ath10k: warn if give WMI command is not supported

This will show and make it easier to track the API
differences in the new AP firmware.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: add wmi_10x_<cmd/event> definitions
Bartosz Markowski [Thu, 26 Sep 2013 15:47:06 +0000 (17:47 +0200)]
ath10k: add wmi_10x_<cmd/event> definitions

Introduce the cmd and events definitions for 10.X FW API
and make up the wmi_10x_cmd_map. This is the core of
host-firmware WMI interface for 10.X FW branch.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: introduce dynamic WMI structures
Bartosz Markowski [Thu, 26 Sep 2013 15:47:05 +0000 (17:47 +0200)]
ath10k: introduce dynamic WMI structures

This is the initial framework to implement dynamic
WMI API in order to support new firmware (from so
called 10.X branch)

The realization is to have a static WMI cmd map for
each of the firmwares, registered upom wmi init.

This patch creates such map for MAIN FW, updates
wmi_cmd_send() calls to take as a parameter
the map value instead of direct WMI enum.

As soon as complete 10.X API will be on place,
we will introduce the FW IE mechanics to dynamicaly
identify which FW is being used and based on that
we will use correct map, API, structures, etc.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: make monitor vdev down before stoping it
Marek Puzyniak [Tue, 24 Sep 2013 12:06:24 +0000 (14:06 +0200)]
ath10k: make monitor vdev down before stoping it

Following sequence causes FW crash:
-monitor vdev up,
-monitor vdev stop,
-monitor vdev delete.
Making monitor vdev down before stoping it works ok:
-monitor vdev up,
-monitor vdev down,
-monitor vdev stop,
-monitor vdev delete.

Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: replenish HTT RX buffers in a tasklet
Michal Kazior [Tue, 24 Sep 2013 08:18:36 +0000 (10:18 +0200)]
ath10k: replenish HTT RX buffers in a tasklet

This starves FW RX ring buffer in case of
excessive RX. This prevents from CPU being
overwhelmed by RX indications/completions by
naturally forbiddin FW to submit more RX.

This fixes RX starvation on slow machines when
under heavy RX traffic.

kvalo: remove extra newline

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: align RX frames properly
Michal Kazior [Thu, 26 Sep 2013 07:12:24 +0000 (10:12 +0300)]
ath10k: align RX frames properly

Ethernet-like decapping mode leaves IP protocol
frame not aligned to 4-byte boundaries. This leads
to re-aligning in mac80211 which in turn leads to
poor CPU cache behaviour on some machines.

Since HW doesn't allow to change payload offset
properly the solution is to force HW to decap in
Native Wifi mode which always has 24-bytes long
802.11 header (even for QoS frames). This means IP
frame is properly aligned in this decap mode.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: fix Native Wifi decap mode RX
Michal Kazior [Thu, 26 Sep 2013 07:12:23 +0000 (10:12 +0300)]
ath10k: fix Native Wifi decap mode RX

NWifi decap mode always reports 802.11 Data
Frames, even when QoS Data Frames are actually
received.

This made mac80211 not report frame priority
properly (since there was no QoS Control field).

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: cleanup RX decap handling
Michal Kazior [Thu, 26 Sep 2013 07:12:23 +0000 (10:12 +0300)]
ath10k: cleanup RX decap handling

Simplify decapping code and make it easier to
understand.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: document decap modes
Michal Kazior [Thu, 26 Sep 2013 07:12:23 +0000 (10:12 +0300)]
ath10k: document decap modes

Clarify how each decap mode works in one place.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: report A-MSDU subframes individually
Michal Kazior [Thu, 26 Sep 2013 07:12:22 +0000 (10:12 +0300)]
ath10k: report A-MSDU subframes individually

HW reports each A-MSDU subframe as a separate
sk_buff. It is impossible to configure it to
behave differently.

Until now ath10k was reconstructing A-MSDUs from
subframes which involved a lot of memory
operations. This proved to be a significant
contributor to degraded RX performance.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: use msdu headroom to store txfrag
Michal Kazior [Wed, 18 Sep 2013 12:43:22 +0000 (14:43 +0200)]
ath10k: use msdu headroom to store txfrag

Instead of allocating sk_buff for a mere 16-byte
tx fragment list buffer use headroom of the
original msdu sk_buff.

This decreases CPU cache pressure and improves
performance.

Measured improvement on AP135 is 560mbps ->
590mbps of UDP TX briding traffic.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: cleanup HTT TX functions
Michal Kazior [Wed, 18 Sep 2013 12:43:21 +0000 (14:43 +0200)]
ath10k: cleanup HTT TX functions

Use a saner goto scheme for failure handling. Also
group operations more sensibly.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: decouple HTT TX completions
Michal Kazior [Wed, 18 Sep 2013 12:43:20 +0000 (14:43 +0200)]
ath10k: decouple HTT TX completions

Until now the all MSDU transfer related structures
were freed when all resources were unreferenced.

Now HTC transfer is freed independently and HTT
transfer is so too.

This yields a way more simpler ath10k_skb_cb and
should possibly enable parallel pipe processing
(which is now serialized in
ath10k_pci_process_ce routine).

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: avoid needless memset on TX path
Michal Kazior [Wed, 18 Sep 2013 12:43:19 +0000 (14:43 +0200)]
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>
11 years agoath10k: use num_pending_tx instead of msdu id bitmap
Michal Kazior [Wed, 18 Sep 2013 12:43:18 +0000 (14:43 +0200)]
ath10k: use num_pending_tx instead of msdu id bitmap

It's more efficient to simply check num_pending_tx
value instead of traversing whole bitmap of
msdu ids.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: fix num_sends_allowed replenishing
Michal Kazior [Wed, 18 Sep 2013 13:22:17 +0000 (15:22 +0200)]
ath10k: fix num_sends_allowed replenishing

Commit e9bb0aa39 ("ath10k: delete struct ce_sendlist") broke
num_sends_allowed incrementing. num_sends_allowed
exceeded initial values and could overflow.

This code was supposed to replenish
num_sends_allowed for partial sendlist items (i.e.
before final sendlist item from a sendlist was
completed and could be processed by completion
handlers).

Fortunately it seems it did not cause any major breakage,
yet.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: fix tracing build for ath10k_wmi_cmd
Michal Kazior [Thu, 19 Sep 2013 07:44:09 +0000 (09:44 +0200)]
ath10k: fix tracing build for ath10k_wmi_cmd

Commit be8b394390 ("ath10k: make WMI commands block by design") broke
the build if CONFIG_ATH10K_TRACING was enabled.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: remove wmi event worker thread
Michal Kazior [Fri, 13 Sep 2013 12:16:58 +0000 (14:16 +0200)]
ath10k: remove wmi event worker thread

It's not really necessary to have this processed
in a worker. There are no sleepable calls (and
actually shouldn't be).

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: remove wmi pending count limit
Michal Kazior [Fri, 13 Sep 2013 12:16:57 +0000 (14:16 +0200)]
ath10k: remove wmi pending count limit

It is no longer used nor necessary since WMI
commands can block.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: improve beacon submission latency
Michal Kazior [Fri, 13 Sep 2013 12:16:56 +0000 (14:16 +0200)]
ath10k: improve beacon submission latency

The patch prevents beacon misses in some case of
heavy load on a system.

If a beacon can't be transmitted directly from an
SWBA event it will be left in arvif->beacon and
transmission will be retried once TX credits
become available.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: simplify HTC command submitting
Michal Kazior [Fri, 13 Sep 2013 12:16:55 +0000 (14:16 +0200)]
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>
11 years agoath10k: make WMI commands block by design
Michal Kazior [Fri, 13 Sep 2013 12:16:54 +0000 (14:16 +0200)]
ath10k: make WMI commands block by design

This will be necessary for further changes in
command submission scheme.

Once HTC is cleaned up WMI commands will finally
block.

This requires for SWBA to be processed in a
non-atomic context for now. Once other necessary
changes are in this will be reverted.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: add HTC TX credits replenishing notification
Michal Kazior [Fri, 13 Sep 2013 12:16:53 +0000 (14:16 +0200)]
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>
11 years agoath10k: simplify HTC credits calculation
Michal Kazior [Fri, 13 Sep 2013 12:16:52 +0000 (14:16 +0200)]
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>
11 years agowireless: ath10k: remove unnecessary pci_set_drvdata()
Jingoo Han [Tue, 10 Sep 2013 11:25:11 +0000 (20:25 +0900)]
wireless: ath10k: 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>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: delete struct ce_sendlist
Kalle Valo [Sun, 8 Sep 2013 15:36:11 +0000 (18:36 +0300)]
ath10k: delete struct ce_sendlist

struct ce_sendlist is useless as we always add just one buffer onto it.
And most importantly, it's ugly as it doesn't use skb properly.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: Calculate correct peer PHY mode for VHT
Sujith Manoharan [Sun, 8 Sep 2013 15:19:55 +0000 (18:19 +0300)]
ath10k: Calculate correct peer PHY mode for VHT

The peer PHY mode for 11ac operation needs to be determined
properly based on the channel bandwidth being used. Fix
this so that the proper mode is given to the firmware.

kvalo: earlier we used 11na-ht20 in STA mode for 11ac AP peer, this
patch changes that to 11ac-vht80. I didn't notice any change in
throughput in my tests, but nevertheless it's the right thing
to do.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: print phymode as a string
Kalle Valo [Sun, 8 Sep 2013 14:56:14 +0000 (17:56 +0300)]
ath10k: print phymode as a string

Makes it easier to read debug logs.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: clean mac.c debug messages
Kalle Valo [Sun, 8 Sep 2013 14:56:07 +0000 (17:56 +0300)]
ath10k: clean mac.c debug messages

Just to unify with the rest of debug messages. Minimal functional changes,
only major ones are removal of the awkward "else" style in debug
messages.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: add boot messages to htt.c
Kalle Valo [Sun, 8 Sep 2013 14:56:02 +0000 (17:56 +0300)]
ath10k: add boot messages to htt.c

To unify the boot debug level.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: add boot debug messages to htc.c
Kalle Valo [Sun, 8 Sep 2013 14:55:56 +0000 (17:55 +0300)]
ath10k: add boot debug messages to htc.c

To unify the boot debug level.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: add boot debug messages to pci.c and ce.c
Kalle Valo [Sun, 8 Sep 2013 14:55:50 +0000 (17:55 +0300)]
ath10k: add boot debug messages to pci.c and ce.c

To unify all boot related debug messages into one debug
level.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: cleanup debug messages in core.c
Kalle Valo [Sun, 8 Sep 2013 14:55:44 +0000 (17:55 +0300)]
ath10k: cleanup debug messages in core.c

Fix them to follow the general logging style in ath10k.

While at it, add print id chip_id to the debug log.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: rename ATH10K_DBG_CORE to BOOT
Kalle Valo [Sun, 8 Sep 2013 14:55:38 +0000 (17:55 +0300)]
ath10k: rename ATH10K_DBG_CORE to BOOT

core.c mostly deals with driver and firmware starting related
actions. And we can use the boot level also in other components,
like PCI and HTT.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: add BMI log level
Kalle Valo [Sun, 8 Sep 2013 14:55:32 +0000 (17:55 +0300)]
ath10k: add BMI log level

Also clean BMI log messages and add few more.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: define ath10k_debug_start/_stop as static inline
Bartosz Markowski [Mon, 9 Sep 2013 15:50:45 +0000 (17:50 +0200)]
ath10k: define ath10k_debug_start/_stop as static inline

Otherwise if CONFIG_ATH10K_DEBUGFS won't be set we will
end up with multiple definitions and compilation failure
in each place the header is included.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: prevent CE from looping indefinitely
Michal Kazior [Tue, 3 Sep 2013 13:09:58 +0000 (15:09 +0200)]
ath10k: prevent CE from looping indefinitely

The double while() could end up running forever.
Inner while() would complete very fast. However
the completion processing could take enough time
for more completions to flow in. In that case the
outer while() would not terminate and run again,
and again. This could happen especially on a slow
host system.

This could lead to a system freeze during heavy
traffic. Note: this doesn't solve all known
starvation issues yet.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: remove obsolete INIT STATUS definitions
Bartosz Markowski [Tue, 3 Sep 2013 12:24:03 +0000 (14:24 +0200)]
ath10k: remove obsolete INIT STATUS definitions

There's no functional changes. Just a small cleanup.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: set the UART baud rate to 19200
Bartosz Markowski [Tue, 3 Sep 2013 12:24:02 +0000 (14:24 +0200)]
ath10k: set the UART baud rate to 19200

When configuring the host_interests over BMI, set the UART
baud rate to 19200. This is valid for QCA988X_2.0 devices.

kvalo: found during code review, there should not be any functionality
changes

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: add htt_stats_enable debugfs file
Kalle Valo [Tue, 3 Sep 2013 08:44:10 +0000 (11:44 +0300)]
ath10k: add htt_stats_enable debugfs file

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: implement ath10k_debug_start/stop()
Kalle Valo [Tue, 3 Sep 2013 08:44:03 +0000 (11:44 +0300)]
ath10k: implement ath10k_debug_start/stop()

Needed for the HTT stats implementation.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: add trace event ath10k_htt_stats
Kalle Valo [Tue, 3 Sep 2013 08:43:55 +0000 (11:43 +0300)]
ath10k: add trace event ath10k_htt_stats

For analysing various data path statistics in user space.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: add missing braces to ath10k_pci_tx_pipe_cleanup
Dave Jones [Thu, 5 Sep 2013 03:51:28 +0000 (23:51 -0400)]
ath10k: add missing braces to ath10k_pci_tx_pipe_cleanup

The indentation here implies this was meant to be
a multi-statement if, but it lacks the braces.

kvalo: add "ath10k: " prefix

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: add chip_id file to debugfs
Kalle Valo [Sun, 1 Sep 2013 08:22:21 +0000 (11:22 +0300)]
ath10k: add chip_id file to debugfs

So that's it's possible to query chip id from ath10k anytime.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: check chip id from the soc register during probe
Kalle Valo [Sun, 1 Sep 2013 08:22:14 +0000 (11:22 +0300)]
ath10k: check chip id from the soc register during probe

ath10k doesn't support qca988x hw1.0 boards anymore. Unfortunately
the PCI id is the same in hw1.0 and hw2.0 so ath10k tries to use
hw1.0 boards anyway. But without hw1.0 workarounds in place
ath10k just crashes horribly.

To avoid using hw1.0 boards at all add a chip id detection
and fail the probe if hw1.0 is detected:

[ 5265.786408] ath10k: ERROR: qca988x hw1.0 is not supported
[ 5265.786497] ath10k: Unsupported chip id 0x043200ff
[ 5265.786574] ath10k: could not register driver core (-95)
[ 5265.793191] ath10k_pci: probe of 0000:02:00.0 failed with error -95

Also add a warning if there's an unknown chip id but continue
the boot process normally anyway.

Reported-by: Zaki Bakar <zaki.bm@gmail.com>
Tested-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: simplify ath10k_ce_init() wake up handling
Kalle Valo [Sun, 1 Sep 2013 07:02:15 +0000 (10:02 +0300)]
ath10k: simplify ath10k_ce_init() wake up handling

ath10k_ce_init() and the functions it calls wakeup
the chip multiple times. Simplify that to call
ath10k_pci_wake() only once. This also makes it
easier to add error handling when wakeup fails.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: convert ath10k_pci_wake() to return
Kalle Valo [Sun, 1 Sep 2013 07:02:07 +0000 (10:02 +0300)]
ath10k: convert ath10k_pci_wake() to return

We should not try to access hw if wakeup fails so add
proper error checking for that. Also add the timeout lenght
to the warning message.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: clean up ath10k_ce_completed_send_next_nolock()
Kalle Valo [Sun, 1 Sep 2013 07:02:00 +0000 (10:02 +0300)]
ath10k: clean up ath10k_ce_completed_send_next_nolock()

The error handling was just weird, simplify it.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: convert ath10k_pci_reg_read/write32() to take struct ath10k
Kalle Valo [Sun, 1 Sep 2013 07:01:53 +0000 (10:01 +0300)]
ath10k: convert ath10k_pci_reg_read/write32() to take struct ath10k

This is consistent with all other functions.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: remove void pointer from struct ath10k_pci_compl
Kalle Valo [Sun, 1 Sep 2013 07:01:46 +0000 (10:01 +0300)]
ath10k: remove void pointer from struct ath10k_pci_compl

Void pointers are bad, mmkay.

No functional changes.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: make target_ce_config_wlan more readable
Kalle Valo [Sun, 1 Sep 2013 07:01:39 +0000 (10:01 +0300)]
ath10k: make target_ce_config_wlan more readable

It's easier to read t if the field names are visible.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: pci: make host_ce_config_wlan[] more readable
Kalle Valo [Sun, 1 Sep 2013 07:01:32 +0000 (10:01 +0300)]
ath10k: pci: make host_ce_config_wlan[] more readable

It's much more readable if struct entries in host_ce_config_wlan
are explicitly set.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: remove un ar_pci->cacheline_sz field
Kalle Valo [Fri, 2 Aug 2013 07:56:01 +0000 (10:56 +0300)]
ath10k: remove un ar_pci->cacheline_sz field

cacheline_sz is not used anywhere and can be removed.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: rename ce_ring_state to ath10k_ce_ring
Michal Kazior [Tue, 27 Aug 2013 11:08:03 +0000 (13:08 +0200)]
ath10k: rename ce_ring_state to ath10k_ce_ring

The new naming makes more sense.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: rename ce_state to ath10k_ce_pipe
Michal Kazior [Tue, 27 Aug 2013 11:08:02 +0000 (13:08 +0200)]
ath10k: rename ce_state to ath10k_ce_pipe

The new naming makes more sense.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: rename hif_ce_pipe_info to ath10k_pci_pipe
Michal Kazior [Tue, 27 Aug 2013 11:08:01 +0000 (13:08 +0200)]
ath10k: rename hif_ce_pipe_info to ath10k_pci_pipe

The new naming makes more sense.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: remove unused ce_attr parameters
Michal Kazior [Tue, 27 Aug 2013 11:08:00 +0000 (13:08 +0200)]
ath10k: remove unused ce_attr parameters

Some parameters were unused and are not required.
They have no representation in firmware. Clean
them up.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: remove ce_op_state
Michal Kazior [Tue, 27 Aug 2013 11:07:59 +0000 (13:07 +0200)]
ath10k: remove ce_op_state

It was only written to and never read back. No use
to keep it around.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: use inline ce_state structure
Michal Kazior [Tue, 27 Aug 2013 11:07:58 +0000 (13:07 +0200)]
ath10k: use inline ce_state structure

Simplifies memory managament of ce_state.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: Fix mutex unlock balance
Mohammed Shafi Shajakhan [Wed, 21 Aug 2013 16:26:44 +0000 (21:56 +0530)]
ath10k: Fix mutex unlock balance

ath10k_debug_read_target_stats is properly
protected by data_lock (spinlock). Remove
the unwanted mutex_unlock(&ar->conf_mutex)

[ BUG: bad unlock balance detected! ]
-------------------------------------
kworker/u4:0/12459 is trying to release lock
(&ar->conf_mutex) at:
[<c16a170d>] mutex_unlock+0xd/0x10
but there are no more locks to release!

 Call Trace:
  [<c16a170d>] ? mutex_unlock+0xd/0x10
  [<c10b697d>] __lock_release+0x4d/0xe0
  [<f88ca0fc>] ? ath10k_debug_read_target_stats+0xac/0x290

  [<c16a170d>] ? mutex_unlock+0xd/0x10
  [<c10b6a5b>] lock_release+0x4b/0x150
  [<c16a1580>] __mutex_unlock_slowpath+0x70/0x150
  [<f88ca0fc>] ? ath10k_debug_read_target_stats+0xac/0x290

  [<c10b456b>] ? trace_hardirqs_on+0xb/0x10
  [<c16a170d>] mutex_unlock+0xd/0x10
  [<f88ca107>] ath10k_debug_read_target_stats+0xb7/0x290

  [<f88d337a>] ath10k_wmi_event_process+0x3fa/0x6e0

  [<c10b456b>] ? trace_hardirqs_on+0xb/0x10
  [<f88d36e1>] ath10k_wmi_event_work+0x21/0x40
               [ath10k_core]

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: add support for HTT 3.0
Michal Kazior [Fri, 9 Aug 2013 08:13:34 +0000 (10:13 +0200)]
ath10k: add support for HTT 3.0

New firmware comes with new HTT protocol version.
In 3.0 the separate mgmt tx command has been
removed. All traffic is to be pushed through data
tx (tx_frm) command with a twist - FW seems to not
be able (yet?) to access tx fragment table so for
manamgement frames frame pointer is passed
directly.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: add support for firmware newer than 636
Michal Kazior [Fri, 9 Aug 2013 08:13:33 +0000 (10:13 +0200)]
ath10k: add support for firmware newer than 636

The mgmt_rx event structure has been expanded.
Since the structure header is expanded the payload
(i.e. mgmt frame) is shifted by a few bytes. This
needs to be taken into account in order to support
both old and new firmware.

This introduces a fw_features to keep track of any
FW-related ABI/behaviour changes.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: fix WEP in AP and IBSS mode
Marek Puzyniak [Tue, 13 Aug 2013 09:45:22 +0000 (11:45 +0200)]
ath10k: fix WEP in AP and IBSS mode

WEP encoding was not working properly for AP and IBSS mode.
TX frames were encrypted with default WEP tx key index set
always to zero, what sometimes was wrong when different
key index should be used. This patch allows to update
WEP key index also for AP and IBSS mode.
Problem detected during automated WEP tests.

Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: plug possible memory leak in WMI
Michal Kazior [Tue, 13 Aug 2013 05:59:38 +0000 (07:59 +0200)]
ath10k: plug possible memory leak in WMI

There was a possible memory leak when WMI command
queue reached it's limit. Command buffers were not
freed.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: implement 802.3 SNAP rx decap type A-MSDU handling
Michal Kazior [Tue, 13 Aug 2013 05:59:37 +0000 (07:59 +0200)]
ath10k: implement 802.3 SNAP rx decap type A-MSDU handling

This enables driver to rx another decapped a-msdu
frames. It should possibly help with throughputs
in some cases and reduce (or eliminate) number of
messages like this:

  ath10k: error processing msdus -524

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: fix HTT service setup
Michal Kazior [Tue, 13 Aug 2013 05:59:35 +0000 (07:59 +0200)]
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>
11 years agoath10k: print errcode when CE ring setup fails
Michal Kazior [Tue, 13 Aug 2013 05:54:57 +0000 (07:54 +0200)]
ath10k: print errcode when CE ring setup fails

This makes it possible to see the reason why the
setup fails. It also adheres to code style of
error checking in ath drivers.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: clean up PCI completion states
Michal Kazior [Tue, 13 Aug 2013 05:54:56 +0000 (07:54 +0200)]
ath10k: clean up PCI completion states

Improve code readability by using enum and a
switch-case.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: use sizeof(*var) in kmalloc
Michal Kazior [Tue, 13 Aug 2013 05:54:55 +0000 (07:54 +0200)]
ath10k: use sizeof(*var) in kmalloc

This fixes checkpatch warning from the latest
3.11-rc kernel tree.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: clean up monitor start code
Michal Kazior [Tue, 13 Aug 2013 05:54:54 +0000 (07:54 +0200)]
ath10k: clean up monitor start code

Remove useless code that was causing WARN_ON when
a 80MHz+ vif entered promiscuous mode or monitor
interface was started.

The channel mode is already computed by
chan_to_phymode().

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: check allocation errors in CE
Janusz Dziedzic [Fri, 9 Aug 2013 06:39:13 +0000 (08:39 +0200)]
ath10k: check allocation errors in CE

Handle pci_alloc_consistent(), kmalloc()
errors in copy engine module.
Found during code review.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: update supported FW build version
Bartosz Markowski [Wed, 7 Aug 2013 13:17:46 +0000 (15:17 +0200)]
ath10k: update supported FW build version

The latest supported and available FW build is 1.0.0.636.
Reflect this in ath10k code.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: Remove qca98xx hw1.0 support
Bartosz Markowski [Wed, 7 Aug 2013 13:17:45 +0000 (15:17 +0200)]
ath10k: Remove qca98xx hw1.0 support

Since the firmware support is no longer available for hw1.0,
drop all code (especially workarounds) for those units.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: setup peer UAPSD flag correctly
Janusz Dziedzic [Wed, 7 Aug 2013 10:10:49 +0000 (12:10 +0200)]
ath10k: setup peer UAPSD flag correctly

Setup UAPSD peer/peer rate flags correctly.
WMI_RC_UAPSD_FLAG is a peer rate capabilities flag
and should not be set as a peer flag.
Found during code review, doesn't fix a known
issues.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath6kl: Fix invalid pointer access on fuzz testing with AP mode
Mohammed Shafi Shajakhan [Mon, 5 Aug 2013 04:49:22 +0000 (10:19 +0530)]
ath6kl: Fix invalid pointer access on fuzz testing with AP mode

In our Fuz testing, reference client corrupts the dest mac to "00:00:00:00:00:00"
in the WPA2 handshake no 2. During driver init the sta_list entries mac
addresses are by default "00:00:00:00:00:00". Driver returns an invalid
pointer (conn) and the drver shall crash, if rxtids (aggr_conn)
skb queues are accessed, since they would not be initialized.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath6kl: Fix race in heart beat polling
Vasanthakumar Thiagarajan [Thu, 20 Jun 2013 07:17:20 +0000 (12:47 +0530)]
ath6kl: Fix race in heart beat polling

Make sure to cancel heart beat timer before
freeing wmi to avoid potential NULL pointer
dereference.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath10k: add SoC power save option to PCI features map
Bartosz Markowski [Fri, 2 Aug 2013 07:58:49 +0000 (09:58 +0200)]
ath10k: add SoC power save option to PCI features map

Unify the PCI options location.

By default the SoC PS option is disabled to boost the
performance and due to poor stability on early HW revisions.
In future we can remove the module parameter and turn on/off
the PS for given hardware.

This change also makes the pci module parameter for SoC PS static.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>