Commit Graph

66 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
Sravan Kumar Kairam
44ce891d7c qcacmn: Send anycast addresses for NS offload
Propagation from qcacld-2.0 to qcacld-3.0

Current implementation has support for IPv6 addresses of type
unicast for NS offload to firmware.

As part of this change add anycast addresses for NS offload.

CRs-Fixed: 954880
2016-08-24 06:56:18 -07:00
Selvaraj, Sridhar
f36770f7d4 qcacmn: Add support to provide assoc IEs to FW in RSO command
As part of MBO(Multiband Operations), host driver need to supply
the Assoc IEs to FW after initial connection. FW uses these Assoc
IE's in subsequent roaming.i.e Reassociation requests.
This Fix updates the WMI interface to provide support for passing
Assoc IEs to FW.

Change-Id: Ida3d2947714002233090a3f9075dd8d674a3c224
CRs-Fixed: 1039969
2016-08-24 04:42:24 -07:00
Nirav Shah
47ec248c19 qcacmn: Add support to enable/disable packetlog using iwpriv
Add support to enable/disable packetlog using
iwpriv wlan0 pktlog command.

CRs-Fixed: 970647
Change-Id: I4f7c64332e971591b7a08020a412e6f3979b718d
2016-08-19 20:20:38 -07:00
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
Govind Singh
8754248ea3 qcacmn: Add WIN compilation fixes for TLV
Compilation fixes made to compile TLV on WIN code base.
Also, Previous gerrits used WMI_NON_TLV_SUPPORT for all
compilation fixes of WIN vs MCL, using CONFIG_MCL and
CONFIG_WIN wherever it is found appropriate to keep it
consistent with other modules.

Change-Id: I1c129d736746556210c46f3122e2739d233e1d6b
Acked-by: prgandhi@qti.qualcomm.com
CRs-Fixed: 1008872
2016-08-19 18:52:53 -07:00
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
Krishna Kumaar Natarajan
b16bb27362 qcacmn: Correct len size of oem data request
qcacld-2.0 to qcacmn propagation.

oem data request len size should be of 4 byte instead of
1 byte.
Add changes to correct len size in wmi unified API.

Change-Id: I9b377420c50ff1160964f94be5eaa0072df0f63d
CRs-Fixed: 1013488
2016-07-29 18:15:29 -07:00
Varun Reddy Yeturu
5a552cf597 qcacmn: Fix incorrect channel list passed to the firmware
Fix the occupied channel list that is being passed from CSR to
WMA to WMI to firmware.There is a conversion happening in
WMA from channel number to frequency which is the root of the
issue.

Change-Id: I8a2f8c9d31897b38086df26ebd386ec59d0f3540
CRs-Fixed: 1039020
2016-07-14 12:36:11 -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
Arif Hussain
4ab1c4c0a3 qcacmn: SAP DFS: Fix dfs_phyerr_filter_offload
Correct the logic based on phyerr filter offload INI value.

Change-Id: Ie4722eba7d7476fc7c445e9e9a026827231552eb
CRs-Fixed: 1036629
2016-07-01 16:19:14 -07:00
Himanshu Agarwal
ac3869bf63 qcacmn: Add NULL checks before dereferencing
Add NULL checks before dereferencing in:
1) HIF layer
2) WMI layer.

Change-Id: I47c5d18ae7841826d958d742283edb0bd6d246b7
CRs-Fixed: 1036390
2016-07-01 10:36:19 -07:00
Govind Singh
224a7313f3 qcacmn: Remove WMA header file dependency to fix WIN compilation
Remove dependency of WMA header files in common wmi layer.

Change-Id: I705e3b8cbe048f846c819dc028667061a0ce3ce2
CRs-Fixed: 1008872
2016-06-29 12:17:36 -07:00
Kiran Kumar Lokere
51b7a165a0 qcacmn: Add support for NSS configurability
qcacld-2.0 to qcacld-3.0 propagation

Add support for NSS configurability per vdev type.
- Configure the 2g and 5g NSS with the INI value of
each vdev type
- Program the HT and VHT IE to FW for 1x1 and 2x2 mode,
FW will include them in scan probe request frames

