Commit Graph

637 Commits

Author SHA1 Message Date
tinlin
a8193944ec qcacld-3.0: Possible null pointer dereference
cds_cfg is assigned the return value from function
cds_get_ini_config. cds_cfg may be null pointer. Add
null pointer check before cds_cfg is
dereferenced.

Change-Id: I184c0a589fa660c5c49cd951986ad918cbc42bcd
CRs-Fixed: 2518433
2019-09-02 02:31:13 -07:00
Abhishek Singh
682cf6f843 qcacld-3.0: Fix WMI timeout for runtime PM
For runtime PM if the bus is suspended driver need to consider
extra 6 sec time for bus resume.
Thus add 6 sec extra in WMI timeouts if runtime PM is supported.

Change-Id: I5515cc889a0315382bac11a33ea6f901b7af1c46
CRs-Fixed: 2507029
2019-08-20 22:53:50 -07:00
Jinwei Chen
c460236962 qcacld-3.0: support monitor mode enablement by changing driver mode
Support monitor mode enablement by changing driver mode, and also
remove the support that enable monitor mode with insmod parameter
"con_mode_monitor = 4", use "con_mode = 4" instead.

enable monitor mode steps for reference:
(1) change driver mode
   a. svc wifi disable
   b. echo 4 > /sys/module/wlan/parameters/con_mode
   c. ifconfig wlan0 up
   d. iwpriv wlan0 setMonChan 11 0

(2) insmod with kernal parameter way
   a. insmod /vendor/lib/modules/qca_cld3_wlan.ko con_mode=4
   b. ifconfig wlan0 up
   c. iwpriv wlan0 setMonChan 11 0

Change-Id: Ie615533d060261d545b3b92bea9916099ccccadd
CRs-Fixed: 2494158
2019-08-18 23:44:56 -07:00
Yuanyuan Liu
10a7666ed3 qcacld-3.0: Don't call pld_collect_rddm in trigger recovery handler
RDDM can be collected during kernel panic and pld_collect_rddm is
a blocking call that will cause WLAN watchdog if the caller is from
scheduler thread. Hence revert this change and collecting FW dump
inside kernel panic handler.

CRs-Fixed: 2506844
Change-Id: I8667896e61b856fc2e03e1c8278a6451b6a04c24
2019-08-10 04:05:01 -07:00
bings
58247e90b1 qcacld-3.0: Use dma_iommu_mapping only ENABLE_SMMU_S1_TRANSLATION defined
In standard linux kernel, struct dma_iommu_mapping is not defined for
arm64, while in qualcomm linux kernel, struct dma_iommu_mapping is
defined for arm and arm64.

To fix build error in standard linux kernel, use struct dma_iommu_mapping
only when ENABLE_SMMU_S1_TRANSLATION is defined.

Change-Id: Ib02073163f2a38c47f864c6592fe2470046868ce
CRs-Fixed: 2496733
2019-08-09 07:37:31 -07:00
Abhishek Ambure
7470976006 qcacld-3.0: Refactor vdev create code
Refactor vdev create code to target_if common code. Remove legacy
code for vdev create.

Change-Id: I57caf0c5fa2da7b6ba640a9d2edb72363959c585
CRs-Fixed: 2460786
2019-08-05 10:55:23 -07:00
Rakshith Suresh Patkar
02f3d31c2f qcacld-3.0: Use new HDD callback for rx mic error
Post rx mic error information to HDD via new HDD mic
error callback(hdd_rx_mic_error_ind) registered to
.rx_mic_error member in dp_ol_if_ops.

Change-Id: Ia1e2b78a94dddba48937995ecf62fb5a7ae4139d
CRs-Fixed: 2488452
2019-07-22 11:36:11 -07:00
Saket Jha
7741e86998 qcacld-3.0: Implement QDF API for cpumask
In cds_sched_find_attach_cpu function, change calls to functions
cpumask_clear, cpumask_set_cpu, and cpumask_setall to instead use the
QDF abstraction of these functions qdf_cpumask_clear,
qdf_cpumask_set_cpu, and qdf_cpumask_setall.

