提交图

109 次代码提交

作者 SHA1 备注 提交日期
Debasis Das
eaf8a8bd28 qcacmn: Fix Integer Overflow Leading to Buffer Overflow
wmi_buf_alloc() API expects length to be passed of type
uint16_t. However, the callers pass uint32_t to it.
This might result in overflow and illegal memory access
thereafter. The fix is to modify the API signature accordingly.

Change-Id: If09da4978d421269b884f7d3c933c49c81651475
CRs-Fixed: 2218346
2018-06-20 06:33:47 -07:00
Vignesh Viswanathan
737cef775f qcacmn: Fix Uninitialized byte sent to FW in wmi_unified_cmd_send
In wmi_unified_cmd_send, the skb head is pushed by size of WMI_CMD_HDR
and then the commandId is initialized in the header. However 1 byte of
reserved memory in the WMI_CMD_HDR is not initialized and is sent to
the FW as it is and this might lead to exposure of 1 byte of kernel
memory to FW.

Initialize the WMI_CMD_HDR to zero once the skb head is pushed and
then set the commandId in the header.

Change-Id: I89fd5401105cd9c61674a63aac5aa88fb20cc41a
CRs-Fixed: 2257688
2018-06-18 16:33:57 -07:00
Jeff Johnson
03ba7db97a qcacmn: wmi: Remove legacy markings
Per current guidance remove legacy markings.

Change-Id: Ic86284ff527bb55b681149e38f5c708edda5ce8b
CRs-Fixed: 2230684
2018-05-18 02:17:53 -07:00
Abhiram Jogadenu
429ab53de2 qcacmn: Check to validate wmi tartget_type
This target type is used as an array index for wmi_attach_register.
If the index is greater than or equal to  WMI_MAX_TARGET_TYPE,
it may lead to invalid memory access.
KW issue id is 294041

Change-Id: Ibb49d77413517173c24aae44ae5a3f17069425d2
2018-05-14 06:04:51 -07:00
Kabilan Kannan
66084ce918 qcacmn: Block WMI cmds before issuing HTC stop
WMI cmds should be blocked, before calling HTC stop
to avoid the race condition in the system

Change-Id: I015b154a3bc422f50d4ed82bc861dd9e054c47a3
CRs-Fixed: 2194234
2018-04-16 16:57:01 -07:00
Shiva Krishna Pittala
792933748b qcacmn: Fix the limitations in enabling memory debug on WIN
Copy the file name to a QDF local array, rather than using
the pointer to file name, to avoid access to the invalid pointer.
Also, separate out SKB debug from memory debug.
SKB debug will be enabled once the SKB related false positives are fixed.

CRs-Fixed: 2216661
Change-Id: I0ada1acb84c24c961cf614c9c47261f272959874
2018-04-11 09:15:20 -07:00
Kabilan Kannan
f1311ecc8d qcacmn: Add magic string for debug enhancement
Add magic string in the driver to automate the
stability analysis.

Change-Id: Ic4989d70827bbb680de428f8065e2fff6ea8ad2f
CRs-Fixed: 2212155
2018-04-02 19:39:42 -07:00
Vivek
c582309f9a qcacmn: Replace A_UINT with appropriate types
There are instances of use of older A_UINT/A_INT.
Replace all such instances with the qdf u_int*_t/int*_t.

Change-Id: I7ce29b03f29a0d1a0cf87cfd3c846f4694da4c2a
CR's-Fixed: 2210869
2018-03-26 04:58:12 -07:00
Chaithanya Garrepalli
6327e8ad49 qcacmn: Send max commands as param to wmi_unified_attach
Modify arguments of wmi_unified_attach to use struct to
send attach params instead of individual params. Add max
WMI commands as a param. Based on requirement MAX WMI
commands value is different. In case of AP that supports
16 VAPs and more than 512 clients, 1024 commands is not
enough. Use this param to configure this value based on
the requirement.

Change-Id: I4e778475481e509051dfbac70980614b644e1b4a
CRs-fixed: 2034438
2018-03-15 04:26:08 -07:00
Pratik Gandhi
cf3b8b97c7 qcacmn: Fix compilation issues for FW header abstraction
fwhdr_abstrct: Fix compilation issues for WIN firmware header abstraction.

