Commit Graph

62 Commits

Author SHA1 Message Date
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
Sarada Prasanna Garnayak
17b9e9ed33 qcacmn: Runtime PM packets tagging after wow suspend
qcacld-2.0 to qcacmn propagation.

Don't Tag Non-WoW packets as Runtime PM packets after
wow suspend. Some WMI Commands can be send in Runtime
PM context and MC thread context. Packets coming via
MC Thread Context can be tagged as Runtime PM packets
when runtime pm in progress.

Packets should be tagged in the same caller context to
avoid any race condition. Being stability issue, addressing
this issue by not tagging any non-wow commands as runtime pm
after wow suspend. This will ensure all the non-wow packets
coming after wow_suspend flag is set as non runtime pm packets
and will trigger a runtime resume.

Git-commit: 4a396d80c5cc2ded75098c61426521b9b2762c17
Git-commit: 2ee4bf4791cc5db30ec03eceaf591367deffe39a

CRs-Fixed: 1106496
Change-Id: I4e55733ad8403581aca0b49ce9442fc5591335c0
2017-01-12 05:26:11 -08:00
Paul Zhang
d19abd8880 qcacmn: Drop Action frame in FW config by host
Propagation from qcacld-2.0 to qcacmn.

Several Action frame categories are not processed in host and they
are not forwarded to supplicant either, but they are dropped in host.
These unprocessed action frames are forwarded to host by FW and
wake up host unnecessarily which leads to battery drain. With this fix,
host conveys FW the disallowed action frames list at HDD startup
so that the remaining frames can be dropped in FW itself thereafter
when under WoW mode.

Change-Id: I40b49d42df94085784c8f1d8321de0ee61473ae0
CRs-Fixed: 999114
2017-01-04 18:09:31 -08:00
Nishank Aggarwal
e6994d201d qcacmn: CL 1683879 - update fw common interface files
WMI message to allow Specific Absorbtion Rate / tx power
limits to be set per band, chain, or modulation class.

Change-Id: Iece786a4e731462fd282e3eb3107541338a3af30
CRs-Fixed: 865207
2016-12-27 23:33:28 -08:00
Sandeep Puligilla
abcd0f532e qcacmn: CL 1685950 - update fw common interface files
WMI defs for DFS offload

Change-Id: Ief6ea8771ec130a94f19c7296930534364bdd2fb
CRs-Fixed: 865207
2016-12-27 23:33:26 -08:00
Kiran Venkatappa
23e6e08b32 qcacmn: Fix implicit declaration error for TLV helper APIs
Include TLV helper header file to fix implict function decration warning
treated as error. These APIs are required only for TLV target, hence
put it under TLV compilation flag.

Change-Id: I50f3629b3f69c3cdb46e2384e47d2559c803cd4c
CRs-Fixed: 1090087
2016-11-23 23:14:29 -08:00
Jeff Johnson
9366d7a6cb qcacmn: Fix -Wmissing-prototypes in WMI
We want to enable the compiler's -Wmissing-prototypes switch, but
there is existing code that is generating warnings. Fix all warnings
in wmi.

Change-Id: I2452ffa4e9fa1de8a7bd75d04dd4a0f94d7cf55c
CRs-Fixed: 1093298
2016-11-23 14:44:54 -08:00
Dustin Brown
4103e4a36e qcacmn: Fix use-after-freed when sending WMI command to FW
Using a buffer after passing it to wmi_unified_cmd_send() induces a
race condition that may result in a use-after-freed situation. Fix
several potential use-after-freed situations when calling
wmi_unified_cmd_send() by ensuring all access to a buffer is done
before the call to wmi_unified_cmd_send().

Change-Id: I985aad6e49daf1d823e3751a9cb0a293a298323c
CRs-Fixed: 1089713
2016-11-16 01:59:30 -08:00
Mukul Sharma
7da24ca532 qcacmn: Change WMI command limit to 256 from 1024
qcacld-2.0 to qcacmn propagation

To debug the fwr stuck issue as early as possibile,
reduce the wmi max pending command threshold to 256
from 1024.

