History log of /linux-master/drivers/net/wireless/ath/wil6210/pm.c
Revision Date Author Comments
# 45286070 10-Apr-2022 Minghao Chi <chi.minghao@zte.com.cn>

wil6210: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()

Using pm_runtime_resume_and_get() is more appropriate
for simplifing code.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220411013602.2517086-1-chi.minghao@zte.com.cn


# 85630469 28-Oct-2019 Lior David <liord@codeaurora.org>

wil6210: add SPDX license identifiers

Change all files to add SPDX license identifiers and
remove license text.
This is only an administrative change, there is no change
in actual license or copyright for any file.

Signed-off-by: Lior David <liord@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# e4a29bdd 28-Feb-2019 Ahmad Masri <amasri@codeaurora.org>

wil6210: check mid is valid

Check that the mid is valid and that it does not exceed the memory
size allocated to vifs array.

Signed-off-by: Ahmad Masri <amasri@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# a0618945 28-Feb-2019 Ahmad Masri <amasri@codeaurora.org>

wil6210: prevent device memory access while in reset or suspend

Accessing some of the memory of the device while the device is
resetting or suspending may cause unexpected error as the HW is still
not in a stable state. Prevent this access to guarantee successful
read/write memory operations.

Signed-off-by: Ahmad Masri <amasri@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# ec95e84c 10-Sep-2018 YueHaibing <yuehaibing@huawei.com>

wil6210: remove set but not used variable 'start'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/wireless/ath/wil6210/pm.c: In function 'wil_suspend_keep_radio_on':
drivers/net/wireless/ath/wil6210/pm.c:193:16: warning:
variable 'start' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 7be13fc3 29-Jun-2018 Gidon Studinski <gidons@codeaurora.org>

wil6210: add support for enhanced DMA RX data flows

Enhanced DMA RX data path is handled using a single
RX descriptor ring for all VIFs.
Multiple RX status rings are supported, to allow RSS
and multi MSI support.
The driver gets the RX completions via the RX status rings.
The RX status message includes the completed RX buffer ID,
which points to the allocated SKB.

The enhanced DMA RX data flow supports RX chaining, where
multiple SKBs are merged into a single packet.

Enhanced DMA HW supports RX HW reorder offload, enabled by
default for Talyn-MB.

amsdu_en debugfs entry was added to allow control MSDU aggregation.
Use the following command to disable AMSDU (enabled by default):
echo 0 > amsdu_en

Signed-off-by: Gidon Studinski <gidons@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 5bd60982 26-Feb-2018 Lior David <liord@codeaurora.org>

wil6210: multiple VIFs support for connections and data path

Track the connection status per-VIF.
The data path code is also updated to support multiple VIFs.
This includes RX and TX VRING management, NAPI poll loops,
RX reordering and related code.
Power management code used to check if the main interface
is up or based on connection state of the main interface,
adapt this code to take all VIFs into account.

Signed-off-by: Lior David <liord@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# e00243fa 26-Feb-2018 Lior David <liord@codeaurora.org>

wil6210: infrastructure for multiple virtual interfaces

Simple infrastructure changes for supporting multiple
virtual interfaces (multiple VIFs).
It is still not possible to add new VIFs so the only VIF
belongs to the main interface.
Main changes:
1. Add MAC ID(mid) argument to wmi_send and wmi_call to
allow invoking WMI commands on different VIFs.
2. Similarly, in WMI event handler look at the mid reported
by FW and extract VIF structure (currently only for main
interface). All WMI event handlers operate on wil6210_vif
structure so they know on which VIF they were called.
3. Trivial changes to use wil6210_vif structure and MID
throughout the code.
4. Various changes to logging to report MID.

More complete multiple VIFs support will be added gradually
in next patches.

Signed-off-by: Lior David <liord@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# a8fd16d7 14-Dec-2017 Maya Erez <qca_merez@qca.qualcomm.com>

wil6210: prevent parallel suspend and dump collection

Suspend and crash dump operations can happen simultaneously
in case there is a FW assert during the suspend procedure
or when SSR calls all the devices crashdump callbacks.

To prevent that, a new flag is added, indicating that the
dumps collection is in progress, in order to allow the
suspend/reset decline if the dumps collection already started.

Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# bd8bdc6c 14-Nov-2017 Lazar Alexei <qca_ailizaro@qca.qualcomm.com>

wil6210: update statistics for suspend

