Commit Graph

234 Commits

Author SHA1 Message Date
Bala Venkatesh
2fde2c61db qcacld-3.0: SAP CFG Items part 2
Add support for the sap cfg items in new mlme component

Change-Id: I80f3f00a85720fe7bec11575fe67dd2f6b9d44b2
CRs-Fixed: 2316643
2018-09-20 10:30:08 -07:00
Vignesh Viswanathan
987f0bba09 qcacld-3.0: Use MLME CFG for BSS Scoring Items
Implement the usage of MLME CFG infra for BSS Scoring related INI Items
and remove the older INI definitions from HDD.

Change-Id: I0db69138f0439131916a38176b5b21b706ff3671
CRs-Fixed: 2318320
2018-09-19 23:15:15 -07:00
Dundi Raviteja
db2dbab047 qcacld-3.0: Possible NULL pointer dereference in pmo
Currently, the return value of get_wmi_unified_hdl_from_psoc() API
is passing directly as argument to some functions without checking
the return value for NULL which may cause NULL pointer dereference.

To address this issue, add NULL checks for return value of
get_wmi_unified_hdl_from_psoc() API where ever it is getting used.

Change-id: I60e89b5305ad31d8663a8feed3cb0f71105bb060
CRs-Fixed: 2316868
2018-09-19 23:15:11 -07:00
Vignesh Viswanathan
ff78bc174f qcacld-3.0: Add BSS Scoring Related INI Items
Add BSS Scoring Related CFG Items to CFG Component.

Change-Id: Icb012f2560e7ebed298d2041085a516c582e56b6
CRs-Fixed: 2318316
2018-09-19 23:15:08 -07:00
Wu Gao
55f2171184 qcacld-3.0: Refine mlme lfr configurations
Define mlme lfr configures based on converged cfg component, add
APIs to get and set mlme lfr configurations.

Change-Id: I8aa9b37d1b943fcdc6a84704ede37b19cd7cffb8
CRs-Fixed: 2316490
2018-09-18 12:48:57 -07:00
Pragaspathi Thilagaraj
cd6aef0bd3 qcacld-3.0: Add MLME CFG items of MBO INI configs
Add the MBO ini configs to mlme for the following:
1. CFG_MBO_CANDIDATE_RSSI_THRESHOLD
2. CFG_MBO_CURRENT_RSSI_THRESHOLD
3. CFG_MBO_CUR_RSSI_MCC_THRESHOLD
4. CFG_MBO_CAND_RSSI_BTC_THRESHOLD

Change-Id: I9e779c912538973c8281170ec8c212a4f05b7e2e
CRs-Fixed: 2314168
2018-09-18 06:17:05 -07:00
Abhishek Singh
5ad797d0b3 qcacld-3.0: Remove legacy APIs to modify vdev state machine
This change Removes legacy APIs to modify vdev state machine and
add use new API to get vdev state.

Change-Id: I48aa3744dafc6d13a43a14e48de821c7dadf3a37
CRs-Fixed: 2314730
2018-09-17 06:09:35 -07:00
Wu Gao
406c53c169 qcacld-3.0: Refine mlme sta configurations
Define mlme sta configures based on converged cfg component, add
APIs to get and set mlme sta configurations.

Change-Id: I1a03037081ebe27760d23405adc3cc9042ba7698
CRs-Fixed: 2312002
2018-09-17 10:41:35 +08:00
Pragaspathi Thilagaraj
48d273cbf0 qcacld-3.0: Remove legacy INI items of QOS aggregation configs
Remove the legacy INI code from hdd_cfg. Replace the existing
access from hdd_config with new mlme api.

Change-Id: Iddde15330c1ad39a59bd9a3c7ea86af971df61b5
CRs-Fixed: 2313296
2018-09-14 03:12:25 -07:00
Pragaspathi Thilagaraj
17afb8410c qcacld-3.0: Add MLME CFG items of QOS aggregation configs
Add the following QOS tx/rx aggregation related ini configs to
MLME CFG:
1. CFG_TX_AGGREGATION_SIZE
2. CFG_TX_AGGREGATION_SIZEBE
3. CFG_TX_AGGREGATION_SIZEBK
4. CFG_TX_AGGREGATION_SIZEVI
5. CFG_TX_AGGREGATION_SIZEVO
6. CFG_RX_AGGREGATION_SIZE
7. CFG_TX_AGGR_SW_RETRY_BE
8. CFG_TX_AGGR_SW_RETRY_BK
9. CFG_TX_AGGR_SW_RETRY_VI
10. CFG_TX_AGGR_SW_RETRY_VO
11. CFG_SAP_MAX_INACTIVITY_OVERRIDE_NAME

Change-Id: I209a29695b08375796e02985e90332a3bd3c5b96
CRs-Fixed: 2313294
2018-09-14 03:12:21 -07:00
Srinivas Girigowda
eff16d956b qcacld-3.0: Fix tab stop checkpatch warnings
Fix tab stop checkpatch warnings.

Change-Id: I4ccbc39b571737413de038fabcd4b8641a39cd62
CRs-Fixed: 2312593
2018-09-13 13:20:38 -07:00
Wu Gao
d8f3db0fb5 qcacld-3.0: Refine mlme obss ht40 configurations
Refine mlme obss ht40 configurations based on converged cfg component.
Remove related legacy codes.

Change-Id: If4f061a16e9a2a0bba81d1d24aa1f52bbeadacf5
CRs-Fixed: 2311907
2018-09-13 04:52:15 -07:00
Bala Venkatesh
100d742755 qcacld-3.0: Add SAP CFG ITEMS Part 1
Add support for the mlme cfg SAP items in mlme component

Change-Id: I7b97ec14d0e328f8abe8585927da1947e5d181d8
CRs-Fixed: 2313045
2018-09-12 08:50:02 -07:00
Sandeep Puligilla
b7beb478db qcacld-3.0: Add legacy VDEV manager callbacks
Add legacy VDEV manager callbacks framework.

