Commit Graph

6032 Commits

Author SHA1 Message Date
nobelj
418b2e9af9 qcacmn: Modify index for printing BW stats
bw index are stored as
0 for 20MHz,1 for 40MHz, 2 for 80MHz and 3 for 160MHz

Change-Id: If5c71ca5716c7870782dcd7ddd9b8e73c6f2bbd3
2018-12-05 00:36:03 -08:00
Vignesh Mohan
eba709480e qcacmn: Receive and parse RCSA with subchannel information
Update NOL list based on the external radar information sent
from the action frame and store in DFS structure.

Add an utility - dispatcher function that can be called by UMAC
with NOL IE information.

In the DFS structure,
	1). If subchannel marking is disabled, add all the current
	    channel's subchannels to NOL, do not update the NOL IE
	    structures inside dfs, and send a flag saying not to
	    propagate the NOL IE to uplink.
	    This is because, in case of cascading repeaters, one
	    of the repeaters (RE1) in the cascading system might have
	    subchannel marking disabled. In that case, sending the
	    same NOL IE to uplink results in RE1 and its BSS to disconnect.

	2). If subchannel marking is enabled, add those subhannels to NOL,
	    and update flags saying NOL and RCSA IE should be sent.

Change-Id: I3f3e14a59503cd1a15573c988a984a20117aa814
CRs-Fixed: 2328377
2018-12-05 00:36:00 -08:00
Vignesh Mohan
07035aaed8 qcacmn: Enable RCSA with subchannel information
Calculate the bitmap of subchannels that are affected by
radar and store in dfs structure along with flags

Algorithm:
	1). Given the radar affected subchannels list, create a
	NOL bitmap, where
	1 - Radar hit on Subchannel.
	0 - Subchannel not affected.

	2). Along with the NOL bitmap, send the Minimum Bandwidth
	for each subchannel and the Channel list's starting
	channel's centre frequency.

	Example:
	Mode : 100HT80, if radar affected subchannels are 100, 104
	and 108.
	NOL bandwidth: 20.
	NOL start frequency: 5500.
	NOL Bitmap: 11100000.

	3). During precac (precac timer running), if radar hits
	at secondary segment, the umac code that sends rcsa
	is still called, but add a new flag to not send rcsa, and
	in rootAP, channel change is not triggered, only NOL
	is updated.

Add APIs that can be called from mlme to fetch the NOL and IE
flags information from DFS structure during RCSA framing.

If subchannel marking is disabled, the new NOL bitmap has no meaning
and is hence, not sent.

CRs-Fixed: 2328377
Change-Id: I3114ff5ca2704c316c9dc83220740fac9a6a00a1
2018-12-05 00:35:57 -08:00
gaurank kathpalia
079ec73fbc qcacmn: Fix Supported rates max length
Currently the driver checks for the supported rates IE,
and if the length of the IE is greater than 8, the driver
rejects the IE, according to spec.
But some APs supports 12 rates hence are not scanned.

Fix is to have a supported rates IE length check of 12 instead
of 8.

Change-Id: Ib0e25c94e781ccd44b7f08ea3db6109ad8d6ad22
CRs-Fixed: 2360709
2018-12-04 22:27:53 -08:00
Dustin Brown
40bd452c5b qcacmn: Abstract qdf_mem_validate_list_node()
Currently qdf_mem contains a function, qdf_mem_validate_list_node(), for
validating a list node and ensuring it is currently part of a list.
Instead, abstract this function from qdf_mem, and move the definition to
qdf_list_node_in_any_list() in qdf_list. This is a more reasonable
location for the list-specific logic, and allows its reuse by other
callers.

Change-Id: I56a5d54e3c81470a111f168533faedf7fa525ff3
CRs-Fixed: 2359358
2018-12-04 16:45:21 -08:00
Amir Patel
c2cc252d18 qcacmn: Fix avg_tx_rate computaion
Assign dp_ath_rate_lpf return value to avg_tx_rate,
which is further used to compute ppdu_tx_rate