Change-Id: Id76a6f29fd41ae559cf377029428224d59bd03fb
CRs-Fixed: 2140921
2018-03-09 07:28:50 -08:00
Rachit Kankane
799d2c9655 qcacmn: Compile out WMI logging feature
Fix to compile cleanly when WMI_INTERFACE_EVENT_LOGGING
feature is disabled.

Change-Id: I1c7d687e685b8b2dcdb35667c425afc3d09c73da
CRs-Fixed: 2192125
2018-03-06 23:45:19 -08:00
Arunk Khandavalli
b6ba21fef9 qcacmn: Increase the wmi watchdog timeout to 30sec
Under low memory conditions skb allocation sleeps
and results in kernel work queue watchdog.

Increase the wmi timeout to check if the system
recovers to allocate the SKB.

Change-Id: Ie4e42fdc71703c687ba2e5a4d995481ea7931c97
CRs-Fixed: 2158198
2018-02-27 16:04:41 -08:00
Pratik Gandhi
67da1bb4af qcacmn: WMI registration change to support to WIN modularization
Change WMI initialization sequence to support WMI modularization.
TLV and Non-TLV modules calls WMI module registration based on target type.
WMI attach will call respective attach routines based on registration.

Change-Id: Id56446f491d129758537913d2d5d6633f8dec918
CRs-Fixed: 2179854
2018-02-07 12:12:05 -08:00
Kris Muthusamy
76e2241d3b qcacmn: Fix host panic due to missing WMI service handles
WMI service handle is not attached for all Pdev with recent
WMI changes. Fix host panic due to missing WMI service handles
for all Pdev.

Change-Id: Ic6107120ea4a49e49b86ebbfe385e440de3f49a9
2018-02-02 07:46:00 -08:00
Sourav Mohapatra
a7b454df56 qcacmn: Converge on wmi service/ext service is enable
Converge on wmi service/ext service is enable

Change-Id: Ib246befa72cce927bee157394cd22c7d1562d341
CRs-Fixed: 2152751
2018-01-24 13:19:48 -08:00
jiad
36c94d2d50 qcacmn: Fix WMI mgmt cmd tx comp record
wmi_mgmt_cmd_record is used to add WMI mgmt cmd record. But mgmt
cmd tx comp record is missing due to mismatch of is_management_record.
Fix is to change is_management_record WMI cmd id to match those who
call wmi_mgmt_cmd_record. In wmi_unified_cmd_send, mgmt cmd record
add is no longer needed since already added in wmi_mgmt_cmd_record.

Change-Id: I41daf428ac0848dabaf4d87e3ecb7dca5e1c2774
CRs-Fixed: 2168104
2018-01-24 01:43:33 -08:00
Adil Saeed Musthafa
b85851dac4 Revert "qcacmn: Add debug print before calling WMI event handler"
This reverts change-id: Ie1b758a17882743fa4871b6ce4725c986769b01b

CRs-Fixed: 2155931
Change-Id: I54e0e1b2af868bc22da59410af405e970fe5678e
2018-01-15 13:25:18 -08:00
nobelj
2a6da6fb08 qcacmn: Add support to print time on event log and command log
print event time and command time along event/command logging

Change-Id: I4562f76d4d15f9c42080795007af94422c14e33c
2018-01-13 21:31:13 -08:00
Rakesh Pillai
24c7f8acad qcacmn: Fix wmi debugfs creation after interface creation timeout
After driver init, if not interface is created and the stop modules
gets called, the wmi debugfs dir is removed. After this it is not
created again during start modules. Due to this the wmi debugfs will
be unavailable after this.

Fix the wmi debugfs entry creation when interface creation timeout
happens after driver init.

CRs-Fixed: 2164039
Change-Id: Ib1a9c655b5144b11d506a09268918b63f82adcc0
2018-01-11 03:48:48 -08:00
Rakesh Pillai
0511046ae5 qcacmn: Unify the wmi command and event record offset
The wmi data buffer offset passed to record command and event
buffer uses different offset and type for command and event.

