Commit Graph

90 Commits

Author SHA1 Message Date
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
Sravan Kumar Kairam
fbc87b7230 qcacld-3.0: Fix wlan_ipa_set_perf_level failure for UNIFIED_WDI_API
Add Unified WDI API support for ol_txrx_ipa_set_perf_level and fix
client parameter for ipa_wdi_set_perf_profile.

Change-Id: Ieaaf7cf5231f74cd6ba358c02032ae173d9618f0
CRs-Fixed: 2211504
2018-05-02 19:47:55 -07:00
Tushnim Bhattacharyya
581b4c82a7 qcacld-3.0: Change the log level to debug in ipa_is_fw_wdi_activated
There's an excessive log for IPA if IPA is disabled on ini but enabled
in FW. Change the log level to debug from info.

Change-Id: I60a49132bc00b06fc0725c7a3f648fa773321f56
CRs-Fixed: 2232196
2018-04-28 10:19:58 -07:00
Rajeev Kumar
289f3c401a qcacld-3.0: Add feature flag for PMO component (part-2)
Add feature flag for PMO component such that for high latency
and IoT devices power management and offload component can be
compiled out.

Change-Id: Iaccda7d9e895cdb4610f0ec984add3aeb7ef9926
CRs-Fixed: 2227330
2018-04-26 16:01:57 -07:00
Rajeev Kumar
109683cf30 qcacld-3.0: Add feature flag for PMO component (part-1)
Add feature flag for PMO component such that for high latency
and IoT devices power management and offload component can be
compiled out.

Change-Id: I2c88b6af33e8f10f1837263f157c1f6892a2c2fb
CRs-Fixed: 2227326
2018-04-25 14:30:31 -07:00
Yun Park
a29974a3ae qcacld-3.0: Remove IPA uC stat log when IPA pipe is suspended
There's an excessive log for IPA uC stat request reason even when
WDI pipe is suspended.
Enable IPA uC stat request reason log only when IPA pipe is resumed.

Change-Id: I35d98e02a9180738bc9cdb25f59e31d572df9e0e
CRs-Fixed: 2181952
2018-04-25 07:36:19 -07:00
Sravan Kumar Kairam
c8eec8a827 qcacld-3.0: Extend support to get IPA HW status on all platforms
Extend support to get IPA HW status on all platforms if IPA OFFLOAD
feature is enabled.

Change-Id: Ideea6b7f058b3d80efecc9473a20d7a31046b4bc
CRs-Fixed: 2230316
2018-04-25 00:43:12 -07:00
Yun Park
21ec490dbd qcacld-3.0: Cleanup interface when loading/unloading timeout
When AP_DISCONNECT event occurs during IPA resource unloading in
progress, timeout could happen since suspending FW IPA Rx pipe took much
time. This could cause a subsequent AP_CONNECT event failed since no
interface is available.
Fix this by
- Adapter struct sanity check using hdd_validate_adapter()
- Call hdd_ipa_cleanup_iface() for AP_DISCONNECT/STA_DISCONNECT event
  in loading/unloading timeout case
- Assert when no interface is available in hdd_ipa_setup_iface()

Change-Id: Ie96e4f0e96ccffacf4ce5fcc976636c440214873
CRs-Fixed: 2208347
2018-04-24 22:50:00 -07:00
Jeff Johnson
8af32915b0 qcacld-3.0: ipa: Remove legacy markings
Per current guidance remove legacy markings.

Change-Id: Iabff91dc310eab97bccf40db984453c4ef4da2a2
CRs-Fixed: 2229655
2018-04-24 14:48:21 -07:00
jiad
80055eb33c qcacld-3.0: Add frag_header to support pre-wdi2.0 platform
wdi2.0 feature adds extra 2 bytes to frag_header and thus hdr_len
to IPA HW also adds 2 bytes. This change breaks pre-wdi2.0 platform
with WiFi FW discarding all TX traffic since packet payload is
with an extra 2-byte offset.

Fix is to add frag_header structure with pre-wdi2.0 pattern.