Change-Id: Ibd62e4d0f38ad3b8f2483e6cf40d56fcb70cba10
CRs-Fixed: 2486827
2019-07-16 17:14:55 -07:00
Jingxiang Ge
92fd1ee387 qcacld-3.0: Remove CONFIG_MCL in wlan_flush_host_logs_for_fatal
This is to Remove CONFIG_MCL in qcacmn code.
Related qcacmn change is
Ie231e966229789bcd8fa69aef1bc20e9b07a88ae.

Change-Id: I7b9500bc5de74be20d404758b43fca590bbf7caa
CRs-Fixed: 2484900
2019-07-09 18:50:53 -07:00
Jingxiang Ge
ce8ebf794d qcacld-3.0: Remove CONFIG_MCL in wlan_logging_set_fw_flush_complete
This is to remove CONFIG_MCL from qcacmn code.
Related qcacmn change is
Ia417c90060b20b004b1e5408be654ff392a8113d.

Move cds_is_fatal_event_enabled from
wlan_logging_set_fw_flush_complete to
cds_logging_set_fw_flush_complete.

Change-Id: I709c1f9be40d0b09df512d995a72edd5e7a5c820
CRs-Fixed: 2484843
2019-07-09 18:50:50 -07:00
Mohit Khanna
c77d69d19b qcacld-3.0: Affine threads to perf core in high tput
Affine DP RX Threads to perf cluster in high throughput scenarios.
High throughput is detected using existing logic from the bandwidth
timer.

Change-Id: Ieb98c6930807ba42be7f5b4d0b8a78dfb197ba27
CRs-Fixed: 2474322
2019-06-28 18:07:50 -07:00
Tiger Yu
e40e7836a5 qcacld-3.0: Add support for TCP delayed ack in driver
qcacld-2.0 to qcacld-3.0 propagation

This change adds support for driver supported TCP
delayed ack to increase TCP RX performance in
third-party platform which does't support kernel
TCP delayed ack feature.

TCP delayed ack is dependent on count and timer
values. Whatever is achieved first will trigger
sending TCP ack.

This feature can be controlled through ini values.
gDriverDelAckTimerValue - timer value in ms
gDriverDelAckPktCount - delayed ack count
gDriverDelAckEnable - enable/disable feature

Change-Id: I8105bbb90965295b5a4aefeb00d344a90155974d
CRs-fixed: 2414224
2019-06-18 22:27:35 -07:00
Jianmin Zhu
69ca6965db qcacld-3.0: Fix F/W dump on Rome when host F/W out of sync
When Rome host F/W out of sync, cds_trigger_recovery_handler is
called, but pld_collect_rddm is added in it by change
Id9f1dfefe1560affff6c4ecfca1b8fdba3eb0928,
Rome doesn't support RDDM, panic will always happen without F/W
dump.

With this change and ini gEnableSelfRecovery=1, when host F/W out
of sync happens, crash inject is sent to F/W to trigger F/W dump,
if subsystem restart level is "system", panic will happen,
If subsystem restart level is "related", SSR will happen.

Change-Id: I3c714e6b2750ef3305b0f4c64ea5fe8fdc74c1d8
CRs-Fixed: 2472484
2019-06-16 08:26:36 -07:00
hangtian
b9c9136eaf qcacld-3.0: Fix QCA_LL_PDEV_TX_FLOW_CONTROL invalid memory access
Add QCA_LL_PDEV_TX_FLOW_CONTROL for both
QCA_LL_LEGACY_TX_FLOW_CONTROL and QCA_LL_TX_FLOW_CONTROL_V2
disabled platform, avoid frame drop in driver which leads to bad TCP
TX throughput. Change NUM_TX_QUEUES to 5 for this case to avoid invalid
memory access in wlan_hdd_netif_queue_control().