Change the recorded wmi data buffer type to uin8_t pointer
for both, wmi command and wmi event record.

CRs-Fixed: 2164395
Change-Id: Ie759248a6a32632dd93f751a856a0588d9a11c25
2018-01-11 03:48:45 -08:00
Surabhi Vishnoi
209f7d4ade qcacmn: Change the data type of message type id
The datatype of wd_msg_type_id was uint16_t which truncates the
upper bytes of msg id.

Changing the datatype of wd_msg_type_id from uint16_t to uint32_t.

Change-Id: I49b5eefd878660f6ba3d0b7da451df99661c59df
2017-12-16 14:08:06 -08:00
Govind Singh
c646e102cf qcacmn: Dump WMI work queue stack for watchdog bite
In the event of an WMI work queue watchdog bite, dump the stack
trace to aid in debugging.

Change-Id: I7f3df5a56904748fb80afb1aef1aed90d20fbbc0
CRs-Fixed: 2145913
2017-12-15 19:26:25 -08:00
Mukul Sharma
2c66f7e844 qcacmn: Converge on wmi event registration / unregistration
Converge on wmi event registration / unregistration method.

Change-Id: If03a38d74a47cc1d900bc5734a7c8f950513efaa
CRs-Fixed: 2148479
2017-11-30 03:40:33 -08:00
Houston Hoffman
c85276b73a qcacmn: Allways do WMI_RX_EVENT_RECORD when wmi event recieved
Receipt of the wmi events wasn't being recoreded when the event
was being processed in the mc thread or tasklet.  Log the receipt
in all cases to root-cause unprocessed wmi events faster.

Change-Id: I2543a9ff9049e7d177c1ffa5df1e899035860f91
CRs-Fixed: 2125232
2017-10-24 19:19:12 -07:00
Ashish Kumar Dhanotiya
4f873ffc59 qcacmn: Remove wmi_id_to_name from wmi_unified.c
Remove wmi_id_to_name from wmi_unified.c as this
function is define in fw_api project.

Change-Id: I4b7d83ed79fe9a5d3a867149972a9ccb1e2f34c8
CRs-Fixed: 2002773
2017-10-24 15:38:22 -07:00
Govind Singh
97b8e7c606 qcacmn: Add watchdog timer for WMI work queue lock-up
WMI work queue rx context can block other work queue
shared on the same CPU if it takes more time.

Add watchdog timer for WMI work queue housekeeping and
assert if takes more time in SLUB DEBUG build

Change-Id: I60b1dad21afbf93a5b88aa855a2835bb0f85b82f
CRs-Fixed: 2104106
2017-09-28 01:57:28 -07:00
Kiran Venkatappa
7d73914da9 qcacmn: Add support of extended service bitmap handling
Extended service bitmap is used by FW to indicate supported services
bitmap for services excedding the current limitation of 128. Add support
to save and use this bitmap to check services supported in FW. Also,
change exisiting services bitmap to be dynamic allocated buffer to
optimize the buffer used to save the bitmap.

Change-Id: I24a0321bc1a06ee3aedf1c6acbc379e907bbd464
CRs-Fixed: 2103617
2017-09-23 10:32:47 -07:00
Ravi Kumar Bokka
7aec5b5e9b qcacmn: Add ini param to control the crash inject
qcacld-2.0 to qcacmn propagation

Currently the crash can be injected by iwpriv command and FW
gets crashed.
Changes are done to add the gEnableCrashInject ini parameter

1) This ini param is disabled by default.
2) If this param is disabled the crash inject is ignored.

Change-Id: I7e908be1e37090a9d343dc04411fe387f776a937
CRs-Fixed: 1087774
2017-09-19 02:28:14 -07:00
yeshwanth sriram guntuka
0a050d77c1 qcacmn: Fix excessive logging
kmsg is flooded with excessive logs from wmi_control_rx.

Fix is to change log level to debug.