Change-Id: Ib51be85c2436bef8feffeb611982314720399a69
CRs-Fixed: 2356831
2018-12-04 15:12:31 -08:00
Ajit Pal Singh
625413c918 qcacmn: Call pld_wlan_enable() from usb_bus_configure()
When PLD_USB_CNSS is enabled, call pld_wlan_enable() from
hif_usb_bus_configure().
Do not call pld_wlan_enable() when QMI is not enabled.

CRs-Fixed: 2325591
Change-Id: Ie710f8aea1b5ceb9d3a633348858775b2ff462d5
2018-12-04 12:50:41 -08:00
Harprit Chhabada
2de9f012bd qcacmn: Clean scan active and passive dwell time apis
Create ucfg apis in scan components for calling from hdd.
Move the scan apis to new file, wlan_scan_api.c

Change-Id: Iec08eddbba3066a4d781c988624d47749a75610a
CRs-Fixed: 2342892
2018-12-04 00:06:09 -08:00
Krunal Soni
07215e8082 qcacmn: Define int_ctx variable to resolve compilation error
int_ctx variable is not defined but it is being used which creates
compilation error. Define this variable as part of the fix.

CRs-Fixed: 2359507
Change-Id: I17e57663eb8daa449616ee99d5eb9455e3b7cee2
2018-12-03 16:41:55 -08:00
Nachiket Kukade
2b5448d685 qcacmn: Remove NAN component and related files from CMN
NAN will not be needed in CMN codebase, to reduce the
unnecessary lines of code all the NAN related files have
been merged into CLD. Remove all those files from CMN,
remove NAN related API's and structures from init-deinit,
target if and lmac components.

Remove NAN component and related files from CMN.

Change-Id: I8fa22b84aff30cfbb7a8cd0a573acf6e0a9d8744
CRs-Fixed: 2338061
2018-12-03 15:18:11 -08:00
chenguo
5fc91d835e qcacmn: Safely cleanup reorder frag list during RX defrag flush
Need to use tid_lock to protect the rx_tid data structure in the
dp_rx_reorder_flush_frag function. Or else there will be race
condition issues.

CRs-Fixed: 2357226
Change-Id: I860a64b529f0548eced7b537c4180a2c57175a56
2018-12-03 11:01:30 -08:00
Rathees kumar Chinannan
b0bedad338 qcacmn: WMI command to delete multiple WDS entries
Added new WMI command to delete multiple WDS entries.

Change-Id: Ifa40d8d96c645f12c4887763ce0aebb874306382
CRs-Fixed: 2291453
2018-12-03 05:48:19 -08:00
Amir Patel
4cf16d6d96 qcacmn: Fix tx_stbc stat print issue
set str_buf index to zero before parsing stbc stats from tlv

CRs-Fixed: 2354728
Change-Id: I9100a762a1f40e0ef2fc76ad4a9286b4002a9a82
2018-12-03 04:15:15 -08:00
Jeff Johnson
94f016c5f2 qcacmn: Fix BLOCK_COMMENT_STYLE issues in target_if/dfs
A few instances of violating "Block comments should align the * on
each line" have been identified in target_if/dfs, so fix them.

Change-Id: Ic198912225b8bec587e30d00d7a2a5f76e03d366
CRs-Fixed: 2359528
2018-12-02 14:59:56 -08:00
Dustin Brown
be5a24a808 qcacmn: Remove qdf libc implementations
The libc implementations of QDF were originally intended to be used for
off-target unit testing purposes. However, doing this involved
reimplementing large sections of QDF. Instead, unit testing is being
done in an emulator, which provides many of the benefits of off-target
testing without needing to reimplement any logic. As such, remove the
libc folder from QDF.