Change-Id: Ifa649e31a41d1bf89eadc8cc7e9520f0e27b9fe4
CRs-Fixed: 2466996
2019-06-13 04:10:25 -07:00
Rakshith Suresh Patkar
65bdb19143 qcacld-3.0: Use new API pld_smmu_get_domain
Use new API pld_smmu_get_domain in place of
pld_smmu_get_mapping, which is to be deprecated.

Change-Id: I7a083cd3c0deecdbf774b57121866cd72fc157dc
Crs-Fixed: 2464850
2019-06-08 06:29:09 -07:00
Manjunathappa Prakash
8280a15953 qcacld-3.0: Add WMA API to know if vdev is roaming
Add WMA API and DP ol_if callback to know if vdev is roaming in progress

Change-Id: Ice43413516d8b2490bf7ddf6fcac85ee5dee421b
CRs-Fixed: 2458886
2019-06-03 02:26:49 -07:00
Jiani Liu
6d3b6a16ab qcacld-3.0: Add PTP timestamp socket options TX support
Host need to fill netbuf with qtime instead of tsf. So
host need to add tsf64 enable/disable related functions
and definitions to sync with FW.

The tsf64_time is new added to fw/host structure, so host
need to add parse functions to get tsf64_time from tx_desc.

Change-Id: Ieea0d8f905eb57629d279f8da0e811857b760b1f
CRs-Fixed: 2444456
2019-05-23 22:57:27 -07:00
Rajeev Kumar
c58f7c2578 qcacld-3.0: Add change to support DRV during wow mode
Add changes to support DRV feature during wow mode.

Change-Id: I588dfc5fa1bc419a288f346664c4028ef2d2011b
CRs-Fixed: 2456148
2019-05-23 13:12:17 -07:00
Srinivas Girigowda
793fd05680 qcacld-3.0: Remove file cds_if_upperproto.h
Remove file cds_if_upperproto.h.

Change-Id: Iaef5431c93e1f13ab8afb908ad6ca140ee22d087
CRs-Fixed: 2436677
2019-04-30 22:27:20 -07:00
Rajeev Kumar
0075036be1 qcacld-3.0: Stats: Add handling of pmo suspend resume
Register pmo suspend resume handler to disable/enable stats requests.

Change-Id: If1112e3ef23bfa53f107eb5a668189da4f83bd0c
CRs-Fixed: 2430011
2019-04-29 04:17:30 -07:00
hangtian
72704809e5 qcacld-3.0: Add stop_th and start_th for tx flow control V1
Add stop_th and start_th for QCA_LL_TX_FLOW_CONTROL_V2 disabled
platform, which is pdev based tx_desc pool. Change pdev tx_desc pool
size from 1056 to 900, default stop_th is 15% start_th is 25%, this
setting is exactly same as QCA_LL_TX_FLOW_CONTROL_V2. Pause netif tx
queues for all vdevs when stop_th reached instead of dropping frames.
Reduce pdev pool size could significantly reduce firmware wmm drop. Both
of host and firmware frame dropps lead to bad TCP throughput.

Change-Id: I77daf8c9fdef624f8ec479885b7705deb1fef142
CRs-Fixed: 2436772
2019-04-28 18:46:27 -07:00
Arun Kumar Khandavalli
a423458219 qcacld-3.0: Propagate error from the hdd to wma in case of failure
When the ready event is received from the firmware, hdd callback
is called to create the pdev and update the capabilties. If
there is any error the error is not propogated back to hdd
which can result in the accessing the invalid memory.

Propagate the status correctly from hdd to wma to resolve this issue.
This will result in the probe failure until the resources are available
or reference leaks are fixed.

Change-Id: I97ec062893216e25e285d95d6bfb5cf3e91a4005
CRs-Fixed: 2426612
2019-04-25 00:51:26 -07:00
Pragaspathi Thilagaraj
42dc8c9360 qcacld-3.0: Update HLP data from FILS assoc rsp frame to PE session
HLP data extracted from FILS association response frame needs to
be sent to upper layer. When association success is posted to
sme, HLP data is copied from lim pe_fils_info structure to
sme_join_rsp->roam_fils_info. But the hlp data is parsed from
association response frame but its not copied to pe_fils_session
This resuts in hlp data not sent to hdd and upper layers.
Copy fils data from parsed association response frame into the
pe_fils_info for FILS connection.

