Commit grafiek

773 Commits

Auteur SHA1 Bericht Datum
Mohit Khanna
83aab371c4 qcacmn: Add support to use pre-alloc mem
Add logic to pre-allocate DP consistent memory and reuse later
on wifi on/off. This prevents memory fragmentation.

Change-Id: I1e5eb0da39950a5d028dd46d38ff715f283e53ff
CRs-Fixed: 2740889
2020-08-31 03:32:45 -07:00
Rakesh Pillai
351a71f1d3 qcacmn: Destroy rx tid spinlock when peer is freed
Currently the rx tid spinlock is destroyed from
peer delete (based on peer state) or peer unmap handler.
This can lead to a race condition when the peer is
deleted before the peer map command is processed/received.

Fix the above race condition by destroying the rx tid
spinlock only when the peer handle is destroyed/freed.

Change-Id: Iaf7ccea11a95732c1aa20e66af6dd4a9a66517c5
CRs-Fixed: 2763533
2020-08-28 08:54:13 -07:00
Pavankumar Nandeshwar
f0d2f53e32 qcacmn: stats VoW IGMP improvements
Add stats VoW IGMP improvements feature

Change-Id: I86b803e67f2cc3cfc01750f261f06590ff2b97c2
2020-08-28 02:01:25 -07:00
Srinivas Girigowda
d5f803a63e qcacmn: dp: Remove duplicate log line
Remove duplicate log line.

CRs-Fixed: 2763028
Change-Id: Ic7c5325ba43b9b3117f997576fa2fa9a00c3d1fc
2020-08-28 02:01:15 -07:00
Pavankumar Nandeshwar
0eeac59b4e qcacmn: VoW IGMP improvements
As part of the VoW IGMP improvements, which deals with
conversion of igmp packets to unicast packets, the
following changes are done when the new feature is enabled:

1. IGMP/MLD packets with special addresses (addresses not
   part of any multicast group) will be converted to all
   existing clients of the AP. These packets will be
   directly fed to igmp multicast to unicast conversion
   module.
2. The IGMP/MLD packets with group specific addresses will
   first go to multicast enhancement module, where they
   will be allowed to pass and will be converted to unicast.
3. The new feature will be enabled only when multicast
   enhancement feature is enabled, which will be ensured
   at the configuration level.
FR : 61063

Change-Id: I2fd5a67766c806432fbe1a12cb9654a3600100f5
2020-08-28 02:00:48 -07:00
Yeshwanth Sriram Guntuka
4c12885407 qcacmn: Delete peer AST entries as part of peer unmap
In roam HO failure, peer unmap indication is processed
even before Host initiates the peer cleanup. In the cleanup,
as part of cdp_peer_teardown, AST entries are freed up without
removing it from the peer AST list since get_peer_by_ref_id
returns NULL peer pointer as peer is moved to inactive state.

Fix is to delete peer AST entries as part of peer unmap
indication so that the entries are removed from the AST list.

Change-Id: I1b04517e8cc392b33bb439501e61e3d5534d8307
CRs-Fixed: 2763825
2020-08-27 23:52:36 -07:00
Amir
f6f16ac551 qcacmn: Fix full monitor support enable issue
For QCN9000, full monitor is controlled through,
	a. full_mon_mode ini param
	b. QCA_SUPPORT_FULL_MON compile time macro

Currently enabling full monitor is not taken care under
macro QCA_SUPPORT_FULL_MON.

As monitor mode is not supported for 256M profile,
QCA_SUPPORT_FULL_MON is disabled.

Enable full monitor mode when both ini and macro are enabled.

Change-Id: Id5be5f7edc4739423fd74e28bb71a8f3339d87b3
CRs-Fixed: 2744622
2020-08-26 12:13:40 -07:00
Srinivas Girigowda
b100ced3c7 qcacmn: dp: Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF
Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF.

CRs-Fixed: 2760938
Change-Id: Ib7999b69f79a65a67e1d9f7e24a04b7a7da0aebf
2020-08-23 23:09:31 -07:00
Ramanathan Choodamani
dae503e5a1 qcacmn: Add build flag for MSCS procedures (Data path)
This change will add a build flag support to MSCS wherein
the functions will be called based on the status of the flag
created. This flag will be enabled by default.

Change-Id: I1c234c710d3b37f534ed2df7b37343cbd65ab930
CRs-Fixed: 2757257
2020-08-22 16:01:07 -07:00
Chaithanya Garrepalli
926912fe86 qcacmn: store vdev_id in tx desc instead of vdev pointer
In tx desc store vdev_id to avoid unprotected access of
vdev memory.