Change-Id: Ic3cbe26cca979dcaa68fca03e6fe1af397cf0c4f
CRs-FIXED: 1080761
2016-11-08 02:36:59 -08:00
Govind Singh
82ea32676c qcacmn: Clear WMI cmd buffer after TX completion
WMI command buffer is not cleared after WMI command TX completion.
For DISA certification TK and GTK should not remain in the memory
area after disconnection. Since WMI command buffer is not cleared,
hence content of TK and GTK is still in host memory region.
Clear WMI cmd buffer after TX completion.

Propagation from qcacld-2.0 to qcacmn.

Change-Id: Ib09a77b630c932409645b7a989bd959f0ed4f514
CRs-Fixed: 1060982
2016-10-27 05:48:35 -07:00
Sarada Prasanna Garnayak
f1cf0a6137 qcacmn: Log Transport Layer Tag for debugging purposes
Log Transport Layer Tag for debugging. The tag differs for
normal command and the runtime pm commands.

CRs-Fixed: 1072520
Change-Id: I7ec085410aaa429cfeb8cc09729e62deee9c7d95
2016-10-26 21:34:31 -07:00
Houston Hoffman
40805b86f0 qcacmn: Free pkt in wmi_unified_cmd_send error path
The packet is allocated in wmi_unified_cmd_send so if it doesn't
get sent or added to a queue it needs to be freed.

Change-Id: I763824812d3c0510c53a70caf063568385b9bfc2
CRs-Fixed: 1079509
2016-10-20 15:12:28 -07:00
Pratik Gandhi
29e33f08f0 qcacmn: Revert back implementation of wmi_mgmt_command_record
WMI_RECORDING:Fix implementation of WMI_MGMT_COMMAND_RECORD to
be compatible to WIN.
Current implemantation uses variables not applicable to
WIN.

CRs-Fixed: 1067944
Change-Id: I65b2415e40bd888d3b94ef5f04ec6d53b4d50da2
2016-10-19 21:58:02 -07:00
Houston Hoffman
cdd5eda297 qcacmn: Initialize ret in send_pdev_utf_cmd_tlv
If param->len was 0, ret would be returned without being initialized.
param->len of 0 is unexpected, so return an error.

Change-Id: Ib9b0a60976dedcf8fcd4184083a9948892791621
CRs-Fixed: 1072077
2016-10-07 18:12:09 -07:00
Kiran Venkatappa
1d5f5ab6a4 qcacmn: Add WMI fixes made for TLV bringup on WIN
These fixes are made during qca8074 VP control path bringup.
Add fixes in tlv.c and enable TLV helper routines for WIN.
Fixed some inconsistencies in wmi API params by adding compiler flags.
This needs to be cleaned up so that API and params have common interface
between WIN and MCL.

Change-Id: I0821daa58df86ad0b394a7846a982a9e3577cd14
CRs-Fixed: 1063252
2016-09-20 07:59:33 -07:00
Himanshu Agarwal
91c9d677b5 qcacmn: CL 1641391 – update fw common interface files
Propagation from qcacld-2.0 to qcacmn.

WMI modification for DISA feature

Change-Id: I57441642986ecfb6d3ee42d602810f6b22f83c46
CRs-Fixed: 865207
2016-09-14 20:43:24 +05:30
Manjeet Singh
bea167157e qcacmn: CL 1614559 - update fw common interface files
qcacld-2.0 to qcacmn propagation.

Add support for WLAN counters and stats

Change-Id: I5601a9207529060c6c97e70f067c8e43ca45488a
CRs-fixed: 865207
2016-09-14 19:45:22 +05:30
Manjeet Singh
c026bdecd0 qcacmn: CL 1613065 - update fw common interface files
qcacld-2.0 to qcacmn propagation.

Add WMI types and macros definitions for antenna isolation detect

Change-Id: I69b715c224d30b40e37d4a6a6e780b1980b490e0
CRs-fixed: 865207
2016-09-14 19:45:10 +05:30
Himanshu Agarwal
7c83dcdc38 qcacmn: Add changes for coexistence of WIN/ MCL TLV implementation
Add changes to allow coexistence of WIN/ MCL TLV implementation
through use of CONFIG_MCL flag and change of MACRO names.

Change-Id: I6868c288a43fd3afb19c84b8a9d4ef0dfbee5c94
Acked-by: prgandhi@qti.qualcomm.com
CRs-Fixed: 1008872
2016-08-19 18:52:55 -07:00
Anurag Chouhan
7f6f1d5493 qcacmn: CL 1605795 - update fw common interface files
Propagation from qcacld-2.0 to qcacld-3.0

