History log of /linux-master/drivers/net/wireless/ti/wlcore/acx.c
Revision Date Author Comments
# 2b27bdcc 29-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation this program is
distributed in the hope that it will be useful but without any
warranty without even the implied warranty of merchantability or
fitness for a particular purpose see the gnu general public license
for more details you should have received a copy of the gnu general
public license along with this program if not write to the free
software foundation inc 51 franklin st fifth floor boston ma 02110
1301 usa

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

has been chosen to replace the boilerplate/reference in 246 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190530000436.674189849@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# fa2648a3 19-Jun-2018 Tony Lindgren <tony@atomide.com>

wlcore: Add support for runtime PM

We can update wlcore to use PM runtime by adding functions for
wlcore_runtime_suspend() and wlcore_runtime_resume() and replacing
calls to wl1271_ps_elp_wakeup() and wl1271_ps_elp_sleep() with calls
to pm_runtime_get_sync() and pm_runtime_put().

Note that the new wlcore_runtime_suspend() and wlcore_runtime_resume()
functions are based on simplified versions of wl1271_ps_elp_sleep() and
wl1271_ps_elp_wakeup().

We don't want to use the old functions as we can now take advantage of
the runtime PM usage count. And we don't need the old elp_work at all.
And we can also remove WL1271_FLAG_ELP_REQUESTED that is no longer needed.

Pretty much the only place where we are not just converting the existing
functions is wl1271_op_suspend() where we add pm_runtime_put_noidle()
to keep the calls paired.

As the next step is to implement runtime PM autosuspend, let's not add
wrapper functions for the generic runtime PM calls. We would be getting
rid of any wrapper functions anyways.

After autoidle we should be able to start using Linux generic wakeirqs
for the padconf interrupt.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# c4ee30a2 01-Dec-2017 Colin Ian King <colin.king@canonical.com>

wlcore, wl1251: fix spelling: "Couldnt" -> "Couldn't" and remove error on -ENOMEM

Trivial fix to spelling mistake in error message text. Also remove the
error message on an kzalloc failure as this is redundant.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 42c7372a 21-Aug-2016 Maxim Altshul <maxim.altshul@ti.com>

wlcore: Pass win_size taken from ieee80211_sta to FW

When starting a new BA session, we must pass the win_size to the FW.

To do this we take max_rx_aggregation_subframes (BA RX win size)
which is stored in ieee80211_sta structure (e.g per link and not per HW)

We will use the value stored per link when passing the win_size to
firmware through the ACX_BA_SESSION_RX_SETUP command.

Signed-off-by: Maxim Altshul <maxim.altshul@ti.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 133b7326 02-Dec-2015 Guy Mishol <guym@ti.com>

wlcore: split wl12xx/wl18xx sg parameters

Align to new wl18xx sg parameters.
This requires to split both wl12xx/wl18xx enumerators.

Signed-off-by: Guy Mishol <guym@ti.com>
Acked-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 96dae591 07-Jan-2015 Giel van Schijndel <me@mortis.eu>

wlcore: fix copy-paste bug: assign from src struct not dest

Signed-off-by: Giel van Schijndel <me@mortis.eu>
Reported-at: http://www.viva64.com/en/b/0299/
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# d881fa2c 10-Feb-2014 Eliad Peller <eliad@wizery.com>

wlcore: enable beacon filtering only after receiving a beacon

Enabling beacon filtering before receving a beacon
might result in not having a beacon at all for the
current connected AP, which prevents the station
from entering power-save.

Replace the current approach (of starting beacon
filtering on init) and configure beacon filering
only after bss_conf->dtimper is set (which means
mac80211 already parsed a beacon).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 028e7243 10-Feb-2014 Eliad Peller <eliad@wizery.com>

wl18xx: move to new firmware (wl18xx-fw-3.bin)

Bump the min wl18xx fw version to 8.8.0.0.13

This fw is not backward compatible with older
firmware (due to api changes), so use bump
the firmware name as well.

