Commit Graph

958 Commits

Author SHA1 Message Date
Rhythm Patwa
c5068e341f qcacmn: Add support to offload FILS Discovery to FW
Construct the FILS Discovery frame template and send
template to FW.

Change-Id: I1052b9b8240ea9461e19bb70887b49aabffc4e05
2019-10-16 21:54:34 -07:00
Rhythm Patwa
7232cb187e qcacmn: Add support to parse 6GHz specific IEs
Add support to scan for the 6GHz band capabilities
IE and parse the IE. Added peer assoc param for updating
the minimum data rate advertised by the peer in 6GHz
Opration information.

Change-Id: Iebb4379d321832f3ed2bcd3174a54843fa2d497c
2019-10-16 21:54:30 -07:00
Shaakir Mohamed
af7c6e0445 qcacmn: Support pdevid conversion map for wmi_handle
Support pdevid conversion map for dynamic mode switch

Change-Id: I350d66b142c7206f87e4182abfbe990bdc0faa7d
CRs-Fixed: 2509336
2019-10-15 14:49:23 -07:00
Bala Venkatesh
00a0c37e87 qcacmn: Update the vdev_id in the vdev_chain_rssi stats
In tgt layer, rssi_stats are copied by comparing the vdev id
filled in the target layer and last reqested stats vdev id.
But in target layer api, target_if_cp_stats_extract_vdev_chain_rssi_stats
vdev id is not filled and that can lead to wrong stats in the upper
layers.

Update vdev id in the rssi stats.

Change-Id: I6a8bd032152b43b90ffd4acfc760e218bf4bba5b
CRs-Fixed: 2530148
2019-10-15 06:45:06 -07:00
Amar Singhal
56246e9faa qcacmn: Send multiple WMI_SCAN_CHAN_LIST_CMDID messages if required
If more than MAX_NUM_CHAN_PER_WMI_CMD are present, wmi buffer size can
exceed the maximum allocated buffer size. So iterate over the channel
list, and send multiple messages till channel list is empty. Also check
if 6 ghz channel is a PSC channel and mark channel flag accordingly.

Change-Id: I977a2d220c750cec1f261377b3838360bd8c0df3
CRs-Fixed: 2522763
2019-10-06 18:13:07 -07:00
Kiran Venkatappa
744c36176e qcacmn: Add support to send number of tx_desc limit to FW
Add support to send number of tx_desc limit to FW

Change-Id: I0465b0ca0579869d3278f8e55dd8957b07e39ac7
CRs-Fixed: 2530471
2019-10-05 19:10:47 -07:00
Naga
542fe34d96 qcacmn: Create separate wmi file for vdev mgr tlv ops
TLV and non-TLV definitions of vdev mgr ops are in component_dev,
they are carved out to a separate file in cmn_dev/wmi for adapting
target_if/vdev mgr component, they are made part of same file
which conflicts tlv design. Create separate file for tlv ops
to definitions and enable respective pointers.

Change-Id: I1e67c7c59adee61b4eb46acb8f51a7a6c385f056
CRs-Fixed: 2517009
2019-10-03 05:08:38 -07:00
Himanshu Batra
7ee0677954 qcacmn: Replace linux print APIs with qdf print APIs
Replace linux print APIs with equivalent level qdf print APIs.

Change-Id: If0a4a5326de87c9f023e8f4de996a4734ed6cda2
CRs-Fixed: 2530137
2019-09-29 23:15:37 -07:00
Pragaspathi Thilagaraj
6a9791c23f qcacmn: Add auto pm tag for WMI_WOW_SET_ACTION_WAKE_UP_CMDID
Add auto PM tag for WMI_WOW_SET_ACTION_WAKE_UP_CMDID command
such that rrm action frame feature can be enabled for runtime pm
as well.

Change-Id: Ife57c127b1af93632722c9b0a861ecf6ab99fda2
CRs-Fixed: 2513510
2019-09-28 04:01:27 -07:00
Sandeep Puligilla
5e0d7addc7 qcacmn: Add 6G scan dwell time parameter in scan request command
Add 6G scan active and passive dwell time parameter to scan request