Change-Id: I8529a54382b3ffdecd25e54a97fc69d6a6a68177
CRs-Fixed: 2312724
2018-09-12 07:08:13 -07:00
jitiphil
fdcaaba297 qcacld-3.0: Introduce SSR protection wrapper to IPA callback APIs
IPA driver calling WLAN driver callback, and in parallel WLAN
driver is unloading and freeing this callback, which leads to
a use after free scenario

Add SSR protection wrapper to all of IPA callback APIs in driver
to avoid racing against driver unload or SSR or self recovery

Change-Id: I5dcdfe4749b89104ec79eac060e60fe5aa7c2335
Crs-Fixed: 2307365
2018-09-12 07:08:09 -07:00
Sourav Mohapatra
113685f379 qcacld-3.0: Add support for FW Offload component
This is for adding support for FW offload component. It is responsible
to offload all the ini params that are needed by the firmware. To have
this component, the new files added are

components/fw_offload/dispatcher/inc/cfg_fwol.h
components/fw_offload/dispatcher/inc/wlan_fwol_ucfg_api.h
components/fw_offload/dispatcher/src/wlan_fwol_ucfg_api.c
components/fw_offload/core/inc/wlan_fw_offload_main.h
components/fw_offload/core/src/wlan_fw_offload_main.c
components/fw_offload/dispatcher/inc/wlan_fw_offload_public_struct.h

The fw_offload_main.h is to take care of the public APIs for the
component. The corresponding .c file implements the init/deinit of
the component. The fw_offload_public_struct.h is to define the public
structures needed. The ucfg files are for the APIs that can be called
from other components. The cfg_fwol stores the INIs and CFGs.

Change-Id: I4405b87e6dec15aa94146f8ec550078c3d03b1e6
CRs-Fixed: 2307837
2018-09-12 02:19:15 -07:00
Pragaspathi Thilagaraj
00bd8bc47f qcacld-3.0: Remove legacy ini for chainmask configs
Remove the legacy ini config values defined in hdd_cfg.
Call the mlme cfg get api to retrieve chainmask config values.
Remove the tx_chainmask_cck from cds_config as mlme object is
not initialized during cds_open. Call mlme cfg api during
wma_open to populate the tx_chainmask_cck value.

Change-Id: If48aeb62cf35e2e604be2b72845b8e98c5c313dc
CRs-Fixed: 2310382
2018-09-11 12:01:28 -07:00
Pragaspathi Thilagaraj
ce0a9d02ce qcacld-3.0: ADD MLME CFG items of Chainmask configs
Add the following chainmask INI configs to MLME cfg:
1. CFG_VHT_ENABLE_1x1_TX_CHAINMASK,
2. CFG_VHT_ENABLE_1x1_RX_CHAINMASK,
3. CFG_TX_CHAIN_MASK_CCK,
4. CFG_TX_CHAIN_MASK_1SS,
5. CFG_11B_NUM_TX_CHAIN_NAME,
6. CFG_11AG_NUM_TX_CHAIN_NAME,
7. CFG_TX_CHAIN_MASK_2G_NAME,
8. CFG_RX_CHAIN_MASK_2G_NAME,
9. CFG_TX_CHAIN_MASK_5G_NAME,
10. CFG_RX_CHAIN_MASK_5G_NAME

Introduce the basic infra APIs related to these configs from mlme

Change-Id: I56b56fe9ba5282b459bc03587c2cacbf91b12af3
CRs-Fixed: 2310381
2018-09-11 12:01:23 -07:00
gaurank kathpalia
d9ee9f2481 qcacld-3.0: Add src, and dst id support in SYS/CFG
In the scheduler_post_message, src_id is now added to
know the source module of the msg. the present scheduler
doesn't know about the same which is scheduler_post_msg

Replace the scheduler_post_msg with scheduler_post_message

Change-Id: I869e14830b2f57b951033ada5957594fac7bc4c2
CRs-Fixed: 2305994
2018-09-11 03:49:00 -07:00
Pragaspathi Thilagaraj
f4cc58b320 qcacld-3.0: Add MLME CFG items of sap/sta erp protection
Add the following SAP/STA protection ini and cfg parameters to MLME cfg:
CFG_PROTECTION_ENABLED       - CFG
CFG_FORCE_POLICY_PROTECTION  - CFG
CFG_IGNORE_PEER_HT_MODE_NAME - INI

Change-Id: I3763d62c6aa4ae79a5a31dfac248e8367b6369ad
CRs-Fixed: 2310378
2018-09-07 01:29:17 -07:00
Rajeev Kumar Sirasanagandla
85f8b02175 qcacld-3.0: Add debugfs support for offload info
Add debugfs entry to get offload info (mc addr list, arp, ns etc.,)
for STA interface.

Change-Id: I8bf4491929b5ef04ed5ce19f4b0030945f0eb0c0
CRs-Fixed: 2203786
2018-09-06 08:54:37 -07:00
Vignesh Viswanathan
a0921c424e qcacld-3.0: Fix naming conventions for MLME APIs and files
Fixed the naming conventions of APIs and files for MLME component.
Internal MLME component only APIs are in wlan_mlme_main.h/c files
under core.
APIs exposed to other components are in wlan_mlme_api.h/c files
under dispatcher.
APIs exposed to HDD are in wlan_mlme_ucfg_api.h/c files
under dispatcher.
mlme_init/deinit, mlme_psoc_open/close are called from HDD,
so made that as ucfg APIs.

Change-Id: I049008ceaa86ca52acd3ad9a02f903a732117d1f
CRs-Fixed: 2309276
2018-09-05 09:49:58 -07:00
Rachit Kankane
0cf4d4feb1 qcacld-3.0: Featurize WLAN_FEATURE_PACKET_FILTERING
Featurize packet filter properly, as this feature was partially featurized.

Change-Id: Ib4b0e94ab2b9847f824220e2cd4efc2cee6fae8d
CRs-Fixed: 2304233
2018-09-04 13:45:49 -07:00
Vignesh Viswanathan
7818250f0f qcacld-3.0: Fix camel case names in mlme_ht_capabilities_info structure
Rename camel case names of members of mlme_ht_capabilities_info
structure.

