Validate vdev and make sure its not null before try to get vdev ref
during runtime pm suspend/resume path.
Change-Id: Ieb9cb26703727edbc302447453000e1d33717343
CRs-Fixed: 2715161
vdev object is used without get ref in runtime pm enable/disable offloads
api, this can lead to vdev use after free issue. Add vdev ref get before
using it and avoid vdev use after free.
Change-Id: I309abdd568c858288150f575899101bda06e57a7
CRs-Fixed: 2710759
In pmo_core_psoc_bus_runtime_suspend, when handing pm suspend fail,
Don't call qdf_bug if fw is already down.
Change-Id: I4be872a27bbc100e85432e42a33ac329fad1dd24
CRs-Fixed: 2694416
Remove wowlan_deauth_enable and wowlan_disassoc_enable INI params as
these are unused
Change-Id: I90d10995365771359f1bcd029b9193437ad67a18
CRs-Fixed: 2678156
WLAN_FEATURE_NAN_DATAPATH is deprecated and the define is also
removed. But there is still some code(NDP wakelock event
configuration) which is guarded in this flag and it never gets
compiled. So replace WLAN_FEATURE_NAN_DATAPATH with overall
NAN feature define WLAN_FEATURE_NAN and move it to a separate
API.
Also, enhance log to print the complete 16-byte bitmap in hex
format.
Change-Id: I1ad51efc2b6a088022601686744802995fb7b4b7
CRs-Fixed: 2679286
In case of driver unload, there can be a race condition
since the timer for processing monitor status ring can run
in parallel to the unload time wow ack response handler,
which is also flushing all the monitor status ring entries.
To avoid this race condition, stop the monitor reap timer
as a part of target suspend, and process all the outstanding
entries in the monitor status ring.
This will make sure that the monitor status ring is
processed from only one context at any given time.
Change-Id: Iaff01b2d61ba53eb7ab442b2c1886ba8076a4a8b
CRs-Fixed: 2678973
gEnablePowerSaveOffload is confusing, so change it to
gAdvancedPowerSaveMode.
Value 0: Disable advanced power save
Value 1: Enable advanced power save
Change-Id: Ib5593ef31eedacdc232ffbad183974e2cd847e83
CRs-Fixed: 2676664
Currently there is no check for fw down during runtime suspend. This is
causing issue when host has already received fw down event due to
injected fw crash.
To avoid this, add check for fw down during runtime suspend.
Change-Id: Ic518f7fc95fa3ff9f9a3bd8973e9e37e9ebcf52f
CRs-Fixed: 2676841
Currently the bitmap of action frames that can wake up the host
is sent via the wmi command WMI_WOW_SET_ACTION_WAKE_UP_CMDID.
This bitmap doesn't include RVS action frames so currently the
host doesn't wake up for rvs action frames.
Enable wake up for rvs action frames during runtime.
Change-Id: I9fac8e74cdb7b529f858f7f2027906ca2b3083b3
CRs-Fixed: 2649927
The QDF framework for triggering self recovery is undergoing changes to
include support for multiple psoc driver. As the MCL host is still
multiple psoc agnostic, create dummy wrappers over the
cds_trigger_recovery so as to maintain compatibility with modified
qdf_trigger_self_recovery
Change-Id: I42163879c3e786a2b9ab2f9f5785be5531754e77
CRs-Fixed: 2617709
ARP/NS offload cannot be executed in NaN mode, but currently there is no
check on vdev for opmode so it is still trying to execute. Add an if
check for opmode of vdev and return QDF_STATUS_E_INVAL if in NaN mode.
Change-Id: I89accfef625c2a1eae944662acdff5d3fdd6ea9d
CRs-Fixed: 2630329
If resume and fw wakeup happens at the same time.
psoc_ctx->lock maybe doing bottom half operation for resume,
then wakeup interrupt comes on same cpu, the interrupt
handler will also acquire psoc_ctx->lock in
pmo_core_update_wow_initial_wake_up, which cause dead lock.
Using atomic for wow_initial_wake_up, so the interrupt handler
can avoid using spin_lock.
Change-Id: Id0e963a0924415e9660c57a1c1b776d3e609213d
CRs-Fixed: 2624899
Scan cmd still can be exist after scheduler thread is suspended
when host suspend, the scan cmd can't be removed from
serialization list by either complete or cancel any more since
both depends on scheduler thread, suspend thread blocked 30s to
wait scan cmd cleared.
Roam sync event from F/W can't be handled and Roam sync complete
can't be sent to F/W since scheduler thread suspended, then F/W
assert for roam sync cmd timeout.
After receive F/W down event, host will try SSR, but blocked by
unfinished suspend thread too.
Fix: suspend all components including scan before suspend
scheduler thread, make sure scan cmd is cleared and no new scan
is allowed any more before scheduler thread suspended.
Change-Id: I7a3badeedea018e4d92bbe8660692e42923852aa
CRs-Fixed: 2620650
In case of successful wow enable ack from FW for system
suspend call cdp wow ack response process, so that dp
layer will take care of required operations before system
goes to suspend.
Change-Id: Ibc5bf8d62aa055c9c8c7242c00abc3b696bb0051
CRs-Fixed: 2608980
arp_ns_offload and gtk offload command are being issued for NaN mode
vdev. NaN mode vdev does not support ARP_NS and GTK off load features,
so disable them when in NaN mode.
Change-Id: Iab11c92bb5da4004b62e642342a386f532832509
CRs-Fixed: 2608618
Add support to make event WMI_ROAM_PMKID_REQUEST_EVENTID as
wakable in FIPS case.
In FIPS Enabled case, for roaming Firmware sends PMKID request
to host as firmware is not supposed to do crypto functionality
with FIPS enabled.
Change-Id: I09b6b68f77ba75f9e5519ff18017c95d16771f52
CRs-Fixed: 2513790
This reverts commit I1adb8ead32a0d45a34f72590c33309b17d6c80c0.
Nan offload supported is now supported.
Change-Id: Ic99aa886c82dcf4d9c68f658080bd800117cce87
CRs-Fixed: 2600602
Currently cdp ops are given pdev/vdev/peer
handle as its arguments which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.
Hence as a part of cdp convergence, pass only
the pdev_id or vdev_id or peer mac address,
which will be used to get the respective handles,
and hence avoiding the unwanted access of the
handles if it has been deleted.
- txrx_data_tx_cb_set
- txrx_mgmt_tx_cb_set
- txrx_mgmt_send_ext
- txrx_pdev_attach_target
- txrx_pdev_detach
- txrx_vdev_attach
- txrx_vdev_register
- txrx_vdev_detach
- txrx_peer_create
- txrx_peer_delete
- txrx_peer_delete_sync
- txrx_fw_stats_get
- txrx_get_vdev_from_vdev_id
- txrx_pdev_set_ctrl_pdev
- txrx_pdev_attach
- txrx_get_vdev_mac_addr
- txrx_pdev_post_attach
- txrx_pdev_pre_detach
- txrx_get_ctrl_pdev_from_vdev
- txrx_get_mon_vdev_from_pdev
Change-Id: Ib8b0b1edd63e7c3f8813b11ca26b50ec121fe255
CRs-Fixed: 2541459
Currently the offloading of the NS and ARP to firmware is inefficient;
redundant caching is performed even if offload is not sent. This causes
wastage of resources and increases code complexity.
Introduce checks before caching and offload to ensure that the mentioned
inefficiencies are taken care of.
Change-Id: I6013810e1e08adb15c801f4fc21e1b50371bacda
CRs-Fixed: 2569763
Currently the cdp apis are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.
Hence as a part of cdp convergence, pass only
the pdev/vdev id or peer mac address, which will be
used to get the respective handles, and hence
avoiding the unwanted access of the handles if
it has been deleted.
Converged misc_ops
- tx_non_std
- get_opmode
- get_tx_ack_stats
- set_ibss_vdev_heart_beat_timer
- hl_tdls_flag_reset
- set_wisa_mode
- txrx_post_data_stall_event
- update_mac_id
- pkt_log_init
- pkt_log_con_service
- get_num_rx_contexts
- set_wmm_param
- flush_rx_frames
- bad_peer_txctl_set_setting
- bad_peer_txctl_update_threshold
- txrx_data_stall_cb_register
- txrx_data_stall_cb_deregister
- vdev_set_driver_del_ack_enable
- get_intra_bss_fwd_pkts_count
- mark_first_wakeup_packet
- register_pktdump_cb
- unregister_pktdump_cb
- pdev_reset_driver_del_ack
- runtime_suspend
- runtime_resume
CRs-Fixed: 2539735
Change-Id: I2baad09fde29d439ae2099e01e4e68ed6b94196d
Currently the cdp apis are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.
Hence as a part of cdp convergence, pass only
the pdev/vdev id or peer mac address, which will be
used to get the respective handles, and hence
avoiding the unwanted access of the handles if
it has been deleted.
Converged l_flowctl_ops
- register_tx_flow_control
- set_vdev_tx_desc_limit
- set_vdev_os_queue_status
- deregister_tx_flow_control_cb
- flow_control_cb
- get_tx_resource
- ll_set_tx_pause_q_depth
- vdev_flush
- vdev_pause
- vdev_unpause
CRs-Fixed: 2539748
Change-Id: I8ad4a20914c654b8e8aaf629dda7f673fdb110e4
In non concurrency scenario with TDLS Offchan link, FW is sending
two pauses namely PAUSE_TYPE_CHOP and PAUSE_TYPE_CHOP_TDLS_OFFCHAN
back to back when DUT dwells between TDLS Off channel and AP channel
respectively. HOST handles these events as vdev based event instead
of peer based event and remove all the tx queues from scheduler for
all the peer irrespective of the pause type. This will lead to data
stall in TDLS offchan scenarios, as at any point of time, host will
be receiving one of the two pauses and keep its peer queues out of
scheduler.
Changes are done to decouple the handling of pause/unpause events
for TDLS peers with Offchan enabled from vdev based pause/unpause.
TDLS peers will be paused/unpaused based on PAUSE_TYPE_CHOP_TDLS_OFFCHAN
pause type. Other pause/unpause events will be handled as usual.
Change-Id: Iccb46fd6d121d5df6d53633c9978ddc8e02f588f
CRs-Fixed: 2558612
Presently in the driver, we get the MSI interrupt to wake up from
suspend which directs the call to the both kernel and driver. In the
driver, the HIF callback target_initial_wakeup_cb registered, gets
called in interrupt context while that through the kernel get scheduled
in thread context. These two call can potentially get into a deadlock.
The scenario can be described as:
- MSI interrupt raised
- callback invoked from kernel -> takes spinlock on psoc->lock
- hif callback in interrupt context -> spins on the same psoc->lock
- deadlock
The problem arises due to the fact that both the kernel thread and the
interrupt handler are executing on the same CPU. This causes the
spinlock in the interrupt context to spin forever.
The solution to mitigate this scenario is to not take the reference
inside the hif callback pmo_core_psoc_handle_initial_wake_up. This
reference was put in place to prevent the wake up callback from getting
affected by psoc creation and deletion. But there seems no need for this
as creation and deletion of psoc happens outside the time-scope of the
wake up callback.
Change-Id: I566ab08802ba3f38e154d26599c73d718ec74bfb
CRs-Fixed: 2556497
In WPA3 roam hybrid model, the SAE exchange/4-way handshake is
offloaded to the wpa_supplicant. After roam candidate selection,
firmware will send WMI_ROAM_PREAUTH_START_EVENTID to send SAE
authentication frame with the selected candidate. If the host
is in suspended state, then SAE preauthentication could fail.
So wakeup the host when WMI_ROAM_PREAUTH_START_EVENTID event is
received to carry out the SAE authentication with the provided
candidate
Change-Id: I7a89234e90e7fccef58ec3822dc0cda3740bad20
CRs-Fixed: 2512871
Currently the bitmap of action frames that can wake up the host
during suspend is sent via the wmi command
WMI_WOW_SET_ACTION_WAKE_UP_CMDID. This bitmap doesn't include
RRM action frames so currently the host doesn't wake up for rrm
action frames when in suspend mode.
Selectively enable wake up for rrm action frames during runtime PM
alone. Don't enable host wake up during normal suspend as it will
consume more power.
Change-Id: I097596118c2888fc9ea24802e4dbe69d02c5c5f7
CRs-Fixed: 2507185
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
gEnablePowerSaveOffload is curretly set to 0 but the default recommended
value is 2. Change default value of gEnablePowerSaveOffload to 2.
Change-Id: I456b0947715be39756e2971a2b2cdcd40e527e4c
CRs-Fixed: 2498218
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
For runtime PM if the bus is suspended driver need to consider
extra 6 sec time for bus resume.
Thus add 6 sec extra in WMI timeouts if runtime PM is supported.
Change-Id: I5515cc889a0315382bac11a33ea6f901b7af1c46
CRs-Fixed: 2507029
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
As a part of the change I3cd617e52e86e2a890e35edb33b37ba3df8f4f6e
the max value of the ini gEnableDynamicDTIM was changed from 9 to 5.
This change causes regression where DUT is not entering in to DTIM9.
Restore back the max value of the ini to 9.
Change-Id: Ifea0c5199951a0dffc5cd116ec4c065f1563fe94
CRs-Fixed: 2489494
Currently, macro is used instead of destination size
to copy KEK pmo_gtk_req to kck and kek of
WMI_GTK_OFFLOAD_CMD_fixed_param.
Fix is to Copy KEK bytes from pmo_gtk_req same as the size of
cmd->kek i.e destination address to avoid macro change if size
of cmd->kck changes in future.
Change-Id: I06705f25682d950c35a3fb9bd0413ddf46e04ab4
CRs-Fixed: 2477212
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