Commit Graph

211 Commits

Author SHA1 Message Date
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
gaurank kathpalia
07e79f5860 qcacmn: Fill vdev nss chain params structure
Fill the nss chain params structure, with the dynamic params
and send to FW.

Change-Id: I6d9589b1af33a3bf2d4895424c22ca0c24b4b9a8
CRs-Fixed: 2349795
2018-11-16 05:10:23 -08:00
Ashish Kumar Dhanotiya
c4fd271d20 qcacmn: Send the vdev chain params to fw
Send the vdev nss, chain params to fw.

Change-Id: Ie62ea5001c579545b43b4c30ab15d9023e636042
CRs-Fixed: 2347628
2018-11-16 05:10:17 -08:00
phadiman
e5a330acf6 qcacmn: Set WMI Endpoint as Async
Conditionally set WMI enpoint as
async only for WIN and revert it
for MCL

Change-Id: I8969fffb4ba72909839baea2bdd12723665a8a4f
2018-11-15 01:38:33 -08:00
Arif Hussain
e1a66b56e2 qcacmn: Add support for obss spatial reuse default threshold
Add support to send default offsets to firmware.

Change-Id: I5d566fbd5eb074e7aac94f793c5431734c2e0922
CRs-Fixed: 2345173
2018-11-07 00:12:24 -08:00
Uraj Sasan
ff4f2d20fb qcacmn: Add Support for msdu retry stats
Requirement to provide various msdu retry stats to host:-
1. successfully transmitted msdus
2. Retried msdus
3. msdus retried for more than once
4. failed msdus

Change-Id: I4cd7dfceae16b4223df605fa174299858a8651c8
2018-10-30 03:43:20 -07:00
Alok Singh
1ae17d8c6f qcacmn: Add ctl failsafe event
CTL failsafe event handler adds the capability to inform host
when failsafe algorithm invoked.

CRs-Fixed: 2333137
Change-Id: I91298c9be1f0f8291c927dbd3ac4a2a9f1b9f31b
2018-10-18 02:17:40 -07:00
Qiwei Cai
770c90f8ca qcacmn: Featurize WMI APIs and TLVs that are specific to MCL
In the existing converged component, WMI TLV APIs are implemented in
a generic manner without proper featurization. All the APIs exposed
outside of WMI are implemented in wmi_unified_api.c and all the APIs
forming the CMD or extracting the EVT is implemented in wmi_unified_tlv.c.
Since WIN and MCL have a unified WMI layer in the converged component and
there are features within WIN and MCL that are not common, there exists a
good number of WMI APIs which are specific to WIN but compiled by MCL and
vice-versa. Due to this inadvertent problem, there is a chunk of code and
memory used up by WIN and MCL for features that are not used in their
products.
Featurize WMI APIs and TLVs that are specific to MCL -
- DSRC
- NAN
- P2P
- PMO
- roaming
- concurrency
- STA
- Generic MCL specific WMI (STA)

Change-Id: I03a68b0db30a3aa585b269ab0a1745b37bc7e0b7
CRs-Fixed: 2316935
2018-10-16 13:40:25 -07:00
narayan
a566dce41a qcacmn: WMI support added for sifs_trigger interval config
FR: TDMA Support for Wave2 Radios (host support)
Added a wmi cmd for configuring the interval between successive sifs
trigger frames given by the user app. Added a separate wmi cmd instead
of wmi param with reference to further scope.

Change-Id: Ifa778a761e3495ef7abab5f63a49661b307034ae
CRs-Fixed: 2330484
2018-10-16 11:38:15 -07:00
Gyanranjan Hazarika
584a187b8d qcacmn: changes for BSS Color Enahancement FR40903
Added WMI extract API for beacon_tx_status_event

Change-Id: I8516184d5734672d56553fb232bd8e84d89ded58
CRs-fixed: 2242109
2018-10-05 22:10:09 -07:00
Sathish Kumar
a8dcd50683 qcacmn: Featurize WMI APIs and TLVs that are specific to WIN
In the existing converged component, WMI TLV APIs are implemented in
a generic manner without proper featurization. All the APIs exposed
outside of WMI are implemented in wmi_unified_api.c and all the APIs
forming the CMD or extracting the EVT is implemented in wmi_unified_tlv.c.

Since WIN and MCL have a unified WMI layer in the converged component and
there are features within WIN and MCL that are not common, there exists a
good number of WMI APIs which are specific to WIN but compiled by MCL and
vice-versa. Due to this inadvertent problem, there is a chunk of code and
memory used up by WIN and MCL for features that are not used in their
products.

Featurize WMI APIs and TLVs that are specific to WIN
- Air Time Fareness (ATF)
- Direct Buffer Rx (DBR)
- Smart Antenna (SMART_ANT)
- Generic WIN specific WMI (AP)

Change-Id: I7b27c8993da04c9e9651a9682de370daaa40d187
CRs-Fixed: 2320273
2018-10-05 02:14:04 -07:00
Shashikala Prabhu
70da943414 qcacmn: Add wmi wrapper function to get target pdev id from host
Add wmi wrapper function to convert host pdev id to target  pdev id.

Change-Id: I3824a7556bf0b740d069602e9ee5a572c427c49c
CRs-Fixed: 2316715
2018-10-02 13:48:38 -07:00
Linux Build Service Account
1d27cc3a48 Merge "qcacmn: Spatial Reuse changes" into wlan-cmn.driver.lnx.2.0 2018-09-20 04:22:38 -07:00
Rachit Kankane
f96c05eb03 qcacmn: Featurize Roam offload specific WMI cmds
Featurize WMI_ROAM_SYNCH_COMPLETE and WMI_ROAM_SET_RIC_REQUEST_CMDID
under WLAN_FEATURE_ROAM_OFFLOAD feature flag.