In tx path pass VDEV as argument to all APIs

In completion path get vdev from peer as vdev reference
in peer is protected with reference, in places where peer
is invalid get vdev object using vdev_id stored in tx desc
with a reference count

Change-Id: I364ebb51143218872c0bc6f856772ab1df00bb17
2020-08-21 11:42:28 -07:00
Nisha Menon
b7d1ef0bdf qcacmn: Set IRQ affinity for CE IRQs to gold cores
CE2 status ring full condition results in WMI req timeout
in host resulting in self recovery being triggered.
Set IRQ affinity of CE IRQs to gold cores for defconfig
builds only. This is to alleviate the processing of all
DP rings and CE rings on CPU0.
CE2 status ring will be reaped fast enough to ensure host
has enough credits from FW to send out the WMI reqs to FW.

Change-Id: Ifef338faac17b44eae811d23ec41d89bde1b29c7
CRs-Fixed: 2738317
2020-08-21 02:28:45 -07:00
Manjunathappa Prakash
93aff9ee1f qcacmn: Add DP INI to tune netdev features at runtime
Add INI to modify the HW checksum capability advertisement.
Add hook to update enable/disable of HW checksum for vdev.

Change-Id: Idd0bad1d39c8411c7b4ef19483aa2c75a756791b
CRs-Fixed: 2732099
2020-08-20 23:08:11 -07:00
Chaithanya Garrepalli
ddc9e59e8f qcacmn: Add VDEV refcount debug support
Add debug support for VDEV refcount to take
refcount by module id and decrement corresponding
refcount with same module id

Change-Id: I15c075816994ba70155fefbc0bce208b20fb9a59
2020-08-20 10:07:32 -07:00
Chaithanya Garrepalli
a718007f03 qcacmn: increment vdev refcount for search by id
Add new API dp_vdev_get_ref_by_id() which will return vdev
pointer by holding a reference. Caller of this API has
to ensure that this reference is released by calling
dp_vdev_unref_delete() API

New lock soc->vdev_map_lock is introduced to protect
vdev id to object array

Change-Id: I883e328932e35ef31254125492dbae20cebe0e00
2020-08-20 10:07:28 -07:00
Ramanathan Choodamani
fe082ae00d qcacmn: MSCS Procedures - Get the MSCS parameters
This change will acquire MSCS parameters from the
MSCS request sent by the STA and provide it to the
data path which will later use it for building flow
database.

Change-Id: I972154792c682527f8df04de693077188726e8da
CRs-Fixed: 2669386
2020-08-16 23:07:06 -07:00
phadiman
9a47fcc650 qcacmn: Pass module ID to get peer reference
New approach requires module IDs to be passed to
acquire and release peer references

Hence pass module ID to acquire and release the
peer reference

CRs-Fixed: 2755560
Change-Id: Id351179da68f6ca30f13710a47575f3ff550ada3
2020-08-15 01:26:26 -07:00
Chaithanya Garrepalli
e2b00339f3 qcacmn: add APIs to iterate the peers at vdev level
Add new APIs to iterate through the vdev peer list
by taking the peer reference.

A call back has to be passed to these APIs which will
be called for every peer in the lisst

dp_vdev_iterate_peer() -> iterates through peer_list of vdev
dp_pdev_iterate_peer() -> iterates through peer_list of all
                          vdevs in pdev
dp_soc_iterate_peer() -> iterates through peer_lists of all vdevs
                         in soc

Additonal APIs are added to for itearations where the callback
will be called outside the vdev->peer_list_lock, as these APIs
have additional memory allocations suggested to use only in case
the iteration need to happen outside lock

dp_vdev_iterate_peer_lock_safe()
dp_pdev_iterate_peer_lock_safe()
dp_soc_iterate_peer_lock_safe

Change-Id: I24632fe611355cc3e93b7f16d90913d4b8686ca9
2020-08-15 01:26:23 -07:00
Chaithanya Garrepalli
1322dc7949 qcacmn: add state to data path peer
Add states to data path peer and appropriate
checks for transistion of states

Change-Id: Ieaadbf4b406351d48aece7fd3552abe42d61db1e
2020-08-15 01:26:20 -07:00
Chaithanya Garrepalli
f4701f13ec qcacmn: remove peer backpointer in DP ast entry
Remove the peer backpointer in ast entry and store
peer_id instead

Assign peer_id in AST entry in AST MAP event,
also add the ast entry to peers ast list

In AST map & AST unmap APIs use ast find by vdev_id