Change-Id: I576ad77c4744c240537d540f1efaab0e7d9cb109
CRs-Fixed: 2293859
2018-08-31 14:49:14 -07:00
Karthik Kantamneni
22dd0f69cb qcacld-3.0: Add MLME CFG items of rates [PART 1]
Add MLME CFG items of rates

Change-Id: I9f52f2ef0eef4698ddc13c55dd56d938a6e4c677
2018-08-31 02:33:14 -07:00
Sravan Kumar Kairam
cd430b6ebb qcacld-3.0: Send IPA RX offload disable to FW
When AP_DISCONNECT event occurs during IPA resource unloading
in progress, unload time out can happen due to IPA driver taking
time in suspending pipes or delay in FW HTT responses. In such
case events are added to pending queue. Pending queue events are
executed in worker thread context when resource unload is complete.
There is possibility of delay in scheduling of worker thread. When
worker thread is scheduled after HOST sends VDEV DELETE to FW and
processing of AP_DISCONNECT pening event will leads to FW assert.
Reason is as part of AP_DISCONNECT host sends IPA OFFLOAD disable
to FW on deleted vdev id. So send IPA RX offload disable command to
FW when AP_DISCONNECT is added to pending queue.

Change-Id: Ib24deb7654496ec60a3e56b8a9d1e1bd2d8c2db5
CRs-Fixed: 2295105
2018-08-24 18:35:28 -07:00
Rajeev Kumar Sirasanagandla
80e16bfe83 qcacld-3.0: Add null check in action oui send request
In target_if_action_oui_send_req(), there is no NULL check against
return value of GET_WMI_HDL_FROM_PSOC() which can result in NULL
pointer exception. Therefore, add NULL check.

Change-Id: Ibbc4fdf03563496b9d5dac63141921dd8bdea4fa
CRs-Fixed: 2299793
2018-08-24 07:16:45 -07:00
Vignesh Viswanathan
c6812821f7 qcacld-3.0: Add support for wildcard OUI in Action OUI framework
Add support for wildcard OUI 0xFFFFFF in action OUI framework.
When the OUI FFFFFF is defined for some action OUI ini and bit 0
of info_presence bit is set to 0 then the check for vendor OUI
in vendor specific IEs and the vendor IE data checks are skipped
and other checks like MAC, Capabilities are done during connection.

Change-Id: I6e996c5d79f4f7bd91e11134b1b8ba69a1ff0253
CRs-Fixed: 2293167
2018-08-20 15:15:11 -07:00
Vignesh Viswanathan
21c58cb8c3 qcacld-3.0: Add MLME CFG items and APIs
Add the basic infra for MLME CFG items and the APIs to be used from
other components.

Change-Id: I39654de8f7266089d574b85437a19e8d21f91249
CRs-Fixed: 2293825
2018-08-20 05:29:46 -07:00
Dustin Brown
6a8d39b6ed qcacld-3.0: Reduce excessive logging
Reduce or removed several excessive log in order to avoid spamming
dmesg.

Change-Id: I818c8f88f66ad11a3c3bc5d5a12799e83c02e5ff
CRs-Fixed: 2296680
2018-08-14 23:32:49 -07:00
Sravan Kumar Kairam
ad65331565 qcacld-3.0: Remove debug assert in wlan_ipa_uc_disable_pipes
Remove the debug assert added in wlan_ipa_uc_disable_pipes when
the check for IPA pipes disabled is true. Anyway logging is in
place to give information about the scenario.

Change-Id: If2906f0ee827e84df4594693702064cd249c564c
CRs-Fixed: 2295461
2018-08-13 18:12:32 -07:00
Manikandan Mohan
dcd0fdfcc0 qcacld-3.0: Update for converged NAN config params
Update driver to use NAN config params based converged CFG
component. Cleanup hdd config references to nan ini params.

Change-Id: I5af85d68ee53ad557e64523f7a1719e328536926
CRs-fixed: 2290360
2018-08-10 20:45:16 -07:00
Vignesh Viswanathan
f9a704c92a qcacld-3.0: Add support for 1x1 connect with 1 Tx/Rx Chain action OUI
Add support for new 1x1 connect with 1 Tx/Rx Chain action OUI to be
parsed and sent to the FW. From host during connection, the behaviour
is same as existing connect 1x1 action OUI where nss is sent to 1 to
the FW, but the FW takes the decision to use only one Tx/Rx chain
based on the OUIs defined in the new action ID.

Change-Id: Ia464209043dc73bcc71577c43b28fbe13e780c23
CRs-Fixed: 2264326
2018-08-09 14:34:02 -07:00
jiad
fa131feaa0 qcacld-3.0: Fix WLAN IPA duplicate deactivation
FW assert is observed when HTT_WDI_IPA_OPCODE_TX_SUSPEND is sent twice
in a row. Issue is that CLIENT_DISCONNECT and AP_DISCONNECT could both
trigger IPA deactivation when CLIENT_DISCONNECT is poped from pending
queue and in another thread AP_DISCONNECT event arrives.

Fix is to add check for resource_unloading flag and if resource_unloading
is set to true, IPA deactivation is ignored since deactivation is already
undergoing.

Change-Id: I68a245809e263ce396b910c4cc3d4e6b071812c0
CRs-Fixed: 2288941
2018-08-08 09:11:45 -07:00
Dustin Brown
1e3ec6b86d qcacld-3.0: Reduce logs with high occurrence
Several logs show up repeatedly in dmesg. Reduce the following logs to
help avoid spamming dmesg:
 * wlan_ipa_wdi_meter_notifier_cb()
 * hdd_print_netdev_txq_status()
 * hdd_wlan_start_modules()
 * hdd_wlan_stop_modules()
 * csr_nonscan_pending_ll_peek_head()
 * sme_qos_statustype()