Change-Id: I829b4cae3f7bad7b24c97ed458e978eab2b0fbbd
CRs-Fixed: 2359499
2018-12-02 14:59:54 -08:00
Mohit Khanna
40f76b57f8 qcacmn: Fix regression from DP init-deinit path changes
MCL DP initialization path is running into issues due to change
I5732453f617bdc16995fda916b645c41845c3ecb. Fix the same.

Move flow control lock variables to re-use region. This is needed since
flow control deinit happens in dp_soc_detach, while in dp_soc_deinit, the
soc memory is being partially reset.

De-init HTT memory in dp_soc_deinit and free HTT handle
in dp_soc_detach. The existing code was not freeing HTT
packets for MCL case and freeing the HTT handle twice.

CRs-Fixed: 2359409
Change-Id: I52dcccc0444d4ce139a29ffcb884598bbacda88f
2018-12-02 13:31:08 -08:00
jitiphil
7c265d301e qcacmn: Packet stat collection failure
Change made I7fd67b02c3b7cb4f1bfe7c6f4641f6d881e25abd
to fix possible NULL dereference of pkt_stats_dump
caused pkt stats collection to fail as pkt_stats_dump
is NULL from cds_pkt_stats_to_logger_thread.

Move NULL check for pkt_stats_dump to just before
it is dereferenced

Change-Id: I0f4c9d58f0d4d17d6c26bfbbd79f6447dd52230b
CRs-Fixed: 2358139
2018-12-02 11:55:21 -08:00
bings
53262f1d1f qcacmn: Check param_buf->hal_reg_caps before dereferencing it
While handling the WMI_SERVICE_READY_EXT_EVENTID WMI FW event, a NULL
pointer dereference can occur if param_buf->hal_reg_caps is not checked.

Check param_buf->hal_reg_caps before dereferencing it to avoid NULL
pointer dereference.

Change-Id: I00eba5e89fbdde78979d19f492df5ad4dca8b80c
CRs-Fixed: 2347673
2018-11-30 17:40:01 -08:00
Pamidipati, Vijay
7d6957294f qcacmn: fix for nbuf leak issue
Fix a nbuf leak issue in htt tx completion path for
invalid peer frames

Change-Id: I7818bd2cfe8144e1ea8b1d43e5e5c1de929f91cc
2018-11-30 14:36:54 -08:00
Basamma Yakkanahalli
7b6855aa3e qcacmn: Add hal_get_hw_hptp_generic hal_ops to ipq6018
Added missed hal_get_hw_hptp_generic
'Get HW head and tail pointer value for any ring' to ipq6018.

Change-Id: Idc4b595ab6c52558542cf6f87e36f590bf93123f
2018-11-30 08:28:33 -08:00
jiad
cceae87cf8 qcacmn: Properly featurize NAN
When CONFIG_MOBILE_ROUTER is enabled there are build failures
due to improper featurization of NAN, so fix the featurization.

Change-Id: I6bc11fb82394c2d32b328cb5d50ff974051755e1
CRs-Fixed: 2353170
2018-11-30 08:28:30 -08:00
Krunal Soni
d3eb8bcff8 qcacmn: Initialize the PN and plumb it to HW
Initialize the PN to the value which is given by upper layer
and plumb it to HW.

Change-Id: If6b14d2b9b92e4571a85cb20dc445608d5f56961
CRs-Fixed: 2350954
2018-11-30 08:28:28 -08:00
Rajeev Kumar
d60134e91d qcacmn: Log link up/down logs to console using info log level
PCIe link up/down voting is critical hence log it using info level
log on console.

Change-Id: Iea2be05cf9ea5231b0e2de54b508d49aec341847
CRs-Fixed: 2357793
2018-11-30 08:28:26 -08:00
Amir Patel
d577d09497 qcacmn: Fix last_per overflow issue
Check if ucast pkts count is more than success pkts count,
compute last packet error rate only if ucast is less than success
pkts.