Change-Id: I5cbf17a14ab6becad6cf5765ae5039fc284dc309
CRs-Fixed: 869026
2016-06-24 16:48:20 -07:00
Poddar, Siddarth
98281c484e qcacmn: Add wma apis for High Latency systems (Part 4 - HL Datapath)
Initialize bad peer tx control data structure in WMA,
send down the initial configuration info to fw and
configure the peer status update setting in the tx_rx module.

CRs-Fixed: 975526
Change-Id: Ib380e10a0b343b6a8f9c2c0bf6d6dd602d2601c5
2016-06-23 12:33:06 -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
Gupta, Kapil
2e68598d3e qcacmn: Add support for adaptive dwell scan time
Dwell time can be modify based on channel congestion per scan
request.
Add changes to enable firmware to use scan control flag and select
dwell time optimization algorithm based on ini values.

Change-Id: Iea3de57c1b7d087442e4b8984b4184d24bb8c930
CRs-Fixed: 994443
2016-06-23 12:32:48 -07:00
Govind Singh
a7dd6f0b81 Revert "qcacmn: Remove WMA header file dependency to fix WIN compilation"
This change reverts Change-Id: I48978e51ca6bd4416420ee66746d5bfe7adae3c9

Change-Id: I8113e233b3477c7b35a5c35a1a1c6f5f32936d8c
CRs-Fixed: 1008872
2016-06-14 13:48:46 -07:00
Govind Singh
9381e603e4 qcacmn: Remove WMA header file dependency to fix WIN compilation
Remove dependency of WMA header files in common wmi layer.

Change-Id: I48978e51ca6bd4416420ee66746d5bfe7adae3c9
CRs-Fixed: 1008872
2016-06-14 13:48:28 -07:00
Govind Singh
e7f2f341d7 qcacmn: Add WIN changes to wmi_unified_tlv.c
Add changes made in wmi_unified_tlv.c to get basic control path
working with WIN driver on a tlv platform

Change-Id: I2044df3d452cd5f1c8659a8e61e343494c6228fb
Acked-by: kiranv@qti.qualcomm.com
CRs-Fixed: 1005778
2016-06-14 13:48:26 -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
Govind Singh
bca3b1bc52 qcacmn: Add support for WMI_PDEV_WAL_POWER_DEBUG_CMD
Add host support for WMI POWER DEBUG command to control mac_core power features
for run time debugging.

Change-Id: Ifc810b24222507f1445a84a54caa8aee5e815b38
CRs-Fixed: 1007598
2016-05-06 16:45:34 -07:00
Houston Hoffman
38e60923f0 qcacmn: Remove cds_api and wma_api includes
The inclues are not needed.

Change-Id: I874a511535fded52f346201b24f6d3174334b430
CRs-Fixed: 1003804
2016-05-04 21:10:40 -07:00
Manishekar Chandrasekaran
157a4de21d qcacmn: Replace soc level references of set mac config
Replace the WMI command WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID
and event WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID with
WMI_PDEV_SET_MAC_CONFIG_CMDID and
WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID respectively since
the former are obsolete. The new WMI commands and events
additionally carry the pdev id.

Change-Id: I77eab3ead005bbb7f951ce7e077cd661813cb628
CRs-Fixed: 989502
2016-05-04 21:09:56 -07:00
Manishekar Chandrasekaran
1718378a88 qcacmn: Replace soc level references of set hw request and response
Replace the obsolete WMI command WMI_SOC_SET_HW_MODE_CMDID with
WMI_PDEV_SET_HW_MODE_CMDID and event WMI_SOC_SET_HW_MODE_RESP_EVENTID
with WMI_PDEV_SET_HW_MODE_RESP_EVENTID respectively. These new WMI
commands and events additionally carry the pdev id and all mac id
references are replaced with pdev id.

Change-Id: If2a3f93dcd1947eedce8d4eac8ed936166f7e078
CRs-Fixed: 989502
2016-05-04 21:07:32 -07:00
Govind Singh
4df471425b qcacmn: Replace mac_id with pdev_id in WMI PDEV commands
Replace mac_id with pdev_id for WMI pdev commands and
vdev start response handler to support multi-radio in
converged firmware. In order to maintain backward
compatibility with old fw, host needs to check
WMI_SERVICE_DEPRECATED_REPLACE service id in service
bitmap and needs to fill pdev id or mac id accordingly.

