Graf commitů

6047 Commity

Autor SHA1 Zpráva Datum
Aditya Sathish
b514afc58a qcacmn: Add sanity check for txrx_stats 28
Add sanity check for txrx_stats 28 for a MAC address pointer.

Change-Id: I7bc3cfb5a18313086e457b6b4888a8002a4f7fd9
CRs-Fixed: 2360609
2018-12-06 10:28:08 -08:00
Srinivas Pitla
d3a3c544bf qcacmn: VDEV MLME component changes
1) replace legacy string with ext
2) Added new compile CMN_VDEV_MLME_CMPT_ENABLE macro for
   VDEV MLME component

Change-Id: I75fc7cbae9c437d60e666f0c188fb63e98fdac3b
CRs-Fixed: 2307722
2018-12-06 10:28:06 -08:00
Srinivas Pitla
79cdf64d70 qcacmn: VDEV MLME SM fixes
1) Pass EV_DOWN event to SUSPEND state

In Disconnection progress state event handler, on receiving
restart response, trigger EV_DOWN event to move to SUSPEND_DOWN
sub state

2) Replace return statements with status

Change-Id: Ieac0d158f79aad244a480eee24993ddc059b72f0
CRs-Fixed: 2307722
2018-12-06 10:28:03 -08:00
Rakshith Suresh Patkar
5aeabd612d qcacmn: Add support to handle new htt format
If FW supports new htt format include only payload length in
the header length.

Change-Id: Ia5ec9a474bc5fe68de28273e6f9615d36de94a7c
CRs-Fixed: 2359253
2018-12-06 08:39:32 -08:00
Keyur Parekh
c28f839a84 qcacmn: FR-50469 Pktlog for particular peer mac address support
This FR is to enhance existing pktlog debug tool
This feature will allow to capture pktlog for particular
peer mac address.

Change-Id: I3676095536185f25b0d498e03f70246260a324fd
2018-12-06 00:03:13 -08:00
Keyur Parekh
11865218ea qcacmn: Enable monitor mode buffer ring LWM interrupt
Eanable monitor mode low water mark interrupt.The monitor
mode processing is stuck in the monitor mode buffer ring full
if monitor mode low water mark interrupt is not enabled.This
is because there is no packet come in when monitor buffer
ring is full and hence there is no ppdu end interrupt.The
monitor is not processing the monitor ring and buffer ring
full condition is not remoevd.

Change-Id: I28b3a4b408db62873c17512d20e63c9844e8d4ea
2018-12-05 22:46:06 -08:00
Naga
cb25801fa9 qcacmn: Delete WIN specific files from cp_stats
Delete WIN specific files in cmd_dev cp_stats component
and add them in component_dev cp_stats

Change-Id: I16d0e251452225403e3e25f63a5105026c8f258c
2018-12-05 20:34:16 -08:00
Sourav Mohapatra
040e9df4a8 qcacmn: Fix rx_rate population in upper layers
Presently the rx rate is not being populated in the upper layer.

Populate the rx rate in the upper layer via the callback function
get_station_stats_cb

Change-Id: I4729bebd56d550152b0af41017a8c9bd5fb5f187
CRs-Fixed: 2359955
2018-12-05 19:01:45 -08:00
Alok Kumar
2e254c549d qcacmn: Add CDP Ops for peer unmap conf support
Add CDP Ops to support callbacks for peer unmap
confirmation support.

Change-Id: Ia530eeb5b6acd845b3c4cdd33108da806c5f33c5
CRs-Fixed: 2358061
2018-12-05 19:01:42 -08:00
chenguo
b21a49a57e qcacmn: Peer ref count leaks in ppdu stats and descriptor deliver
Because of reference counter decrement is not triggered for every
condition path, it is possible that peer reference counter leaking
happens under some perticular circumstance. Make sure the peer ref
count unreference is called for each possible path.

CRs-Fixed: 2352433
Change-Id: I60bc5a5210519c26c57cdc563d0d1b02d799e090
2018-12-05 13:13:46 -08:00
Vignesh Mohan
d0d365d87e qcacmn: Fix pdev param enum after maximum value
the enum for subchannel marking pdev param is after the
maximum value. Re-enumerate the enum so that the pdev param max
points to the last value.

Change-Id: I9ecf616a13b3b73b3aafb0f6dfdfbf6eda29f4dd
CRs-Fixed: 2334258
2018-12-05 13:13:43 -08:00
Nirav Shah
0be39b748c qcacmn: Make ipa_owned bit common for TX and RX control block
Make ipa_owned bit common for TX and RX control block union
for MCL as it is used in qdf_nbuf_free API, which is used in
both TX and RX path to free skbs.

Change-Id: I3a4279d528a1b8a72a1ec307f1672efae84d2745
CRs-Fixed: 2353137
2018-12-05 06:58:57 -08:00
Hariharan Basuthkar
738320eef9 qcacmn: Bring Up STA without dissociation when AP switches to DFS Channel
AP is configured to operate in Channel 100(HT80), and Zero Wait DFS
is enabled. Once PreCAC is complete on DFS Channels,inject radar in
Channel 100 and AP moves to another DFS channel 116 and beacons
immediately but station associated to AP still does a scan again.
When the station receives the Channel Switch Announcement from AP, it
dissociates from the AP and scans again.

Maximum Switch time Information Element can be used by the Station to
to know if the AP has done PreCAC on target channel. Maximum Switch Time
IE is part of AP's beacon and is the sum of CAC timeout on the target
channel and 1 beacon interval.

If PreCAC is done on target channel, the CAC timeout is zero and Maximum
Switch time IE is equal to 1 beacon interval. This element is sent to
Station along with Channel Switch Announcement. The Station receives the
maximum channel switch time element. If the value of maximum channel switch
time element is less then or equal to beacon interval, the station
associates with the AP seamlessly without dissociation. If the value of
the Maximum Channel Switch Time IE is greater than 1 beacon interval, then,
the Station has to dissociate from the AP since, ZeroCAC has not been done
by the AP.

Change-Id: I0301a68c1731cc268b9a6900258261034476446b
CRs-Fixed: 2330817
2018-12-05 03:57:51 -08:00
jiad
268579c204 qcacmn: Fix WAPI unencrypted frame error
WAPI cert AP sends rekey frames as unencrypted. Thus
RXDMA will report unencrypted frame error and error
frames are then sent to release ring as configured.
With current implementation, host just drops WAPI
error frames.

To pass WAPI cert case, fix is to deliever unencrypted
WAPI frames to stack.

Change-Id: I6dfd1b5e6958d729ec3da0a0d1f1e6c227b0597f
CRs-Fixed: 2350485
2018-12-05 03:57:49 -08:00
Nandha Kishore Easwaran
8dd440d33c qcacmn: Add extra check in mec event when replacing ast entry
Check if the ast_entry peer is same as the peer received
in MEC event before removing the wds entry. This check is
required for wds repeater scenarios. When a multicast packet
goes from station to the rootap via the repeater, a mec event
will be received in host but the entry should not be replaced.

Change-Id: Ia6fae9f08b411b481fc6d7c3f829bd127f92caec
2018-12-05 02:18:10 -08:00
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