Change-Id: I0aa4d41d09b1691e4d554beab2f2ed7a7f2ceb1e
CRs-Fixed: 2343479
2018-11-30 06:45:20 -08:00
Alok Kumar
c1ec49e685 qcacmn: Fix max OL_TXRX_NUM_LOCAL_PEER_IDS for concurrency
Change max OL_TXRX_NUM_LOCAL_PEER_IDS to 35 to take care of
STA + SAP + P2P concurrency.

Each AP will occupy one ID, so it will occupy 2 IDs for AP-AP mode.
Clients will be assigned max 32 IDs and STA(associated)/
P2P DEV(self-PEER) will get one ID.

Change-Id: I4d3e74c550e34b1d3417825245990655ead87b28
CRs-Fixed: 2356032
2018-11-30 06:45:17 -08:00
Anish Nataraj
e9d4c3bf33 qcacmn: Reorganise DP init-deinit path to reuse memory
Avoid memory fragmentation that happens during
attach-detach flow.
- Reuse transmit allocated static pool memory across soc up/down.
 These memories are allocated during soc attach.
- Reuse DP source ring memory, DP soc context, DP pdev context
  across soc up/down.
- Reorganise structure members of DP soc and DP pdev so that
  we can zero out structure members across soc up/down
- Add cdp soc init/deinit and cdp pdev init/deinit that
  will be active across soc up/down

Change-Id: I5732453f617bdc16995fda916b645c41845c3ecb
2018-11-30 03:40:43 -08:00
jiad
5eb6276a46 qcacmn: Fix misleading-indentation build error
This change fixes build errors with compiler option
-Werror=misleading-indentation.

Change-Id: I56e0921b1319852109d978cf239b54c2941a0e8e
CRs-Fixed: 2353199
2018-11-30 03:40:41 -08:00
Venkateswara Swamy Bandaru
9fb7b7813a qcacmn: Enable WMI support for RU26 intollerent setting
Enable WMI support for RU26 intollerent setting for tlv case.

Change-Id: Ia088ac3803c437bb35ace21fd508906baf519a3b
CRs-Fixed: 2357397
2018-11-30 03:40:38 -08:00
Dustin Brown
da4fb2ad20 qcacmn: Avoid marking MSI as wakeable
On MSM platforms, MSI vectors are always wakeable, so calling
enable_irq_wake() on an MSI vector interrupt line is a no-op.
Additionally, on some product lines, this call will fail. This causes
suspend to fail despite the MSI already being wakeable. Simply avoid
marking the wake MSI as wakeable during suspend as a work around.

Change-Id: I32b2b4fb231681ad29b4e98b2410d0eb6e68c671
CRs-Fixed: 2357784
2018-11-29 23:33:28 -08:00
Dustin Brown
0497d105b0 qcacmn: Panic before unlock on missing unmap
Currently, qdf_nbuf_map_check_for_leaks() logs the leak information
under spinlock before inducing a panic. This can cause a confusing false
positive panic upon releasing the spinlock if the logging took longer
than the spinlock timeout threshold. Since we already know we are going
to panic, panic under spinlock to ensure the panic message is always
appropriate.

Change-Id: Ib98b21e8feac0314b7c1f00f08b9e81112c4f2ba
CRs-Fixed: 2357806
2018-11-29 18:12:36 -08:00
Chaitanya Kiran Godavarthi
f6c061252f qcacmn: Reduce ASE aging for MEC entry type
ASE entry aging for MEC entry type was same as
WDS type for 120 secs, this creates an issue when
device roams from MEC to WDS connection by not
aging out till 120secs. So now we reduce the MEC
aging time to 1sec

Change-Id: I6ab3b095a85c6d09f9fcd95b3b39f7152064d297
2018-11-29 18:12:33 -08:00
Jianmin Zhu
74c34ff6b0 qcacmn: Avoid mem leak when create regulatory object
When x_psoc_create_handle return failed,  need free all resources
before return, x_psoc_destroy_handler has no chance to be called
any more.

