Commit Graph

400 Commits

Author SHA1 Message Date
Nachiket Kukade
200fbf7f4b qcacmn: Send enable/disable flag separately in hw filter command
Before wow enable or pdev suspend host sets hardware filter bitmap
and enables the filter via a command. But after resuming it sends
bitmap as zero with filter disable. This is interpreted by Firmware
as disable the modes set in the bitmap, so none of the modes are
disabled. With this host will not receive bc/mc packets after
disabling the hw filter, which it is expecting.

Use the correct bitmap sent by cld for disabling the hw filter.

Change-Id: I465e2ec40b6fde8a9e99743a1b9979b67cce5408
CRs-Fixed: 2194973
2018-06-18 16:33:54 -07:00
Nachiket Kukade
ae35a2c76f qcacmn: Rename legacy definitions containing BPF to APF
In implementation of Android Packet Filter, functions, variables,
definitions are named after BPF, which stands for Berkely Packet
Filter. The term was more appropriate for Link Layer packet
filters implemented in the Linux kernel, known as Linux Socket
Filters.

The term BPF is obsolete now, so rename it with the
appropriate acronym, APF.

Change-Id: I606afc747cddedb524a41cd8e5998400f04e69f6
CRs-Fixed: 2191531
2018-06-18 16:33:52 -07:00
Nachiket Kukade
7d4f04b91c qcacmn: Refactor APF related common modules in separate
File wmi_unified_tlv.c is bloated and adding support for upcoming
Android Packet Filter v3 is going to increase its size even more.
Create a new source file for APF related WMI modules and a header
file for declaring the API's

Change-Id: I37dcc30c7d1311067f375c891be9723612161de9
CRs-Fixed: 2189827
2018-06-18 16:33:49 -07:00
gaolez
ab037cf5b5 qcacmn: Add length check in ndp event handler
qcacld-2.0 to qcacld-3.0 propagation

Add length check to prevent the data overflow the wmi buffer. The
total length of data should not exceed max svc msg size.

CRs-Fixed: 2248879
Change-Id: I1543732fcfe0cb7e32f7175f7775c9550854cae8
2018-06-14 20:55:52 -07:00
bings
00d767cbb7 qcacmn: Set wmi_service_wow_wakeup_by_timer_pattern service bit
Currently the service bit of wmi_service_wow_wakeup_by_timer_pattern
is not set and it is 0. This is wrong because 0 is the service bit of
wmi_service_beacon_offload.

Set wmi_service_wow_wakeup_by_timer_pattern service bit as
WMI_SERVICE_WOW_WAKEUP_BY_TIMER_PATTERN

Change-Id: I52058d79281aeed9312ce6c0c361d3cb254fef07
CRs-Fixed: 2250922
2018-06-13 22:27:10 -07:00
Nirav Shah
66932f7705 qcacmn: Featurize packet log
Featurize packet log.

Change-Id: Ica7d658ef65486ae77e24a11cef50291a5e82563
CRs-Fixed: 2245424
2018-06-09 02:28:11 -07:00
Varun Reddy Yeturu
94107f9dbf qcacmn: Add support to store target TWT capabilities
Add support to read the TWT services being advertised
by the target and make use of it internally in the host
at appropriate places

Change-Id: I3691622447271467d9276788574a2f2717928f83
CRs-Fixed: 2251389
2018-06-08 20:14:13 -07:00
Wu Gao
52c0b77485 qcacmn: pmo feature flag disable
In case PMO feature flag disable, add this change. Change
WLAN_PMO_ENABLE  to WLAN_POWER_MANAGEMENT_OFFLOAD.

Change-Id: I875e568dcb239da1b86d1a76cb8cbc925bb13cde
CRs-Fixed: 2243948
2018-06-08 08:31:10 -07:00
Naveen Rawat
a8e19e7bb8 qcacmn: Fix get chain rssi stats
Fix chain rssi stats by correcting logic to extract chain
rssi stats.

Change-Id: Ifd8337abaef7f101082131e48f2ec87097317899
CRs-Fixed: 2253043
2018-06-07 12:46:58 -07:00
Wen Gong
f60f11e838 qcacmn: Add extscan feature flag
Add config flag to enable / disable extscan feature