Change-Id: Ic5ca059f258dee92ffaa4b0ecca47df41b424c11
CRs-Fixed: 2292710
2018-08-07 22:35:41 -07:00
Dustin Brown
6661df3104 qcacld-3.0: Add Driver Synchronization Core (unit test)
The Driver Synchronization Core (DSC) is a set of synchronization
primitives for use by the driver's orchestration layer. It provides APIs
for ensuring safe state transitions (including bring up and tear down)
of major driver objects: a single driver, associated psocs, and their
associated vdevs.

APIs are divided into two categories: mutual exclusion of conflicting
transitions, and operation tracking, blocking, and waiting capabilities.

For part 5, add the unit test implementations.

Change-Id: Ia68d6df18894b254c1f5fe3855d896e96be38a90
CRs-Fixed: 2290260
2018-08-06 19:03:05 -07:00
Dustin Brown
7fba9a74e8 qcacld-3.0: Add Driver Synchronization Core (vdev)
The Driver Synchronization Core (DSC) is a set of synchronization
primitives for use by the driver's orchestration layer. It provides APIs
for ensuring safe state transitions (including bring up and tear down)
of major driver objects: a single driver, associated psocs, and their
associated vdevs.

APIs are divided into two categories: mutual exclusion of conflicting
transitions, and operation tracking, blocking, and waiting capabilities.

For part 4, add the vdev-level implementation.

Change-Id: I3f5ef0f7abf24a45d757d286d450ef086640c56a
CRs-Fixed: 2290260
2018-08-06 19:03:03 -07:00
Dustin Brown
a17fa404d1 qcacld-3.0: Add Driver Synchronization Core (psoc)
The Driver Synchronization Core (DSC) is a set of synchronization
primitives for use by the driver's orchestration layer. It provides APIs
for ensuring safe state transitions (including bring up and tear down)
of major driver objects: a single driver, associated psocs, and their
associated vdevs.

APIs are divided into two categories: mutual exclusion of conflicting
transitions, and operation tracking, blocking, and waiting capabilities.

For part 3, add the psoc-level implementation.

Change-Id: I30406c61e89cc220a2697e13f38289554985a7bf
CRs-Fixed: 2290260
2018-08-06 19:02:59 -07:00
Dustin Brown
f838322559 qcacld-3.0: Add Driver Synchronization Core (driver)
The Driver Synchronization Core (DSC) is a set of synchronization
primitives for use by the driver's orchestration layer. It provides APIs
for ensuring safe state transitions (including bring up and tear down)
of major driver objects: a single driver, associated psocs, and their
associated vdevs.

APIs are divided into two categories: mutual exclusion of conflicting
transitions, and operation tracking, blocking, and waiting capabilities.

For part 2, add the driver-level implementation.

Change-Id: I86630edfe11e89cc035974ae76ed3908cf68cde4
CRs-Fixed: 2290260
2018-08-06 19:02:56 -07:00
Dustin Brown
424788cfe0 qcacld-3.0: Add Driver Synchronization Core (common)
The Driver Synchronization Core (DSC) is a set of synchronization
primitives for use by the driver's orchestration layer. It provides APIs
for ensuring safe state transitions (including bring up and tear down)
of major driver objects: a single driver, associated psocs, and their
associated vdevs.

APIs are divided into two categories: mutual exclusion of conflicting
transitions, and operation tracking, blocking, and waiting capabilities.

For part 1, add common infrastructure and headers.

Change-Id: Id290e66d2dccd28b89fed5f285d3692ff3c814e7
CRs-Fixed: 2290260
2018-08-06 19:02:53 -07:00
Dustin Brown
7e761c71eb qcacld-3.0: Reduce hdd/ipa info logs
A number of HDD and IPA logs are generally unnecessary and have been
identified as contributing to log spam. Reduce these log messages to the
debug level.

Change-Id: I2f92bb4caec5adc65fdad0146298aa5f88b43def
CRs-Fixed: 2288430
2018-07-31 19:01:18 -07:00
Nirav Shah
790d943594 qcacld-3.0: Add per module logging macros without function/line info
Add per module logging macros without function/line info
to avoid adding function/line info where it is not required.

Change-Id: Id808fef623b82cec38fc31071ef384f3ff0c92da
CRs-Fixed: 2278874
2018-07-27 09:09:42 -07:00
jiad
3a321f3cfb qcacld-3.0: Fix WLAN IPA disconnection handling
When wlan driver unloading is in progress, IPA_OPCODE_TX/RX_SUSPEND
will not be processed and resource_unloading may be left as true.
Moroever since driver will be unloaded, IPA_OPCODE_TX/RX_SUSPEND
interaction between Host and FW will not be necessary.

Fix is to disable IPA pipes directly when handling disconnection
if wlan driver unloading is in progress.

Change-Id: Ia4af1ab04052b1a9bab44105760de50ad6263dbb
CRs-Fixed: 2279044
2018-07-25 11:52:11 -07:00
Nirav Shah
d6fa0f8cd8 qcacld-3.0: Add compilation flag for enter/exit macros
Map all enter/exit log macros to enter/exit QDF TRACE macro
to provide option to compile out enter/exit logs if required.

Change-Id: I0c6cd633705e820fcfeb47e3f81a3522c9ef1974
CRs-Fixed: 2274850
2018-07-25 09:40:33 -07:00
Wu Gao
bdb7f27bde qcacld-3.0: Enable TDLS configures based on converged CFG component
Enable TDLS configures based on converged cfg component and remove
legacy codes.

Change-Id: I77221a8493c8a20efdae9e714a98da74f5c6b6ed
CRs-Fixed: 2277572
2018-07-24 16:58:25 -07:00
Rajeev Kumar Sirasanagandla
4725ae4600 qcacld-3.0: Add support for action OUI extensions
Add support for action OUI extensions which can be used by station
to control mode of connection, connected AP's in-activity time and
Tx rate etc.,

Change-Id: Ie85e29c4b0ed7ac2815709d7a4e607c4ba46c6ca
CRs-Fixed: 2254502
2018-07-24 13:20:33 -07:00
Wu Gao
e568979eb5 qcacld-3.0: Enable P2P cfg based on new cfg component
Enable p2p cfg based on new cfg component and remove legacy codes.