Currently there is pointer to hlp_data in pe_session also. But
it is not used and memory allocation is also not done for this
hlp_data. Cleanup this unused hlp data in pe_session and only
use the hlp data from pe_fils_session structure.

Change-Id: I0ef6df6e55130e18a85e2ddf49f8293d8672ac0b
CRs-Fixed: 2424493
2019-04-15 15:21:05 -07:00
Jianmin Zhu
4f3708d75a qcacld-3.0: Fix scan queue not unregistered
Scan queue isn't unregistered, lead to scheduler queue leakage,
after driver module start/stop several times, scheduler queues
are used out, can't register any more.

Change-Id: I98d81591aee25a5e18e560766fb077733eb1b671
CRs-Fixed: 2431696
2019-04-09 06:37:02 -07:00
Srinivas Girigowda
d462f3b993 qcacld-3.0: Multiple cleanup regarding access category
1. Replace TX_WMM_AC_NUM/OL_TX_NUM_WMM_AC with QCA_WLAN_AC_ALL
2. Replace SIR_QOS_NUM_AC_MAX with QCA_WLAN_AC_ALL
3. Replace WME_NUM_AC with QCA_WLAN_AC_ALL
4. Fix the typo sme_qos_u_pto_ac_map

CRs-Fixed: 2430527
Change-Id: Id2b4624d60a2bd7dd1471c65699ef0de1b88aecf
2019-04-06 00:15:56 -07:00
Liangwei Dong
a44d55b68a qcacld-3.0: Use converged pmkid cache
When WLAN_CONV_CRYPTO_IE_SUPPORT enabled, pmkid should be
saved to crypto component by crypto API. Otherwsie RSN ie
construction will have no pmkid info to add to rsn ie buf.

Change-Id: I8643aca794dcb42323d3d051e7a15a0597167ed6
CRs-Fixed: 2402775
2019-04-04 08:51:17 -07:00
Manjunathappa Prakash
f5b6f5f4b7 qcacld-3.0: Add INI config option to control WMI credits
Add INI option to control consecutive WMI writes. Setting this 1
will essentially serializes the HTC WMI command writes.

Change-Id: I8e28990127f3e4dac2fa91ac9b9df87eed321a2a
CRs-Fixed: 2424795
2019-03-29 11:05:38 -07:00
Srinivas Girigowda
a47b45f94f qcacld-3.0: Consolidate multiple MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
Consolidate multiple (redundant) MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
PMO_80211_ADDR_LEN
IEEE80211_ADDR_LEN
ETHER_ADDR_LEN
HTT_MAC_ADDR_LEN
ETHERNET_ADDR_LEN
DEFRAG_IEEE80211_ADDR_LEN
OL_TXRX_MAC_ADDR_LEN
QCSAP_ADDR_LEN

CRs-Fixed: 2406592
Change-Id: I829c5799e4724f81af996b23fdd4ea03f4728bc4
2019-03-28 16:49:58 -07:00
Srinivas Girigowda
ff8f5efad4 qcacld-3.0: Consolidate multiple SIR/CSR PMKID_LEN to PMKID_LEN
1. Change MAX_PMKID_LEN to PMKID_LEN (present in qcacmn)
2. Change SIR_PMKID_LEN to PMKID_LEN
3. Change CSR_RSN_PMKID_SIZE to PMKID_LEN

Change-Id: I7a25d49ab2fc032338b2f88915852ae7f3a6271f
CRs-Fixed: 2423876
2019-03-27 14:31:47 -07:00
Dustin Brown
3f49e5e9b1 qcacld-3.0: Remove start/stop modules in progress
With the addition and integration of the Driver Synchronization feature,
it is no longer necessary to keep track of whether the driver modules
are starting or stopping. Remove the driver modules starting/stopping
flags.