Change-Id: I6303836226aa2cdcaf3a680d9ce36f2490fde615
CRs-Fixed: 2243749
2018-06-05 06:01:45 -07:00
Zhu Jianmin
3ed26de64c qcacmn: Check chip capability when enable AP+AP
Check capability of dbs, mcc and scc on single band when enable
AP+AP, then same driver code can support different chip and
firmware.
Add wmi_service_dual_beacon_on_single_mac_(mcc/scc)_support

Change-Id: I505747122504b2a89813e7bdfcd27dc07539f39e
CRs-Fixed: 2214237
2018-06-02 10:26:19 -07:00
Wen Gong
ca17401144 qcacmn: Featurize dbglog_host
Featurize parsing support for WLAN firmware logs in WLAN host driver

Change-Id: I94a75a0ab09f086209298bdd4870df78e9733a3f
CRs-Fixed: 2228370
2018-05-30 01:42:30 -07:00
Keyur Parekh
2c0bab6f2d qcacmn: Convert pdev_id from target to host
Convert pdev_id from target to host before passing
to ol layer to print correct noise floor value.

Change-Id: I2d138f19901ca5d654631bc2eca76a757dc46628
2018-05-24 13:32:40 -07:00
Naveen Rawat
d42ce38f7b qcacmn: Implement ndp schedule update and channel info in ndp confirm
Add support for ndp schedule update event and provide channel information
in ndp confirm event.

Change-Id: Ic2c073dd4f220627cc2bd1a2d52d858136b6b450
CRs-Fixed: 2180310
2018-05-24 11:13:55 -07:00
bings
26d46df40a qcacmn: Refine chirp check for ETSI type 4 radar
Currently if the delta peak of the ETSI type 4 radar pulse is 0, it will
be considered as radar false dection, which affects normal dfs ETSI type
4 certification test.

More checks are added when delta peak of the ETSI type 4 radar pulse is 0.
If psidx_diff, the difference in the FFT peak index between the short FFT
and the first long FFT, is greater than 4 and less than 16, it is still
considered as valid ETSI type 4 radar pulse.

Change-Id: Iee9c22e0c208023bb9f0f70121f8269169b63d18
CRs-Fixed: 2173576
2018-05-23 20:45:39 -07:00
Varun Reddy Yeturu
2c8c912493 qcacmn: Add support for sending TWT enable command
Add WMI support for building and sending the
WMI_TWT_ENABLE_CMDID to the firmware.

Change-Id: Ifbda4d1668e2bcb2e33d044269908e8d4c8333a5
CRs-Fixed: 2244214
2018-05-22 15:32:59 -07:00
Jeff Johnson
da26399dfa qcacmn: wmi: Fix misspellings
Address the following issues in the wmi folder:
CHECK: 'addres' may be misspelled - perhaps 'address'?
CHECK: 'COMAND' may be misspelled - perhaps 'COMMAND'?
CHECK: 'defintion' may be misspelled - perhaps 'definition'?
CHECK: 'happend' may be misspelled - perhaps 'happened'?
CHECK: 'managment' may be misspelled - perhaps 'management'?
CHECK: 'messsage' may be misspelled - perhaps 'message'?
CHECK: 'overriden' may be misspelled - perhaps 'overridden'?
CHECK: 'poiter' may be misspelled - perhaps 'pointer'?
CHECK: 'refering' may be misspelled - perhaps 'referring'?
CHECK: 'refrence' may be misspelled - perhaps 'reference'?
CHECK: 'shrinked' may be misspelled - perhaps 'shrunk'?
CHECK: 'succesfully' may be misspelled - perhaps 'successfully'?
CHECK: 'succesful' may be misspelled - perhaps 'successful'?

Change-Id: Ie97e4d83cc88a2610524b38adc3474cdd31170d9
CRs-Fixed: 2241590
2018-05-19 19:40:53 -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
Jeff Johnson
79eaacb1e1 qcacmn: Fix typo "doesnt"
Replace typo "doesnt" with correct spelling "doesn't".