Change-Id: I99b0a53a4904f56fda2aaa2e237455433c3363d2
CRs-Fixed: 2277566
2018-07-23 19:17:51 -07:00
Dustin Brown
867ce6d534 qcacld-3.0: Reduce excessive logging during suspend
Currently, errors are logged if a given offload feature is disabled
while suspending the wlan driver. Instead, simply return success for the
configuration of those features which are disabled, since nothing needs
to be done. This also has the side effect of avoiding meaningless error
logs for situations which are not error conditions.

Change-Id: I1d897d8db066e642e1cc6e77daff0f44172cefe8
CRs-Fixed: 2282040
2018-07-21 13:15:52 -07:00
Dustin Brown
0127a73a2d qcacld-3.0: Enable/Disable MC filter when connected
Multicast address filtering only makes sense if the interface is
connected and capable of receiving traffic. Avoid enabling/disabling
the multicast address filter list on an interface that is disconnected.

Change-Id: Id8aff136e920bb726b8c7dd539d477ff44f080d4
CRs-Fixed: 2282003
2018-07-20 10:46:49 -07:00
gaurank kathpalia
82a1b2b802 qcacld-3.0: Fix GTK offload req params
Currently the host sends the fixed gtk offload params
and the FILS TLV params, even when the FILS feature is disabled
in the host, which force firmware to pick the KEK from the
FILS TLV structure rather than from the fixed param structure,
which further leads to GTK re-keying feature fail.

Fix is to send only the fixed params in case when host doesnt
supports FILS.

Change-Id: I5b3b3fd503c7cb9c4d7933074fd483086b113204
CRs-Fixed: 2244725
2018-07-17 14:48:23 -07:00
Sandeep Puligilla
c5609d5bdc qcacld-3.0: Add legacy mlme component
Add legacy mlme component main APIs and init/deinit from HDD.

Change-Id: I3d3de3bca9a4fd0896a9d6a076b5e60bb1a5ca83
CRs-Fixed: 2272959
2018-07-17 05:28:30 -07:00
jiad
7178449356 qcacld-3.0: Ratelimit logs in ipa_is_fw_wdi_activated
ipa_is_fw_wdi_activated is invoked in the context of default 100ms
bus bandwidth calculation timer. Any logs will lead to excessive
messages and fix is to ratelimit these possible log messages.

Change-Id: I6e408187759bb6b6a5c511f2f88c2b14f4c889ab
CRs-Fixed: 2279024
2018-07-16 10:42:43 -07:00
Qiwei Cai
1083f5b0ac qcacld-3.0: Featurize WLAN_NS_OFFLOAD
Fix compilation errors when disable WLAN_NS_OFFLOAD

Change-Id: Ifba894a4880a226cedf4c88b1121d02c63aceb4b
CRs-Fixed: 2271272
2018-07-13 10:36:11 -07:00
Sravan Kumar Kairam
1f8f8b320e qcacld-3.0: Add IPA TX complete nbuf call back function
For IPA MCC SW TX path add IPA TX complete nbuf call back which
frees the IPA TX descriptor after TX completion.

Change-Id: Ic7baae3db11c6ae92daa722b30fa7028481c0f93
CRs-Fixed: 2240220
2018-07-10 15:39:58 -07:00
Dustin Brown
bec5806fea qcacld-3.0: Move panic messages into QDF_DEBUG_PANIC
QDF_DEBUG_PANIC has recently gained a reason parameter. Move instance of
logging followed immediately by QDF_DEBUG_PANIC to single calls.

Change-Id: I6633296fb1c82a3945cedc967de222410b9f5d9b
CRs-Fixed: 2274413
2018-07-09 14:24:30 -07:00
Dustin Brown
84f46eae30 qcacld-3.0: Enable converged configuration component
Enable the converged configuration component in the Kbuild. Also, hook
into the cfg parse and release APIs.

Change-Id: Id0df669a34463e9f51bd5cc5bf2939fb1ac6228d
CRs-Fixed: 2258233
2018-07-05 14:13:53 -07:00
jiad
f3ecc75fae qcacld-3.0: Ratelimit logs in WLAN IPA exception path
There will be excessive logs in exception path when running SAP embedded
traffic since these logs are per packet.

Fix is to ratelimit all logs in IPA exception path to avoid excessive
logs.

Change-Id: Ia96a60f4de145740d7099b432c92e7b5785047d2
CRs-Fixed: 2272014
2018-07-05 10:00:56 -07:00
Nachiket Kukade
54e7be76f3 qcacld-3.0: Add upper limit check on Listen Interval configuration
User can override the Listen Interval value set during association
by using wifi config set vendor command. Since there is no limit
check in host, a very high value causes an assert in the Firmware.

Add an upper limit check on the user Listen Interval value.

Change-Id: I8128ccbb875adf57c95a15d0391fb442d3dbbbc3
CRs-Fixed: 2256334
2018-07-03 02:59:59 -07:00
jitiphil
4e8e8b22d2 qcacld-3.0: Excessive logging from IPA
WLAN logs are excessively filled with
IPA logs when IPA performance level
is set.

Remove unnecessary logging in
hdd_ipa_set_perf_level().

Change-Id: I07563c1a6e98981e2b074bce7a969c9cbd94ec24
CRs-Fixed: 2268632
2018-06-27 12:04:45 -07:00
Nirav Shah
99923a8330 qcacld-3.0: Map all module logs to per-level log APIs
Map all module level log APIs to per-level log APIs
to compile out specific log level if required.

Change-Id: Icfcc28fb592ee99704d8fb23bc3cb45b6e4c9f53
CRs-Fixed: 2266718
2018-06-26 18:53:18 -07:00
Sravan Kumar Kairam
a61e5a9050 qcacld-3.0: Fix IPA Rx suspend timeout due to IPA Tx pipe stall
The change id I50c357ca0f8ddfcc1a51ad4ed040961daf052459
is missed as part of UMAC IPA componentization changes.
Propagate the missed change to IPA component.