Change-Id: I4718eedfaa1305780c5fcf6a2ff04114b210a911
CRs-Fixed: 2423618
2019-03-27 12:51:49 -07:00
Dustin Brown
3fdaaf61ad qcacld-3.0: Remove cds_ssr_protect/unprotect
cds_ssr_protect/unprotect is obsolete. Remove them, replacing any
remaining call sites with qdf_op_protect/unprotect.

Change-Id: Ib8e1fc1e16785dfe3c5f8273e4ad8d5d6ecdb6e6
CRs-Fixed: 2418454
2019-03-27 01:25:38 -07:00
Yuanyuan Liu
3eb39032e3 qcacld-3.0: Do not collect rddm in irq context
Do not collect ramdump in interrupt/atomic context.

CRs-Fixed: 2392126
Change-Id: I07059808a7e6a8073dde0cd020fa42075d1556cb
2019-03-20 08:25:43 -07:00
Jeff Johnson
e7afbe9804 qcacld-3.0: cds: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within cds replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: Ib542e8e26c16dd0d6afccb0fd94bca75a89b21e1
CRs-Fixed: 2418395
2019-03-19 22:54:33 -07:00
Abhishek Singh
72a04bf418 qcacld-3.0: Remove unused lim_is_system_in_scan_state
lim_is_system_in_scan_state was used when scan was handled by host
and with scan offloaded the API always return false and thus is
of no use. Also the SCAN state used by it are never set.

Thus remove the unused scan state and lim_is_system_in_scan_state.

Change-Id: Ie9b78340035d85805cc9416f557b683a0a3be232
CRs-Fixed: 2417851
2019-03-19 16:51:03 -07:00
Srinivas Girigowda
2d56c36a61 qcacld-3.0: Use converged qcacmn macros (part 2)
Replace the existing qcacld-3.0 macros with qcacmn converged
macros.

Change-Id: I8c7e07587111bc3b783138623249da692168d9d3
CRs-Fixed: 2416429
2019-03-19 02:24:27 -07:00
Yuanyuan Liu
3ab5531e6d qcacld-3.0: Collect ramdump before kernel panic
FW dumps is not getting collected during kernel panic handler.
Hence move ramdump collection before kernel panic.

CRs-Fixed: 2362637
Change-Id: Id9f1dfefe1560affff6c4ecfca1b8fdba3eb0928
2019-03-18 23:55:43 -07:00
Jinwei Chen
000e7f2413 qcacld-3.0: fix invalid dp_soc use after free issue
driver module has been stopped since long time no interface is up
and dp_soc handle has been freed, but one virtual interface operation
still try to access invalid dp_soc from gp_cds_context, panic
happened.

set gp_cds_context->dp_soc to NULL if dp_soc is detached.

Change-Id: Icb2aa8bb15e309d8fcc749bafe37253c82a21f36
CRs-Fixed: 2413720
2019-03-18 03:24:13 -07:00
hangtian
6b62cb15c5 qcacld-3.0: Fix resume issue while SSR in progress
Fix resume issue while SSR in progress. When firmware goes down
while driver is in suspend state, fix driver resume(wmi fail) issue.

Change-Id: I5521b92a0a14382a8e1e4b4172e3ed91ad5d93a8
CRs-Fixed: 2412130
2019-03-17 20:42:54 -07:00
Jingxiang Ge
45a2433bca qcacld-3.0: Fix camelCase for sessionId in t_packetmeta
Replace sessionId with session_id in t_packetmeta.

Change-Id: I041d25a5a5f61dd65fea25d41fa11d6456e4e88f
CRs-Fixed: 2413150
2019-03-11 07:46:54 -07:00
Srinivas Girigowda
df90ceacd1 qcacld-3.0: Remove obsolete macros from CDS
Remove obsolete macros from CDS.