Change-Id: I10c7e288056ca296d4e69ec7ad47404482cbf6f3
CRs-Fixed: 2238309
2018-05-17 00:47:39 -07:00
Jeff Johnson
bbd428c9bf qcacmn: Fix typo "paramter"
Replace typo "paramter" with correct spelling "parameter".

Change-Id: I3f6f090a4f5348f64241e08c87b9bcd342696e10
CRs-Fixed: 2238309
2018-05-17 00:47:26 -07:00
Jeff Johnson
3f955233bf qcacmn: Fix typo "recieve"
Replace typo "recieve" with correct spelling "receive".

Change-Id: I7d88e57b97fa6d217630d4a5d5c365b56e714428
CRs-Fixed: 2238309
2018-05-17 00:47:23 -07:00
Jeff Johnson
19a59fec80 qcacmn: Fix typo "comand"
Replace typo "comand" with correct spelling "command".

Change-Id: Ia56f21487ac36e687aff8ac0ba693174e1e4a202
CRs-Fixed: 2238309
2018-05-17 00:47:15 -07:00
Jeff Johnson
ac11e17b7c qcacmn: Fix typo "lenght"
Replace typo "lenght" with correct spelling "length".

Change-Id: Ieea0c547c61248e510835d16a9fa55ace486df23
CRs-Fixed: 2238309
2018-05-17 00:47:02 -07:00
Jeff Johnson
eb83ef0ca8 qcacmn: Fix typo "sucess"
Replace typo "sucess" with correct spelling "success"

Change-Id: Ieacb299890210d67848268a389a57168e2a2badd
CRs-Fixed: 2238309
2018-05-17 00:46:44 -07:00
Naveen Rawat
d2115722b0 qcacmn: Add target_if/wmi implementation of get_stations_stats
Add changes to support get station stats from within the cp stats
component.

Change-Id: I936ea8e18e519f257ae2d57b384a5a39f4582aed
CRs-Fixed: 2210313
2018-05-16 23:20:19 -07:00
Surabhi Vishnoi
83f677e764 qcacmn: Fix memory leak in WMI
In case of invalid MIMO PS config in wmi cmd, wmi cmd
is not sent and we return. This leads to memory leak as wmi
net buf allocated is not freed before returning.

Fix the memory leak by freeing the wmi net buf in such case
before return.

Change-Id: I7f353f0b4d84a663801482a9c28296371bea3b89
CRs-fixed: 2230346
2018-05-16 12:13:30 -07:00
Naveen Rawat
d30dad6ef0 qcacmn: Fix possible OOB access while sending NAN msg to firmware
Fix possible OOB access while sending NAN msg to firmware, by checking
data len calculation against integer overflow and making sure data len
to be less than max wmi msg size.

Change-Id: I98f42b9924a1810282ae3bca031cd5a1e3dd4047
CRs-Fixed: 2205722
2018-05-15 19:05:59 -07:00
Naveen Rawat
963ee9411c qcacmn: Add target_if/wmi implementation of get congestion stats
Add changes to support get congestion stats(arp stats) from
within cp_stats component.

Change-Id: Ic3b2f020c0169c9113c1b40738f782cbb3b8f6c5
CRs-Fixed: 2222781
2018-05-14 11:39:24 -07:00
Srinivas Girigowda
5029ae7cb7 qcacmn: Consistently use policy_mgr_dual_mac_config
Remove duplicate structs wmi_dual_mac_config and sir_dual_mac_config
and use policy_mgr_dual_mac_config.

Change-Id: I6da6539f519ec46ee274ba3f3ae042e5fd9c25d2
CRs-Fixed: 2191031
2018-05-12 04:31:30 -07:00
Kiran Venkatappa
3619e6668f qcacmn: Update target resorce config with TWT params
Number of AP TWT and AP TWT stations are added in
target_resource_config to provide the configuration for TWT.
Add support in WMI to provide appropriate defaults for TWT.