Change-Id: Ib5baaea04582049c47a78491c88a9860f688d5bb
CRs-Fixed: 2304139
2018-09-18 01:03:12 -07:00
Pratik Gandhi
3bc1616092 qcacmn: Spatial Reuse changes
Add WMI interface for OBSS Spatial Reuse changes.

Change-Id: I5da23632a8746de749fc623439c9d9cbc02fcea5
CRs-Fixed: 2313292
2018-09-17 04:44:02 -07:00
Rajeev Kumar Sirasanagandla
61a090c1d5 qcacmn: Add wmi support to get firmware roam scan stats
Add wmi layer support to get firmware roam scan statistics which includes
scoring of roam candidates, channels, old and new bssids etc.,

Change-Id: I3a0aafbe66d12eea40e71ceb4c7c3a60b9d6e04f
CRs-Fixed: 2203904
2018-09-07 03:04:10 -07:00
Arif Hussain
ffcaef4344 qcacmn: Add logs in wmi_unified_cmd_send()
In wmi_unified_cmd_send() function, pass function name and
line number of caller and log the same in case of failure,
this approach helps to remove error logs in caller function
there by reducing text segment.

Change-Id: Ib70d55959087021c4495c175d5363375037afe00
CRs-Fixed: 2281983
2018-09-06 01:42:14 -07:00
Arif Hussain
58189eb0bd qcacmn: Add logs in wmi_buf_alloc()
In wmi_buf_alloc() function, pass function name and
line number of caller and log the same in case of failure,
this approach helps to remove error logs in caller function
there by reducing text segment.

Also add wmi_nofl_* macros.

Change-Id: Ib1ac8bf2bbcefa7f0015aff2733d3dc4773b185d
CRs-Fixed: 2281983
2018-09-06 01:42:09 -07:00
Rachit Kankane
898f6ff055 qcacmn: Featurize P2P Listen Offload
P2P Listen offload is not a requirement for Genoa, hence featurize
P2P listen offload code to save memory foot-print for Genoa.

Change-Id: I3c32b4ee2b37421e49acee4bd20d36e7a8a3bf77
CRs-Fixed: 2304555
2018-09-06 01:42:01 -07:00
Jeffin Mammen
31320b31bc qcacmn: Add WMI command for WMM based ATF config
Add new WMI command to support WMM based ATF configuration.
The new WMI command sends the Access category ID and the
corresponding airtime allocation to the firmware.

Change-Id: I7a5fafa6190d779d0fef8982b7b781af54656b19
CRs-Fixed: 2293193
2018-08-17 10:30:02 -07:00
Jeff Johnson
0820b3ab2b qcacmn: Remove wmi_unified_vdev_restart_send() prototype
Currently wmi_unified_api defines a wmi_unified_vdev_restart_send()
prototype, but there is no implementation of this function. This
discrepancy dates back to the initial introduction of the prototype in
change "qcacmn: Add tlv implementation of common unified API" (Change
Id I7e70b48ef5e1df0c0f81c639579e6eb1a6685dc3). Since this function
does not exist, and in fact has never existed, remove the prototype.

Note that another API, wmi_unified_vdev_start_send(), supports both
start and restart capability.

Change-Id: Ia88d8b1e825c806b454428e72d9731ccefd05c01
CRs-Fixed: 2286613
2018-07-31 19:01:27 -07:00
Rajeev Kumar Sirasanagandla
66970850d9 qcacmn: Add WMI layer support for action OUI extensions
Add WMI support to send action OUI extensions to firmware.
For STA interface, this feature is intended to control mode of connection,
connected AP's in-activity time, Tx rate etc.,

Change-Id: I6a0bc9d3f7f0d57805b872cae4baa1fe84fb8193
CRs-Fixed: 2254509
2018-07-24 13:20:42 -07:00
Anirban Sirkhell
d01ccdf6eb qcacmn: Add WMI for estimated airtime calculation
Add support for sending WMI command to firmware
to measure estimated airtime that a new client
will get and populate the result that firmware
returns in the ESP IE.

Change-Id: Ic5fcb11100ecd0597ba02dfa5512e2f4ff3558c9
CRs-Fixed: 2261469
2018-07-06 04:45:23 -07:00
c_priys
b214c2454c qcacmn: WMI Recording Failure on Multi-radio RDPs
WMI recording is done per pdev and hence an instance of
debugfs directory (eg: WMI0, WMI1, WMI2 for 3 radio boards)
has to be created in /sys/kernel/debug/ path.

The wmi handle is per pdev and hence is causing the problem of wmi_instance
being 0 always as each pdev has its own wmi_handle.
WMI1 and WMI2 debugfs directories are not created as wmi_instance
is always 0.

WMI debugfs directory is created for every pdev of the psoc and naming
convention is changed to WMI_SOCx_PDEVx.

Change-Id: Ieb7e9d072d84f699588a8f719508c5cd8d9873fb
CRs-Fixed: 2232472
2018-07-06 00:16:36 -07:00
Amar Singhal
dbff0cc4f2 qcacmn: Make worker thread processing API non static
Worker thread WMI processing API has more broader use now. So make it
non-static.

CRs-Fixed: 2268243
Change-Id: Iae51e1115f5f3664d08c891e8a42d24bd3ef7bcf
2018-06-30 00:18:01 -07:00
Kabilan Kannan
762ad5db89 qcacmn: Add SAR V2 support
Add changes to support SAR V2 power limits

Change-Id: Ife7af8db51a45660bc27d1e5b857e38f4dd40935
CRs-Fixed: 2217069
2018-06-29 13:31:50 -07:00