Change-Id: I63fd3743dd4ef4c9cc35c9ae8464c2b728447818
CRs-Fixed: 2353795
2018-11-29 18:12:31 -08:00
Jianmin Zhu
5d9c2898db qcacmn: Avoid mem leak when create DFS object
When x_psoc_create_handle return failed,  need free all resources
before return, x_psoc_destroy_handler has no chance to be called
any more.

Change-Id: I4b9999dbc2597c4ea860f08a6f3334f7f5728146
CRs-Fixed: 2353795
2018-11-29 18:12:28 -08:00
Jianmin Zhu
3b50e73e0f qcacmn: Avoid leak and double free in serialization object
When wlan_serialization_pdev_create_handle return failed,  need
free all resources before return,
wlan_serialization_pdev_destroy_handler has no chance to be
called any more, same for psoc, pdev handlers.

Optimized destroy handlers to avoid double free and leak.

Change-Id: Iae2b7c2fa221502742cbe565b27bcb16b7fc56ed
CRs-Fixed: 2353795
2018-11-29 18:12:27 -08:00
Yeshwanth Sriram Guntuka
dca006cecc qcacmn: Remove ssid check for finding scan dup entry
Probe responses received from hidden AP after beacons
with non-zero ssid length will use a new entry in scan
db resulting in multiple scan entries for same AP.

Fix is to remove ssid check in util_is_scan_entry_match
api.

Change-Id: I1c094d483a40d40f7ca9d40b26d04a7f80099dd1
CRs-Fixed: 2353339
2018-11-29 18:12:24 -08:00
gaurank kathpalia
a6076f692d qcacmn: Fix scan policy type in default scan case
The driver has a default scan policy type of DBS scan
which is not overwritten in case of DBS disabled.

Fix is to have a default of NON-DBS scan, and overwrite the
scan policy if the low power, low span scan is triggered,
or if the DBS is disabled from ini.

Change-Id: I8c95b2ca5915e1a74ccdeae55dea5e65bcfe9664
CRs-Fixed: 2354103
2018-11-29 18:12:21 -08:00
Paul Zhang
da522d8f7c qcacmn: Ignore destroy callback if creating fail
objmgr should not call destroy callbacks for components
that have not successfully completed the creating callback.
Or the function wlan_objmgr_xxx_obj_destroy returns with
QDF_STATUS_E_FAILURE and doesn't call wlan_objmgr_xxx_obj_free
to free the psoc/pdev/vdev/peer.

Change-Id: I1ba5a6afd98254cbed4571d5fb1cd24543e1db54
CRs-Fixed: 2318184
2018-11-29 18:12:18 -08:00
Abhiram Jogadenu
ba7946a147 qcacmn: Support for Quiet IE count change in bcn
Added support for quiet IE count change in beacon for beacon
offload case.

Change-Id: Ic8de5910588b58c8ffce48ea888afe8e6ed30dc9
CRs-Fixed: 2334134
2018-11-29 18:12:15 -08:00
jitiphil
a3be364dfb qcacmn: Free buffer in ath_procfs_diag_read
A read buffer is allocated and used in
ath_procfs_diag_read and it is not freed
in one exit path which causes a memory leak

Free read buffer in all exit paths of
ath_procfs_diag_read

Change-Id: I1b2446a99f53c2f9130d395dd316eb4649eb24db
CRs-Fixed: 2352165
2018-11-29 18:12:12 -08:00
chenguo
2a73379e03 qcacmn: Add new cdp API to get vdev in monitor mode
After gerrit#2436786, vdev in monitor mode is removed from vdev
list of pdev. So it is needed to add one more cdp API to get vdev
in monitor mode.

