Commit Graph

236 Commits

Author SHA1 Message Date
Manoj Ekbote
9c0ec6c2d8 qcacmn: Add API to allow WMI commands
Add API to restart sending WMI commands after they have been
stopped using wmi_stop() API.

Change-Id: Id65e5d1310cd7076ca47c6e7e19221492c10a868
2019-11-18 00:46:05 -08:00
Jianmin Zhu
ed37c7cbca qcacmn: Clean up legacy F/W event handler
target_if F/W event handler is moved from wma to cmn part per
MCL/WIN converge requirement, clean up legacy call back.

Change-Id: Ifacc6bb46e6bde1a73d9953e3403551dd2e92939
CRs-Fixed: 2555080
2019-11-04 01:57:51 -08:00
Sandeep Puligilla
9304a97961 qcacmn: Add WMI scheduler thread context execution
Add WMI scheduler thread context execution framework
to process firmware events in the common project.

Change-Id: If56a4767ee9428d2f93d54ccbf5a8bb17e89e0f4
CRs-Fixed: 2554727
2019-11-01 08:17:25 -07:00
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
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
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
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
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
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
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
Aditya Sathish
7de5d4f264 qcacmn: Add support for RF characterization WMI event
Add support to read the RF characterization WMI event
and parse each individual TLV containing the channel's
center frequency, bandwidth and RF characterization
metric.

Also, remove the support for reading the RF
characterization metrics from the extended
service ready WMI event.

Change-Id: I560583f9304005282c09a27f47c8d5c2778b1645
CRs-Fixed: 2487415
2019-08-02 03:13:52 -07:00
Himanshu Batra
032d352263 qcacmn: Replace void * Host Target Communications handle with abstract type
Replace void * Host Target Communications handle with abstract type handles
provided by Host Target Communications component

Change-Id: I16ca87e4f9716791d340da2fda0a8a640fa2ec34
CRs-Fixed: 2487151
2019-07-25 00:25:49 -07:00
Himanshu Batra
e6eeca68f3 qcacmn: Replace void * wmi_hdl with abstract type (5/10)
Replace void * wmi handle with abstract type handles
provided by wmi component.

Change-Id: Ic8d4ddc90c8e49a9629553debf6c09c7565fcd80
CRs-Fixed: 2475462
2019-07-18 03:46:01 -07:00
Himanshu Batra
453eea49a9 qcacmn: Replace void * wmi_hdl with abstract type (4/10)
Replace void * wmi handle with abstract type handles
provided by wmi component.

Change-Id: I4bb0f9fd921bf53d38dfb257818fee48c4516cd8
CRs-Fixed: 2475457
2019-07-18 03:45:58 -07:00
Himanshu Batra
6abe4bebd6 qcacmn: Replace void * wmi_hdl with abstract type (3/10)
Replace void * wmi handle with abstract type handles
provided by wmi component.

Change-Id: I04cd3ce5b4f36f7073d4644e2fd0d52da41e1af3
CRs-Fixed: 2475447
2019-07-18 01:07:26 -07:00
Himanshu Batra
29bc991911 qcacmn: Replace void * wmi_hdl with abstract type (2/10)
Replace void * wmi handle with abstract type handles
provided by wmi component.

Change-Id: Id12d6446aed8fd389b8677f08765bb31cabf2fb0
CRs-Fixed: 2475444
2019-07-18 01:07:23 -07:00
Himanshu Batra
9173c9192d qcacmn: Replace void * wmi_hdl with abstract type (1/10)
Replace void * wmi handle with abstract type handles
provided by wmi component

Change-Id: Idd1fddffd9e254f367e9ad608729668249bbe758
CRs-Fixed: 2475372
2019-07-18 01:07:20 -07:00
Abhiram Jogadenu
94748b3c46 qcacmn: Extract OEM response params
Add API to extract OEM response parameters from corresponding
WMI event.

Change-Id: I9a45bdac4a9091bf21ad8b9877e485baad4a75db
CRs-Fixed: 2467938
2019-07-11 02:10:41 -07:00
Paul Zhang
5e9e4549d9 qcacmn: Add OEM DATA vendor command support
This command is used to send OEM data binary blobs
from application/service to firmware.

Change-Id: Id806638bf8c53c65b32177969d965290da5701b9
CRs-Fixed: 2477337
2019-07-11 00:52:13 -07:00
Naga
8e5172276f qcacmn: Add WMI support for vdev delete all peer
Add WMI support for vdev delete all
peer request which will replace individual peer
delete of peers under a vdev during vdev down.