Change-Id: I74d9828dc309149d98f6f577b5c8304cb087fd76
2020-08-15 01:26:17 -07:00
Chaithanya Garrepalli
fdc6a808ae qcacmn: add module id for peer reference
Add support to get the peer reference with module id

To help debug the peer reference related issues

Change-Id: Ie20c7e710b9784b52f2e0f3d7488509282528a00
2020-08-15 01:26:14 -07:00
Chaithanya Garrepalli
113841906c qcacmn: increment refcount for peer find by id
Use unified version of dp_peer_find_by_id API
which will take peer reference

Also use unified peer ref release API dp_peer_unref_delete

Change-Id: Ibb516a933020a42a5584dbbbba59f8d9b72dcaa4
2020-08-15 01:26:10 -07:00
Chaithanya Garrepalli
e253cee043 qcacmn: Peer refcount FR update DB as per new design
Update peer DB as per new design

peer_hash_table: add at peer_create and delete at peer delete
peer_id_to_obj_map: add at peer map and delete at peer unmap
peer_list: vdev level peer list add at peer create delete at
	   peer delete

Call dp_peer_cleanup() at unmap event

dp_peer_cleanup -> dp_peer_tx_cleanup -> Tx capture cleanup
	|
	---------> dp_peer_rx_cleanup -> Cleanup Rx REO TID queues &
					 defrag queue free

Introduce ref_cnt variable per VAP which will be
incremented and decremented at peer alloc and free. This counter
will be used to delay the vdev free if there are any active
peers for vdev exist in system

Change-Id: Iec13bceed0db0db71655fdbf6f96df8795b5077b
2020-08-15 01:26:07 -07:00
Chaithanya Garrepalli
86d3df0605 qcacmn: use granular locks to protect peer structures
Remove the global soc->peer_ref_mutex lock to protect
peer access

Instead use granular locks to protect the individual
peer DBs

1) soc→peer_hash_lock : To protect peer hash table
2) soc→peer_map_lock : To protect id to objmap array
3) vdev→peer_list_lock : To protect vdev level peer list

Change-Id: I9f044c4d71fe1155817a2b22a5a050545ec37445
2020-08-15 01:26:03 -07:00
phadiman
3df84438dd qcacmn: Add CDP API to get peer wlanstats ctx
Peer wlanstats context was accessed directly from
PPDU cookie, with this approach the cookie pointer
may become stale if peer goes for deletion

Hence access the wlanstats context using CDP API
with stats context protection

CRs-Fixed: 2740261
Change-Id: I54c785325f8852ad422f05527b98ebca6e4d6cf0
2020-08-14 14:44:25 -07:00
Nitin Shetty
279435cff4 qcacmn: clearing jitter statistics
adding support for clearing jitter statistics
for command "cfg80211tool athX txrx_stats 257"

Change-Id: Iaac9a6e6a849bbb08935ca581fa58c93ef51bdbd
2020-08-13 17:12:45 -07:00
Saket Jha
8a35dcfc63 qcacmn: Check for allocation failure in rx ring history
Add allocation check failure before accessing index in
dp_soc_rx_history. In case of allocation failure for a particular ring,
continue with allocation and history recording of other rings.

Change-Id: Ifae46ddf38b3af271900651cdbba662325220ef9
CRs-Fixed: 2747891
2020-08-12 17:48:08 -07:00
Jia Ding
c07761e4cc qcacmn: Fix static code analysis issues in DP
In dp_srng_init, max_buffer_length and prefetch_timer are used
while uninitialized.

In dp_bucket_index, overrunning array cdp_sw_enq_delay leads to
out-of-bounds access.

In dp_rx_defrag_fraglist_insert, cur is first NULL checked but
cur is again set to qdf_nbuf_next and is accessed without
NULL check. Thus do a NULL check again before dereferencing
cur to avoid potential NULL pointer dereference.

In htt_t2h_stats_handler, soc could be NULL while cmn_init_done
is dereferenced. Thus fix it by NULL check soc first and then
dereference cmn_init_done.

Change-Id: Ie6a33347d34862f30ba04a10096d3892af7571d3
CRs-Fixed: 2751573
2020-08-12 13:56:42 -07:00
Subrat Mishra
9b715c34c5 qcacmn: Retrieve per PPDU phy tx duration
Add support to retrieve per PPDU phy tx duration without response time.
Add support to retrieve per User phy tx duration for MU-MIMO and OFDMA.

These metrics are useful for ATF stats feature. Stats processing done
only if atf stats flag is set.