Change-Id: I327463387a5dac318ecc0ad7e773006cfc09b42a
CRs-Fixed: 2073718
2017-08-10 04:25:49 -07:00
Adil Saeed Musthafa
5ffc0c21d3 qcacmn: Add debug print before calling WMI event handler
Print the Event ID before calling WMI event handler

CRs-Fixed: 2086665
Change-Id: Ie1b758a17882743fa4871b6ce4725c986769b01b
2017-08-09 16:07:47 -07:00
Govind Singh
2d8bfc63c4 qcacmn: Remove redundant header file inclusion from wmi layer
Remove redundant header file inclusion from wmi layer by abstracting
the dependency with in WMI layer.

Change-Id: Ie113b69006a960b70d781134775bc44c7508fc4c
CRs-Fixed: 2023825
2017-07-26 08:14:52 -07:00
Wu Gao
21e6938191 qcacmn: Free events logs list of wmi handle
Free events logs list of wmi handle, avoid memory leak.

Change-Id: I7660239f3808ebf0f56baf5900c1290218507406
CRs-Fixed: 2062407
2017-07-21 20:15:16 -07:00
Srinivas Girigowda
245fa9e277 qcacmn: WMI: Reduce the log spam in kmsg
Move the logs to appropriate log levels to reduce
the log spam in kmsg.

Change-Id: Icc2d55626908b6e6448567b259af106e3314827e
CRs-Fixed: 2017427
2017-07-12 20:12:51 -07:00
Adil Saeed Musthafa
4f2c98f10d qcacmn: Add verbose print in wmi_register_event_handler
Add verbose information print in register_event_handler

CRs-Fixed: 2071681
Change-Id: Icf2a81b71a97a0d01a9771ad998f96b5d10f6cb6
2017-07-06 17:50:27 -07:00
Rakesh Pillai
943a6c1163 qcacmn: Fix CLANG warnings in Data path
implicit conversion from enumeration type 'A_STATUS' to different enumeration type 'QDF_STATUS'
implicit conversion from enumeration type 'QDF_STATUS' to different enumeration type 'A_STATUS'

CRs-Fixed: 2063344
Change-Id: Id3613d0b7fca58c3d94c5af59838b0bff3ef26de
2017-06-30 22:50:37 -07:00
Kiran Venkatappa
ea88a4e9c1 qcacmn: Refactor wmi_unified_get_pdev_handle for target stop/start
Target stop and (re)start will free htc_handle and re-negotiate endpoint
ids. Change wmi_unified_get_pdev_handle to update htc_handle and
endpoint data in wmi_handle to reflect latest values.

Change-Id: I2385a73bd1d61a6f36db8bdaca4a22115f6bf68c
CRs-Fixed: 2062439
2017-06-20 14:06:35 -07:00
Kiran Venkatappa
1241bb8f85 qcacmn: Changes to support pdev_id in host from zero
pdev_id in FW starts from one. Zero is reserved for Soc. But host uses
pdev_id starting from zero. Make WMI changes to take care of this
difference and always provide and accept pdev_id starting from zero at
WMI. Use 0xFF for SoC on host.

Change-Id: I49f481e54bbaeea9359753bc7d3da9092fc9559a
CRs-Fixed: 2045125
2017-05-22 17:05:25 -07:00
Kiran Kumar Lokere
daf91e333c qcacmn: Add support to send new country to FW
Add support to set new country code to the FW

Change-Id: Id24967b7c9e93bfbf045f494f142be9e33e16483
CRs-Fixed: 2042879
2017-05-18 13:42:21 -07:00
Pratik Gandhi
795ab91e23 qcacmn: Fix for read and write operations in wmi_recording
With linux4.4 definition of seq_printf is changed. New definition
updated in driver applies va_start twice which causes incorrect
output hence definition is updated to make sure va_start is applied
only once. For write operations using copy_from_user to avoid
crash due to accessing user space area.

CRs-Fixed: 2042210
IRs-Fixed: 201729
Change-Id: I4043ab027411d42e15adaf53e6e92ae57aa987c7
2017-05-18 12:00:21 -07:00
Manikandan Mohan
f940db87e4 qcacmn: Fix kernel module check patch warnings
Fix kernel module check patch warnings in Host Target Communication
module files