Change-Id: Ia41ae5fbf96a75d2a3e608564742d2a43e0ed2cc
CRs-Fixed: 2456858
2019-07-05 10:26:44 -07:00
Akshay Kosigi
c36e354311 qcacmn: Fix for removal of void pointer usage
Add changes to remove usage of void pointer for wmi_handle
Instead use an opaque pointer(set 2)

Change-Id: I06a89adaf15c6b398dbc901518aa83927b7ca16a
CRs-Fixed: 2479298
2019-07-02 09:47:56 -07:00
Akshay Kosigi
f0c668f54a qcacmn: Fix for removal of void pointer usage
Add changes to remove usage of void pointer for wmi_handle
Instead use an opaque pointer(wmi_handle_t)

Change-Id: I7c6dce564f34352c75e0b9d0c90591de625f1959
CRs-Fixed: 2479299
2019-07-02 02:40:11 -07:00
Vevek Venkatesan
02c9164668 qcacmn: featurize PKTLOG send cmd under feature flag in WMI layer
Featurize PKTLOG cmd handle under feature flag FEATURE_PKTLOG
as part of CONFIG_MCL cleanup.

Change-Id: Iae8c7e7caad001d7d37a8e17c1eb892f96009066
CRs-Fixed: 2467198
2019-06-20 08:45:46 -07:00
Aditya Sathish
ce928dcd67 qcacmn: Add support for chan RF info from service_ready_ext event
Channel RF info contains metrics that signify the throughput
availability of all the supported channels. This information
is sent in as discrete TLVs (per channel) as part of the WMI
extended service ready event.

Each TLV contains the frequency, bandwidth represented and
the actual channel metric.

Add support to read the above-mentioned TLVs from the extended
service ready event

Change-Id: If947e179c1ca41466997cc48840a8d36b6236780
CRs-Fixed: 2441921
2019-06-03 02:27:10 -07:00
Surya Prakash
4e517d7795 qcacmn: Use arrays for param conversion from host to target type
Convert host param id to target param id using arrays
instead of switch case. This enables removal of CONFIG_MCL
compile time macro and use specific macro
ENABLE_HOST_TO_TARGET_CONVERSION for conversions

Change-Id: I223141d47e92521e6600fc0e160ab2deef43d7d2
CRs-Fixed: 2418030
2019-05-13 03:31:48 -07:00
Pragaspathi Thilagaraj
9582515724 qcacmn: Send idle roam trigger monitor command to firmware
Send idle roam trigger monitor command to firmware based on
the SET SUSPEND mode command received from the user space.
The set suspend mode value sent will be used by firmware as
one of the parameters in determining if the device is in
idle state. When set suspend mode is 1, device is not in
idle state else the device is considered idle if idle state
data packet count, idle rssi, inactivity time criteria are met.

Add changes to send the idle trigger monitor value over the
wmi command WMI_IDLE_TRIGGER_MONITOR_CMDID.

Change-Id: I34632814a1e653fa87cfbab90c72ee1622dfd63c
CRs-Fixed: 2436222
2019-04-18 17:02:30 -07:00
Ajit Pal Singh
eb5bf8cfc7 qcacmn: Add new WMI API to check target suspend status
Add new WMI API to check target suspend status

Change-Id: Ie4ba55fc3db2d8de7354377b26325d3510a1e228
CRs-Fixed: 2425368
2019-04-05 08:37:31 -07:00
Srinivas Girigowda
2751b6d2b3 qcacmn: Consolidate multiple MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
Consolidate multiple (redundant) MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
CDP_MAC_ADDR_LEN
OL_TXRX_MAC_ADDR_LEN
DP_MAC_ADDR_LEN
HTT_MAC_ADDR_LEN
IEEE80211_ADDR_LEN
DEFRAG_IEEE80211_ADDR_LEN
ETHER_ADDR_LEN
HAL_MAC_ADDR_LEN
WLAN_MACADDR_LEN

CRs-Fixed: 2406591
Change-Id: I4a87f8ff556920c7b341bdbba99ec43c97b873f4
2019-03-28 16:50:32 -07:00
Arun Kumar Khandavalli
ac6e126adf qcacmn: Add support to improve coex logging
Add support to get the various Coex data from the debugfs.
This commit adds the support to get the various coex data:
            * COEX STATE
            * COEX DPWB STATE
            * COEX TDM STATE
            * COEX IDRX STATE
            * COEX ANTENNA SHARING STATE