WMI pdev POWER_STATS request and report message defs
pktlog flag in HTT_T2H RX_IN_ORD_PADDR_IND
New release of Hawkeye HW header files

Change-Id: If2f122a6879b60052849b7efb738e7fc1a4c23f3
CRs-fixed: 865207
2016-08-18 13:51:50 +05:30
Anurag Chouhan
40865b40a8 qcacmn: CL 1598475 - update fw common interface files
Propagation from qcacld-2.0 to qcacld-3.0

Adding defined weightage values for WMI_PDEV_SET_PCL_CMDID
Add filter configure interface in fwcommon for sniffer mode

Change-Id: Ic822863cbbaffe7303dedf7f6c16ba92c2d0a5d3
CRs-fixed: 865207
2016-08-18 13:45:15 +05:30
Sandeep Puligilla
828a45f7f1 qcacmn: Fix compilation with WMI_INTERFACE_EVENT_LOGGING disabled
Compilation error occurs due to undefined struct when
WMI_INTERFACE_EVENT_LOGGING disabled.

Use void pointer as argument to wmi_mgmt_cmd_record() and cast as header
struct inside logging function to avoid casting as undeclared type.

Change-Id: I7d0922ee2009b235473febdbcbc3317e432a1386
CRs-Fixed: 1043597
2016-08-03 02:28:04 -07:00
Govind Singh
3ba23ea33f qcacmn: Remove unnecessary locking during WMI detach
HOST driver unload sequence does following
   1) Kill WLAN tasklet
   2) Disable CE interrupts
   3) Flush WMI RX work
Hence its unncessory to acquire eventq_lock as no one
will be using the shared resource during wmi detach.

Change-Id: I5c549358aeefc460c794c35659915d3b966c7350
CRs-Fixed: 1021376
2016-08-01 23:42:25 -07:00
Nitesh Shah
33b954056b qcacmn: CL 1597848 - update fw common interface files
Propagation from qcacld-2.0 to qcacld-3.0

Adding WMI defs for pdev and peer GET_ANTDIV_STATUS_CMD,
ANTDIV_INFO_EVENT msgs.

Change-Id: Iad3c57f0b4e10e68c86cef175b8cadcfd9e7fe1e
CRs-fixed: 865207
2016-08-01 16:31:48 -07:00
Nitesh Shah
c048265d73 qcacmn: CL 1546483 - update fw common interface files
Propagation from qcacld-2.0 to qcacld-3.0

Add WMI command to set GPIO numbers that are used to wakeup host
and wakeup target.
Changes to disable dynamic bandwidth RTS.
Add swol_assist_enable field to WMI extwow_set_app_type1_params
cmd to enable IoT mode WMI enums for CCK and OFDM max tx rates.

Change-Id: I26873873d7a355c179babaa7cc56e187e9771c92
CRs-fixed: 865207
2016-07-19 03:07:41 -07:00
Nitesh Shah
70e1104567 qcacmn: CL 1534810 - update fw common interface files
Propagation from qcacld-2.0 to qcacld-3.0

Define WMI messages for per-AC rx reorder timeouts
and A-MPDU aggregation limits.

Change-Id: I19d96379a93e2d860cce249704834f06f271efb0
CRs-fixed: 865207
2016-07-12 22:57:51 -07:00
Pradeep Reddy POTTETI
10ca69d7aa qcacmn: CL 1529540 - update fw common interface files
Propagation from qcacld-2.0 to qcacld-3.0

Tufello USB Wlan Adapter - Flash Read

Change-Id: Ib90306a871febe43a076ae8b104442bbc3a4960c
CRs-fixed: 865207
2016-07-12 22:57:49 -07:00
Pradeep Reddy POTTETI
4b997fd889 qcacmn: CL 1527207 - update fw common interface files
Propagation from qcacld-2.0 to qcacld-3.0

Add mcast filter set/delete command that can take multiple
filters in a list.
Fix HTT typos to make MACROS consistent with the field name.

Change-Id: I97ca72f102faecfc3d20409b0d4819a09968417c
CRs-fixed: 865207
2016-07-12 22:57:47 -07:00
Pradeep Reddy POTTETI
18f8fbb1d8 qcacmn: CL 1524945 - update fw common interface files
Propagation from qcacld-2.0 to qcacld-3.0.