Change-Id: Idf50aa23d9dd856c076b1bc3f84e2b3c0ef2b289
CRs-Fixed: 2530498
2019-09-27 00:22:08 -07:00
Wu Gao
85fe728e66 qcacmn: Use new pdev id conversion callback for dbr
In direct buffer rx component, it required to pdev id and mod id match
at same time, so use new pdev id conversion backup and convert pdev id
actually.

Change-Id: If53bde84564becd91f2dd0e20b002da2961dccd2
CRs-Fixed: 2528401
2019-09-23 00:06:33 -07:00
Min Liu
2c14fae3d5 qcacmn: Add interface to get / set eLNA bypass
Add interface to get / set eLNA bypass from / to firmware via WMI.

Change-Id: I2ed78aece6703c18999fdfbfdfa159a2abd477a6
CRs-Fixed: 2498526
2019-09-21 02:47:10 -07:00
Manikandan Mohan
9b1b93cfcd qcacmn: Add support for WMI over QMI
Add support for WMI over QMI to reduce power consumption for
periodic stats report.

Change-Id: Ic57b2bd18be803c97ffeea2e0073751d31e02202
CRs-fixed: 2521835
2019-09-19 18:56:11 -07:00
Will Huang
c180dcd475 Revert "qcacmn: Change pdev_stats to pdev_stats_v2"
This reverts Change-Id: I6dd3abd61730d8f17d74a11a42978a64853136e5.
wmi_pdev_stats_v2 and wmi_pdev_stats_v1 are defined depends on
specific target, can’t use them directly in our common code,
must use wmi_pdev_stats instead. And use different config to
enable v1 or v2 pdev stats.

Change-Id: I6ad11d723ac0c9ed55a266c204957af706045d3d
CRs-Fixed: 2521638
2019-09-19 07:47:09 -07:00
Rajeev Kumar Sirasanagandla
63b0f33c4c qcacmn: Use frequency for channel operation
As a part of 802.11ax amendment, 6GHz band operation is added.

Since the 6 GHz channel numbers are overlapping with existing 2.4GHz
and 5GHz channel numbers, use frequency to identify unique channel
operation instead of channel number. Channel frequency is unique across
bands.

As a part of above requirement, in the existing WMI interface handlers
and related functions, wherever missing, add frequency attributes to
identify unique channel operation.

Change-Id: I7c7542aa8488b4c55764c733590b77c64c397029
CRs-Fixed: 2517900
2019-09-18 11:23:14 -07:00
Debasis Das
a7b2f9a1d1 qcacmn: Process dma_ring_caps from EXT2 event
EXT2 event carries the dma_ring_caps TLV.Necessary
support is added to process the same.

Change-Id: I6bdfa2901c4213229a3fbb436120f993635a2925
2019-09-17 12:12:37 -07:00
sheenam monga
446837d5f8 qcacmn: Send vendor_roam_score_algorithm ini to firmware
vendor_roam_score_algorithm is added in order to
enable/disable roam score algorithm.
With this roam score Algorithm, AP score will be calculated
based on below equation:
AP Score = (RSSIfactor * rssiweight(0.65)) +
                        (CUfactor *cuweight(0.35))
Add vendor_roam_score_algorithm inside scoring_param
and inside function send_roam_scan_offload_ap_profile_cmd_tlv
populate score_param->vendor_roam_score_algorithm_id
from ap profile.

Change-Id: I21bb788d96a34c3bf237f0d304e51a7f4664d2ee
CRs-Fixed: 2517492
2019-09-17 05:15:25 -07:00
Yue Ma
a720310823 qcacmn: Log runtime PM wake source in debug level
Since callers who log runtime PM resume source may be invoked within
spinlocks or in other atomic contexts, log using info level will log
to console as well which may result overhead. Log using debug level
which will be logged to buffer only to avoid such issues.