Change-Id: I151f597142d93a26e5e037cf7fce944f86fba72a
CRs-fixed: 2033001
2017-05-02 13:29:31 -07:00
Govind Singh
54c6d12d7a qcacmn: Remove ol_defines dependency from WMI layer
ol_defines header inclusion is invalid in WMI layer.
Remove the header inclusion by abstracting the dependency
with in WMI layer.

Change-Id: I5eb8624605cde20b516a1d8d0c823996c363e119
CRs-Fixed: 2023821
2017-04-28 07:42:08 -07:00
Dustin Brown
8ea3912180 qcacmn: Create qdf_log_timestamp_to_secs helper function
Create a timestamp conversion helper that returns whole seconds and
remaining micro seconds, for easier consumption by logging methods.

Change-Id: I5bc40075566485f3dc9f7e5fd81a13ec462c5da0
CRs-Fixed: 2031564
2017-04-13 21:31:10 -07:00
Rajeev Kumar
2ec8d473b6 qcacmn: Migrate WMI from shared work queue to dedicated work queue
WMI RX event processing is very critical for WLAN driver and today
we are using kernel's shared event work queue. Shared event work
queue is used by many drivers and if any work submitted in shared
work queue takes longer time to finish then it directly impacts WLAN
control path processing.

Define a dedicated work queue for WMI RX event processing and use
it for WMI RX event handling.

Change-Id: I8ee6ca5b4b20c3357d46f8b56943078a0a76977f
CRs-Fixed: 2029775
2017-04-11 11:04:40 -07:00
Dustin Brown
f24bf9b6f7 qcacmn: Implement WMI/Credit History log print APIs
Create output agnostic log print APIs for WMI and Credit History to
enhance the debugging experience.

Change-Id: Ie89a9cb3b54c373ac2610d62003e940da17696d8
CRs-Fixed: 2028762
2017-04-11 11:04:24 -07:00
Soumya Bhat
8eb0b93613 qcacmn: Add new WMI API to unregister event handler
Add new API to unregister event handler to allow
converged components to move to common eventid space.

Change-Id: I97f096ff3e36bc7923718498c535fb6c3c50e7e7
CRs-Fixed: 2023157
2017-03-29 16:06:01 -07:00
Soumya Bhat
488092da56 qcacmn: Add new WMI API
Add new API to allow components to move to common eventid space.

Change-Id: Ieab2019a0fb96817833266236073cffb3aaeab2c
CRs-Fixed: 2023157
2017-03-24 06:21:06 -07:00
Kiran Venkatappa
f285aba0b4 qcacmn: Move max_event_idx and ctx_lock to wmi_soc
WMI event handlers are maintained in soc level WMI structure. Move
corresponding event_idx and ctx lock to soc level structure.

Change-Id: Ib78d26279028a8cf12f59446ae6139e3dfd1f875
2017-03-21 22:01:29 -07:00
Kiran Venkatappa
5bffce58f1 qcacmn: Support per mac CE for WMI commands
Firmware requires WMI commands to be sent on different copy engine for
each MAC. Add support in WMI to use different endpoints for each pdev.

Change-Id: Ie0dfe71043275ac694362f88b625219f089b5303
CRs-Fixed: 2005214
2017-02-22 11:13:18 -08:00
Mukul Sharma
f8a1708f41 qcacmn: Add WMI reference in PSOC and PSoc reference in WMI
Add WMI reference in PSOC and PSoc reference in WMI.

Change-Id: I6841bec1748447c6c98a81417365cf6e8d228b54
CRs-Fixed: 2002025
2017-02-08 04:43:36 -08:00
Pratik Gandhi
dad75ffbce qcacmn: Fix for write operations in wmi_recording
Change incorrect extraction of wmi_handle from file handler
reference during write operations, performed on debugfs files
in wmi_recording/wmi logging.

IR-Fixed: 189093
CRs-Fixed: 1111722

Change-Id: I0603efe8f8e2530950f845f9ef9419b6784c626f
2017-01-16 12:57:32 -08:00