New WMI command for reorder queue setup/removal

Change-Id: I31ad0432a0d5f49eed55603ae7d9eeedbdd19876
CRs-Fixed: 865207
2016-07-12 22:57:46 -07:00
Sandeep Puligilla
b74958d1cf qcacmn: Enhance MGMT frame logging in WMI
More detailed logging needed for mgmt frames

Add vdev_id, frame type, subtype, and channel to logs by defining wrapper
function around logging macro and calling it from send_mgmt_cmd_tlv

Change-Id: I0c8c26e3194d97be7d903f64c5c5909c2d4b9799
CRs-Fixed: 1011346
2016-07-08 18:59:51 -07:00
Houston Hoffman
0a0b2d03fc qcacmn: Reduce logging for wmi messaging
Stop logging wmi message send and completion data to kernel log.

Change-Id: Ie61e6984f0f97e595ff5c4d2a34aa5b9eb2e9a9a
CRs-Fixed: 1026520
2016-06-23 12:33:14 -07:00
Himanshu Agarwal
fc302f9097 qcacmn: CL 1519524 – update fw common interface files
Propagation from qcacld-2.0 to qcacld-3.0.

P2P listed offload WMI messages

Change-Id: I0f591f9a620587ef77be09e3714c7156d4189172
CRs-Fixed: 865207
2016-06-23 12:33:01 -07:00
Govind Singh
06c18396b9 qcacmn: Fix compilation issue for WMI Recording feature
Fix compilation issues when WMI_INTERFACE_EVENT_LOGGING
feature is disabled.

Change-Id: I30e9b96cc8d387a7fbe94ae786f9d36ea58b8c21
CRs-Fixed: 1019979
2016-06-23 12:32:58 -07:00
Himanshu Agarwal
dc8d1ae217 qcacmn: CL 1507516 – update fw common interface files
Propagation from qcacld-2.0 to qcacld-3.0

Add dbglog IDs for ARP and DHCP packets
WMI CMDID for dbglog time stamp sync
Move reason code from wmi to nan_msg.h

Change-Id: I2e6e837fade375ef86c0c4247490b44ec502be1b
CRs-Fixed: 865207
2016-06-23 12:32:54 -07:00
Himanshu Agarwal
de992721d6 qcacmn: CL 1506155 – update fw common interface files
Propagation from qcacld-2.0 to qcacld-3.0

WMI bandwidth fairness peer configuration command message
definition.

Change-Id: I8023e8a4f9758d6003a3f666cc45c1e98265c01a
CRs-Fixed: 865207
2016-06-23 12:32:52 -07:00
Manikandan Mohan
5826ae9ec5 qcacmn: Fix compilation error in 4.4v Kernel
Fix compilation errors in Kernel 4.4 version. seq_printf function
syntax is changed in v4.4 Linux kernel

Change-Id: I013171e5bbd4e5641c1a74d22003271c88c63232
CRs-fixed: 1026152
2016-06-14 13:48:44 -07:00
Rajeev Kumar
fec0401efd qcacmn: Remove redundant null check for wmi_handle
In WMI detach caller routine already has null check for
wmi_handle so remove redundant null check.

Change-Id: I764a91a6050ffc93613b82008f5df2529a056e70
CRs-Fixed: 1027177
2016-06-10 15:26:22 -07:00
Govind Singh
20e7a06bfa qcacmn: Destroy WMI eventq_lock in WMI detach
eventq_lock is not destroyed in WMI detach.
Destroy WMI eventq_lock in WMI detach.

Change-Id: Ia60ec83cf776a3ceef75274b1bcb5dcca2594763
CRs-Fixed: 1021376
2016-06-06 18:52:34 -07:00
Rajeev Kumar
ae91c40e3f qcacmn: Do not call sleeping API from atomic context
WMI unified detach holds spin lock bh and calls kernel API
to remove debugfs directory. Remove debug fs kernel API uses
mutex for internal synchronization and hence kernel complains
WLAN is calling sleeping API from non sleeping context. Fix this
issue by keeping debug fs remove API call outside spin lock bh
protection.