Change-Id: I0497c7b7528200af9a34d816865e9bbbfd8bacf2
CRs-fixed: 2518800
2019-09-13 17:37:17 -07:00
Pragaspathi Thilagaraj
5a962e6c4c qcacmn: Fix pmk_info null pointer dereference
In send_set_del_pmkid_cache_cmd_tlv(), pmk_info is
dereferenced to copy vdev_id, flush flag and other
parameters. Add null pointer validation for pmk_info before
dereferencing pmk_info.

Change-Id: If44acc76d7e0e5d4387f089f8ec5684fc4648665
CRs-Fixed: 2520041
2019-09-10 19:03:33 -07:00
Subrat Mishra
3645c34060 qcacmn: Smart Antenna Multi radio support
Smart Antenna WMI cganges to extract pdev_id from
WMI_PEER_RATECODE_LIST_EVENT data.

Change-Id: I726d7615c7c624b20c5bfd5ae3e82bcdc1a9ad28
CRs-Fixed: 2514500
2019-09-10 12:23:03 -07:00
Disha Das
fe93761b89 qcacmn: Enable DISA WMI for FIPS
Enable DISA WMI commands for FIPS CCM test
by moving DISA WMI code to unified tlv files.

Change-Id: I90e82fef0e7e365faa6e15d555bf4d431214e14a
CRs-Fixed: 2516897
2019-09-09 23:27:43 -07:00
Abhishek Singh
5f1a994b1d qcacmn: Remove unused hidden ssid vdev restart command
Remove unused func and structures for hidden ssid vdev restart.

Change-Id: Ia22c7676ce582e2b554ff845c11641a6ef9d3013
CRs-Fixed: 2522560
2019-09-07 06:18:50 -07:00
Sourav Mohapatra
6561456601 qcacmn: Add support in host to receive ext2 ready event
Currently the host gets service_ready_event and service_ready_ext_event
during the init sequence as a part of handshake with firmware. As the
size of the service_ready_ext_event exceeds on adding further
parameters, new event is created.

Add support for WMI_SERVICE_READY_EXT2_EVENT to be processed after
WMI_SERVICE_READY_EXT_EVENT based on the service bit
WMI_SERVICE_EXT2_MSG.

Also add support to extract the reg db/bdf version information that
comes inside the ext2 event.

Change-Id: If0b57af362e7eb653f9189b912ec1dd3efb0f731
CRs-Fixed: 2501132
2019-09-04 11:31:00 -07:00
Linux Build Service Account
ea8878646c Merge "qcacmn: BA window reset after FT roam" 2019-08-30 05:36:51 -07:00
Jianmin Zhu
eb1cc95361 qcacmn: Set target if vdev start resp handler as public
Set target if vdev start resp handle as public to be registered
when wma open.
Remove wma_remove_vdev_req in ocb, don't use wma vdev cmd queue
and timer.

Change-Id: I2cd48ddd700ed1cde34231c22c02e0e54d4df5e3
CRs-Fixed: 2516536
2019-08-30 02:27:59 -07:00
Tushnim Bhattacharyya
33087cb402 qcacmn: Include wmi.h on the correct header files
Include wmi.h in wmi files.

Change-Id: I0584e58c5ae64e8ed93d024aa7943a9cdcdb07c8
CRs-Fixed: 2514753
2019-08-29 22:11:16 -07:00
Rajeev Kumar
e792050400 qcacmn: Remove CCE HW filter command from WMI runtime pm tagging
Remove CCE HW filter command from WMI runtime pm tagging since CCE
HW filter is not getting enabled in runtime pm mode.

Change-Id: I1cf778ec916cafda0644268b20d1c9c413ae0938
CRs-Fixed: 2514050
2019-08-29 22:11:12 -07:00
Gurumoorthi Gnanasambandhan
1ea546454f qcacmn: BA window reset after FT roam
Reset seq number for Station roaming back in FT roam.