Change-Id: I33d83b5777ea259e29175e632a36e5fec3be24bc
CRs-Fixed: 2262351
2018-06-22 22:19:04 -07:00
Nachiket Kukade
01becb9bf0 qcacld-3.0: Cleanup dtim configuration during suspend and resume
Currently while going to suspend, dtim parameters are not
correctly getting configured. Some other parameters to config
like the inactivity timeout are completely skipped as well.

Cleanly port the setting of dtim and other parameters during
suspend and resume.

Change-Id: Ic41a8ace3f5650e53f2dcaa416bfe241b87aa88d
CRs-Fixed: 2248160
2018-06-21 12:35:44 -07:00
Nachiket Kukade
4b7c8e03c7 qcacld-3.0: Port modulated dtim and override listen interval
Port modulated dtim and override listen interval to PMO from
WMA.

Change-Id: Id965dd8ee0fbddfa563335fd2fe225dcd20cd162
CRs-Fixed: 2252788
2018-06-21 12:35:40 -07:00
Jeff Johnson
e84581b383 qcacld-3.0: pmo: Replace tSirRetStatus with QDF_STATUS
The tSirRetStatus definitions are obsolete, so replace them with
QDF_STATUS definitions in the pmo component.

Change-Id: Ia23e1d0eed5a88b0cb1caf4feebd535d36ca2690
CRs-Fixed: 2261705
2018-06-20 04:05:40 -07:00
Sravan Kumar Kairam
ce792eb7f6 qcacld-3.0: Clean up IPA interface when SAP stop bss fails
In case of rmmod if stop bss fails SAP IPA interface is not
deleted. So again at next driver load IPA will be holding the
stale IPA header and new IPA header will not be added at IPA
interface creation. In this change clean IPA interface when SAP
stop bss fails.

Change-Id: I3a1bf891752308ba1a29d6768f24880d8514d5bf
CRs-Fixed: 2224307
2018-06-20 04:05:36 -07:00
Nachiket Kukade
f080407812 qcacld-3.0: 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.

Send the same bitmap after resume that was used before suspend.

Change-Id: Ic7425274c9197e907404c3ca9ba0d5269ee51690
CRs-Fixed: 2194964
2018-06-18 16:33:30 -07:00
Sravan Kumar Kairam
8c151e20cc qcacld-3.0: Validate session while processing IPA pending events
Some times HTT response for suspend IPA pipes from FW host arrives
after vdev has been cleaned up at FW. After receiving FW HTT IPA
pipe suspend response HOST processes pending events. For event AP
DISCONNECT HOST sends IPA offload disable command to FW with vdev
id that has been deleted at FW. As a result FW asserts.

In this change before processing IPA WLAN pending events validate the
session. If session exists then only process the events.

Change-Id: I464a91c3a85e6002297d9ade2fbd45b45a2a4d51
CRs-Fixed: 2261111
2018-06-18 16:33:27 -07:00
Nachiket Kukade
e547a48662 qcacld-3.0: 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: I9e02edbc580ffb2c559c8e864f54d255fc2d51a3
CRs-Fixed: 2191530
2018-06-18 16:33:24 -07:00
Will Huang
ad01577f26 qcacld-3.0: Use wma callback to get vdev dp handle
PMO should not know about vdev data path handle, but
pmo_unpause_all_vdev() need it, so register a wma callback to retrieve
the vdev dp handle instead of keep a copy in pmo vdev private context.

Refine current code to retrieve vdev dp handle using a wma callback

Change-Id: I1f668fff633a5e5cdfc478e7f619e9600930b333
CRs-Fixed: 2227384
2018-06-18 16:33:13 -07:00
Dustin Brown
0f87448ee2 qcacld-3.0: Reduce excessive logging in PMO
There are several logs in PMO that log debugging related information
at the INFO level. Reduce the logging level of these debug logs to
avoid spamming the console.

Change-Id: Ib1bb9279d5d8104104b58bd2c83869f72c0bde4a
CRs-Fixed: 2260190
2018-06-14 23:53:59 -07:00
Nachiket Kukade
37b4e6dfbe qcacld-3.0: Add support for getting dtim and beacon interval
Add support for getting vdev dtim and beacon interval from
mlme in PMO.

Change-Id: I97c117eec290f6b9452b98629bf6b3ee10c38ce6
CRs-Fixed: 2252713
2018-06-13 22:27:01 -07:00
Mukul Sharma
4474604869 qcacld-3.0: Add support for getting cfg integer from PMO
Add support for getting cfg integer from PMO. Register callbacks
during pe_open/close so that PMO can query CFG int values for
calculating parameters like listen interval etc.

Change-Id: I52d165586576e547e175ba276e6b7225db5b27e0
CRs-Fixed: 2252661
2018-06-13 22:26:58 -07:00
jiad
ad913c784e qcacld-3.0: Fix WLAN IPA clk scaling enablement
With IPA WDI unified API, IPA PM is used instad of IPA RM
for power/resource management. When checking if IPA clk
scaling is enabled or not, HDD_IPA_RM_ENABLE_MASK is thus
not applicable for WDI unified API.

Change-Id: Ie18c2ba6168a06a3bf03f6a5754ffef98113ce30
CRs-Fixed: 2256015
2018-06-13 19:41:13 -07:00
jiad
f9771185c2 qcacld-3.0: Fix WLAN IPA perf profile initialization
With IPA WDI unified API, IPA PM is initialized after WLAN IPA pipes
are connected. Initializing IPA perf profile will fail if IPA pipes
are not yet connected.

Fix is to
1. Initialize perf perofile only after IPA pipes are connected
successfully.
2. If clk scaling is disabled, initialize perf level to maximum.
3. Allow driver to proceed if perf profile initialization fails.

Change-Id: I3a63e0f1decec10440467da62cb6ccf740eda318
CRs-Fixed: 2258682
2018-06-13 19:41:10 -07:00
Will Huang
c312328512 qcacld-3.0: Resolve assert when sending D0WOW disable command
Currently while sending wmi command when target is suspend, it will
check whether command is WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID/
WMI_PDEV_RESUME_CMDID, but D0WOW command is an exception, to keep align
with legacy code so don't set wmi_handle->is_target_suspended if it is
D0WOW enable command.

