As part of minidump enhancement feature, incorporate
wmi_command_tx_cmp_log_buffer data structure into the minidump.
Change-Id: I323971cc397b3ec710152c774462c85900acc603
CRs-Fixed: 2950790
Current in wmi_rx_diag_event_work, rx diag event is processing
in a while loop, if there is continuous diag event comes from
fw, it is possible that it occupy the work queue, and other work
are not able to run.
Break the while loop so give a chance to other work.
Change-Id: I7af6d60aeb8c0524cc51d663658d5b17349daa60
CRs-Fixed: 2948839
Firmware generates wmi Rx diag events every few milliseconds,
and processing the same in system shared work queue may lead to
work queue lock-up detection. Hence, move Rx diag event processing
to dedicated work queue.
Change-Id: I10cdde317794e35bc6d10677ab76ea24a66e1880
CRs-Fixed: 2941409
When unregistering wmi handlers, the position of the
old handler is replaced with the last handler in the table.
But at this stage only handler was getting replaced, but
not the context. Hence, make sure to update the context
as well.
Change-Id: If90ea9d7663fb105e8e8ad7d7e6c70da20264e44
DHCP packet is received in the IPA exception path when
system is suspending. As part of DHCP packet processing,
WMI_PEER_SET_PARAM_CMDID is sent to FW after WOW is
enabled resulting in self recovery getting triggered by
host.
Fix is to do an explicit system wakeup if a WMI command
has to be sent post WOW enablement.
Change-Id: If1904a4fe5c861deed1b35071be10cb8cc8d6407
CRs-Fixed: 2890913
For QMI events qdf_nbuf_set_pktlen is invoked twice. Once in
wmi_buf_alloc and again in __wmi_process_qmi_fw_event. Remove
this duplicate set packet length.
Change-Id: I06c7e077fb1d554215a5ebc52f9d69a333a25a84
CRs-Fixed: 2859036
Currently, Host driver assumes WMI_MIN_HEAD_ROOM is part of WMI
messages and Validations are done accordingly. But this
WMI_MIN_HEAD_ROOM is not considered in the firmware. Because of
this host may drop valid events.
To avoid this, Don't consider WMI_MIN_HEAD_ROOM while validating WMI
msg length.
Change-Id: I5f1fe12cfae570e636defb8a4a46ec154f988195
CRs-Fixed: 2844982
Currently, Stats request commands are sent over qmi right from the
target suspend request is sent to FW. This is leading to a crash in
FW since it is trying to access PCI when it is in suspend state.
To address this, send stats request over QMI only after the ack is
received for the target suspend command.
Change-Id: Id7a79d52740916f66476bf911e571c0ff466c7d3
CRs-Fixed: 2838737
Introduce wmi_validate_handle() with the caller function name
embedded in it to validate the WMI handle and log incase
of error. Calling functions can avoid logging in case
wmi_validate_handle() returns -EINVAL. This reduces logging and
thereby memory foot print.
Change-Id: Ie0a6a84ffad6e5cf2da8f547c7209dc77cdf5729
CRs-Fixed: 2838960
Currently, Rx diag event work is not being flushed during idle shutdown.
This may result in use after free access if the scheduled diag event work
gets the chance to execute after driver modules are closed.
To address this, flush diag events work during idle shutdown.
Change-Id: I348e80d2c86a5e070f0fb67d66b758529fede76c
CRs-Fixed: 2838020
Currently QMI message length is not being validated before
handling QMI event. This is resulting in illegal memory access
when QMI message length is invalid.
To address this, discard QMI events with invalid length.
Change-Id: Ia9f04bcb4fa3b365cbbf2be8885a8d30f78f8f10
CRs-Fixed: 2839277
FW diag events will be dropped when number FW diag events pending for
processing is reached to configured RX_DIAG_WQ_MAX_SIZE value. Add a
log when these diag events a getting dropped for debugging purpose.
Change-Id: Ifc303991bdf274fa7426794eaf71517722e9f386
CRs-Fixed: 2824458
Currently, FW diag logs, management frames and stats responses are
processed in worker context. Because of this, there is a possible
out of memory scenario when there are huge number of diag events
waiting in work queue.
To address this, process diag events in a separate worker thread and
set the limit for the number of diag events that can be queued in
work queue.
Change-Id: Ie6e5b905a3b591cf724cd6b024bec0612f9e2e0c
CRs-Fixed: 2818013
Skip wmi sequence check during SOC stop and enable after
initializing wmi handle. It is required to skip sequence check
during soc stop as the endpoint flush is preceding CE flush.
CRs-Fixed: 2813341
Change-Id: Ieb821483e9786471d033773dc2365ab456345f83
For QMI events, recevid QMI event length is used to allocate wmi buffer
using wmi_buf_alloc. The received QMI event length includes WMI head
room and wmi_buf_alloc also try to reserve WMI head room again.
Because of this, WMI buffer allocation is exceeding max WMI msg length.
To resolve this, use length of the received actual WMI msg to allocate
WMI event buffer using wmi_buf_alloc.
Change-Id: Icd259988c4b1091580a35aaf2c3fabc606e0f2a9
CRs-Fixed: 2786326
Reset the WMI sequence counter after FW recovery to avoid
false assert due to CE pending packets freed in htc layer
instead of WMI completion handler.
CRs-Fixed: 2787424
Change-Id: I109ff56655e5fb428aca637e6420efed5943b3f7
Add WMI command buffer address information(DMA/Physical addr) to
the WMI TX completion logging. This will help in debugging issues
when HW DMAs copies data from a different location than the one
configured.
Change-Id: I60586b865a97e7ff88e48606806ec151321ff0aa
CRs-Fixed: 2789492
Log WMI work queue call stack when WD timer expires to assist
in debugging on non slub debug enabled builds.
Change-Id: Id3dd575700ca586b0738a88ca2af88a757238d1b
CRs-Fixed: 2789114
This records all the WMI events and commands, for all
PDEVs. Set WMI_EXT_DBG flag to enable this feature. Refer
Original Change-Id: I18e46f683e35912cad717ca3b9cc3d1885315362
Change-Id: I4c9bdfe6fdd195656ca0c01ca400eba595be24a3
CRs-Fixed: 2762266
Add sequence number to each packet queued on wmi pipe and
match it against expected sequence number in wmi completion handler.
WMI packets are consumed internally, use the skb mark field to capture
the sequence number of the wmi packet.
Change-Id: I1421e3fcff0a2b326f6d899780c773950544ef26
CRs-Fixed: 2741465
Make each WMI debug log buffer size configurable through
compile time config option. Now memory constraint platforms
can use these config options. Use default values if no
values are configured.
Change-Id: Ibc924e12a56ae7d529aea91e55bcc0bbce72ac7e
CRs-Fixed: 2741465
Support WHUNT FW simulation feature.
Records all the WMI events and commands, for all PDEVs.
Set WMI_EXT_DBG flag to enable this.
Change-Id: I18e46f683e35912cad717ca3b9cc3d1885315362
CRs-Fixed: 2762266
To send received raw event buffer to event handler
Send without processed buffer to registered event with buffer
type WMI_RX_RAW_BUFF
Change-Id: I2a401e2e7afbfd8f32d4bd521d184ed9ddcdb264
Currently, stats over QMI features can only be disabled over build flags,
which is not flexible. Hence, add a CFG ini item to enable/disable stats
over QMI.
Change-Id: If5d57d2fc781fecc8817c2da8f61a2f7977d9c77
CRs-Fixed: 2752310
WMI commands are logged in hex in FW and hence log WMI CMD ID
in hex when stats request is send over QMI to assist in debugging.
Change-Id: I9ce63db30b491f26b9d6ac7ae3c98e6177452d7c
CRs-Fixed: 2733208
Remove panic when tlv doesn't matching attributes, the following commit
takes away a chance to pass invalid values tlv to test the the wmi event
hence reverting commit ca24670e56.
Change-Id: Iafff2067288c8a6fafa016f21b1d7fdfdcb0753e
CRs-Fixed: 2706245
Whenever a wmi even it received the tlv received from the firmware
will be sanitized, if there is any error the event would be dropped.
This dropping of the event can give side effects in the host/firmware
after some time and making it difficult to find the actual reason of
why the tlv is not received properly.
Crash the system if the tlv is not parsed correctly to debug the issues.
Change-Id: Ic56e3f96252ac74917caeebc8296c2b50ae4f3cd
CRs-Fixed: 2695053
Update return type of wmi_discard_fw_event to return QDF_STATUS
to match scheduler_msg_process_fn_t.
Change-Id: Iba2d41c4bab2bfd5fb163d82fca6c6b895e5a2a4
CRs-fixed: 2699644
Somtimes F/W event WMI_REG_CHAN_LIST_CC_EVENTID comes for country
code changed before WMI_READY_EVENTID processed completely in
worker thread, to update current channel list,
hdd_regulatory_dyn_cbk is invoked in scheduler thread and wiphy
is extracted from pdev which isn't attached to pdev yet, assert
will happen.
WMI_READY_EVENTID and WMI_REG_CHAN_LIST_CC_EVENTID
should be serialized, both of them should be handled in same
context, such as worker thread.
Set WMI_REG_CHAN_LIST_CC_EVENTID execution context same as
WMI_READY_EVENTID: WMI_RX_WORK_CTX.
Host F/W handshake during init:
Host <- FW WMI_SERVICE_READY_EVENTID
Host <- FW WMI_SERVICE_READY_EXT_EVENTID
Host -> FW WMI_INIT_CMDID
Host <- FW WMI_REG_CHAN_LIST_CC_EVENTID
Host -> FW WMI_SET_CURRENT_COUNTRY_CMDID
Host <- FW WMI_READY_EVENTID
Host <- FW WMI_REG_CHAN_LIST_CC_EVENTID
Change-Id: I922e5f2a9722e9b441cc844dd38b1039dd4d8900
CRs-Fixed: 2689274
The stale value of this field blocks driver from sending
FW_HANG wmi messages to target after recovery
Change-Id: Ib44388c5c95c2574c96117b77fdabda26f5890bd
Crash happens if wma_handle->link_stats_results is allocated and
freed by two threads at the same time.
WMI event should be handled uniformly whether it is from htc or qmi
Change-Id: I415fd228d15c1342944e77a74e564fe46dd9a5c5
CRs-Fixed: 2648865
whenever there is a wmi timeout and recovery is triggered, the
wmi history gives insight into reason for the recovery, hence save
the last 5 commands/events to understand the reason for the hang
recovery.
Change-Id: Ie4e0431a8fa6971e6b25b20a6f267341d3f3f4fd
CRs-Fixed: 2650340
To undergo self recovery, the driver uses qdf_trigger_self_recovery to
initiate the sequence. Currently, this framework is valid for only a
single psoc driver.
Extend this framework to include support for multiple psoc driver by
providing the psoc on which the recovery has to be undertaken.
Change-Id: I782b505c03819223a914dabe7673b369aa175b7c
CRs-Fixed: 2617707
1)Configurable number of bytes to log
2)Add support to record only specific WMI command/events
Separate buffers are added to save user specified WMI commands and events
1.To record specific wmi cmd, e.g. WMI_VDEV_START_REQUEST_CMDID
echo 0x5003 > /sys/kernel/debug/WMI_SOC0_PDEV0/filtered_wmi_cmds
2.To record specific wmi evt, e.g. WMI_MGMT_RX_EVENTID
echo 0x7001 > /sys/kernel/debug/WMI_SOC0_PDEV0/filtered_wmi_evts
Results of recorded specific WMI command/events:
1. WMI commands, e.g.:
cat /sys/kernel/debug/WMI_SOC0_PDEV0/wmi_filtered_command_log
2. WMI events, e.g.:
cat /sys/kernel/debug/WMI_SOC0_PDEV0/wmi_filtered_event_log
CRs-Fixed: 2597854
Change-Id: I1e90a13ac0717f1f37ba998fb1d06a990d3f4fa2
Currently while printing commnad information new
line is added which needs to be removed.
Change-Id: I639508a9a14db173f8d61d7a55c4ec99db4f1a1f
CRs-Fixed: 2618863
Clear console log boot up error prints by removing unnecessary
prints, modifying prints to appropriate info or debug and
by fixing the errors
Change-Id: Ica3f126280399eef59b894236849e2079a62565f
CRs-Fixed: 2597026