Change-Id: Ic17ae603f698568ba8ccb6b4e3f332a475e67a7b
CRs-Fixed: 2395980
2019-03-08 18:53:37 -08:00
Alok Kumar
ea3b23bc74 qcacld-3.0: Fix callback function type for cds_ol_rx_thread_cb
To address kernel control flow integrity (CFI) issues related to
type mismatch, correct input argument type for ol_rx_data_cb().

Change-Id: Iafefe5dc3d946e3d67743de1a662aa3b0511cf5d
CRs-Fixed: 2407160
2019-03-07 23:53:53 -08:00
Jeff Johnson
d82d7893b1 qcacld-3.0: Remove is_ra_ratelimit_enabled from cds_config_info
Change I870a1271a627d47242000f5e04068e628f567216 ("qcacld-3.0: Cleanup
usage of RA rate limit variables in WMA") removed all usage of field
is_ra_ratelimit_enabled in struct cds_config_info. Since this field is
now obsolete, remove it.

Change-Id: Iea020b56cb1927718bccb7bc77d314e40b9c73a6
CRs-Fixed: 2411167
2019-03-07 22:22:32 -08:00
Srinivas Girigowda
a83abf3bbe qcacld-3.0: Modify IEEE80211_FC0_*_QOS to QDF_IEEE80211_FC0_SUBTYPE_QOS
Modify IEEE80211_FC0_SUBTYPE_QOS to QDF_IEEE80211_FC0_SUBTYPE_QOS.

Change-Id: Ide7ce0b8ff66af1706c2781dbe2aecb316613366
CRs-Fixed: 2408230
2019-03-05 11:27:49 -08:00
Wu Gao
09846d21e5 qcacld-3.0: Remove duplicate codes about DP INI
There is duplicate codes about DP INI in function cds_cdp_cfg_attach,
so remove it.

Change-Id: I0e6879cf28944cfd92ae7a3e6f4594641431d571
CRs-Fixed: 2408904
2019-03-05 05:36:33 -08:00
Dustin Brown
963101199d qcacld-3.0: Remove OS_* usage
There are a few consumers of the legacy OS_* APIs. Directly use
appropriate QDF APIs instead.

Change-Id: Ibe46172200119c6d293acb301baf796276c5949c
CRs-Fixed: 2403793
2019-02-27 08:11:53 -08:00
Srinivas Girigowda
a987746e2c qcacld-3.0: Replace struct ether_header with qdf_ether_header_t
Replace struct ether_header with qdf_ether_header_t.

Change-Id: I250b9c72828595c738cf3cfdca69ba6de66ef8aa
CRs-Fixed: 2395980
2019-02-26 21:18:23 -08:00
Srinivas Girigowda
4c2d30580c qcacld-3.0: Remove duplicate macro ETHERTYPE_8021Q
Remove duplicate macro ETHERTYPE_8021Q and instead use
ETHERTYPE_VLAN.

Change-Id: I84b1382a92023cc670b1cd19b8588c6386ffce84
CRs-Fixed: 2395980
2019-02-26 21:18:19 -08:00
Srinivas Girigowda
3105e4db2d qcacld-3.0: Remove duplicate WME_AC_* macros
Remove duplicate WME_AC_* macros.

Change-Id: Iedd17289974b5c017c9ea76501fa746e4ef5ca2c
CRs-Fixed: 2395980
2019-02-26 21:18:15 -08:00
Srinivas Girigowda
a02ce98bc3 qcacld-3.0: Replace IEEE80211_ELEMID_* with WLAN_ELEMID_*
Remove the duplicate enumerations in CDS and
use the enums defined in wlan_cmn_ieee80211.h.

Change-Id: I0bf380d0b06d85be8778d985b10246ea2b8aa474
CRs-Fixed: 2395980
2019-02-26 21:18:10 -08:00
Srinivas Girigowda
2834495863 qcacld-3.0: Remove cds_ieee80211_defines.h
Remove cds_ieee80211_defines.h file.

Change-Id: I3b7a3f61f82ea15b7975fb5d143257c80382f20d
CRs-Fixed: 2395980
2019-02-26 21:18:05 -08:00