Change-Id: I7e6b40b4c0bd20e967dc0a383b480068e256486f
CRs-Fixed: 994415
2016-05-03 07:52:17 +05:30
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
Manishekar Chandrasekaran
8650851387 qcacmn: Replace WMI_SOC_SET_PCL_CMDID with WMI_PDEV_SET_PCL_CMDID
Replace the obsolete WMI command WMI_SOC_SET_PCL_CMDID with
WMI_PDEV_SET_PCL_CMDID. WMI_PDEV_SET_PCL_CMDID carries the weightage
for all the channels (preferred and non-preferred) in the same order
and length as that of the command WMI_SCAN_CHAN_LIST_CMDID. This is
in contrast to the command WMI_SOC_SET_PCL_CMDID which carries only
the preferred channel list.

Change-Id: I040f4307491d3242d2e9409dbbe8005c4b307bf5
CRs-Fixed: 989502
2016-04-25 23:00:58 -07:00
Krishna Kumaar Natarajan
3729261c96 qcacmn: Fix compilation error in WMA
qcacld-2.0 to qcacld-3.0 propagation.

Fix compilation error introduced due to change in WMI
interface structure definition changed by CL 1479065.

Change-Id: I83d50bc046961ab90bcfbb164d5d64296ff95d9f
CRs-Fixed: 865207
2016-04-20 15:48:44 -07:00
Houston Hoffman
b51680551b qcacmn: Enable station SMPS only if the session supported NSS > 1
If HT SMPS is enabled and if the session supported NSS > 1
then include SMPS IE in the HT capabilities of the association
and the reassociation management frame.Enabling SMPS with an AP
whose capability is only 1x1 will result in association/reassociation
request being rejected or an unexpected behavior. Send SMPS force mode
to FW to trigger SMPS action frame only if SMPS is enabled in the
INI. For dynamic antenna switch, the chain mask manager will send
the SMPS action frames.

CRs-Fixed: 931250
Change-Id: Ifff2ef2c8790994a68e676b8bba2fb03c21370d4
2016-04-15 15:04:43 -07:00
Gupta, Kapil
7e652921ab qcacmn: Add support for dense roam params in wmi layer
qcacld-2.0 to qcacmn propagation

In High dense environment roaming should be triggered early
at dense RSSI threshold which provide better throughput result.
Add support for dense roaming parameters to read from ini file
and send to FW with other roaming parameters

CRs-Fixed: 953579
Change-Id: Ia63bfdd1248b4507d988b019f07164a7c75566af
2016-04-14 18:27:09 -07:00
Siddarth Poddar
9500f2eeb4 qcacmn: Fix tlv formation of gtk offload command
Add gtk offload enable/disable macros and use them
while copy keys and replay counter.

Change-Id: Ifdd776bc0c567d6c815ab5cb3eb212a43889b5a5
CRs-Fixed: 987362
2016-04-04 09:50:25 -07:00
Govind Singh
67922e88bf qcacmn: Use QDF_STATUS instead of Linux return type in wmi layer
Replace Linux return type with QDF_STATUS to have uniformity
across common wmi layer.

Change-Id: I74730602c6b20fb240182afd7c6e5ec6b3fcfd55
CRs-Fixed: 987362
2016-04-04 09:50:14 -07:00
Govind Singh
ccb0c27aa0 qcacmn: Fix tlv formation of pno start command
Fix tlv formation of pno start command by adding the pno channel
prediction parameter in variable length tlv of pno start command.

Change-Id: I10274519eedf3d3cbcebfdc5e308fcf86bc2a804
CRs-Fixed: 987362
2016-04-04 09:49:57 -07:00
Himanshu Agarwal
712622fe81 qcacmn: Add tlv formation of key installation commands in common wmi layer
Move tlv formation of wmi setup key installation commands from umac to
common wmi layer.

Change-Id: I51250a9b1b6bb5aed06657b9f88f4659430f4c74
CRs-Fixed: 987362
2016-03-30 12:06:53 -07:00