Some modifications were done to the driver-fw api
in order to support multiple APs.

Additionally, some of the consts (such as max stations,
max links and max RX BA sessions) were changed.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 4b674144 08-Sep-2013 Igal Chernobelsky <igalc@ti.com>

wlcore: fix interrogate command length

Change interrogate command prototype to have command size
and returned buffer length.
This fixes the issue when command parameters are needed to
be passed to FW in addition to acx header as in the case with
get RSSI command, where role_id has to be passed.

Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>


# 0a9ffac0 12-Mar-2013 Nadim Zubidat <nadimz@ti.com>

wlcore: report rssi from roaming statistics

report the average beacon rssi which is calculated
by firmware for roaming statistics instead of the
last rx packet rssi. this results a more accurate
rssi reporting

Signed-off-by: Nadim Zubidat <nadimz@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>


# 530abe19 28-Nov-2012 Eliad Peller <eliad@wizery.com>

wlcore: add ACX_PEER_CAP command

ACX_PEER_CAP command is just ACX_PEER_HT_CAP, but allows
configuring the peer's support rates as well.

this is needed because we start the station role when
the remote rates are not known yet.

the two commands should be unified in future fw versions,
but for now add a new set_peer_cap per-hw op, that will
use ACX_PEER_CAP for 18xx, and ACX_PEER_HT_CAP for 12xx.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>


# 3b44b3b3 26-Nov-2012 Eliad Peller <eliad@wizery.com>

wlcore: allow ACX_BA_SESSION_RX_SETUP to fail

Under some circumstances, that fw might be asked to
remove a rx ba sessions it doesn't know about. In
this case, instead of triggering a recovery, accept
the error code (CMD_STATUS_NO_RX_BA_SESSION) and
ignore it.

[Arik - indicate failure up when the BA session cannot be setup]

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>


# 2f18cf7c 10-Jun-2012 Arik Nemtsov <arik@wizery.com>

wlcore: reconfigure sleep_auth when removing interfaces

The sleep_auth value of the last interface to be set up prevailed when
an interface was removed. Take care of this by correctly configuring the
value according to the remaining STA/AP interfaces.

Take this opportunity to refactor the sleep_auth setting code for better
readability.

[Small style fix. -- Luca]

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>


# 66340e5b 10-Jun-2012 Arik Nemtsov <arik@wizery.com>

wlcore: allow setting sleep_auth before interface init

Hold a value for sta_sleep_auth that is amenable to change by debugfs.
When detecting a legal value in this variable on interface init, use it
as an override value for sleep_auth.

This makes debugging more intuitive using the debugfs value.

Increment the conf version since we added an element to the conf
structure.

Note: An AP going up will always set sleep_auth to PSM_CAM.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>


# 26b5858a 28-Feb-2012 Luciano Coelho <coelho@ti.com>

wlcore: add a debugfs entry to allow changing the sleep mode by hand

For FW debugging purposes, we may need to change the sleep mode
(aka. sleep_auth) by hand, and set it to the mode we want. To allow
this, a debugfs entry is added.

Now we store the sleep_auth value that has been set and use that
instead of the quirk to decide whether we should enter ELP or not.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>


# 4987257c 09-May-2012 Luciano Coelho <coelho@ti.com>

wlcore: abstract debugfs fw_stats to be handled by the lower drivers

The FW statistics differ from hardware to hardware. This commit
prepares for hardware-specific implementation of the FW statistics
debugfs entries.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>


# c331b344 09-May-2012 Luciano Coelho <coelho@ti.com>

wlcore/wl12xx: add plt_init op and move the code to wl12xx

PLT mode needs to be initialized differently for each chip. This
patch adds an operation to init PLT and moves the existing PLT
initialization into the wl12xx driver.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>


# 4161923a 29-May-2012 Eyal Shapira <eyal@wizery.com>

wlcore: fix undefined symbols when CONFIG_PM is not defined

