Commit Graph

138 Commits

Author SHA1 Message Date
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
Kiran Venkatappa
06520827d4 qcacmn: Add extract routines for WMI ext service ready event
Add helper routines to extract TLV params in WMI EXT service ready
event. These helper routines abstracts all TLV related information
providing APIs to extract ext serivce ready params.

Change-Id: Ic989331856ed2f9376965bdec4b658328f9e470b
CRs-Fixed: 1079237
2016-11-09 22:57:44 -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
Leo Chang
eee40879de qcacmn: add lithium rx queue setup wmi messages
WMI changes for rx reorder queue setup.

Change-Id: I4c8b1a5b8fd50cceaf754bdfdecada695871fe96
CRs-fixed: 1080338
2016-11-02 12:02:09 -07:00
Selvaraj, Sridhar
1b1fdaeeab qcacmn: Add wmi_roam_scan_mode_fixed_param TLV alone for RSO Stop command
Add only wmi_roam_scan_mode_fixed_param TLV for ROAM_SCAN_MODE disable
command[i.e. mode is set with WMI_ROAM_SCAN_MODE_NONE |
WMI_ROAM_SCAN_MODE_ROAMOFFLOAD]. This is to retain the scan params
[n_probes, dwell time] so that it can be used if ROAM_INVOKE command
follows ROAM_SCAN_MODE disable.

Change-Id: Iafe31850872cac3eaff35eeb57ab271b4409ef18
CRs-Fixed: 1084912
2016-11-02 08:46:49 -07:00
Nandha Kishore Easwaran
03b9418c1a qcacmn: Update scan_ctrl_flags when strict passive scan enabled
Analysis: strict passive scan is not working as the scan_ctrl_flags
check is missed when strict passive scan enabled

Change-Details : Added a support in ol_ath_scan_start_send() and
send_scan_start_cmd_non_tlv() to update the scan_ctrl_flags with
WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN when strict_pscan_enabled

Change-Id: If6713e340841d4947ef9042421dabec35f7bfbae
CRs-fixed: 1069383
2016-10-30 05:29:10 -07:00
Nandha Kishore Easwaran
9b7f47eac5 qcacmn: CTL changes for Beeliner family
For Beeliner family of chipsets, the number of values expected is 688
for 2G and 1540 for 5G

Change-Id: I2c47ed98f639c09453687fce7f713946304a7036
CRs-fixed: 1071083
2016-10-30 05:29:09 -07: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
Sathish Kumar
e89385bd59 qcacmn: Adapt WIN driver with FW abstraction changes
Recently added changes for coexistence of WIN/MCL TLV implementation
through CL I6868c288a43fd3afb19c84b8a9d4ef0dfbee5c94 require
adaptations in QCA WIN driver to successfully compile.

Add required definitions in WMI layer to adapt WIN driver to
changes made for coexistence.

Change-Id: I99550ca10553d8096b8967249c006bac4e0c62df
2016-10-26 11:19:00 -07:00
Sathish Kumar
87832dde1c qcacmn: Abstract RTT related operations out of WMI layer
Currently, RTT related operations to change report type and number
of measurements are done in the WMI layer.

Abstract these operations out of WMI layer and keep it in the WIN
host API layer to make the RTT WMI API generic.

Change-Id: I9b73830912c6c2b3d0908788f1f6a77b7f43dcaa
2016-10-25 22:29:32 -07:00
Sathish Kumar
bbd8be7c53 qcacmn: Set txrx chainmask to 0 for non CFR RTT report type
TxRx chainmask is populated by the FW only in the case when report
type is WMI_RTT_REPORT_CFR.

Populate txrx chainmask to 0 when RTT report type is non-CFR to avoid
corruption.

Change-Id: Ie728656efe2f608e90a15b6fc94be3159db0f635
CRs-Fixed: 1080686
2016-10-23 21:05:29 -07:00
Sathish Kumar
403beb4421 qcacmn: Add LOWI messages to be sent to FW
LOWI messages to register, set capability
and send RTT measurement request are not sent assuming only
LCI and LCR messages are sent out to the FW using ol_ath_lowi_data_req_to_fw.

Add code to send messages other than LCI and LCR through the API in
ol_if_lowi.c when msg subtype is not one of LCI or LCR.

Change-Id: I2deedaa6e03e769bf802337b2ec93d9573eb1b5a
CRs-Fixed: 1079169
2016-10-23 21:05:28 -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
Mukul Sharma
bf3bc6534f qcacmn: Enhance EPNO feature
qcacld-2.0 to qcacmn propagation