The specific state information can be read via the debugfs.

Example to read the COEX STATE logging:
            sm6150:/ # echo "1" > /d/wlan/mws_coex_status_info
            sm6150:/ # cat /d/wlan/mws_coex_status_info
                    Reading for command MWS_COEX_STATE.
                    vdev_id = 0
                    coex_scheme_bitmap =  0
                    active_conflict_count = 0
                    potential_conflict_count = 0
                    chavd_group0_bitmap = 0
                    chavd_group1_bitmap = 0
                    chavd_group2_bitmap = 0
                    chavd_group3_bitmap = 0

Change-Id: I92272ad7edf44df22730ac0fa992d876840ba632
CRs-Fixed: 2413955
2019-03-25 08:52:41 -07:00
Sourav Mohapatra
9a6ee7d0ce qcacmn: Add WMI support for peer_extd2 stats
Add the necessary support for peer_extd2 stats in the WMI layer. The
stats contain rx_bytes, rx_err and rx_mpdus

Change-Id: I9f787e28a8e128471489c8f47ac03fef77dae930
CRs-Fixed: 2395636
2019-03-18 09:52:59 -07:00
Surya Prakash Raajen
80638517c2 qcacmn: Redefine pdev and vdev param to remove CONFIG_MCL
Convert pdev and vdev param conversion array to pointers
and allocate them only if conversion is required.Use run-time
NULL check of pdev and vdev param pointers for conversion
and remove CONFIG_MCL compiler flag.

CRs-Fixed: 2393422
Change-Id: Ica1c81f5f3c3a4b7e31dcb70c63471898c36933d
2019-03-15 18:04:02 -07:00
Shaakir Mohamed
9ff68da6e5 qcacmn: Add WMI support for Agile DFS feature
Add WMI commands and event to support Agile DFS feature:
	1)WMI send adfs channel config command
	2)WMI send adfs o-cac abort command
	3)WMI extract function to handle O-CAC complete event from target

Change-Id: Ib11d042bf06c786ab553aa28091145b620fbd551
CRs-Fixed: 2385536
2019-03-14 14:28:19 -07:00
Jeff Johnson
012467b128 qcacmn: Refine the Link Layer Stats Unified API
There are multiple issues with the Link Layer Stats Unified API:
- struct ll_stats_clear_params and struct ll_stats_get_params both
  incorrectly use the identifier "sta_id" to refer to a vdev_id.
- struct ll_stats_set_params has an unused "sta_id" field.
- Functions wmi_unified_process_ll_stats_clear_cmd() and
  wmi_unified_process_ll_stats_get_cmd() pass the MAC address as a
  separate parameter rather than adhering to the commonly used
  unified signature: func(handle, param).
- Not all of the functions and data structures are correctly protected
  by the WLAN_FEATURE_LINK_LAYER_STATS feature flag.

Refine the Link Layer Stats Unified API to address these issues.

This is co-dependent with Ifd7c8de2358121dae4752525ff57021a32be85d3
("qcacld-3.0: Use the refined Link Layer Stats Unified API").

Change-Id: Ifdc1fada55a559f3b3d0837ec20cceb653c45c40
CRs-Fixed: 2409293
2019-03-06 16:56:32 -08:00
Abhiram Jogadenu
c528145962 qcacmn: Add support for peer tx event param extraction
Add host's copy of peer cfr tx completion event param and prototype for
extract API.

CRs-Fixed: 2406064
Change-Id: I433171fc90d3c5dbb92dd525e8b5b2c441cc1bf9
2019-03-04 15:48:08 -08:00
Abhiram Jogadenu
975303cc41 qcacmn: Add wmi support for CFR capture command
Add wmi support for CFR capture command.

CRs-Fixed: 2372061
Change-Id: Icaeb30ccf619058383314317864be65380a551fd
2019-02-22 02:50:14 -08:00
Anirban Sirkhell
0f2677d572 qcacmn: Fix possible NULL pointer dereference
In son_ol_send_null(), check for the return value of
GET_WMI_HDL_FROM_PSOC() before using it.

Also, pass argument of type wmi_unified_t in calls
to wmi_unified_stats_request_send().

Change-Id: Idfedae2fcbde6d18b1829adefcabac0adbc55859
CRs-Fixed: 2371368
2019-02-07 04:58:01 -08:00
Edayilliam Jayadev
d4b7e3b572 qcacmn: Populate spectral capability and send via cfg80211
Populate Spectral capability structure with scaling parameters
from extended service ready event parameters. Send the spectral caps
via cf80211 interface.

