Commit Graph

91 Commits

Author SHA1 Message Date
Sourav Mohapatra
0dfe5550e0 qcacld-3.0: Relocate HDD ini items (1)
Relocate below HDD ini items as per converged infrastructure.
1. CFG_ENABLE_RUNTIME_PM
2. CFG_STA_KEEPALIVE_METHOD_NAME
3. CFG_ENABLE_MCC_ENABLED_NAME
4. CFG_ENABLE_SAP_SUSPEND
5. CFG_ENABLE_DEAUTH_TO_DISASSOC_MAP_NAME
6. CFG_INFORM_BSS_RSSI_RAW_NAME
7. CFG_AP_ENABLE_RANDOM_BSSID_NAME
8. CFG_VC_MODE_BITMAP

Change-Id: I881c87f9ca73804d03af358163c9a043b3193c81
CRs-Fixed: 2357174
2018-12-06 13:43:56 -08:00
Rajeev Kumar
1f97e10701 qcacld-3.0: Decouple PMO LPASS and NAN wow enable check from vdev
LPASS is driver specific feature which is controlled by INI item
and similarly NAN is also driver specific and not vdev specific
hence decouple PMO lpass and nan feature get APIs from vdev to
psoc.

Change-Id: I152f8b909cf85e412c2fa72a2e7147a1505e60e1
CRs-Fixed: 2361991
2018-12-06 12:02:56 -08:00
Ashish Kumar Dhanotiya
68ee2e4c50 qcacld-3.0: Reset wow pattern on vdev destroy
Currently if a vdev is destroyed, wow patterns are not
getting cleared for that vdev, so when a new vdev is
created, host tries to configure new wow patterns for
this new vdev but due to FW limitations on number of
wow patterns that can be maintained at FW, FW is not
able to act on this filter and will not maintain this
new wow filter.

To resolve this issue, clear the wow patterns for the
vdev before it gets destroyed.

Change-Id: Iae7ad8b683c95d8eaf11355bc0e36b91cece2202
CRs-Fixed: 2344337
2018-11-28 09:35:06 -08:00
Wu Gao
70afa0e409 qcacld-3.0: Split PMO configures into different files
Split PMO configures into different files by feature. Remove
unnecessary macro limitation.

Change-Id: I1e431fd2f38988c771e02c979c5ce55d0627e605
CRs-Fixed: 2323999
2018-10-24 03:17:03 -07:00
Wu Gao
d7dd6e4157 qcacld-3.0: Rename some ucfg APIs of PMO
To keep names of PMO ucfg APIs consistent, change some of them from
"pmo_ucfg_xxx" to "ucfg_pmo_xxx".

Change-Id: I77165be8c5c408c3f91f84a477c15be1c6ea15e8
CRs-Fixed: 2334109
2018-10-22 03:52:11 -07:00
Dustin Brown
7cc1f4cd0f qcacld-3.0: Succeed when offload config is disabled
PMO returns failure codes for enable/disable of NS and MC List offloads
when their respective configurations are disabled. As this is expected
behavior, return success instead.

Change-Id: I91b00da9b4026f5975c14f5889cd913b13e1347b
CRs-Fixed: 2323312
2018-10-02 12:07:58 -07:00
Wu Gao
87bfd3520c qcacld-3.0: Refine PMO configures based on converged cfg component
Based on cfg component, define PMO configures and add APIs to get or
set configures.

Change-Id: I9b9ff1f8701168787985cbcb219361a3f63c787f
CRs-Fixed: 2322176
2018-10-01 18:38:06 -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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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