Make the following enhancements to the EPNO feature:
1) Implement the reset EPNO command handler
2) Add new parameters for candidate score calculation.

Change-Id: Iad1ff9c2b003c9e3ddbc3373366686040ccb55ca
CRs-Fixed: 1075380
2016-10-13 11:47:07 -07:00
Sathish Kumar
aa4950b608 qcacmn: Populate RSSI information during single phyerr WMI event extraction
Extraction API for phy error event handling does not populate single phyerr
RSSI info for DFS radar event, but was populating the value in case of
spectral event. Single phyerr RSSI info is required for both DFS and Spectral
operations. As a result of this change, single phyerr RSSI info is updated
on receiving DFS event as well.

Change-Id: Idca3e4075e1869eda0d200a102e2ca2b7d33bf70
CRs-Fixed: 1076872
2016-10-13 00:32:49 -07:00
Govind Singh
09523e2b27 qcacmn: Register tlv ops for WMI POWER DBG command
Add WMI POWER DBG tlv ops to enable power debug command
feature.

Change-Id: I2a4e79624fae656bfdb0a442a9a22b4e96de4896
CRs-Fixed: 1065551
2016-10-12 08:47:24 -07:00
Kapil Gupta
4a95ef2088 qcacmn: Reduce gscan priority
qcacld-2.0 to qcacmn propagation

gscan priority should not cross normal scan.

Add changes to reduce gscan priority.

CRs-Fixed: 1066785
Change-Id: I7459367cfed5d932f07f8c846265c448b9a84555
2016-10-10 03:10:33 -07:00
Nitesh Shah
7a25289e47 qcacmn: Move certain logs to appropriate log levels
Propagation from qcacld-2.0 to qcacld-3.0

Some of the logs are printing quite often and spamming the kernel logs.
Hence move them to appropriate log levels and remove the useless debug
messages.

Change-Id: If38d7a6a3cf13a5879f6a628d3d7eb4f5156a95b
CRs-Fixed: 1001441
2016-10-10 01:27:54 -07:00
Houston Hoffman
d702a9b118 qcacmn: Replace A_OK with QDF_STATUS_SUCCESS in wmi_unified_non_tlv.c
A_OK status is deprecated.  Use QDF_STATUS_SUCCESS.  Needed since
wmi_unified_cmd_send returns QDF_STATUS not A_STATUS.
see change: Ib9b0a60976dedcf8fcd4184083a9948892791621

Change-Id: I91209002c0a84a8353541c84cdc2e49ffdcc6654
CRs-Fixed: 1072077
2016-10-07 18:12:17 -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
Sathish Kumar
01b7ac01b1 qcacmn: Fix issue in green AP feature
Green AP feature for WIN allows the AP to go into power save mode
and leads to only a single chain being active.

In the current code, it is seen that the WMI API for enabling Green
AP feature is under "FEATURE_GREEN_AP" flag that is not defined for
WIN. This leads to trigger of dummy API that does no operation.

Replace "FEATURE_GREEN_AP" with proper flag "ATH_SUPPORT_GREEN_AP"
defined on WIN to enable Green AP feature.

Change-Id: I344e74c3753f1ef3b6d5d5a2bb1086c84f2ab84c
CRs-Fixed: 1074036
2016-10-07 09:17:13 -07:00
Padma, Santhosh Kumar
8394bae1b0 qcacmn: Add changes for DISA certification
Add TLV changes to pass DISA parameters received from
WMA and pass them to firmware for firmware
to encrypt data and send back to driver.

Change-Id: Ic6928a93f799c47518fbbad96564062f595287dd
CRs-Fixed: 1072545
2016-10-03 12:48:34 +05:30
Sathish Kumar
9214c1607c qcacmn: Fix crash observed on issuing iwpriv wifiX dl_loglevel <Val> command
On issuing iwpriv wifiX dl_loglevel <Val> command, there is a NULL pointer
dereference crash observed. It is root caused due to improper reference
to module_id_bitmap field, that needs to be corrected.

Change-Id: I59ff4455c74452bb00caff125f84213a2e9d7742
CRs-Fixed: 1066323
2016-09-30 05:47:59 -07:00
Sathish Kumar
e2611f7d69 qcacmn: Fix issues in mcast_group_update and fips WMI cmd
Fix following issues in wmi_unified_non_tlv.c file
->Move allocation of WMI buffer in FIPS WMI cmd
->Change dummymask variable to static in mcast_group_update cmd