Currently the statistics show how many successful/failed
suspend/resume operations the system had.
Update the statistics by splitting each successful/failed
suspend/resume operations to radio on/off.

Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 05898dd9 14-Nov-2017 Lazar Alexei <qca_ailizaro@qca.qualcomm.com>

wil6210: remove suspend time statistics

Currently suspend time statistics are showed through debugfs.
Remove time statistics in suspend state since the timing may
not be accurate in that state.

Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 680c242d 14-Nov-2017 Lazar Alexei <qca_ailizaro@qca.qualcomm.com>

wil6210: fix PCIe bus mastering in case of interface down

In case of interface down, radio is turned off but PCIe mastering is
not cleared.
This can cause unexpected PCIe access to the shutdown device.
Fix this by clearing PCIe mastering also in case interface is down

Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 94162666 14-Nov-2017 Lazar Alexei <qca_ailizaro@qca.qualcomm.com>

wil6210: run-time PM when interface down

Allow run-time suspend when interface is down, keep card alive when
interface is up.
If driver is in wmi only or debug_fw mode run-time PM won't suspend.

Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 9b2a4c2d 08-Aug-2017 Hamad Kadmany <qca_hkadmany@qca.qualcomm.com>

wil6210: fix interface-up check

While wil_open is executed, any call to netif_running
would return a success. In case there are failures
within wil_open, should not treat the device as if it
is already opened in relevant functions (like FW recovery
and runtime suspend check).

Fix that by checking the device up flag instead.

Signed-off-by: Hamad Kadmany <qca_hkadmany@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 26234526 08-Aug-2017 Maya Erez <qca_merez@qca.qualcomm.com>

wil6210: add statistics for suspend time

Add statistics for total, min and max suspend time, that
calculates the time the 11ad device was in suspend.
Those statistics will help to estimate the power impact
of d3hot feature.

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


# c6622116 08-Aug-2017 Maya Erez <qca_merez@qca.qualcomm.com>

wil6210: check no_fw_recovery in resume failure recovery

Reset 11ad device on resume failure only if no_fw_recovery
is not set.

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


# fe9ee51e 16-Jun-2017 Maya Erez <qca_merez@qca.qualcomm.com>

wil6210: add support for PCIe D3hot in system suspend

In order to preserve the connection in suspend/resume flow,
wil6210 host allows going to PCIe D3hot state in suspend,
instead of performing a full wil6210 device reset. This
requires the platform ability to initiate wakeup in case of
RX data. To check that, a new platform API is added.
In addition, add cfg80211 suspend/resume callbacks
implementation.

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


# 3161addd 05-Apr-2017 Maya Erez <qca_merez@qca.qualcomm.com>

wil6210: prevent access to 11AD device if resume fails

In case wil6210 resume fails, wil6210 suspend function will try
to access the suspended device in the next kernel suspend.
To prevent that, add wil_status_suspended flag to indicate if the
device is already suspended and clear it only if the resume succeeds.

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


# a3839fbc 05-Apr-2017 Maya Erez <qca_merez@qca.qualcomm.com>

wil6210: protect against sporadic interrupt during suspend flow

During the suspend flow, wil6210 HW can send sporadic interrupts,
while PCIe bus is not operational.
To prevent that, keep the interrupts disabled during the suspend
flow and re-enable them only after PCIe enablement in resume.

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


# af3db60a 20-Jan-2017 Lazar Alexei <qca_ailizaro@qca.qualcomm.com>

wil6210: remove __func__ from debug printouts

__func__ is automatically added to printouts by dynamic debug
mechanism and by wil_info/wil_err macros.
Remove __func__ from debug printouts to avoid duplication.

Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# e34dc647 16-May-2016 Maya Erez <qca_merez@qca.qualcomm.com>

wil6210: add pm_notify handling

Adding pm_notify to allow the following:
1. Check if suspend is allowed in an earlier stage to prevent
starting the suspend procedure in case it is not allowed
2. Notify the platform driver on the suspend request

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


# 93cb679a 30-Jul-2015 Vladimir Kondratiev <QCA_vkondrat@QCA.qualcomm.com>

wil6210: system power management

Support for the system suspend/resume.
In preparation for the run-time PM, implementation made
run-time PM friendly: common for system and run-time PM
code factored out as generic functions, albeit is_runtime
parameter value is always false currently.

For debug purposes, "PM" debug category introduced.

Policy: AP-like interface can't be suspended; otherwise
suspend is allowed. Hardware brought down if interface
was up. Connection, if existed, get lost.
Interface will be brought up upon resume if it was up
before suspend.

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