Currently if num ns offload count is 0, vdev reference is
not getting released in pmo core enable ns offload in fw api,
this is resulting in vdev ref leak.
To address above issue, release vdev ref count if num ns
offload count is 0.
Change-Id: I2cb7ebf974869f96e5c53faf3855c6c835c28a6c
CRs-Fixed: 2521504
Time stamp for profiling system level power issues is currently using
qdf_get_system_timestamp(), which measures in milliseconds. To get more
fine granular data, use qdf_get_log_timestamp_usecs() to measure in
microseconds instead.
Change-Id: I920d0ec7c90ab602cbdc0d1efdb6061d6a72c122
CRs-Fixed: 2520939
The spin lock APIs are accessed from wake MSI hard irq handler as well,
causing deadlock. To solve this, change spin lock APIs to use spin lock
IRQ.
CRs-Fixed: 2519986
Change-Id: I4d05abd294a71a26915210ae7e2be9be6aa7a996
Add timing profiling log for runtime PM operations such that we can
know how much time each operation is taking.
Change-Id: Iad2aca8e8bb2f0dadc14d24e3a5c2b03938df9df
CRs-Fixed: 2518935
Firmware only supports offloading in STA and P2P CLI mode, so remove
NaN offloading option.
Change-Id: I1adb8ead32a0d45a34f72590c33309b17d6c80c0
CRs-Fixed: 2512426
Enable hw filter in runtime pm mode such that target
CPU wake ups can be avoided in order to achieve max
power savings.
Change-Id: I97aa26b063e70db5e3023faf6aa40cc53bfac3af
CRs-Fixed: 2502744
WOW_NLO_SCAN_COMPLETE_EVENT should be always a wakeable event so
there is no need config it again during runtime PM suspend. Same
for WOW_NLO_DETECTED_EVENT which is already configed by default.
Hence it is safe to skip config dynamic wake events for runtime
PM.
Change-Id: Ie99f9f3dbd5e696601c79b826dbc949c0b439dc1
CRs-fixed: 2502738
FW offload has no wow-wakeup-filter for GC vdev because the number of
filters is limited to two but Host tries to add filter from VDEV-0 to
VDEV-2. To address this, change the max wow config in FW to five.
Change-Id: Ie44403ef127cf0160f39aa001deddee2205b4696
CRs-Fixed: 2505367
In function pmo_core_calculate_listen_interval the max_mod_dtim is
obtained by division of sta ditm with the max ditm. The max ditm can be
zero and can cause divide by zero assert.
Add a zero check before division.
Change-Id: Ie48c8b1086efa4f36e55e83b44cc9cc528ed908d
CRs-Fixed: 2475568
Currently, there is an assert condition inside function pmo_psoc_get_vdev
wherein if the vdev_id exceeds the maximum allowed value, a QDF_BUG is
triggered. This check is not necessary as a simple error check takes
care of the same situation.
Remove the assert condition from pmo_psoc_get_vdev
Change-Id: Icd4c892eca893de0f09c24e74407aba5e243f7bd
CRs-Fixed: 2497743
While processing QCA_WLAN_VENDOR_BEACON_REPORTING_OP_START vendor
cmd, the expectation is FW should not wakeup host if host is in
wow mode. Wakeup of HOST happens purely based on Nth beacon
WMI event WMI_VDEV_PARAM_NTH_BEACON_TO_HOST config to firmware
where host gives Nth value and MSB bit to indicate whether
to wake up host or not. MSB bit is 1 means fw should not wakeup
host(By default MSB bit is 0).
WOW_BEACON_EVENT registration on host is required only in case
if HOST sends WMI_RMV_BCN_FILTER_CMDID in order to allow fw to send
connected AP beacons. Currently, HOST sends NTH BEACON CMD to fw with
MSB bit of Nth value equal to 1 in order to allow send connected AP
beacons to HOST only if HOST is not in wow mode.
Fix is to remove default WOW_BEACON_EVENT registration for STA on host.
Change-Id: I4717925fbcb38efb14f3336706f93d90f7a3888e
CRs-Fixed: 2496594
There is no need to do DRV suspend if gPreventLinkDown ini flag is
set. PCIe link will be always up.
Change-Id: Ie6344514486634e1b6ae3b4a4e416853f8d46e5a
CRs-Fixed: 2492053
Currently both system and runtime PM resume are clearing
wow applicable flag and when runtime PM suspend and suspend
are happening in parallel wow applicable flag value is lost
and host is by mistake enabling pdev suspend instead of wow
suspend. Move the logic to clear wow applicable flag to suspend
configuration path such that every time when either runtime pm
or system suspend is enabled correct wow parameter is chosen.
Change-Id: I821dd5cd23493611dfc5a1c3ebf706defe785b6d
CRs-Fixed: 2475227
Since system is awake when runtime PM suspend/resume happens, there is
no need to send DTIM related WMI commands with WOW sequence during runtime
PM resume as unlike system suspend, these commands are able to be sent from
other paths. It will just trigger runtime PM resume which is expected
behavior.
Change-Id: I51d0f45c0223a0c0e3c61bbcb7135a590359b08d
CRs-Fixed: 2475111
Since system is awake when runtime PM suspend/resume happens, there is
no need to send DTIM related WMI commands with WOW sequence as unlike
system suspend, these commands are able to be sent from other paths. It
will just trigger runtime PM resume.
Change-Id: I5bc6b5e363e90c77a2d615129fbac69fc80366ea
CRs-fixed: 2469483
Host failed to send legacy d0wow disable command due to failure
in target suspend flag check during resume.
Update target suspend flag in legacy d0wow enable.
Change-Id: I497c46b90a8fb5deb78ce31fb6e5b0d2c76d723d
CRs-Fixed: 2460452
In the target_if layer based on the mc address list count the
filter params are filled and sent to the firmware. If the mc address
list passed is more than the maximum supported address list there
can be possible buffer overflow.
Sanitize the mc address list count to avoid any overflow.
CRs-Fixed: 2452131
Change-Id: I03208a5487cfd730e933666c47accb2e46fbbc72
WMI_STA_PS_PARAM_INACTIVITY_TIME and
WMI_STA_PS_PARAM_MAX_RESET_ITO_COUNT_ON_TIM_NO_TXRX
need to be sent as WMI_STA_POWERSAVE_PARAM_CMDID param IDs.
Thus use pmo_tgt_send_vdev_sta_ps_param instead of
pmo_tgt_vdev_update_param_req in appropriate locations.
Change-Id: Ie9438cd88540a9bbcaf120b3d0a32d355f85002d
CRs-fixed: 2457998
Userspace request driver to report details of each beacon
received whose bssid is same as currently connected BSS's
mac address. The driver encapsulates the details of these
beacons as an asynchronous event within vendor command:
QCA_NL80211_VENDOR_SUBCMD_BEACON_REPORTING with operation
type QCA_WLAN_VENDOR_BEACON_REPORTING_OP_STOP until
userspace requests to stop sending beacons.
When driver gets stop indication from userspace, it does
the following things:
1. De-register all callback which is registered while handling
start indication
2. Add beacon filter and send it to fw
If driver is in WOW mode and WMI_ADD_BCN_FILTER_CMDID is
NOT configured, fw wakeup HOST and sends connected AP beacon.
Fw should not wakeup host if host is in wow mode. In order
to support this, configure WOW_BEACON_EVENT for STA and P2P.
Change-Id: Ie7c768fa957d02e1361e1ecb95435ba3f06034b0
CRs-Fixed: 2431360
Currently in function pmo_core_config_modulated_dtim there is a possible
scenario of a division by zero. The parameter dtim period can have zero
value.
Add a check before performing the operation.
Change-Id: Ida4a798e5c7914966db25bd188821a75caaf4353
CRs-Fixed: 2432010
Some failures in PMO runtime suspend do not return any error code.
Fix them by returning proper error code.
Change-Id: Icc6b8fef45707cba6dc2cef7ec44cd5c71d2f07d
CRs-fixed: 2450271
wlan_vdev_get_bsspeer() return bss peer without taking the ref count
of the peer and thus if peer is deleted after wlan_vdev_get_bsspeer()
returns a valid peer, the caller will have stale entry of the peer.
Stale entry of peer can lead to Assert.
Use wlan_objmgr_vdev_try_get_bsspeer API for pmo to get the BSS peer
which increment the refcount if peer is valid. With this the peer
won't be deleted till the caller release the ref count of the peer.
Change-Id: I0901164132c497d78c9dc603539b045e5ce0f152
CRs-Fixed: 2446618
In USB devices even if the driver returns an error from bus_suspend,
still the kernel/platform goes into suspend as any error from USB
bus_suspend is ignored.
During suspend, if WoW or suspend was NACked by FW, we should not
send WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID, WMI_PDEV_RESUME_CMDID to disable
WoW or resume device (in the next system resume)
Add new PMO API to get target suspend state and use it to check if
device should be resumed.
Change-Id: Ic6be05f4f2d36ffe174774b6cd55c6da6b1ea1b8
CRs-Fixed: 2421591
Currently, the vdev connection status is checked by getting
the bss peer of that vdev, and if the bss peer is in associated
state then vdev connected status is sent as true. It can happen
vdev is present and bss peer is deleted after getting the bss peer
from vdev pointer. Then bss peer can not be dereferenced to get the
its status.
Instead remove all the duplicate api's tdls_is_vdev_connected,
pmo_core_is_vdev_connected, and wlan_vdev_is_connected with
wlan_vdev_is_up. wlan_vdev_is_up gives success status
if associated.
Change-Id: I863c3c0689f329870bd08c813813c16956135209
CRs-Fixed: 2424996
Currently there is no support to configure ito repeat
count when driver enters into wow mode.
Add support to configure ito repeat count with ini
gItoRepeatCount when driver enters into wow mode.
CRs-fixed: 2419137
Change-Id: I62d7e7df12342e9743c26e0147851347214a9ce7
Currently there is no support to configure the inactivity
timeout when driver goes to wow mode or when driver resumes
from wow mode.
Add support for PMO component to configure the wow mode
inactivity timeout with ini g_wow_data_inactivity_timeout
when driver enters into wow mode and when driver resumes
from wow mode add support to configure the inactivity
timeout for non wow mode with ini gDataInactivityTimeout.
CRs-fixed: 2412866
Change-Id: I0672f22a5dfec870e5e67b23058db2729b9a0848
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within pmo replace any such comparisons with logical
operations performed on the pointer itself.
Change-Id: I3697ede27e074252017e31be23caa93fc25885c5
CRs-Fixed: 2418398
Allow SSR during driver resume. Assume firmware goes down during driver
is in suspend state. Avoid get into bad state and wmi access during driver
resume.
Change-Id: Ie1689e0b080f940666fbbb19c9f0e3b0fecfe564
CRs-Fixed: 2412130
In SAP mode apps should wake up to handle the client kick out event
from fw and delete the remote peer such that remote peer is not hanging
in partial connected state when apps is in power save mode. Mark client
kick out event as wake event in SAP mode such that apps can wake up and
properly disconnect the kicked out remote client.
Change-Id: I9e2e56820be0bed8019d2fb810a12a129deadd37
CRs-Fixed: 2410124
Currently while copying the MC address list, PMO
checks for the IPv6 router solicitation address. If this
address is found in the source list then this address is
ignored but the hole is created in the destination list.
As a result of this hole, FW does not filter the packets
for the last configured MC address in the list.
To mitigate this issue, add the correct logic of copying
the MC addresses from source list to destination list when
IPv6 router solicitation address is found in the source list.
Change-Id: If9412933d30259e7260e4d9e11cc514dec964355
CRs-Fixed: 2403419
The session_id field in struct pmo_wow_add_pattern does not serve any
purpose, so remove it.
Change-Id: I477b74c1360f124fb493440a8289fb2a4382c6d5
CRs-Fixed: 2404828
Legacy WNI CFG items are refactored into new CFG implementation.
PMO uses a wma callback which uses cfg_get API to get listen
interval. Listen interval is now part of the MLME component's
private object. Define API's to get this value and use it instead
of the callbacks.
Remove WMA callback implementation and use new API that gets
listen interval from MLME component.
Change-Id: I797001ea14cc654f9daee3ce297e1ad0c0a08f2a
CRs-Fixed: 2386725
By design, when APF is supported by target, RA filtering need
not be configured. Legacy code handled this by passing INI value
of RA rate limit value to WMA and intersecting it with APF
enabled flag. Change Iabb75b46fce64b2c4a7a303848d7cb6b4714253b
replaced this implementation by a single check in PMO. So remove
the WMA legacy code since it has no purpose now. Also remove
unused PMO prototypes pmo_update_ra_limit and
pmo_update_target_service.
Cleaunp the WMA code that intersects RA rate limit and APF
variables.
Change-Id: I870a1271a627d47242000f5e04068e628f567216
CRs-Fixed: 2379745
Change I47cce6123566b67d4aa0c56f1cf6738f4fdbf77d ("qcacmn: Initial
power manager offload skeleton") included a prototype for function
pmo_dump_wow_ptrn(), but not an implementation. Since subsequently
an implementation was never added, remove the unused prototype.
Change-Id: I4fda06ef5cabdbff069e542319a9d5296a0e932a
CRs-Fixed: 2380102
Fields nlo_in_progress and nlo_match_received in struct
pmo_vdev_priv_obj are unused, so remove them.
Change-Id: I4152e55e407628bbcc32118aa702770a401cfe3b
CRs-Fixed: 2379076
Update the PMO packet filter APIs to make sure the parameter names
in the prototypes match the ones in the implementations and in the
documentation.
Change-Id: I7fd924d17edb54c690e8ef5b85d4829a4a165edc
CRs-Fixed: 2379075
Based on new cfg framework, refactor below WNI and INI cfg items:
- WNI_CFG_PS_WOW_DATA_INACTIVITY_TIMEOUT
- g_wow_data_inactivity_timeout
- gDisablePacketFilter
Change-Id: I9a975263021ba4fd5ccea19ed1147a661f73317f
CRs-Fixed: 2375866
Use qdf_trigger_self_recovery instead of QDF_BUG for runtime PM
resume failure case as qdf_trigger_self_recovery can handle more
scenarios gracefully.
Change-Id: Iff0348fafb1be82f46400099e3cd551c079eea74
CRs-fixed: 2377677
RA filter is getting configured while APF is supported.
Since APF implementation internally handles RA filtering,
this is not needed. Therefore if APF is enabled in INI
and target supports it, do not configure RA filtering.
Don't configure RA filtering when APF is supported.
Change-Id: Iabb75b46fce64b2c4a7a303848d7cb6b4714253b
CRs-Fixed: 2352248
LPASS is driver specific feature which is controlled by INI item
and similarly NAN is also driver specific and not vdev specific
hence decouple PMO lpass and nan feature get APIs from vdev to
psoc.
Change-Id: I152f8b909cf85e412c2fa72a2e7147a1505e60e1
CRs-Fixed: 2361991