Change-Id: I0a0d0e68820905ad543175abed1a812639b3dbf1
CRs-Fixed: 1069863
2016-09-30 03:49:30 -07:00
Sathish Kumar
3be9e05270 qcacmn: Fix key installation issue for BE offload radios
For big endian based offload radios, key installed using
WMI_VDEV_INSTALL_KEY_CMDID requires to be code swapped as the copy engine
for big endian platform does byte swap operation on the received key before
sending it down to FW.

It is observed that the big endian conversion is carried out in WIN Wi-Fi driver
for big endian platform specific radios in the driver, that takes care of
converting the key data to the byte swapped form. However, it is observed
that an additional copy is carried out in the WMI layer that is overwriting
the converted key with old key, in the non-swapped form.

We move the byte swapping operation to the converged component and do a single
memory copy using the macro that carries out its operation based on big or
little endian platform.

Change-Id: Ic6b7cc667d0f505d1d1daeacec72f54d41554038
CRs-Fixed: 1067206
2016-09-30 02:47:34 -07:00
Sathish Kumar
61bfe8696b qcacmn: Populate composite RSSI info received as part of phy error event
Extraction API for phy error event handling does not populate composite
RSSI info for DFS radar event, but was populating the value in case of
spectral event. Composite RSSI info is required for both DFS and Spectral
operations. As a result of this change, composite RSSI info is updated
on receiving DFS event as well.

Change-Id: Ia77779251ccf230f7ca4242ee0851790305d2fbc
CRs-Fixed: 1066136
2016-09-30 01:09:53 -07:00
Deepak Dhamdhere
583283c32d qcacmn: Enable EXTSCAN cycle start and completed events
qcacld-2.0 to qcacld-3.0 propagation

Enable firmware to send WMI_EXTSCAN_CYCLE_STARTED_EVENT and
WMI_EXTSCAN_CYCLE_COMPLETED_EVENT instead of
WMI_EXTSCAN_BUCKET_COMPLETED_EVENT as per Android N requirements.
This change is required to complete the propagation of
earlier change I399204261fa3d8515146c590630a3bb663ee801c

CRs-Fixed: 1062739
Change-Id: I5c801912828844aa3d8e2aa4f022cb184aa771c4
2016-09-29 17:51:12 -07:00
Sathish Kumar
ae33fe9449 qcacmn: Add non-tlv registrations for atf_peer, atf_group and lcr WMI cmd
Non-TLV registrations for atf_peer, atf_group and lcr WMI command were
missed out during the WMI convergence implementation. This change adds
the missed out registrations.

Change-Id: I384c27709e088c06ee73f17b7dc1a52bb5c63370
CRs-Fixed: 1069863
2016-09-29 13:50:52 -07:00
Sandeep Puligilla
f358b1a822 qcacmn: Correct the peer assoc command TLV length
PEER assoc command failed in the tlv validation check.
Tlv length sent in the TLV header is different from
the length used to fill the tlv buffer which caused
failure at tlv validation.

Modified code to use the aligned length while
filling the tlv buffer.

Change-Id: I9ad2009315dd3cf37308ef44360d566035344950
CRs-Fixed: 1069008
2016-09-26 16:07:30 -07:00
Mukul Sharma
3a5eedb68c qcacmn: Cache ARP/NS offload request at wma layer
qcacld-2.0 to qcacmn propagation

As Current WMI interface need both the ARP/NS configuration
in single command. To support active offload host need to
cache the ARP/NS at wma layer so host can fill the other
request and configure down to firmware complete request
(ARP+NS).

Change-Id: Ie0a57d216379817ff0ae48f4f582c9108e8ecca1
CRs-Fixed: 1067683
2016-09-24 13:03:59 -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
Pratik Gandhi
a73d0a7f5c qcacmn: Address compilation issues for WIN new fw headers
Address compilation issues for WIN with new Lithium Firmware headers.
Also removed dependency on htt.h from header files, which may need to
add explicit dependency on htt.h in .c files.

Change-Id: Ia5027963837e645bc3f81a3db98c2ea06789aea8
CRs-Fixed: 1061096
2016-09-19 01:19:28 -07:00
Himanshu Agarwal
c9fc2a36a8 qcacmn: Add support to get per chain rssi stats
Propagation from qcacld-2.0 to qcacmn.

Add support to get per chain rssi from fw through the
already existing WMI command WMI_REQUEST_STATS_CMDID
and then store it in the station_info structure defined
by cfg80211.

Change-Id: Id50c96dd322b5ca4db34cf2df901730d8b103251
CRs-Fixed: 1005367
2016-09-16 05:50:15 -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
Naveen Rawat
61be23a851 qcacmn: Send HT/VHT CAPs IE to firmware per band
Send HT/VHT CAPs IE to firmware per band. This will allow certain
features like LDPC to be configured per band.

