Commit Graph

504784 Commits

Author SHA1 Message Date
Michal Kazior ce90b27128 ath10k: fix multiple key static wep with ibss
Apparently firmware requires both pairwise and
groupwise keys to be installed per-peer for static
WEP in IBSS. This wasn't necessary for AP mode
(and installing both doesn't seem to break AP
mode thus there's no special handling).

Also there seems to be some kind of issue with
mapping tx/rx keys in firmware properly which
resulted in wrong keys being used and broken
communication between devices.

It can be argued the vdev param part is more of a
workaround than a real fix. However I couldn't
figure out how to fix this differently. It works
and isn't super ugly.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-17 09:37:07 +03:00
Michal Kazior 73dc5a1d9d ath10k: don't use reassoc flag
Firmware actually re-creates peer entry when
reassoc flag is set. This is undesired and could
cause trouble with IBSS crypto-wise. This is also
important for upcomming bitrate mask improvement.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-17 09:37:00 +03:00
Michal Kazior 29a100065e ath10k: change static wep key handling for client mode
mac80211 sets static WEP keys as groupwise while
firmware requires them to be installed twice as
both pairwise and groupwise.

Until now these keys were installed once as
pairwise only and, due to that special handling,
needed additional tricks to support 802.1x as
well.

Without this patch in some cases (when AP and
ath10k client use different default tx keys)
multicast communication was broken.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-17 09:34:59 +03:00
Michal Kazior 36d8230b7d ath10k: add extra check for frame tracing
Frames are logged via tracing in two slices:
header and payload, separately. This is done for
performance reasons when one wants to, e.g.
analyse metadata only of frames only.

If for some reason device delivered a frame buffer
which was sized below what 802.11 header implied
tracing logic would blow doing an invalid memory
accesses.

I've hit this problem when running IBSS on QCA988X
with 999.999.0.636 and tracing at the same time.

Fixes: 5ce8e7fdcc ("ath10k: handle ieee80211 header and payload tracing separately")
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-17 09:33:48 +03:00
Michal Kazior d9585a92c7 ath10k: fix error handling in pci_probe
If chip_id wasn't recognized clean up code wasn't
executed properly. It would skip freeing memory
causing a leak and irqs causing possibly MSI
warning splats later or even kernel crashes.

Fixes: 1a7fecb766 ("ath10k: reset chip before reading chip_id in probe")
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-17 09:32:40 +03:00
Peter Oh 26bea13a65 ath: lower JP W53 band DFS detection threshold around 30%
Japan's W53 band requires 50% data traffic during its DFS test,
but WLAN baseband used by ath9k and ath10k is not able to achieve
current threshold rate, 50%, under the data traffic rate.
In other words, HW occasionally fails detecting radar pulses,
so that SW cannot get enough radar reports to achieve the rate.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-15 15:15:12 +03:00
Peter Oh cb3fbd6357 ath: define JP DFS patterns separated from FCC
Separate Japan's DFS pattern from FCC to control PPB threshold.

Currently all the radar detectors use the same threshold rate at
50%, but it's not able to achieve if data traffic rate is higher
than 40% because WLAN baseband used by ath9k and ath10k often fails
detecting radar pulses, so that SW cannot get enough radar reports
to achieve the rate.

Since Japan's W53 band requires 50% data traffic during its DFS
test we need to apply different threshold rate than others on it.
Hence define its own pattern to give flexibility to threshold rate.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-15 15:15:00 +03:00
Michal Kazior dbd3f9f37e ath10k: use scan burst for hw roc
This improves chances of getting onto a foreign
channel and thus makes P2P a bit more reliable.

Without scan burst it was possible for firmware to
not switch to foreign channel resulting in "failed
to switch to channel for roc scan" warning. This
would also effectively fail some offchan tx
requests and lead to P2P find/connect taking
longer. This could be observed when other vifs
were running/busy, e.g. with P2P GO.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-15 15:07:39 +03:00
Michal Kazior fcf9844636 ath10k: fix hw roc expiration
It is not guaranteed firmware will switch to
foreign channel immediately after starting scan
sequence. To account for that don't use duration
parameter for scan time. Instead request insanely
long scan and use timeout worker to cancel it from
driver.

This should improve P2P reliability a bit.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-15 15:07:31 +03:00
Peter Oh 694c0e0a17 ath: support new FCC DFS Radar Type 1
Add support for new FCC DFS rules released on August 14, 2014.
FCC has added a new radar type named Radar Type 1 and original
Radar Type 1 is renamed to Radar Type 0 in consequence.

During the certificate test, Type 1 PRI values are randomly selected
within the range of 518 and 3066 and we divide it to 3 groups based on
practical test result data collected for more than a year.

For about Radar type ID, it does nothing to functionalities.
In other words, even if we re-order the IDs, DFS detection will
work as well, but we give the ID with matching to FCC doc.

By adding this support, the drivers using this DFS function are
able to support both of old and new FCC DFS rules simultaneously
without any other changes.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-15 15:00:16 +03:00
Sujith Manoharan 55314fc2b6 ath10k: fix no-ack frame status
Use the new IEEE80211_TX_STAT_NOACK_TRANSMITTED flag
to indicate successful transmission of no-ack frames.
This fixes multicast frame accounting.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-09 15:11:30 +03:00
Yanbo Li 6274cd4100 ath10k: change the fw stats access mask
This fix the regerssion introduced after "ath10k_wmi_requests_stats()
call to use more stat bits", both the 10.2.X FW and community FW 10.1.X
will return time out when access the fw_stats with the STAT_VDEV and
STAT_PDEV. Add the condition to use different fw_stats mask for different
FW versions.

Fixes: 7777d8c7ef ("ath10k: implement fw stats for wmi-tlv")
Signed-off-by: Yanbo Li <yanbol@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-09 15:06:36 +03:00
Michal Kazior 15677a7dbe ath10k: fix static wep with more than 1 key in client mode
The default keyidx callback may be called after
more than 1 key is installed. This led to only 1
WEP key being reinstalled only. This caused Rxed
traffic encrypted with other WEP keys to be
dropped in client mode.

Tested-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-09 15:00:11 +03:00
Michal Kazior 7c8cc7eb4f ath10k: fix arvif->wep_keys clearing
The variable should be cleared regardless of
whether there's a peer associated with the key or
not.

This fixes case when user first associates with 2
WEP keys and then disconnects and connects with 1
WEP key. This resulted in WEP key count being 2 in
the driver leading to default keyidx fixup
failure.

Tested-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-09 15:00:03 +03:00
Michal Kazior 5d5c8ec9e4 ath10k: replenish htc tx credits always
There's always at most 2 credits and it makes
little sense to set the
ATH10K_HTC_FLAG_NEED_CREDIT_UPDATE flag
conditionally.

This seems to fix some random issues with tx
credit starvation on WLAN.RM.2.0-00073 I've been
seeing. Note: this isn't related to wmi mgmt tx.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-09 14:58:16 +03:00
Michal Kazior f42f8eb27e ath10k: fix insufficient tracing buffer size
Some trace messages were truncated and a kernel
splat could be seen in the log:

  WARNING: CPU: 3 PID: 0 at /devel/src/linux/drivers/net/wireless/ath/ath10k/./trace.h:114 ftrace_raw_event_ath10k_log_dbg+0x20e/0x220 [ath10k_core]()
  Modules linked in: ath10k_pci(O) ath10k_core(O) ath iwldvm iwlwifi [last unloaded: iwlwifi]
  CPU: 3 PID: 0 Comm: swapper/3 Tainted: G        W  O    4.0.0-rc3-wl-ath+ #703
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
   ffffffffa01d4cb0 ffff88001fd83998 ffffffff8191b86c ffffffff81e3b718
   0000000000000000 ffff88001fd839d8 ffffffff8105573a ffff88001c0a5528
   ffff88001bea9ae0 ffff88001c3dd940 00000000000d0018 ffff88001fd83a80
  Call Trace:
   <IRQ>  [<ffffffff8191b86c>] dump_stack+0x45/0x57
   [<ffffffff8105573a>] warn_slowpath_common+0x8a/0xc0
   [<ffffffff8105582a>] warn_slowpath_null+0x1a/0x20
   [<ffffffffa01c61fe>] ftrace_raw_event_ath10k_log_dbg+0x20e/0x220 [ath10k_core]
   [<ffffffffa01aaa6b>] ath10k_dbg+0xbb/0xd0 [ath10k_core]
   [<ffffffff810eed89>] ? trace_clock_local+0x9/0x10
   [<ffffffffa01bd069>] ath10k_wmi_event_service_ready+0x479/0x520 [ath10k_core]
   [<ffffffff810fdf90>] ? trace_buffer_unlock_commit+0x50/0x60
   [<ffffffffa01c2113>] ath10k_wmi_tlv_op_rx+0x6b3/0x8b0 [ath10k_core]

This could be reproduced with:

  trace-cmd record -e ath10k
  ifconfig wlan0 down
  ifconfig wlan0 up

Fixes: 5c01aa3de9 ("ath10k: deduplicate wmi service ready logic")
Fixes: ca996ec566 ("ath10k: implement wmi-tlv backend")
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-09 14:57:04 +03:00
Janusz Dziedzic 24ab13ef0c ath10k: disable burst mode
Firmwares that indicate BURST_SERVICE as enabled
could overwrite some wmm parameters (eg. txop).
This could lead IOT and balancing issues.
Hence disable this by default.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-09 14:53:50 +03:00
Michal Kazior e57e05716d ath10k: fix IBSS scanning on wmi-tlv and qca6174
WLAN.RM.2.0-00073 firmware requires self-peer to
be created prior to issuing scan command. Without
this wmi-tlv with qca6174 firmware crashes after
submitting a scan request.

Creating the peer as soon as add_interface()
shouldn't be a problem.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-01 22:43:49 +03:00
Michal Kazior 3ae5422574 ath10k: clean up set_bitrate_mask handling
The code was a bit convoluted. Clean it up and
prepare for future changes.

While at it this fixes incorrect verification of
'single nss' case when ss2 rates were missing
while ss1 and ss3 were requested resulting in
nss=3 being set:

  iw wlan1 set bitrates legacy-5 ht-mcs-5 0 1 2 3 4 5 6 7 16 17 18 19 20 21 22 23 vht-mcs-5 1:0-9 3:0-9

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-01 20:33:48 +03:00
Michal Kazior 039a0051ec ath10k: allocate fw resources for iface combinations
The number of 3 vdevs wasn't enough to handle the
worst case for interface combinations in practice.

wpa_supplicant may need up to 4 vifs to have 2
vifs actually connected, i.e. p2pdev + client + 2x
p2p (either p2p client or p2p go).

This fixes worst case warning:

  Free vdev map is empty, no more interfaces allowed.

This keeps the ability to associate 32 stations in
AP mode at the cost of not being able to guarantee
that under all circumstances, i.e. some
combinations may consume additional fw peer
entries for internal purposes leaving less
resource for stations in AP mode.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-01 20:31:23 +03:00
Michal Kazior cf32784c8f ath10k: enable multi-channel on supported devices
This effectively enables multi-channel operation
on qca6174 WLAN.RM.2.0-00073 (and possibly any
newer firmware release for qca6174).

This adds appopriate interface combinations and
initializes firmware channel scheduler.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-01 20:31:15 +03:00
Michal Kazior b4aa539dd8 ath10k: implement tx pause wmi event
qca6174 wmi-tlv firmware defines a new wmi event
for host tx pausing (i.e. stop/wake tx queues).

Map these events to ath10k/mac80211 tx queue
control.

This is important for multi-channel throughput
performance.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-01 20:31:08 +03:00
Michal Kazior 96d828d45e ath10k: rework tx queue locking
Tx queue locking was very simple until now.
Multi-channel support will require a more flexible
and fine grained control.

This introduces a per-hw and per-vif (each with a
bitmask of reasons) tx queue locking.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-01 20:31:00 +03:00
Michal Kazior 5b272e30a4 ath10k: implement adaptive qcs command
This command will be used to configure
multi-channel scheduler in firmware.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-01 20:30:52 +03:00
Michal Kazior 500ff9f938 ath10k: implement chanctx API
The chanctx API will allow ath10k to support
multi-channel operation.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-01 20:30:44 +03:00
Michal Kazior 0a27347efd ath10k: allow empty ssid vdev config
It doesn't make much sense to reject a valid
firmware configuration combination.

Since SSID isn't known early on it might make
sense to allow driver to start vdev without SSID
and restart it later.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-01 20:30:34 +03:00
Michal Kazior d600a6d754 ath10k: don't call quiet mode if it's not implemented
qca6174 and wmi-tlv doesn't have quiet mode
implemented. Don't even attempt to call it. This
fixes a warning when bringing first interface up:

  failed to set quiet mode period 100 duarion 0 enabled 0 ret -95

Fixes: 8515b5c79a ("ath10k: configure thermal throttle while powering up")
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-01 20:21:17 +03:00
Michal Kazior c94aa7ef46 ath10k: fix survey reporting
Number of channels is stored in a separate macro
in a header file and channel list is constructed
independently. The macro is used to define survey
array.

This fixes a recent regression introduced after
adding support for 144 channel. The regression
would lead to a warning and incomplete survey data
on channel 165:

  chan info: invalid frequency 5825 (idx 38 out of bounds)

Also make sure to enforce the sizes and avoid this
kind of problem in the future.

Fixes: 4a7898fed5 ("ath10k: enable channel 144 on 5GHz band")
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-01 20:20:16 +03:00
Nicholas Mc Guire 9eea56895f ath10k: harmonize error case handling in ath10k_core_start
All of the bringup/init functions called in ath10k_core_start return 0
on success and != 0 on failure. ath10k_wmi_wait_for_service_ready(),
ath10k_wmi_wait_for_unified_ready() and their call sites were adjusted
to fit this model.
The return type of wait_for_completion_timeout is unsigned long not int so
ath10k_wmi_wait_for_service_ready() and ath10k_wmi_wait_for_unified_ready()
were fixed up accordingly.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-01 20:19:07 +03:00
Nicholas Mc Guire a7a42849cd ath10k: core: match wait_for_completion_timeout return type
Return type of wait_for_completion_timeout is unsigned long not int.
An appropriately named unsigned long is added and the assignments fixed up.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-01 20:17:50 +03:00
Nicholas Mc Guire f439539bd0 ath10k: thermal: match wait_for_completion_timeout return type
Return type of wait_for_completion_timeout is unsigned long not int.
An appropriately named unsigned long is added and the assignments fixed up.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-01 20:16:59 +03:00
Nicholas Mc Guire 6e8d5438bd ath10k: debug: match wait_for_completion_timeout return type
Return type of wait_for_completion_timeout is unsigned long not int.
An appropriately named unsigned long is added and the assignments fixed up.
Missing spaces 1*HZ -> 1 * HZ were also added along the way.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-01 20:15:59 +03:00
Nicholas Mc Guire 7c377c3de5 ath10k: htc: match wait_for_completion_timeout return type
Return type of wait_for_completion_timeout is unsigned long not int.
An appropriately named unsigned long is added and the assignments fixed up.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-01 20:13:11 +03:00
Nicholas Mc Guire 8e9904f5b9 ath10k: mac: match wait_for_completion_timeout return type
Return type of wait_for_completion_timeout is unsigned long not int.
An appropriately named unsigned long is added, respectively 'ret'
renamed, and the assignments fixed up.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-04-01 20:12:27 +03:00
Michal Kazior c51880ea82 ath10k: fix aid setup in station mode
While debugging something else I noticed AID was
set to 0. This could lead to powersave issues in
station mode. Maybe this isn't really necessary
but set it properly just to be sure.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-30 15:20:33 +03:00
Michal Kazior 8d7aa6bc83 ath10k: document ofdm/5ghz rate offset with a macro
Don't use literal values for offsets. While at it
rename a function so it is more clear what it
checks for.

This finally takes care of the last magic
5GHz/OFDM offset.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-30 15:09:56 +03:00
Michal Kazior 01cebe1c50 ath10k: deduplicate bitrate to rate idx conversion
It's possible to derive rate index from bitrate
without any additional mapping structures/logic.

This should have little to none impact on
performance since this is only done for management
frames and the previous approach wasn't
particularly optimized.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-30 15:09:46 +03:00
Michal Kazior 5528e03270 ath10k: rework legacy rx rate decoding
Instead of using a hacky table and magic values
use supported band information advertised to
mac80211.

This may impact performance a little when dealing
with legacy rx rates depending on system
architecture. It's probably negligible.

This also fixes a highly theoretical corner case
when HT/VHT rates weren't reported correctly if
channel frequency wasn't known.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-30 15:09:38 +03:00
Michal Kazior af00148f63 ath10k: simplify fixed rate selection
Use the existing ieee80211_rate array instead of
definining separate one. This gets rid of the ugly
4-index offset when dealing with 5GHz band.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-30 15:09:32 +03:00
Michal Kazior 6fd4bd26a0 ath10k: use hw rate definitions for fixed rate
Using raw values is discouraged. Having
defines/enums is preferred.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-30 15:09:25 +03:00
Michal Kazior 6aa4cf1cd4 ath10k: add hw rate definitions
Prepare defines for future use.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-30 15:09:15 +03:00
Michal Kazior 5653b39d6f ath10k: drop RATETAB_ENT macro
It was superfluous and confusing. It's better to
define the structure explicitly.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-30 15:08:56 +03:00
Michal Kazior 486017ccbd ath10k: derive rate from bitrate
There's no need to store rate values in hw_value.
This frees up the hw_value for better future use.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-30 15:08:36 +03:00
Michal Kazior dcc330987f ath10k: move rate definitions to file start
Prepare the code for future changes so that new
code can refer to rate-related stuff without
forward declarations.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-30 15:08:30 +03:00
Marek Puzyniak 75d85fd999 ath10k: introduce basic tdls functionality
This patch introduces tdls without tdls peer uapsd and tdls channel switching.
Transmitting tdls data frames works only for ethernet type frames, that's why
data addressed to tdls sta is in ethernet format.

This patch depends on commit c23e31cf7b ("mac80211: initialize rate control
earlier for tdls station").

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Marek Kwaczynski <marek.kwaczynski@tieto.com>
Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-30 15:01:02 +03:00
Marek Puzyniak ad45c888ab ath10k: add wmi support for tdls
As a part of tdls implementation introduce
tdls related wmi data structures, constant
values and functions.

Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-30 15:00:52 +03:00
Marek Puzyniak 7c35424205 ath10k: update station counting
Currently station counting functions
(inc_num_stations/dec_num_stations) does not handle
tdls type of stations. Tdls station should be counted
because it consumes peer in firmware. Only not tdls
stations are excluded from this counting.

Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-30 15:00:44 +03:00
Marek Puzyniak 8cca3d6087 ath10k: store max tdls vdevs that fw can handle
Currently number of tdls vdevs supported by firmware
is hardcoded. For future usage it is stored in ath10k
structure based on defined value.

Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-30 15:00:38 +03:00
Marek Puzyniak 7390ed3467 ath10k: make peer type configurable
Peer type was hardcoded to default value.
For future implementation it is required
to make is configurable.

Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
Signed-off-by: Marek Kwaczynski <marek.kwaczynski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-30 15:00:33 +03:00
Michal Kazior d740d8fd24 ath10k: unify tx mode and dispatch
There are a few different tx paths depending on
firmware and frame itself.

Creating a uniform decision will make it possible
to switch between different txmode easier, both
for testing and for future features as well.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-30 15:00:25 +03:00