Change-Id: I0664bafadb6fed29e5ef2e5d6c1dabe06090eed1
CRs-Fixed: 2490810
2019-08-29 15:25:58 +05:30
Bala Venkatesh
ae946e39c7 qcacmn: Reduce the log level
Reduce the log level from err or info to debug so that logs
are not printed on console.

Change-Id: I0d33c2a8f5b4bb4974656ac0d1eb6713a74cb5f4
CRs-Fixed: 2516287
2019-08-29 01:44:16 -07:00
gaurank kathpalia
f47b162435 qcacmn: Set max BW for each valid channel and send to FW
Configuration for Issue:-
DUT configuration:-
1. Configure DUT's country as US where channel 165 does
not support channel bandwidth of 40 mhz.
AP Configuration:-
1 Configure the AP in a country where channel 165
supports channel bandwidth 40MHZ.
Scenario of the issue:-
1.Connect to a diff AP on some channel x with same SSID,
and then roam to this AP.
Observation:-
The DUT would connect in 40 mhz to this AP instead of 20Mhz,
which violates the DUT's country reg rules.
Expectation:-
The DUT should re-connect only in 20Mhz on channel 165, or
only in max BW supported by reg in that country.
Issue:-
The DUT does not consider the max bandwidth allowed for the channel
in the country configured, and allow the re-association only
in the respective bandwidth.
Fix:-
Send the max BW supported by the channels in the current
reg domain to the FW so that it considers the max BW of the
channel and AP capability and then roam in the respective BW
only.

Change-Id: I977090c58e378e83cb5a3ee84a72afd018e8c428
CRs-Fixed: 2508187
2019-08-28 06:29:18 -07:00
Vignesh Mohan
3efefcbe29 qcacmn: Add dfs_set_cfreq2 flag in scan channel list params
Add dfs_set_cfreq2 flag (indicating secondary DFS set) in addition to
dfs_set (indicating primary DFS set) flag in scan channel list update
params to be sent to FW.

Change-Id: I67670f1d5b128c57c0fad03d9f9b14a99f1d38f6
CRs-Fixed: 2496923
2019-08-27 23:03:41 -07:00
Radha krishna Simha Jiguru
0ebbf5a1de qcacmn: Send ip_hdr_padding configuration through WMI resource config
Send configuration option to configure enable/disable of ip_hdr_padding in
IPQ8074/IPQ6018.

Change-Id: I83bd882559c4fa7527f6ad4a462b00b04cb2a638
2019-08-24 04:23:56 -07:00
Abhiram Jogadenu
d465314ffd qcacmn: Add support for AoA data extraction
Extract AoA data from WMI_PEER_CFR_CAPTURE_EVENTID.

Change-Id: I827ef735f46a3ed1bed61fda2d9bd39fd631f40d
CRs-Fixed: 2502029
2019-08-23 11:17:25 -07:00
Vignesh Viswanathan
3e31e2babd qcacmn: Add support for checksum from FW for pktlog
If the FW sends a pktlog checksum in the FW ready event, store that in
pl_dev and use it as buf_hdr.version in the pktlog buffer header.

Also, use a new magic value to identify the checksum in the
buf_hdr.version field.

If the FW does not send the checksum, then the existing magic number
and standard version number would be maintained.

Change-Id: Ib08c093a9b54495a2c5b7e0e163207f2b1eb4ce2
CRs-Fixed: 2508828
2019-08-22 02:53:10 -07:00
nwzhao
594d8a8167 qcacmn: add twt enable/disable complete event handlers
Add twt enable/disable complete event handlers

CRs-fixed: 2478884
Change-Id: I4c66d206f0eb2b910e9b4a68af3d855bb608198b
2019-08-21 14:19:01 -07:00
Srinivas Dasari
de39f3fc40 qcacmn: Configure roam trigger bitmap to firmware
Userspace may configure the roam trigger bitmap to WLAN host
driver to enable particular roam trigger reasons. Convert the
bitmap to the format of firmware trigger reason bitmap and send
to firmware.