Change-Id: I467a05bab4111a305ae23250c61cecc050821611
CRs-Fixed: 2047714
2018-04-18 22:03:28 -07:00
Yun Park
e114fbf9f1 qcacld-3.0: Remove to call IPA RM APIs for WDI UNIFIED APIs
IPA RM APIs are depricated from WDI UNIFIED APIs.
Remove to call IPA RM APIs when IPA_WDI_UNIFIED_API is enabled.

Change-Id: I4de2f16a9d320a769870efacdd0c067bab133a0a
CRs-Fixed: 2220247
2018-04-06 21:37:41 -07:00
jiad
bb47e130a0 qcacld-3.0: fix ipa mcc scc event notification
Issue is under AP-AP MCC config, mcc event is not sent from wlan
to IPA driver. mcc mode is decided with the help of connection
table. But for AP mode, mcc mode is checked and updated before
connection table is updated by adding the SAP vdev entry.

Fix is to make ipa mcc mode check and notification when connection
table is updated. Since block is not allowed when conn table is
updated, a new work_struct mcc_work is introduced.

Change-Id: I935222e26bb3f6b31685f52b75084b034daccad2
CRs-Fixed: 2075876
2018-04-06 13:25:23 -07:00
Yun Park
84fbb27b31 qcacld-3.0: Fix implicit conversion of different enumeration type
Fix LLVM compilation error: implicit conversion from enumeration type
'qdf_ipa_wlan_event' to different enumeration type
'qdf_ipa_wlan_event_t'

Change-Id: Ie5f09f3e5b6f1e93d344d22483754292d370ce60
CRs-Fixed: 2216820
2018-04-04 11:07:22 -07:00
Dustin Brown
d69ec37568 qcacld-3.0: Trigger recovery on pdev suspend timeout
Historically, recovery was triggered if PDEV suspend failed, but the
logic was lost during componentization. Restore the previous logic of
triggering recovery on PDEV suspend timeout.

Change-Id: I6e193e98c5ef45fd7ab4b6595ea85d986fa84131
CRs-Fixed: 2215588
2018-03-30 02:46:16 -07:00
Sravan Kumar Kairam
cad3847747 qcacld-3.0: Check for IPA ini config enable
Check if IPA is enabled in ini configuration before doing
IPA operations from northbound interface calls.

Change-Id: Ic075562c1afe52d26ebefaff058fde7c90d4f7d1
CRs-Fixed: 2215269
2018-03-29 21:14:40 -07:00
Sravan Kumar Kairam
6a0faeb112 qcacld-3.0: Reset the IPA resource loading flag
When IPA RM resources are not granted immediately, IPA
WDI pipes activation is deferred and activated from the
RM notify callback when resources are granted. In this
case after pipe activation resource loading flag is not
set to true. As a result when IPA wants to access the WLAN
resource driver sends wrong status as resource loading in
progress. So reset the flag when IPA WDI pipes activation
is deferred and activated from rm notification handler.

Change-Id: Ia336181f0471a9a8d6c853aefa19a23102077222
CRS-Fixed: 2198206
2018-03-29 21:14:35 -07:00
Sravan Kumar Kairam
f59aec12b1 qcacld-3.0: Pass STA vdev id for STA IPA RX offload control
Currently SAP vdev id is passed for STA IPA RX offload when DUT
connects first to an AP and later hotspot is turned on. In this
fix pass sta vdev id for STA IPA RX offload command to FW during
sap client connect and disconnect events.

Change-Id: Id73b837a8efd1840f3ca0cba8e4ebda82cdd7fc7
CRs-Fixed: 2211896
2018-03-27 12:16:18 -07:00
Sravan Kumar Kairam
c056d9924f qcacld-3.0: Don't call IPA set perf level for unified WDI IPA
For unified WDI IPA rm resource manager is not initialized. Do not
call set perf level for ipa rm resources.

Change-Id: Icf9e50b4cbe8e3d1eeedd9428d48e1889339fe13
CRs-Fixed: 2210736
2018-03-22 10:15:14 -07:00
Sravan Kumar Kairam
cdf1753e97 qcacld-3.0: Fix compilation error for unified IPA WDI
Fix compilation error when unified IPA WDI is enabled in the
build.