CRs-Fixed: 2343290
Change-Id: I9d74302a464280881ce0cf25dbc8c4f9d8b8d48d
2018-11-28 03:57:17 -08:00
Jinwei Chen
40fafaf4b6 qcacmn: fix REO2SW ring full issue
When reap data from REO2SW ring and if the TP catches up to cached
HP, current logic will update HP again and give a second chance to
reap data. but the TP is not updated to ring register, if more data
is received on this ring then HP easily catches up to TP and the ring
is full.
Update TP as well if HP get chance be updated.

Change-Id: I92f381d2a31f3be987866a829e05b5578098649a
CRs-Fixed: 2334435
2018-11-27 23:54:50 -08:00
Viyom Mittal
27fe1239d3 qcacmn: Set ack_rssi_valid to 1 for successful TX
The ack_rssi_valid flag to set to 1 only when completion_status
value is 0 which shows that the TX was successful.

Change-Id: I9e520422995e374d7d35b9db0c060d1fce2f9067
2018-11-27 11:20:21 -08:00
Bala Venkatesh
c05f8e47be qcacmn: Avoid possible integer overflow
In function init_deinit_chainmask_table_alloc, alloc size is declared
as uint32 and is assigned the value the multiplying non zero value
sizeof(struct wlan_psoc_host_chainmask_capabilities) and uint32
value ser_ext_par->chainmask_table[i].num_valid_chainmasks.
This can lead to overflow as multiplies value can be more than uint32.

Change-Id: I9a886d9ee5213ae8989a2c5d4502336cc275418a
CRs-Fixed: 2347650
2018-11-27 02:01:39 -08:00
Basamma Yakkanahalli
5f7cfd49c2 qcacmn: Device and Target type support for qca6018
Added target and device type support for qca6018.

Change-Id: I85382bf053d0a5f34cfaf0cca78a4b66b4265989
CRs-Fixed: 2323023
2018-11-27 00:32:00 -08:00
Basamma Yakkanahalli
30265f8aeb qcacmn: add target_service_to_ce_map for ipq6018
Populating the data structure target_service_to_ce_map
for IPQ6018 platform.

Change-Id: If89f873a6124240f56b93b4b12464a1e388df272
CRs-Fixed: 2324518
2018-11-27 00:31:56 -08:00
Jinwei Chen
1adbd73547 qcacmn: fix excessive logging about rx defrag
Change rx defrag related log level from info to debug,
it's not necessary to print normal rx defrag operation related
log default, this can avoid panic caused by excessive logging
when receive lot of fragment data.

Change-Id: Id712d546a760377a6f59b321f73d7ae5ca4af564
CRs-Fixed: 2353869
2018-11-26 15:52:48 -08:00
Vignesh Mohan
cca9e9baaa qcacmn: Add WMI command to set Sub Channel Marking
Introduce a new wmi_send pdev param to enable/disable
"Subchannel Marking" in Firmware (only in  Full Offload)

Change-Id: I3cd4f4f13ebca72c4505b6195cc8dc4856d41671
CRs-Fixed: 2334258
2018-11-23 10:13:18 -08:00
Vignesh Mohan
4974032991 qcacmn: Add dfs tgt API to set Sub Channel Marking
Introduce dfs_tgt API to send the WMI command to enable/disable
"Subchannel Marking" in Firmware (only in  Full Offload)

Change-Id: If739409521c8704b612e52dfc8ed6b86ffe32bca
CRs-Fixed: 2334258
2018-11-23 10:13:16 -08:00
Vignesh U
c008454014 qcacmn: Add support to enable/disable NOL subchannel marking
Add DFS function to enable or disable NOL subchannel marking.

Change-Id: Ibb6dbdb373af5b328c813c3b80b0f2296f644406
CRs-Fixed: 2334258
2018-11-23 10:13:13 -08:00
Debasis Das
5e2539c087 qcacmn: Protect TxLookupqueue while flushing
The htc TxLookupQueue needs to be protected with
relevant lock while flushing.

Change-Id: Ib6c8878c024ef623dfb63ca0745d41b140f2b1c3
2018-11-23 02:00:17 -08:00