CRs-Fixed: 2709102
Change-Id: I90db41aa45843808e07343a80750c154abbde9cd
2020-08-12 06:42:17 -07:00
Shivani Soni
c4c0a179f6 qcacmn: Monitor Status ring memory optimization
Memory optimization of monitor status ring by allocating buffers during
replenish using alloc_skb (linux API).
It creates buffer of required size rather than 4k size(dev_alloc_skb)

Change-Id: I3ae5e403de28c4570f8ac3b50d3ca878a9e4b2f9
CRs-Fixed: 2733931
2020-08-12 06:42:13 -07:00
Jinwei Chen
f6a3aba85c qcacmn: fix incorrect ext_stats calculation
Currently when query REO stats, each time REO will response
cumulative REO stats per TID, while host side count them as
delta stats between each query.
Reset host stats to 0 before each query, and if query timeout
happened, use the last saved stats for this time query.

Change-Id: I29e986b3c8859f5c3d1b557d9cc980a52219d664
CRs-Fixed: 2743352
2020-08-11 02:39:17 -07:00
Chaithanya Garrepalli
272f2df8c8 qcacmn: delete sta peer self_ast_entry at peer delete
Delete the STA vap self peer's ast entry at time of
vdev detach before peer delete

Change-Id: I378dc956bffa8eafcd9bbd3849f264cc23da3e7a
2020-08-11 00:35:37 -07:00
Chaithanya Garrepalli
82eb94c989 qcacmn: remove bss and self peer back pointers from dp_vdev
Remove self and BSS peer back pointers and added APIs to
get self and BSS peer from VDEV

These new APIs will iterate through peer list and return
the appropriate peer by taking a reference

Caller has to take care of releasing the reference

Change-Id: I550ff83d665f3ad0a185bea1a1e6270c5474ff07
2020-08-06 14:37:19 -07:00
nwzhao
ca9a332c4a qcacmn: [DP]TWT stats feature: add WMI Support for TWT stats event
Add WMI support for WMI_TWT_SESSION_STATS_EVENTID. This event
contains stats for a given TWT session.

Change-Id: I01d5f7b30da803ee713a14c1d1124b8af7161bca
CRs-Fixed: 2609951
2020-08-05 02:17:19 -07:00
nobelj
4dd08941dd qcacmn: add fix to send ppdu in sequential order
logic of holding ppdu info list is modified to store it
in sequential order.

Change-Id: I179e76f4bb1663e141e48df5f274ac5fd1b81bbc
2020-08-03 13:28:35 -07:00
Jeevan Kukkalli
94c430da4a qcacmn: Notify HMWDS ast add status to upper layers
Notification is sent in following two scenarios.
 - After call to dp_peer_add_ast() if we are not expecting any
   peer map event.
 - When HTT peer map event is received.

Change-Id: Id926d1cec1ee64520b0368fcc5000988c24e0513
CRs-Fixed: 2745542
2020-08-03 11:23:43 -07:00
Rakesh Pillai
9beeaa95a7 qcacmn: Add history to track the entries in rx rings
The rx rings are relatively of smaller size. Any
duplicate entry sent by hardware cannot be back-tracked
by just looking at the ring contents alone.

Hence add a history to track the entries for the
REO2SW, REO exception and SW2REO ring.

Change-Id: I9b0b311950d60a9421378ce0fcc0535be450f713
CRs-Fixed: 2739181
2020-08-02 11:01:41 -07:00
nobelj
ab4338f749 qcacmn: Add support to get device name and tx capture debugfs init
Add support to get device name and invoke debugfs init
on post attach so that device name is updated at that point.

Change-Id: I0e0a06cae4bef4d6e43c0295f5db99220b185df2
2020-07-23 19:28:45 -07:00
Jeevan Kukkalli
659ecbabda qcacmn: Return appropriate QDF error codes
Modify functions dp_peer_add_ast(),dp_peer_map_ast() and
dp_rx_peer_map_handler() to return appropriate QDF error codes.

Change-Id: I582a5e68219fe25df5f46ae6044afa3bed880d2c
CRs-Fixed: 2728559
2020-07-22 11:55:41 -07:00
Aniruddha Paul
1b7f50b096 qcacmn: Update the Tx/Rx Delay histograms
Update the Host Tx/Rx per packet delay histogram

Change-Id: I40c3c05b2eb90427bd83783f13f2a7a3df41d232
2020-07-17 21:25:58 -07:00
Alok Kumar
8054d1a47d qcacmn: Add mapping table for channel band to lmac ring id
In monitor mode, the packets for 5GHz go to lmac ring 0 and for
2.4GHz packets go to lmac ring 1. But this is valid for DBS solution.
For single MAC solution, both 2G and 5G packets go to lmac ring 0.
 