CRs-Fixed: 2379652
Change-Id: Id0372bdd40843c2101df32d2e71920027a24909f
2019-02-05 04:02:20 -08:00
Nachiket Kukade
e2c9a74022 qcacmn: Combine all NAN related flags with WLAN_FEATURE_NAN
Flag WLAN_FEATURE_NAN_CONVERGENCE was added to protect the
converged NAN code inside NAN Component. Since the original
NAN Discovery related code has now been moved inside NAN
component, keeping this flag separate doesn't make sense.

Combine this flag with WLAN_FEATURE_NAN flag which is the
original NAN feature flag.

Change-Id: I0045dcccd36524cbcd4253347c9e0a5704193c2b
CRs-Fixed: 2377393
2019-02-04 10:44:44 -08:00
Jeff Johnson
6a00f1e830 qcacmn: Address Unified WMI "get link status" deficiencies
The original implementation of the "get link status" feature contains
some design and implementation details that are not ideal, so fix the
following deficiencies:
- The link_status_params struct contains three fields that are unused.
- The only link_status_params field that is used, session_id, uses
  legacy terminology instead of converged terminology
- The wmi_unified_link_status_req_cmd() implementation uses a void
  pointer instead of the correct underlying type for the WMI handle.

Note that change I508ec083298caa45d4cbb1ba28b21e47e379a804
("qcacld-3.0: Align with revised "get link status" Unified WMI") is
interdependent with this change.

Change-Id: I057ca0aff4a627c7fcdb9f90a5da46473813f60a
CRs-Fixed: 2381364
2019-01-22 05:06:43 -08:00
Harprit Chhabada
71c9846f58 qcacmn: Use the same callback signature for MCL as WIN
Callback signature in wmi_process_fw_event_default_ctx
is different for WIN and MCL. Make it same.

Change-Id: I28ad8e6068742095bdb9bc265e46dead8bfb217d
CRs-Fixed: 2372980
2019-01-21 03:55:04 -08:00
Arif Hussain
61847a9ba6 qcacmn: Use function name instead of file name in debug logs
Replace all instance of file name to function name in debug logs.

Change-Id: Iff731675772859f02c975005b2656eaa41c6f360
CRs-Fixed: 2377894
2019-01-17 22:20:46 -08:00
Jeff Johnson
3caa53099c qcacmn: Remove SSID hotlist support
Change Ie6c4a9847f2daa9ba2aebd17f386d584201b86d6 ("qcacld-3.0: Remove
obsolete set/reset ssid hotlist") in the qcacld-3.0 project removed
the only client of the WMI SSID hotlist infrastructure. Since this
infrastructure is obsolete, remove it.

Change-Id: I4a1de39c982947bbf4958d976426f95e3217f1a3
CRs-Fixed: 2381277
2019-01-17 13:12:49 -08:00
Kiran Kumar Lokere
25531c4717 qcacmn: Add support for SET KEY convergence
Make changes to the cmn driver to support SET KEY
convergence feature

Change-Id: I17b5f368a1f735eb394ea70f9b61cc033c3eb20a
CRs-Fixed: 2358796
2019-01-08 18:21:17 -08:00
Harprit Chhabada
6407dc4721 qcacmn: Create header file for wmi_unified_bcn_buf_ll_cmd
wmi_unified_bcn_buf_ll_cmd in wmi_unified.h had compilation flag
CONFIG_MCL. To get rid of the compilation flag, a separate header
file is created

Change-Id: I0bbcdf749f461f6880aacc1e3ef4e8e8fdc08ff6
CRs-Fixed: 2366773
2018-12-26 20:27:35 -08:00
Keyur Parekh
c28f839a84 qcacmn: FR-50469 Pktlog for particular peer mac address support
This FR is to enhance existing pktlog debug tool
This feature will allow to capture pktlog for particular
peer mac address.

Change-Id: I3676095536185f25b0d498e03f70246260a324fd
2018-12-06 00:03:13 -08:00
Kiran Kumar Lokere
7ec465930a qcacmn: Add support to configure action frame in HE TB PPDU
Add support to send the action frame in HE TB PPDU configuration
to firmware.

Change-Id: I8f8f63652e0890736266766b283411464f8903b9
CRs-Fixed: 2347028
2018-11-22 00:43:44 -08:00