Change-Id: Ica91f981d59a015b0b4cda41ba951b6ba22e8120
CRs-Fixed: 2212667
2018-05-03 09:12:54 -07:00
Vinay Adella
4662d4e744 qcacmn: Support to enable/disable SWBA events in beacon offload
When SWBA event is enabled, the FW will sent an event to the
host on every TBTT beacon.
Note that, unlike the legacy offload chips, this event is not
used by the host to send out the beacon frame itself.

Change-Id: Icf4440d79f7dbfb544f9d98c4de0e84bdb150459
CRs-Fixed: 2200805
2018-04-30 05:56:24 -07:00
Edayilliam Jayadev
9265122fcf qcacmn: Extract meta data from dbr event
Extract meta data from the dbr wmi event.

CRs-Fixed: 2219818
Change-Id: Ib19588775060e75017e9777206132a0efeec6223
2018-04-25 23:49:01 -07:00
Kiran Kumar Lokere
a536eac8cc qcacmn: Add support to set the MU EDCA params to FW
Add support to set HE MU EDCA parameters to FW

Change-Id: I1aa641764248c0fd834d8790d2268887d3ab0903
CRs-Fixed: 2220230
2018-04-20 02:33:37 -07:00
Naveen Rawat
57e47aaaa5 qcacmn: Add target_if/wmi implementation of get_tx_power
Add changes to support get tx power from within cp_stats component.

Change-Id: I89ac372bd31a8aa5a76938dc4ea4cfe05d6c7cf1
CRs-Fixed: 2210311
2018-04-19 22:06:53 -07:00
Abhinav Kumar
334355f3bf qcacmn: Add new ini to set min delay btw scan and reason bit-mask
Add ini "min_delay_btw_scans" to set minimum duration allowed between
two consecutive roam scans. Fw should not allow roam scan if duration
between two consecutive roam scan is less than min_delay_btw_scan.

Add ini "roam_trigger_reason_bitmask" to set default value of
bit-mask containing roam_trigger_reasons for which
min_delay_btw_scans constraints should be apply.

Pass value of min_delay_btw_scans and roam_trigger_reason_bitmask
to fw.

Change-Id: I2397467a13a720e763d1181d8cd50c571f861366
CRs-Fixed: 2221785
2018-04-19 22:06:47 -07:00
Abhinav Kumar
7c0e99b8cf qcacmn: Add new ini to enable/disable FT open feature
Add new ini item "enable_ftopen" to enable/disable
FT open feature. There is no ini currently to
disable only FT open.

Add sanity check to send 11r params in case of FT open
to fw only when enable_ftopen is enabled

Change-Id: Ifb27aea8de8c8837f8eda329e1247abfadabb628
CRs-Fixed: 2214772
2018-04-18 10:37:24 -07:00
Abhinav Kumar
e158b1c798 qcacmn: Add new ini to set delay Hand-off period
Add new ini item "ho_delay_for_rx" to set delay Hand-off
period. For LFR 3.0 roaming scenario, once roam candidate
is found, firmware waits for minimum this much duration
to receive pending rx frames from current BSS before
switching to new channel for handoff to new AP.

Pass value of ho_delay_for_rx to fw in case of roam
offload.

Change-Id: I19141928a2885371bc1b9e7b720473d99c4ebb1d
CRs-Fixed: 2221755
2018-04-16 16:57:10 -07:00
Santosh Anbu
1e11b47ba8 qcacmn: Move retrieval of wmi_handle to target_if layer
Remove inconsistent API for scan start and stop, where pdev_wmi_handle
is derived from psoc_handle at the WMI layer instead of using
the wmi_handle passed from the above layer i.e target_if

Change-Id: If259260e6f8cf77bf68748a8130db4440b88588a
CRs-Fixed: 2203048
2018-04-15 23:15:26 -07:00
lifeng
fa983052e3 qcacmn: Export antenna info to the userspace
qcacld-2.0 to qcacld-3.0 propagation
Discard the original wmi interface:
WMI_PEER_ANTDIV_INFO_REQ_CMDID/PEER_ANTDIV_INFO_EVENTID,
replace with the new one:
WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID/WMI_PDEV_DIV_RSSI_ANTID_EVENTID
to support chain value along with corresponding antenna info.