Move out logic of checking D0WOW status from PMO tgt to core layer.

Change-Id: I164f24ea733e54e5e0dbdb77344917df5d039e53
CRs-Fixed: 2254047
2018-06-13 18:20:00 -07:00
Dustin Brown
c1cdb710bf qcacld-3.0: Reduce excessive logging during suspend
There are several logs along the suspend/resume code paths that log
debugging related information at the INFO level. Reduce the logging
level of these debug logs to avoid spamming the console.

Change-Id: I0e81901e4a053038392c1012600ae125a1ad27a3
CRs-Fixed: 2258093
2018-06-13 15:23:50 -07:00
Rachit Kankane
8863cba926 qcacld-3.0: Add Kbuild config for no of WoW filter
Total 16 number of WoW filters are PoRed for Genoa.
Define CONFIG_PMO_WOW_FILTERS in genoa defconfigs with value 16.

Change-Id: Iba3d9875c954b32a3f22cfd639f4508beb36a5d5
CRs-Fixed: 2257033
2018-06-13 14:10:55 -07:00
Nachiket Kukade
107f639cce qcacld-3.0: Change wow event API's to accept wow event types
Current ucfg API's that disables wow events accept a u32 bitmap
variable. A pointer to that variable is passed to core API where
it assumes it as a u32 array of 4 bytes. This will lead to out of
bound memory access.

Change wow enable/disable API's to accept wow event type as the
parameter.

Change-Id: I220aaddfea62ab96f121014d0d65a1406988c946
CRs-Fixed: 2233108
2018-06-08 21:34:47 -07:00
Ryan Hsu
338cc11b96 qcacld-3.0: remove the unnecessary stats reset operation
In the case of invalid iface_ctx, the stats reset operation is not
needed, so removed it.

Change-Id: I48b4b42717451e1ccbfc9753147e65d35ff78df4
CRs-fixed: 2254683
2018-06-08 20:13:57 -07:00
Wu Gao
a9d336b455 qcacld-3.0: PMO feature flag disable (part two)
This is the change for PMO feature flag disable.

Change-Id: I3e0624c034ddfcad567534ffbbcd85735b8ea0d6
CRs-Fixed: 2243952
2018-06-08 08:31:00 -07:00
Wu Gao
5395a2e179 qcacld-3.0: PMO feature flag disable (part one)
In case PMO feature flag disable, add this change.

Change-Id: Ib0add24b3eda54d0400f9cf2eff895e28db4de39
CRs-Fixed: 2243950
2018-06-08 08:30:57 -07:00
jiad
8768b146be qcacld-3.0: Remove log in WLAN IPA RX exception cb
When running embedded tput between client and SAP, there'll be
excessive logs per packet. Fix is to remove the per packet
debug message.

Change-Id: I846f4fd5e54cc8945b3159c56e04418feea0183f
CRs-Fixed: 2253186
2018-06-07 19:30:30 -07:00
Ryan Hsu
b5783cfcb2 qcacld-3.0: clean up to avoid NULL pointer dereference IPA
Fix a few things in one shot.

- clean up some code to avoid potential NULL pointer dereference.
- add a helper function - wlan_ipa_free_tx_desc_list() to
  avoid duplication.
- rearrage wlan_ipa_teardown_sys_pipe() to allow others' reference

Change-Id: I9d6391a7f20ae427bf59f07958bd13f349e61d83
CRs-Fixed: 2233867
2018-06-04 15:03:48 -07:00
Lihua Liu
15f6e45a5c qcacld-3.0: Fix potential NULL reference in wlan_ipa_uc_loaded_handler
In function wlan_ipa_uc_loaded_handler,the qdf_dev is as return of
wlan_psoc_get_qdf_dev(),which maybe NULL,then NULL reference could
occur later.

Change-Id: I3c6d5af35934deef643cb600b1966c22769c71ed
CRs-Fixed: 2250977
2018-06-03 21:04:31 -07:00
jiad
4f0eae1817 qcacld-3.0: Fix WLAN IPA NULL pointer dereference
When ipa_check_hw_present() returns false, g_ipa_config
is left as NULL pointer. ipa_config_is_enabled() and
ipa_config_is_uc_enabled() will lead to NULL pointer
dereference.

Fix is to check against g_ipa_config NULL pointer
in ipa_config_is_enabled() and ipa_config_is_uc_enabled().

Change-Id: I95da7aede7d72db8591102eea7504cad59686105
CRs-Fixed: 2246224
2018-06-01 01:43:16 -07:00
Wu Gao
ffb9c72f7b qcacld-3.0: Use PMO macro from public head files
We should use PMO macro from public head files.

Change-Id: Iac533655e85ef85fe86bae19e0bce4967418cc81
CRs-Fixed: 2251499
2018-05-31 22:30:49 -07:00
jiad
ab8cea0b3a qcacld-3.0: Fix SKB free for WLAN IPA exceptions
There are two types of WLAN IPA exceptions, where WLAN driver is
involved for packet processing.

One is for RX exceptions, such as ICMP or Intra-BSS packets.
The other one is for WDI 1.0 MCC TX SW path, where packet queueing
is happening in WLAN driver.

In both cases, skb is allocated in IPA driver. If NBUF_MEMORY_DEBUG
is defined and qdf_net_buf_debug_acquire_skb() is not invoked for
the skb, qdf_nbuf_free() will trigger ASSERT to report unallocated
buffer.

For early processing of RX exceptions, dev_kfree_skb_any() needs to
be called instead of qdf_nbuf_free() otherwise above ASSERT will be
triggered.
For MCC TX SW path, ipa_free_skb() should be called to free skb to
IPA driver.

Change-Id: I039cb20673ce3aa98056529f7609801f76c4c16a
CRs-Fixed: 2247339
2018-05-31 18:21:01 -07:00
jiad
a8c542cf7c qcacld-3.0: Fix WLAN IPA event completion timeout
qdf_wait_for_event_completion() needs a timeout value in milliseconds.
msecs_to_jiffies() is not needed to convert timeout value into jiffies.