Change-Id: I15d9a3735ed3c914af51aed9885f48f9c1d1ded2
CRs-Fixed: 1021379
2016-06-06 18:52:32 -07:00
Govind Singh
ecf03cdc6b qcacmn: Changes to converge WMI Recording feature
1.Logging of all WMI activities(commands, tx complete, events)
is adapted for WIN.
2. WIN and MCL continues to use existing approach of memory
allocation and it is managed using feature flag in common code.
3. Use debugfs for WMI event debugging.

example to read buffer through debugfs interface -
- Navigate to WMI directory under debugfs (/sys/kernel/debug/WMIx)
- It will display elements/files for all command/event buffers
- "cat wmi_command_log" (desired buffer name)
- Output will display something like this:
CMD ID = 16001
CMD = d 0 d8c6de24 e1cf
CMD ID = 16001
CMD = 8 0 0 0
CMD ID = 16001
CMD = d 0 d8c6de24 e1cf
CMD ID = 16001

Change-Id: I26895b480b9eaa400183c4667b9ac6980939cab9
Acked-by: Pratik Gandhi <prgandhi@qti.qualcomm.com>
CRs-Fixed: 1019979
2016-06-06 18:52:28 -07:00
Houston Hoffman
e8caed0f6f qcacmn: Remove ol_fw include from wmi_unified.c
ol_fw include was not needed.

Change-Id: I9a3a408029c00ca528a09fb92e1b1ed4a6acf8e9
CRs-Fixed: 1012824
2016-05-17 11:09:33 -07:00
Anurag Chouhan
b4a65bc260 qcacmn: CL 1498085 - update fw common interface files
qcacld-2.0 to qcacld-3.0 propagation.

WMI changes to handle action frames of different category in WoW mode

Change-Id: Icbf9ad7cac93dd75ddb976a0f781e20b60201896
CRs-Fixed: 865207
2016-05-17 11:09:33 -07:00
Anurag Chouhan
7dd6554ff1 qcacmn: CL 1492713 - update fw common interface files
qcacld-2.0 to qcacld-3.0 propagation.

WMI changes for adaptive dwell time scan.

Change-Id: Ibdd1bdd607b3acac5d55312ee2595c32892c89b5
CRs-Fixed: 865207
2016-05-17 11:09:33 -07:00
Anurag Chouhan
2568939690 qcacmn: CL 1488100 - update fw common interface files
qcacld-2.0 to qcacld-3.0 propagation

Add support for scenario debug logging
WMI changes to control WISA features of firmware from host

Change-Id: I01d96c423b6241248242aa2feae6887d8f202691
CRs-Fixed: 865207
2016-05-17 11:09:18 -07:00
Yuanyuan Liu
68630078ff qcacmn: Clean up OS wrapper functions
Use OS standard APIs instead of CNSS wrapper functions

Change-Id: Icd048f41864c33463f4bb582d8d184816fa77c5d
CRs-Fixed: 1000797
2016-05-06 13:09:08 -07:00
Govind Singh
e7d9f3e887 qcacmn: Add non-tlv implementation in common wmi layer
WIN platform uses non-tlv implementation for host to
target wmi commands. Add support for non-tlv
implementation in common wmi layer.

Change-Id: I1f832695b0d41b521be6b18df0cad31aae11b6c9
Acked-by: Kiran Venkatappa <kiranv@qti.qualcomm.com>
CRs-Fixed: 1005778
2016-04-26 04:01:18 -07:00
Krishna Kumaar Natarajan
0d2a1bd31d qcacmn: CL 1479065 - update fw common interface files
qcacld-2.0 to qcacld-3.0 propagation.

Add Qboost dbglog IDs and module ID, add pdev_id to WMI cmds,
wal_power_debug framework to handle WMI cmd for LP features.

Change-Id: I815e29284ab21086f75197c2ce1319e13074e00f
CRs-Fixed: 865207
2016-04-20 15:48:40 -07:00
Krishna Kumaar Natarajan
c285c10e60 qcacmn: CL 1476371 - update fw common interface files
qcacld-2.0 to qcacld-3.0 propagation.

WMI change to enable Custom aggregation size for ADDBA request and
response through WMI command WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID.

Change-Id: I0fb54e8f32344b209787239ed64d7ecb13ea56fb
CRs-Fixed: 865207
2016-04-20 15:48:37 -07:00