Change-Id: Iebb47f3d34e065197d8fca3b76aae00d9390efdf
CRs-Fixed: 2177925
2018-03-21 18:57:38 -07:00
Sravan Kumar Kairam
983a445b37 qcacld-3.0: Move IPA SMMU functions to IPA component
IPA module has been moved to CLD component under the converged
driver model. Move the legacy HDD IPA SMMU functions to the
IPA component.

Change-Id: I3ac5ebe87cc48913f3e8e075e60737e78664f861
CRs-Fixed: 2177925
2018-03-21 18:57:34 -07:00
Sravan Kumar Kairam
5214f65bf9 qcacld-3.0: Move IPA WLAN event handler to IPA component
IPA module has been moved to CLD component under the converged
driver model. Move the legacy HDD IPA WLAN event handler to
the IPA component.

Change-Id: Ia53adce7ef29eea747f288fa074f96a84e47925d
CRs-Fixed: 2177925
2018-03-21 18:57:30 -07:00
Sravan Kumar Kairam
7d931ff37d qcacld-3.0: Move IPA FW OP event handler to IPA component
IPA module has been moved to CLD component under the converged
driver model. Move the legacy HDD IPA FW OP event handler to
the IPA component.

Change-Id: Idecf12c33a5b4ab80de50626029ff43b5f9336a2
CRs-Fixed: 2177925
2018-03-21 18:57:27 -07:00
Sravan Kumar Kairam
1309e7eaf5 qcacld-3.0: Move IPA UC offload initialization to IPA component
IPA module has been moved to CLD component under the converged
driver model. Move the legacy IPA UC offload initialization to
the IPA component.

Change-Id: I221a11e7f8aa2459918f87c6b043d4682e05cb04
CRs-Fixed: 2177925
2018-03-21 18:57:23 -07:00
Sravan Kumar Kairam
858073b1f9 qcacld-3.0: Remove legacy IPA code from HDD
As part of converged driver model remove IPA from
HDD and create a new IPA CLD component. Remove the
legacy code from the HDD.

Change-Id: Id4691e0f490c2f9bd9ccc8d5225be32002a5df9e
CRs-Fixed: 2177925
2018-03-21 18:57:20 -07:00
Sravan Kumar Kairam
271fab287a qcacld-3.0: Move IPA stats and debug info API to IPA component
IPA module has been moved to CLD component under the converged
driver model. Move the legacy IPA stats and debug info  APIs to
the IPA component.

Change-Id: Ieb68a1579986c835f66c84e5e3b7aa2a4004383d
CRs-Fixed: 2177925
2018-03-21 18:57:17 -07:00
Sravan Kumar Kairam
9e99e9a9f9 qcacld-3.0: Move IPA set perf level API to IPA component
IPA module has been moved to CLD component under the converged
driver model. Move the legacy IPA set perf level APIs to the IPA
component.

Change-Id: Idbbab9cc6885b6acf1cd40d432a236f0629c8dff
CRs-Fixed: 2177925
2018-03-21 18:57:14 -07:00
Sravan Kumar Kairam
2e7aae9fdb qcacld-3.0: Move IPA RM functionalities to IPA component
IPA module has been moved to CLD component under the converged
driver model. Move the legacy IPA RM APIs to the IPA component.

Change-Id: Iaff12ae3cec9ee6ff20543579692385c9a555613
CRs-Fixed: 2177925
2018-03-21 18:57:11 -07:00
Sravan Kumar Kairam
d01b445db4 qcacld-3.0: Move IPA setup and initialization to IPA component
IPA module has been moved to CLD component under the converged
driver model. Move the legacy IPA setup and initialization code
to the IPA component.

Change-Id: I63717eb2601c569131c6642f7330e4182e604424
CRs-Fixed: 2177925
2018-03-21 18:57:08 -07:00
Sravan Kumar Kairam
a0600b8a87 qcacld-3.0: Modify IPA UC offload control cmd
IPA module has been moved to CLD component under the converged
driver model. Remove legacy WMA interface IPA command and use
the new defined API.