commit c21eebb50379a96e1335e933583dcd5b455c6b64
"wl12xx: add RX filters ACX commands" breaks the build
when CONFIG_PM isn't defined:

ERROR: "wl1271_rx_filter_get_fields_size"
[drivers/net/wireless/ti/wlcore/wlcore.ko] undefined!
ERROR: "wl1271_rx_filter_flatten_fields"
[drivers/net/wireless/ti/wlcore/wlcore.ko] undefined!

code in drivers/net/wireless/ti/wlcore/acx.c is using these
functions unconditionally while they are #ifdefed CONFIG_PM.
Fix it by ifdefing all relevant RX filters code with CONFIG_PM.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Acked-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 3246a7fb 15-May-2012 Luciano Coelho <coelho@ti.com>

wlcore: fix pointer print out in wl1271_acx_set_rx_filter()

The debug print in wl1271_acx_set_rx_filter() was causing the
following warning:

CC drivers/net/wireless/ti/wlcore/acx.o
drivers/net/wireless/ti/wlcore/acx.c: In function ‘wl1271_acx_set_rx_filter’:
drivers/net/wireless/ti/wlcore/acx.c:1759:2: warning: cast from pointer to integer of different size

Instead of casting the pointer to an integer, use %p to print it our
instead.

Reported-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# c21eebb5 13-Mar-2012 Eyal Shapira <eyal@wizery.com>

wl12xx: add RX filters ACX commands

More prep work for wowlan patterns.
Added ACXs to set global RX filter behavior and
enable or disable a specific filter.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>


# fa7930af 13-Dec-2011 Arik Nemtsov <arik@wizery.com>

wlcore/wl12xx: add hw op to get rate-mask for AP-link in STA mode

In some chip-families, there are operating modes where we must mask-out
certain Tx rates, and/or tweak the rate-mask with special HW-specific
bits.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>


# 5453dc10 05-Dec-2011 Luciano Coelho <coelho@ti.com>

wlcore/wl12xx: use a single memory config and reset if using wl127x

Instead of having two memory configuration sets, one for wl127x and
one for wl128x, we can use only one which should be correctly set by
the lower driver.

The wl12xx driver now uses the wl128x memory config by default but
changes it when if it identifies the wl127x chips.

Signed-off-by: Luciano Coelho <coelho@ti.com>


# 9d68d1ee 01-Dec-2011 Luciano Coelho <coelho@ti.com>

wlcore/wl12xx: add hw_init operation

Move all the wl12xx-specific hw initialization procedures into a new
hw_init op. Move some commands and ACX functions to wl12xx.

Signed-off-by: Luciano Coelho <coelho@ti.com>


# 72b0624f 07-Dec-2011 Arik Nemtsov <arik@wizery.com>

wlcore/wl12xx: set the number of Tx descriptors per chip family

Each chip family can have a different amount of Tx descriptors. These
are set on init.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>


# 00782136 29-Nov-2011 Luciano Coelho <coelho@ti.com>

wlcore/wl12xx: implement chip-specific register tables

Add register tables support in wlcore, add some new IO functions to
read and write to chip-specific register and data addresses. Move
some common register values from wl12xx to wlcore and add the
registers table to wl12xx.

Signed-off-by: Luciano Coelho <coelho@ti.com>


# c31be25a 21-Nov-2011 Luciano Coelho <coelho@ti.com>

wl12xx/wlcore: move wl1271 struct to wlcore and add ops

In order to add chip-specific operations and prepare for future
elements that need to be set by the lower driver, move the wl1271
structure to the wlcore.h file and add an empty placeholder for the
operations structure.

Signed-off-by: Luciano Coelho <coelho@ti.com>


# 7b3115f2 02-Dec-2011 Luciano Coelho <coelho@ti.com>

wl12xx/wlcore: rename wl12xx to wlcore

Rename the wl12xx driver directory to wlcore as an initial step
towards the split of the driver into wlcore and wl12xx. We just
rename the directory first to keep git blame happy.

Signed-off-by: Luciano Coelho <coelho@ti.com>