Add mapping between channel band and lmac id ring and populate
this mapping table based on target type i.e DBS or Single MAC.

Change-Id: Iabc7c2088caca6fe4adef1da6d45945fc9a2716c
CRs-Fixed: 2728664
2020-07-17 01:51:21 -07:00
Aniruddha Paul
b07ed991ec qcacmn: Alloc/Dealloc the peer extended stats
Allocate/Deallocated the peer extended object in the
peer_create() and peer_del() paths respectively.

Change-Id: I3e93e1ec85aefb22d3fb40d1b01bbd07d660aff5
2020-07-15 03:52:18 -07:00
Mohit Khanna
42a8d7ef31 qcacmn: Add P2P UDP/TCP checksum offload INI entry
Add support to enable disable TCP/UDP checksum offload for P2p modes.

CRs-Fixed: 2725395
Change-Id: Id482649e501a8f9a8900a92e3e03a48f0e99603c
2020-07-12 01:49:34 -07:00
Chaoli Zhou
7c40c9d475 qcacmn: Fix compile error while enable CONFIG_REMOVE_PKT_LOG
Cleanup the code to fix the compile error while setting
CONFIG_REMOVE_PKT_LOG=y & CONFIG_WDI_EVENT_ENABLE=n
with Hasting

Change-Id: I493fbddec865fe20789022445b0f155201772119
2020-07-09 09:24:09 -07:00
Mainak Sen
219e27f9b2 qcacmn: Enable SG support in QCA5018
SG support in WBM release ring for QCA5018

Change-Id: I672b5fd3792c6712588c369bc4f15208c0a94004
2020-07-07 00:46:07 -07:00
Rakesh Pillai
94c0917f49 qcacmn: Monitor mode improvements
Move the srng history to hif context.

Process the monitor ring only for the lmac
corresponding to the configured monitor channel.

Add the timer and srng history for monitor mode.

Change-Id: I4e5e49ad5e657b55bfafbb40ef5f59496277cb40
CRs-Fixed: 2690530
2020-07-01 07:50:55 -07:00
Neha Bisht
e3876720a2 qcacmn: Add ini config to remap reo destination rings used by host
Adding support for enabling ini config to remap reo destination rings
for HK v1, HK v2, maple and pine platforms.

Change-Id: Id9d304521f32497e3acd845ddd2973b96b641516
2020-07-01 05:42:51 -07:00
Ben Wang
909e4e1893 qcacmn: Keep rx_refill_buf_ring using index pdev->lmac_id under MCL case
Fix static analysis issue of rx_refill_buf_ring buffer overflow.
rx_refill_buf_ring length is different for WIN/MCL. For MCL length is 1,
WIN is 3. So rx_refill_buf_ring should always use index pdev->lmac_id to
replenish rx buffer for different MACs under MCL.

Change-Id: I00af069c09c01a81ae4aa54bad5beb79dc6fcff5
CRs-Fixed: 2703683
2020-06-23 04:01:12 -07:00
Mohit Khanna
97200aab9c qcacmn: Add NAN TX checksum offload INI entry
Currently there is a single INI item tcp_udp_checksumoffload to enable
or disable this feature for all the adapters. In some cases, we want to
be able to enable this feature selectively for NAN mode.

Add nan_tcp_udp_checksumoffload ini item to enable or disable checksum
offload feature specifically for NAN mode. If
nan_tcp_udp_checksumoffload is 'true' and tcp_udp_checksumoffload is
false, hardware checksum offload will be enabled only for the NAN
adapter and not for other adapters.

CRs-Fixed: 2693638
Change-Id: I6e255ce68ddc7b01ebdefe4e5e8d2c985388fefe
2020-06-16 12:20:20 -07:00
Sridhar Selvaraj
3ae6b5c3fe qcacmn: Update REO Remap config API as platform specific
Update REO Remap config API as platform specific

Change-Id: I6a38b87e9181e8bc939e49e3eb55fcd6cace626d
2020-06-12 19:29:39 -07:00
Nisha Menon
0bbaedb23c qcacmn: Log memory stats in host driver
Add logs in driver to log current memory footprint
in init functions. Add wlan_mem_stats to sysfs node
in both perf and defconfig builds.
The stats are included under MCL feature
DCONFIG_WLAN_SYSFS_MEM_STATS.

Change-Id: I79c6d418a5762cddf52ab3bc0b0c93993fa7fd84
CRs-Fixed: 2635192
2020-06-11 02:04:46 -07:00