Change-Id: Icd9a207f43f8df4dc563d0078d402470683cfd7d
CRs-Fixed: 2177925
2018-03-21 18:57:06 -07:00
Sravan Kumar Kairam
4af61cf612 qcacld-3.0: Create IPA CLD component
As part of converged driver model remove IPA from
HDD and create a new IPA CLD component. Add files for
IPA core, dispatcher and target_if. Define IPA related
public and private structures.

Change-Id: I8848331edc7dd878f9fc51ef9f5e311ad91ed70b
CRs-Fixed: 2177925
2018-03-21 18:57:03 -07:00
Dustin Brown
89ccc3958c qcacld-3.0: Migrate PMO to level-specific log wrappers
Change Ie062ada403f8a31aebcde691396987ad9e5352b5 introduced level-
specific logging wrappers to support compiling out entire levels of
logging messages. Migrate the PMO logging wrappers to consumer these
new APIs instead of QDF_TRACE.

Change-Id: I3f46450e76cc6422a0877e95785bfd41e4c0af0c
CRs-Fixed: 2208536
2018-03-21 16:09:08 -07:00
Dustin Brown
500ae3de11 qcacld-3.0: Use level-specific QDF_TRACE_RATE_LIMITED
Change Ie062ada403f8a31aebcde691396987ad9e5352b5 introduced level-
specific logging wrappers. Instead of using QDF_TRACE_RATE_LIMITED
directly, use the level-specific versions.

Change-Id: I21b47f443ae53d1780fd21e352f69b0ea48ae726
CRs-Fixed: 2208563
2018-03-19 22:45:58 -07:00
Dustin Brown
897dae4376 qcacld-3.0: Update calls to QDF_TRACE_RATE_LIMITED
QDF_TRACE_RATE_LIMITED recently lost its 'rate' parameter in
I31a3f48f68fb6bc67f59f3157a635345943d3331. Update call sites to account
for this change.

Change-Id: I301a36a445be4ecc3e1d24e007d7ca6f05898fc5
CRs-Fixed: 2205796
2018-03-16 21:51:41 -07:00
Dustin Brown
b2cd2e0ae0 qcacld-3.0: Rename PMO_ENTER and PMO_EXIT macros
In order to better align with the other PMO logging wrappers, and the
rest of the driver, rename the following macros:
 * PMO_ENTER -> pmo_enter
 * PMO_EXIT -> pmo_exit

Change-Id: I9186c1425f22c5a8d4fc98f048a9d487b6095797
CRs-Fixed: 2206650
2018-03-15 17:31:10 -07:00
Dustin Brown
67d69ebbfd qcacld-3.0: Update firmware filter config (part 2)
In order to conserve firmware memory when various filtering features are
not in use, update the target configuration provided to firmware based
on the intersection of various filtering features and host
configuration.

Part 1
	num_wow_filters = ARP/NS offload enabled ? 2 : 5
	bpf_instruction_size - BPF enabled ? 0 (auto) : 0xffffffff

Part 2
	num_packet_filter = Packet Filter enabled ? 12 : 0xffffffff

Change-Id: Ie8cb4ae44c83b115b249e22ebd7146278ed70612
CRs-Fixed: 2199297
2018-03-15 15:11:59 -07:00
Dustin Brown
ed76c198c8 qcacld-3.0: Fix PERF build issue in PMO (part 2)
Building CLD3.2 with a performance configuration results in several
"potentially uninitialized" warnings. Initialize the relevant variables
to avoid the warnings.

Change-Id: I6a4324cb313dfb9d3b4c82294bc2fc8ce357fd0b
CRs-Fixed: 2202533
2018-03-08 18:46:54 -08:00
Dustin Brown
0b703ef927 qcacld-3.0: Remove maxWoWFilters and related
Recent changes in Power Management and Offload (PMO) have removed the
need for a configurable maximum number of WoW filters. Remove the
following relevant fields:

 * maxWoWFilters
 * CFG_MAX_WOW_FILTERS_MAX
 * WMA_STA_WOW_DEFAULT_PTRN_MAX
 * max_wow_filters
 * ol_ini_info