Change-Id: I9fc78c180bd25c995dfd380f80e52e3eb302fce3
CRs-Fixed: 2507611
2019-08-21 02:59:33 -07:00
Pragaspathi Thilagaraj
63eb9e48dd qcacmn: Set WMI_PMK_CACHE_OP_FLAG_FLUSH_ALL only for pmksa_flush
The supplicant sends del_pmksa command to delete the pmk,pmkid
for a particular bssid. In this command pmk_len will be 0.
In send_set_del_pmkid_cache_cmd_tlv() the host driver currently
checks the pmk_len to set WMI_PMK_CACHE_OP_FLAG_FLUSH_ALL.
If pmk_len is 0 WMI_PMK_CACHE_OP_FLAG_FLUSH_ALL is set, which
is not correct. pmk_len will be zero in both the flush and delete
cases.

So add a new flag is_flush_all which will be set to true when the
supplicant sends pmksa flush command.
At WMI based on this flag set the flush flag to the wmi cmd.

Change-Id: I7626c500721a4b8cccbb21a08d4235c041456d1b
CRs-Fixed: 2502478
2019-08-20 05:19:43 -07:00
Srinivas Dasari
5276ece978 qcacmn: Configure full scan period to firmware along with scan period
Full scan period is the idle period in seconds between two
successive full channel roam scans. Configure this to firmware
along with scan period as part of roam_scan_offload request

Change-Id: I3d629f0735b50a5b8116b422779ae423c15cae1d
CRs-Fixed: 2507604
2019-08-19 08:20:55 -07:00
Jianmin Zhu
1af0d55f56 qcacmn: Add items for vdev start
Add hidden ssid flag and cac duration in vdev mlme obj, populate
vdev start param.
Register wmi ops extract_vdev_start_resp for target_if converge.

Change-Id: Iaebd49049fb791aaee39ef67611f96eed37d3605
CRs-Fixed: 2506245
2019-08-15 12:28:47 -07:00
hangtian
871207dc66 qcacmn: Set ssid and ssid_len when restart sap vdev
Set ssid and ssid_len when restart sap vdev. When hostapd set
ignore_broadcast_ssid to 1(zero-len) or 2(zero-content), when we force-scc
or setChanChange to restart sap vdev, if not set ssid and
ssid_len(default 0) in vdev start wmi, then firmware will reply
broadcast probe request since the ssid_len in broadcast probe req is 0
which matches the condition that firmware send probe response, however,
we should not reply with probe response.

Change-Id: I56580529e2b0db673c6b28c75094a7fd225cba77
CRs-Fixed: 2506391
2019-08-14 03:45:04 -07:00
Abhiram Jogadenu
9fb7c768c3 qcacmn: Add flag to enable CFR capture in Probe response
Add cfr_enable flag in Probe response, so that FW can start CFR
capture for particular client.

Change-Id: Id38b61317384a069308de4931463f1aef4f65f38
CRs-Fixed: 2502030
2019-08-13 12:09:32 -07:00
Ashish Kumar Dhanotiya
0cf77a56ea qcacmn: Process All the pdev stats events
There are 2 issues in the driver:
1. Currently host incorrectly fills the pdev id value as 0
   in stats request, If host sends the pdev id as 0 for
   stats request then FW sends the stats for all the pdevs.
2. If host requests pdev stats with pdev id as 0,
   FW can send multiple events for each pdev stats
   if one event buffer is not sufficient to fill the stats
   for all the pdevs. Curent host logic doesn't process
   multiple pdev stats events.

Address above 2 issues with below fixes:
1. Send correct pdev id to FW in the stats command.
2. Add a logic in host to process all the pdev stats events
   received as part of the pdev stats request.

Change-Id: I5b5bfcda2f30fb32749c653c6524ecbd2edc44a4
CRs-Fixed: 2503273
2019-08-13 07:33:27 -07:00
Subrat Mishra
4946004e75 qcacmn: Smart Antenna 11-bit ratecode support
Add Smart Antenna support to accommodate 11-bit ratecode
per Bandwidth.