Change-Id: I21c83af984f9be3ade46121ef148b52568c3ad0f
CRs-Fixed: 1059454
2016-09-12 18:02:28 -07:00
Abhishek Singh
716c46c5f6 qcacmn: Fix mismatch in mem alloc and mem free API
qcacld-2.0 to qcacmn propagation

In some cases wmi_buf_alloc is used to allocate memory, while
adf_os_mem_free(vos_mem_free) is used to free the memory.
vos_mem_free checks if memory is present in vosMemList to detect
double free.

Now as wmi_buf_alloc doesnot add the allocated memory to
vosMemList, vos_mem_free assume it to be double free case and cause
kernel panic.

Use proper corresponding API to free memory

Change-Id: I3602887d2bfdb407e5805aedd7a97a57440a4567
CRs-Fixed: 1004079
2016-09-08 18:22:27 -07:00
Service qcabuildsw
7cdb77423e Merge changes I34cc7916,I19ad7ea2 into wlan-cmn.driver.lnx.1.0-dev
* changes:
  Release 5.1.0.23I
  qcacmn: Modify LFR3 firmware OKC flag
2016-09-07 21:11:42 -07:00
Service qcabuildsw
ae908a4e83 Merge changes Ica6da5c6,Ic2dc113e,I45a132e8,Idcb07751 into wlan-cmn.driver.lnx.1.0-dev
* changes:
  Release 5.1.0.23H
  qcacmn: Add fwtest interface
  Release 5.1.0.23G
  qcacmn: Added a member in qca_napi_info structure
2016-09-07 21:09:52 -07:00
Service qcabuildsw
bc1168f224 Merge changes I5ec5ce2a,If129b9c7,I86daffeb,Id50136f6,Id187b8e6,I22928dea,I15577c50,Ib952643a,Ib9984c43,Ic44825f4,If23398b0,I206d3008 into wlan-cmn.driver.lnx.1.0-dev
* changes:
  qcacmn: Use suspend_noirq callback instead of disabling irqs
  Release 5.1.0.23C
  qcacmn: Implement QDF API to get queue mapping and total ram size
  qcacmn: Fixing incorrect qdf_mem_set API usage in wmi_unified_non_tlv.c
  qcacmn: Fix for kernel panic in wifi down path for peregrine
  Release 5.1.0.23B
  qcacmn: Free WMI HB command buffer in case of errors
  Release 5.1.0.23A
  qcacmn: Add WMI API for setting bandwidth fairness
  Release 5.1.0.23
  qcacmn: unmap buffer for CE destination ring en-queue error
  Release 5.1.0.22Z
2016-09-06 16:58:08 -07:00
Service qcabuildsw
9733fe05f9 Merge "qcacmn: Fix compilation errors in WMI for Big Endian platform" into wlan-cmn.driver.lnx.1.0-dev 2016-09-06 13:43:58 -07:00
Deepak Dhamdhere
70504a18b6 qcacmn: Modify LFR3 firmware OKC flag
Enable or disable OKC flag in WMI roam scan offload request based on
okc_enabled parameter in roam request from CSR.

Change-Id: I19ad7ea2171532f2417742e205d408bdd52682c0
CRs-Fixed: 1057181
2016-09-02 21:27:06 -07:00
Anurag Chouhan
459e015c3f qcacmn: Add fwtest interface
Add wmi fw test interface to support generic fw test command.

Change-Id: Ic2dc113e3a698555c0fdcbafb30df154f6deb97d
CRs-Fixed: 1045265
2016-09-02 16:07:21 -07:00
Sathish Kumar
29657b28c0 qcacmn: Fixing incorrect qdf_mem_set API usage in wmi_unified_non_tlv.c
The qdf_mem_set API is used incorrectly in a few instances inside
wmi_unified_non_tlv.c

The argument list is - <pointer to address, size, value>

However, some places, it is sent as - <pointer to addr, value, size>

This change fixes such incorrect function calls to qdf_mem_set().

Change-Id: Id50136f630022b1fdeaddbdefcad9f637f917e9e
CRs-Fixed: 1048504
2016-09-01 13:27:54 -07:00
Govind Singh
2d8a88cda8 qcacmn: Free WMI HB command buffer in case of errors
WMI HB command buffer is not freed in case of tx error,
Free WMI HB command buffer in case of errors.

Propagation from qcacld-2.0 to qcacmn.

Change-Id: I15577c50cefc0cc2e9129f175cf874f17acc430e
CRs-Fixed: 1001068
2016-08-31 07:06:47 -07:00