Change-Id: Ie9ea9d160e1ac1e2e65de422c85989159fb5a556
CRs-Fixed: 2220759
2018-04-13 09:30:42 -07:00
Soumya Bhat
0ae28067cb qcacmn: Tx capture/Mcopy mode changes
The following changes are added for Tx capture/Mcopy mode
1. Append ppduid for FW generated mgmt. frames
2. Append ppduid received in mgmt. TX completion for host
   generated mgmt. frames
3. Reuse nbuf received in HTT msg to send mgmt. payload to
   upper layers

Change-Id: I073cafa6389ed1ed835cc3ba4b9421b7a4b97d7f
CRs-Fixed: 2185543
2018-04-06 14:47:18 -07:00
Naveen Rawat
3aa16c441c qcacmn: Fix memory allocation in NDP firmware events
Fix memory allocation during NDP firmware events by allocating
memory before wmi_extract APIs are called.

Change-Id: I3af2f49895a79a45b3add246eeb9025b1df92faa
CRs-Fixed: 2183493
2018-04-04 07:37:36 -07:00
Tushnim Bhattacharyya
9c8a954dcf qcacmn: Use correct enum type in function send_get_rcpi_cmd_tlv
Use the wmi enum type in function send_get_rcpi_cmd_tlv converting from
rcpi_measurement_type.

Change-Id: I5b506059ad8b0f4cd65c24e20df6306a47249fdb
CRs-Fixed: 2216017
2018-04-03 16:50:15 -07:00
Yuanyuan Liu
977f53b1a3 qcacmn: Fix LLVM compiling issues
Remove typedef redefinition, use correct enum type, remove extra
parentheses and correct header guard.

CRs-Fixed: 2214003
Change-Id: I0a75c70cd530590a16f6bfa884955ebc26906de0
2018-04-02 16:41:52 -07:00
Kiran Venkatappa
136986dfca qcacmn: WMI interface changes to configure TWT
Add WMI interface changes required to configure TWT

Change-Id: I307f65f8049caf8365fb496fd69f91600ddbd832
CRs-Fixed: 2212556
2018-03-29 13:16:14 -07:00
Gyanranjan Hazarika
32f0002c21 qcacmn: WMI support to set autorate HE GI LTF combinations
WMI_VDEV_PARAM_AUTORATE_MISC_CFG is introduced to set
HE GI LTF combinations in case of autorate adaptation.
Add support for the same in host side wmi files.

Change-Id: Idf567d771539b17e669ddab8b85092e3cbf9d3c8
CRs-fixed: 2204393
2018-03-28 20:01:44 -07:00
Shashikala Prabhu
adb0aaa93d qcacmn: Set half/quarter rate flags in the scan channel list
Set half/quarter rate flags in the scan channel list and send it to FW.

Change-Id: Ia63a1f360337bdb4ba054892c0c3dfe773b97f11
CRs-Fixed: 2212700
2018-03-27 13:53:13 -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
Sravan Kumar Kairam
963cad9923 qcacmn: Modify WMI cmd to point to IPA CLD component
IPA module has been moved to CLD component under the converged
driver model. Point the wmi API's and structures to the newly
defined files.

Change-Id: I96205f7cc18dbea1c05a5f6314490ea6b3dd75fd
CRs-Fixed: 2180176
2018-03-21 18:57:49 -07:00
Neil Zhao
d32a7bdc86 qcacmn: Fix The beaconing functionality of Mesh vap fails
Enable mesh vap beaconing ioctl is sent via
vdev setting WMI cmd for WMI_VDEV_PARAM_CAPABILITIES.
But the vdev_param array for tlv is not populated.

Change-Id: Icefd3a506baf3459b95cdc31bd447f80068954df
CRs-Fixed: 2141343
2018-03-21 13:52:17 -07:00
Manikandan Mohan
3dc8c5127c qcacmn: Fix export symbol for multi drivers compilation
Update wmi module files to use qdf_export_symbol to facilitate
multiple driver module compilation support.

Change-Id: I44970ae510839cdf8f0e8446e39c4b6567eb2b93
CRs-fixed: 2197751
2018-03-19 19:58:16 -07:00