Currently nack status is read using the pmo lock with bottom half
disabled, but if the wow wakeup irq is triggered at the sametime
it is waiting for the same psoc lock resulting in the dead lock.
Hence get the hif handle directly rather than with spinlock api.
CRs-Fixed: 3798619
Change-Id: Ic2d5cd07c2dafb525003ec7e9e02bc17d0876dd0
Kernel configures mc address list once association/NDP connection
happens. Host driver flushes the existing list whenever a new list
is received from kernel. Also, it's expected to cleanup the final
list as part of disconnection/NDI cleanup.
Currently, host expects the vdev/NDI state to be ASSOCIATED
in-order to flush the final configured list. But the STA vdev/NDI
state is already moved to DISCONNECTED by the time host tries to
flush the list from firmware. So, host doesn't send flush command
to firmware and it just flushes internal list from driver adapter.
This results in leaving the final configured entries uncleaned
in firmware and the mc list exhausts in few such iterations as the
firmware supports limited size(32).
Don't check for vdev/NDI state and always issue flush command to
firmware as part of disconnect to avoid this.
Change-Id: I8e070f40976a147959783b3c44f1e9aa24563d4b
CRs-Fixed: 3776542
Currently when suspend sequence is going on and WOW handshake with
F.W is completed, then we check for wow initial wakeup flag if it
is not set then we proceed for suspend. But if this wow initial
wake flag is set just after it being checked in suspend sequence
then we miss honoring the wake message and host will be stuck in
suspend state.
So to avoid this make sure we are requesting resume from wow initial
wakeup setting context. So that resume request is posted properly.
Change-Id: Idd082ef82a4d7dbd62d7762f10debe1db9baed88
CRs-Fixed: 3743425
When enable irq failure is encountered trigger recovery with reason
code ENABLE_IRQ_FAILURE, this helps to recover the system in error
scenario.
Change-Id: I003f43fc9e3473cc939729700a03c8a8c790d34f
CRs-Fixed: 3724860
Extend the page fault action INI to handle following:
1) Ignore page fault event
2) Trigger SSR on page fault threshold
3) Send blob of data to userspace on page fault threshold
On pagefault wakeup event, save per symbol pagefault timestamp
and once the event count reaches configured threshold within the
configured time interval, either trigger SSR or notify userspace
with pagefault address and count based on INI configuration.
Change-Id: I0a3ece369ad0c7aac676fc91f6863e06a3f4ce8c
CRs-Fixed: 3713813
Check for DP drain status and prevent suspend if
we fail to drain txrx succefully.
Change-Id: I76c5587719cb162e3e7802586d5ddde24f18e755
CRs-Fixed: 3718937
After received WoW ACK from FW, there should be some RX packets
coming and IRQ delayed, if these packets are not got processed,
FW UMAC will crash. Change adds an explicit check and abort suspend
if rings are not empty.
Change-Id: Ifbd0bfdbc564fb0c02eda7d13756d82966d88549
CRs-Fixed: 3693641
Host filled link address in the NS tuple, DUT sent NA frame with link mac
addr, not MLD addr.
To fix it, let host fill MLD address in the NS tuple for MLO vdev.
Change-Id: I863dc6184c59ee06950e4aa2287d4d4a6ff30b5c
CRs-Fixed: 3693220
Before suspend, output HP/TP value to make sure there
is nothing pending in RX rings.
Change-Id: I25312b5837ce2edfd43a0f70bda32842a95c5ed6
CRs-Fixed: 3648777
Currently, userspace sends
"QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION" vendor command
for power configuration. With this vendor command, driver receives
the PS parameters which it sends it to the target. Usually,
inactivity timeout is 200ms, but in some scenario, if driver send
the inactivity timeout as zero, then it causes crash in target as
target expects non-zero value.
Scenarios:
1. Userspace updates inactivity timeout to zero.
2. For OPM mode as disable(0) or enable(1), driver updates the PS
params to zero. So, inactivity timeout is zero.
So, to fix this, return invalid if userspace send ITO value as zero
and update vdev PS params for OPM mode as user defined(2).
Change-Id: I120829f12ed350ad7ad0bfb983ad49087dea4fc8
CRs-Fixed: 3653524
Currently, host driver sends ARP pattern to FW for wow mode for
STA interface only. Thus, in case of SAP interface, firmware drops
ARP packets during wow mode as driver does not sent the ARP
response for SAP for wow mode.
So, to fix this, send ARP pattern for wow for SAP interface also.
Change-Id: I8efd895a1c03900245048b2da2a8012ec36dbf71
CRs-Fixed: 3626249
Pass g_wow_spec_wake_interval along with g_wow_data_inactivity_timeout
to firmware through WMI which are used in WOW mode. These configs are
honored by firmware when User defined OPM is set.
Change-Id: I24306e8aa0b7b3f7fce9453f6a98d4922b7c3f62
CRs-Fixed: 3567042
Before the host triggers sleep mode, it configures listen
interval while setting power save parameters to firmware.
If user configured listen interval is present in host,
that configured listen interval is set while setting
power save params.
Change-Id: I158a547f95bca4750b5180840113c03a89ced17c
CRs-Fixed: 3528793
Currently OSIF calls the CDP API for DP suspend/resume
handler directly.
Move these calls to DP component so that DP component
can handle the suspend/resume related operations for
internal DP sub-modules (which are outside CDP).
Change-Id: I080809904f619260c707cacbcdbf158250320081
CRs-Fixed: 3502507
During the conversion to the Bazel DDK build system the qcacld-3.0
driver was built without the FEATURE_WLAN_RA_FILTERING flag being
set. This resulted in two separate build errors due to incorrectly
testing using #if instead of #ifdef, so fix those tests.
Change-Id: I9265475c1d33918e8fac7fc138e0bfdc301e5eef
CRs-Fixed: 3497220
Currently, if active offload is disabled and ARP offload,
NS offload is enabled from ini host doesn't configure
NS and ARP patterns to fw. This results in frame drop when
device is in RTPM and NS, ARP frame is received as fw
doesn't send WOW wakeup to host.
To address this issue, configure ARP, NS pattern to fw if
active offload is disabled.
Change-Id: Iad54263f7a8a52f0a9ca3c56f9a2e3ccb19ea6c0
CRs-Fixed: 3468310
Current code does not enable DRV in unit
test mode. Fix this by setting drv flag
when unit test mode is detected.
Change-Id: I0996860ca6549235aae59459a710f10279a181d5
CRs-Fixed: 3500370
Populate the user-defined listen interval in association
request frame for STA.
Change-Id: I1733ed1d528fa99fc5556639ddfbd68ca97a40e0
CRs-Fixed: 3438369
Currently, Fw did not set NACK reason code
to Host when Fw is not ready for WoW.
As part of the new change, Fw will send NACK
reason code along with WoW NACK to host.
Make changes in host to store and print
NACK reason code.
Change-Id: Ic978af9572c8de37df3fb926083aac5e6ddefda7
CRs-Fixed: 3481177
Currently as IPA_OFFLOAD path is enabled for OPT_WIFI_DP
usecase, this causes SAP/GO D3 WOW to be disabled.
This change will add a check to ensure D3 WOW is
enabled when IPA path is set for OPT_WIFI_DP usecase.
Change-Id: Ibec94ca172646c80fa9ec7e6ff24e6e5f6fcad60
CRs-Fixed: 3472752
Add API to get LI which is configured by the user.
In case, user has not configured any interval,
device uses default LI and this cmd will return 0
Syntax for cli cmd: driver GET_LISTEN_INTERVAL
Change-Id: I3ef12ffc757288c057c88dceece7dbc2da68880b
CRs-Fixed: 3425472
Currently, in WMI_WOW_ADD_WAKE_PATTERN_CMDID driver sends only SAP mac
address and pattern_id. So, FW does not have bridge mac address.
To fix it, driver will send bridge mac address and pattern_id along
with SAP mac address and pattern_id.
Change-Id: I3fae9f0383a1ba8c64edfa6cf8518ab9a5604a14
CRs-Fixed: 3456318
Remove unwanted QDF asserts from PMO and suspend all components as there is
error handling present for error cases.
Change-Id: I43b1ba36d9e2fb467a7a7c110abd4a2d44e5b1a8
CRs-Fixed: 3459928
Rename enum pmo_wow_action_wakeup_opertion to correct the misspelling
of "operation" in the name. Note that no code actually references the
enum by name, so no other code is affected by this change.
Change-Id: I77a113bed3e74b151945ad228471e1a5d09b9d76
CRs-Fixed: 3427584
Extensive amount of PMO logs are seen in case of crash, which
decreses the debugging effciency.
To address this issue, optimize PMO logs.
Change-Id: I7c3b76d72deaf53782befc6d931866d907b5d168
CRs-Fixed: 3402290
According to new requirement, add INIs
max_pagefault_wakeups_for_ssr,
interval_for_pagefault_wakeup_counts and
ssr_frequency_on_pagefault to trigger SSR if host wakes up
because of pagefault.
For ex: If max_pagefault_wakeups_for_ssr = 30,
interval_for_pagefault_wakeup_counts = 180000 (3 mins) and
ssr_frequency_on_pagefault = 3600000 (1hr), in this case host
will trigger the SSR if it receives 30 wakeups because of
pagefaults in 3 mins, host will trigger SSR only once in 1 hr.
Once the SSR is triggered, host will not trigger next SSR for
next 1 hr even if it receives 30 wakeups from fw because of pagefaults.
This 1 hr time is getting monitored from last SSR.
Change-Id: Ic122a7d8e8749870bfa5d28e74f6e9ee19493d04
CRs-Fixed: 3378492
The kernel-doc script identified a multitude of documentation issues
in components/pmo, so fix them.
Note that there is currently one false positive error being flagged in
the documentation for typedef pmo_get_vdev_dp_handle.
Change-Id: Iddaccbf1b55557a82af34d2b6b4913d37c71123a
CRs-Fixed: 3359766
XGAP power save event need host actions and notifying
the userspace.
Register for XGAP events to wake up host.
Change-Id: Ic58837580a35bd27ac5e87fc5debbd4f4d5b9b6b
CRs-Fixed: 3272421
There are two different names with different range of
value for aliasing INI's.
So, it should pick the valid range of value wrt INI
name.
Change-Id: I58d4797a0fa598a1e44349c8954dac3378f1a751
CRs-Fixed: 3352412
For GTK offload functionality, currently only 16bytes of
KEK and KCK are being copied from the userspace.
In latest kernel, kek length and kck length are sent to the
host driver as part of set_rekey_data command. Therefore,
use this length to copy the kek, kck params in host driver.
Change-Id: Idef0247aaab22022a84898eca6eb2f010ca1bf1f
CRs-Fixed: 3345506
In wow_get_wmi_eventid(), the reason to event id mapping fills
the wrong command id (WMI_ROAM_PREAUTH_STATUS_CMDID) instead of
the event WMI_ROAM_PREAUTH_START_EVENTID and.
Since the event WMI_ROAM_PREAUTH_START_EVENTID will not be
piggybacked, remove the reason WOW_ROAM_PREAUTH_START_EVENT from
wow_get_wmi_eventid api. Fix the documentation of setting the
WOW_ROAM_PREAUTH_START_EVENT bit in pmo wow bitmap.
Fix invalid event id mapping for WMI_TDLS_PEER_EVENTID also in
wow_get_wmi_eventid().
Change-Id: Ifd08dc94cda22d9de662ef15b74cb19571007052
CRs-Fixed: 3355578
Currently general PM delay is 500 ms. If fw sends wow wakeup with reason
code WOW_REASON_LOCAL_DATA_UC_DROP host wakes up, 500 ms after the
transactions again runtime suspend takes effect. Every time FW sends wow
wake there will be a small delay induced. It is noticed that large
frames are getting dropped for continuous wow wakeup events.
To address this issue increase PM delay to 1200 ms if fw sends
wow wake for reason WOW_REASON_LOCAL_DATA_UC_DROP and again
revert it back to 500 ms on next WoW enter.
Change-Id: I57bafc5ae8a633f1f685201ceb5936b59c985148
CRs-Fixed: 3330844
In case of MLO connection, whenever firmware receives
enable or disable ARP/NS offload request from host on any vdev,
firmware enables/disables ARP/NS offload for all MLO vdevs.
So, during system resume though host sends disable ARP offload
only for MLO partner link vdev, firmware disables ARP offload
for all MLO vdevs. But during system suspend, as host is unaware
of ARP offload disabled on all vdevs, it will not send enable ARP
offload request to firmware. Because of this, all ARP requests are
forwarded to host instead of firmware in suspend mode.
To address this issue, add logic in host to avoid ARP/NS offload
requests for MLO partner link vdevs.
Change-Id: I1ffe503911705a41be26e44d1db6d15a5988e34d
CRs-Fixed: 3295050
This re-introduces the orignal patch which shutdowns WLAN in system
suspend prepare.
Orignal patch Id1f5172a7fc1792c83c8c1c20127de815f7e4980 is reverted by
Ic82db9dc0ca9d6686df99926335af27abc61cdb5 for deadlock issue.
However, deadlock between cnss_pm_notify and unregister_pm_notifier is
not caused by Id1f5172a7fc1792c83c8c1c20127de815f7e4980. So restore it
and add flag to enable/disable feature shutdown wlan in system suspend.
Deadlock issue is caused by "up_write(&cnss_pm_sem) is invoked before
down_write(&cnss_pm_sem) in function cnss_pm_notify". The issue can be
fixed by changes I533c373b85f554fbcceb562d9f56c6b88e5155bb and
I7768fdbeb1fa8cd6ef3b260eb0aafb231aeed324.
Change-Id: I25e4398a8d3b1a52cf7bc554af74d123ec797c6e
CRs-Fixed: 3287742
In certain concurrencies the total WOW patterns sent
to FW is exceeding the FW limit of five patterns which
can lead to ping failure as FW may drop the packet.
For STA mode ML adapter, send only the MLD MAC address
on which the data packet will be received.
Do not send ARP pattern in SAP/P2P-GO mode which is
sent with length zero.
On successful pattern delete request sent to FW,
decrement the default pattern count.
Change-Id: Ib45cf797a4bc3c6fbc23a2a95e877d7d8af34629
CRs-Fixed: 3257348
This reverts Change-Id: Id1f5172a7fc1792c83c8c1c20127de815f7e4980
to avoid deadlock between cnss_pm_notify and unregister_pm_notifier
during soft driver unload.
Change-Id: Ic82db9dc0ca9d6686df99926335af27abc61cdb5
CRs-Fixed: 3266366
Display control pipes info on WOW ack failure which helps to
debug issues when full debug history is not available.
Change-Id: I6a84aa01c07831b7109d0741337cae6ac0be2f44
CRs-Fixed: 3246284
Currently a userspace request to enable NS offload dynamically
gets rejected if the offloads are in disabled state.
After this change, when a request to enable or disable of NS offloads
is received in the host and if the trigger type is to dynamically update
the NS offloads, then update the dynamic offload configuations and inform
the FW.
Change-Id: Ifb4a1d37b5f2e6c89d043b00f9cc0aaf426d870e
CRs-Fixed: 3237980
With restructuring in hif runtime pm module, modules are
required to register with the hif runtime pm module. Also,
link states are depreciated.
This change registers PM QOS and bus suspend modules which
use runtime PM module and replace link state with resuming
link up state in PMO resume.
Change-Id: I0df48e3d31a1fb0f03faaa0617b48937c9bc224b
CRs-Fixed: 3169425
To support shutdown WLAN when system goes into suspend, add idle shutdown
when got PM_SUSPEND_PREPARE/PM_HIBERNATION_PREPARE.
Before suspend/shutdown, user space should stop adapter. And after resume,
user space should restart adapter. This can ensure user and kernel space
to sync adapter's state.
Change-Id: Id1f5172a7fc1792c83c8c1c20127de815f7e4980
CRs-Fixed: 3208931
-Wimplicit-fallthrough is being enabled by default. Some compilers
such as clang require the attribute instead of just a fallthrough comment.
Change-Id: If55d68cb76589b39b88d859ea4d9fa6e10246c7e
CRs-Fixed: 3217399
This reverts commit I293647175c151da0fd6628345f98ea65c83b1bb3.
New solution idle shutdown in suspend prepare is better.
Change-Id: I69a0e7401c811e4a9656fcc8e3dd069f4317cc35
CRs-Fixed: 3213236
This reverts commit I08818517d05e7866d50e3f92cfdc9fa1a4d0e63f.
New solution idle shutdown in suspend prepare is better.
Change-Id: I76b1ef8e6f945bbcba3955ff625484ebee727670
CRs-Fixed: 3213236