Change-Id: I99cc74731d6373258dc65473a8342bda0ab2786b
CRs-Fixed: 2199452
2018-03-05 23:33:27 -08:00
Dustin Brown
b9987afb2c qcacld-3.0: Update firmware filter config (part 1)
In order to conserve firmware memory when various filtering features are
not in use, update the target configuration provided to firmware based
on the intersection of various filtering features and host
configuration.

Part 1
	num_wow_filters = ARP/NS offload enabled ? 2 : 5
	bpf_instruction_size - BPF enabled ? 0 (auto) : 0xffffffff

Part 2 (pending firmware support)
	pkt_filter_num = Packet Filter enabled ? 12 : 0 (disabled)

Change-Id: Ic6624ff04598b53d8321e4864618b12b9702780f
CRs-Fixed: 2196997
2018-03-05 21:43:46 -08:00
Dustin Brown
f1d278041b qcacld-3.0: Add wlan_pmo_apf.[ch]
Add files to house PMO logic for the Android Packet Filter (APF).

Change-Id: I30e40b1dc761261511d8a37e5720a4f5c737b36c
CRs-Fixed: 2198745
2018-03-05 21:43:43 -08:00
Dustin Brown
d3a53dbc06 qcacld-3.0: Fix PERF build issue in PMO
Building CLD3.2 with a performance configuration results in several
"potentially uninitialized" warnings. Initialize the relevant variables
to avoid the warnings.

Change-Id: If97b67d50ebe2b7465fd2cc5a6a44488e4cb25a7
CRs-Fixed: 2200294
2018-03-05 20:48:51 -08:00
Dustin Brown
06259e5d96 qcacld-3.0: Add ucfg_pmo_psoc_set_caps()
Provide PMO-specific device capabilities to PMO. This allows PMO to do
intersections between configuration and device capabilities.

Change-Id: If0a199f9be466d16cef900a29b14b73a2a4e52d0
CRs-Fixed: 2197828
2018-03-05 20:48:43 -08:00
Dustin Brown
f2e2fac99e qcacld-3.0: Remove pmo_core_wow_[enter|exit]()
pmo_core_wow_enter(), pmo_core_wow_exit() and struct
pmo_wow_enter_params are all dead code. Remove them.

Change-Id: I254a0bad794ffc1170a2799918e1627a3e01e340
CRs-Fixed: 2199462
2018-03-02 20:37:21 -08:00
Dustin Brown
fbe4e7d67b qcacld-3.0: Add pmo_psoc_with_ctx() macro
It is really common to want to update or read from the PMO private
context, but doing so requires several lines boilerplate code. Because
this boilerplate is in so many places, mistakes like using the wrong
lock operation, or forgetting to use locks at all, are a always a
danger. Add pmo_psoc_with_ctx() to address this deficiency, which
retrieves the private context pointer, locks on entry, and unlocks on
exit. Usage is like so:

	struct pmo_psoc_prov_obj *psoc_ctx;

	pmo_psoc_with_ctx(psoc, psoc_ctx) {
		/* use psoc_ctx */
	}

Which is equivalent to:

	struct pmo_psoc_prov_obj *psoc_ctx;

	psoc_ctx = pmo_psoc_get_priv(psoc);
	qdf_spin_lock_bh(&psoc_ctx->lock);
	/* use psoc_ctx */
	qdf_spin_unlock_bh(&psoc_ctx->lock);

Change-Id: I6a3ccbfbfb57c589d44c7eae57e2ed8272dae3ee
CRs-Fixed: 2197722
2018-02-28 19:16:02 -08:00
Arif Hussain
05fb4870a3 qcacld-3.0: Add bss color collision detection support
Add support for bss color collision detection.

Change-Id: Idd616ca902469f5dc446d35e63fce7fe7eb0d327
CRs-Fixed: 2130127
2018-02-11 23:20:42 -08:00
Zhang Qian
47e22cefc3 qcacld-3.0: Add UCFG APIs and public structures for OCB
Add UCFG interface and public structures for OCB feature.

CRs-Fixed: 2177578
Change-Id: Id74df706e658568a0f50a8d953eca3993451f41a
2018-01-29 23:40:32 -08:00