Change-Id: I95315f937d651fd200f58d89f44eb167c6f29cc8
CRs-Fixed: 2250143
2018-05-30 13:57:13 -07:00
jiad
ae9959f175 qcacld-3.0: Add support for SMMU IPA WDI unified API
IPA driver adds unified WDI API for ipa_wdi_create_smmu_mapping
and ipa_wdi_release_smmu_mapping. WLAN driver needs to adopt the
change accordingly.

Change-Id: I997aae3651831d0ecf576369fdb428c0f59be77b
CRs-Fixed: 2230075
2018-05-24 07:51:49 -07:00
Jeff Johnson
36a0abf03b qcacld-3.0: Replace new instances of tQDF_ADAPTER_MODE
Previously change "qcacld-3.0: Use enum QDF_OPMODE", Change-Id
Ic6f663dac11a100f168b2626c7c0fbcaccbfca4f, replaced all instances of
tQDF_ADAPTER_MODE to QDF_OPMODE in the qcacld-3.0 project. However
since tQDF_ADAPTER_MODE was originally defined in a common project,
and not all references to it could be immediately removed, a legacy
definition was left with the expectation that it would be removed when
all references to it had been updated. Unfortunately new instances of
using tQDF_ADAPTER_MODE have been subsequently added to the project,
so replace them with QDF_OPMODE.

Change-Id: I71cead84151cc0411f7cc5cc13a87a281e7502c0
CRs-Fixed: 2245247
2018-05-22 04:56:48 -07:00
Wu Gao
52084c1fdb qcacld-3.0: Refine disa head files
DISA head files include lots of not used public head files, and cause
compilation issue when disable PMO feature flag.

Change-Id: I287f845a3e9f923d042463c34abaedadb905d3b2
CRs-Fixed: 2243947
2018-05-21 22:51:28 -07:00
Sravan Kumar Kairam
cc1abc88f9 qcacld-3.0: Fix information leak in IPA res info and stats
Currently in functions to show IPA resource info and IPA stats
there are information related to IPA resources memory address.
This may be lead to potential information leak to the location
of IPA resources. Remove the addresses information from the
logs in res info and stats function.

Change-Id: I75d756211c8aaaea300fb207e40a08f5b1ca81e3
CRs-Fixed: 2225361
2018-05-17 14:26:15 -07:00
Yun Park
e74e6090f6 qcacld-3.0: Remove wake_lock and rm_lock when WDI_UNIFIED_API defined
IPA RM is not used when WDI_UNIFIED_API is defined.
Remove to use wake_lock and rm_lock, which are created from RM setup.

Change-Id: I6c614fde7d6d7f0ab94aa9933578f3dca814a40e
CRs-Fixed: 2231424
2018-05-16 12:13:05 -07:00
jiad
629b21762e qcacld-3.0: Refine WLAN IPA event record
Use QDF_IPA_WLAN_EVENT_MAX instead of IPA_WLAN_EVENT_MAX to record
WLAN event to IPA.

Also record QDF_SWITCH_TO_MCC/SCC and QDF_WDI_ENABLE/DISABLE event.

Change-Id: Iada6c39d2b952f6b9a1690a86c5871d2ca588cd2
CRs-Fixed: 2240425
2018-05-15 13:54:21 -07:00
jiad
c908ada056 qcacld-3.0: Fix IPA AP-AP interface setup failure
IPA component needs to discard repetitive start_bss event in
case SAP is on DFS channel. Issue is we checked against
available SAP interface and this will lead to second SAP
interface setup failure.

Fix is to check against same SAP interface to see if it has
already been setup.

Change-Id: I2fc3656f5e1fba39dba14dba137c6202c5ec5af0
CRs-Fixed: 2240368
2018-05-15 13:54:03 -07:00
Sourav Mohapatra
cf632579b1 qcacld-3.0: Use new API for fetching wmi_handle
Use get_wmi_unified_hdl_from_psoc instead of GET_WMI_HDL_FROM_PSOC due
to incompatible return types.

Solve renaming dependencies with common side changes.

Change-Id: Ie84641327d64876877c7d26b63d632c79770a88c
CRs-Fixed: 2203055
2018-05-11 22:40:02 -07:00
Sravan Kumar Kairam
7eb6e4c809 qcacld-3.0: Fix uc_op_work->msg leak from uC ready callback
The Change-Id: I69c813047ab4b1b129e4fb057d8aacbef5cc9efea
is missed as part of UMAC IPA componentization changes.
Propagate the missed change to IPA component.

Change-Id: I2c346a266c2c767dd37b5901d8d671e475449a01
CRs-Fixed: 2233325
2018-05-11 22:39:56 -07:00
Abhinav Kumar
6125c29a2d qcacld-3.0: Add comment between cases in switch statement
Add fallthrough comment in pmo_register_wow_wakeup_events
as per linux checkpatch script. Fallthrough required to set
interface type and to set sta wow bitmask.

Change-Id: I6931371e9a2d4421354c19c12e552c75e50cb798
CRs-Fixed: 2233187
2018-05-11 16:17:55 -07:00
Will Huang
67ce1e332b qcacld-3.0: Refine PMO wow to support legacy chip
wma_is_service_enabled can't get valid service bitmap if call in
hdd_update_pmo_config, use psoc_ctx->caps.unified_wow instead to check
pattern id per vdev and legacy d0 wow capability.

Change-Id: If7bf316f482c49253fc4b95b94e172727b27ffd1
CRs-Fixed: 2225847
2018-05-06 23:12:33 -07:00
Dustin Brown
dd2178d146 qcacld-3.0: Fix off-by-one errors in PMO
The following PMO functions have been identified as having off-by-one
logic errors. Address these errors.

 * pmo_register_resume_handler
 * pmo_register_suspend_handler
 * pmo_unregister_resume_handler
 * pmo_suspend_all_components

Change-Id: I6a328fc24ae6a575ef56cf9532133eb666e0dc8c
CRs-Fixed: 2232388
2018-05-03 02:38:39 -07:00