CRs-Fixed: 2506480
Change-Id: Id8b58cf0466739a886ba4f37bc6adcb7f96fa0ea
2019-08-13 02:29:09 -07:00
Rajeev Kumar
d736cdf95e qcacmn: Add auto pm tag to WMI_HW_DATA_FILTER_CMDID
Add auto PM tag for WMI_HW_DATA_FILTER_CMDID command such
that CCE HW fiter feature can be enabled for runtime pm
as well.

Change-Id: Iec1495ebecb0aab0e695fb5e656ac13a22bba338
CRs-Fixed: 2505994
2019-08-12 12:24:21 -07:00
Pragaspathi Thilagaraj
fc54cc76a4 qcacmn: Read OWE and SAE roam target capability
Add support for OWE and SAE roam target capability.
Add event mapping for the tgt event
WMI_ROAM_PREAUTH_START_EVENTID.

Add changes to send WMI_ROAM_PREAUTH_STATUS_CMDID after
the SAE external authentication event is received.

Also for SAE/OWE/802.1x, the key management offload
needs to be enabled by default as PMKSA caching if
set_pmksa is received from the supplicant. So remove
the additional key management offload check so that
OKC and PMKSA is enabled by default for SAE and OWE.

Change-Id: I01d3a07e2ce60e25ea8624c030c6a5802205566d
CRs-Fixed: 2491042
2019-08-12 02:45:23 -07:00
Abhishek Ambure
c367e06da5 qcacmn: Enable target_if common code for vdev stop
As vdev conversion is done in phases, so vdev stop response
handler for target_if is made global. To process vdev stop
response tlv extraction API is registered to WMI tlv_ops.

Change-Id: Ib00f7339330e69d6103a175611df7b59c01faad0
CRs-Fixed: 2506500
2019-08-12 02:45:19 -07:00
Varuneshwar Petlozu
21a557f273 qcacmn: Add null check for event fields in extract_ndp_ind_tlv
In the function extract_ndp_ind_tlv the data from FW is assigned
to the event.The event fields ndp_cfg, ndp_app_info and ndp_scid
are used as source in the memcpy without null check which can cause
undefined behaviour.

To solve this, add null check for ndp_cfg, ndp_app_info and ndp_scid
before memcpy use.

Change-Id: I4bf592e6977c50518e53ece268c34450d9684304
CRs-Fixed: 2476173
2019-08-12 01:27:48 -07:00
Abhishek Ambure
c76db37021 qcacmn: Clean up CMN_VDEV_MGR_TGT_IF_ENABLE
WIN and MCL both uses common targer_if code for vdev manager.
So legacy code and "CMN_VDEV_MGR_TGT_IF_ENABLE" macro is removed.

Change-Id: I2984ae44f3a7cfa01b8f1455353d09deb4db5759
CRs-Fixed: 2503804
2019-08-11 10:38:20 -07:00
Wu Gao
46aa5afbb3 qcacmn: Fix compilation errors for DBR enable
Fix compilation errors for direct buffer rx component enable.

Change-Id: If0913b8357267fa65e61e0c7d197025ff850930b
CRs-Fixed: 2497783
2019-08-09 13:04:45 -07:00
Gyanranjan Hazarika
fe3cca9bd1 qcacmn: Add WMI changes for Dynamic HW mode configuration
This feature enables user to change HW mode dynamically
from DBS to DBS_SBS mode and vice-versa. Currently, HW
mode configuration is only possible through INI setting
requiring a subsequent reboot.

Relevant WMI changes are:

1. Relocate API wmi_unified_soc_set_hw_mode_cmd from
wmi_unified_sta_api.c to wmi_unified_api.c
2. Define API wmi_unified_extract_hw_mode_resp to extract
FW response
3. Parse and store new dev-cap fields wireless_modes,
low_2ghz_chan_freq, high_2ghz_chan_freq, low_5ghz_chan_freq,
and high_5ghz_chan_freq.

Change-Id: I49f975e7c5abc8503b651a3ebd4d56b23af915db
CRs-fixed: 2490212
2019-08-09 11:18:48 -07:00