Commit grafiek

209 Commits

Auteur SHA1 Bericht Datum
Manjunathappa Prakash
9713759668 qcacmn: Deliver nbuf list with NULL terminated
Handle only single nbuf in dp_rx_deliver_to_stack_no_peer. Make sure to
terminate nbuf->next = NULL before delivering it.

Change-Id: Icec76da3b5c5cfd2682489db51cd115e8bc9b830
CRs-Fixed: 2497966
2019-07-28 12:38:32 -07:00
Akshay Kosigi
8eda31cab3 qcacmn: Remove void ptr usage in HAL
Add code to replace usage of void pointers from
HAL layer and instead use appropriate opaque pointers

Change-Id: Id950bd9130a99014305738937aed736cf0144aca
CRs-Fixed: 2487250
2019-07-27 13:43:07 -07:00
Akshay Kosigi
a870c6181a qcacmn: Change to clean up of void pointers
Add code to cleanup usages of void pointer usages
in DP code.

Change-Id: I0736bcc0a547d858ed02f1ee59084a44e5fe4bec
CRs-Fixed: 2487249
2019-07-27 13:43:04 -07:00
Akshay Kosigi
0bca9fb200 qcacmn: Change to remove void pointer usage for HAL SRNG
Add code to remove void pointer usage for hal_srng
and use opaque pointer dp_hal_ring_t instead.

Change-Id: I6907f7376d7fe3c9180b8795bd96f49fead2ec64
CRs-Fixed: 2484404
2019-07-27 13:42:41 -07:00
Akshay Kosigi
91c56523d3 qcacmn: Remove void pointer usage for ring desc's
Make change to remove usage of void pointers for
ring descriptors and instead use a opaque pointer
dp_ring_desc_t.

Change-Id: Ia1e9a3da9eaa3cccf297b2135b52a72f2fe21431
CRs-Fixed: 2484409
2019-07-27 13:42:37 -07:00
Akshay Kosigi
6eef9e3c6e qcacmn: Clean up DP API's
Remove DP API's which are not being used/defined.

Change-Id: I8a1ee7e3156873227131b526793f464ff4444312
CRs-Fixed: 2483400
2019-07-27 13:42:28 -07:00
Akshay Kosigi
c74162c269 qcacmn: Add code to remove void pointer usage
Add code to use cdp_vdev instead of void pointer for
API dp_tx_send_exception and dp_tx_send_mesh

Change-Id: I63ca5a62c2a8cd6feb906181702888814650dfce
CRs-Fixed: 2480836
2019-07-27 13:42:24 -07:00
Kiran Venkatappa
115309a008 qcacmn: Delay monitor buffers replenish to monitor VAP create
Monitor buffer are required only when monitor VAP is created. Allocate
these buffers only when montior VAP is created. This provides memory
savings when no monitor VAP is created/required.

Change-Id: I3ddaef00615f00fd13adb2789469a62f1a0af165
CRs-Fixed: 2491873
2019-07-24 21:43:36 -07:00
Manjunathappa Prakash
5f1b698282 qcacmn: Reduce excessive log and advance error processing
Reduce the excessive loging incase dup detect and advance rx processing
to handle next ring entry.

Change-Id: I1d6e8aa28045ed12dd6d315169483ca56d2c6972
CRs-Fixed: 2489205
2019-07-19 13:37:18 -07:00
Jinwei Chen
9d3f985a8d qcacmn: deliver RX data to stack evev if no peer found
Deliver RX data to stack even if no peer found, this is
needed for LFR roaming case like eapol data.

Change-Id: Ic81f29993fb4542847bd076042a13de6e9f18173
CRs-Fixed: 2468082
2019-07-19 02:48:23 -07:00
Saket Jha
7f89014195 qcacmn: Add WAR to ignore duplicate RX desc
Check if host is reaping a descriptor which is
already reaped then drop RX desc processing instead of asserting.
Macro DUP_RX_DESC_WAR added before dp_rx_dump_info_and_assert function
which does not assert for the case WAR is enabled.

Change-Id: I4f3c1cc16de79f2483cd415582970e093e81d465
CRs-Fixed: 2486057
2019-07-16 18:40:23 -07:00
Vevek Venkatesan
acd3a070da qcacmn: enable DP AP Bridge when SAP mode turned on
Enable DP AP Bridge when SAP mode turned on, CONFIG_MCL cleanup.

Change-Id: I96fa3c263064fe4e438c98246d02dbc50437984b
2019-07-05 10:26:37 -07:00
Saket Jha
43a7ab4549 qcacmn: check if peer pointer is NULL
In dp_rx_process function, check if peer pointer is NULL
before using as argument when calling dp_rx_deliver_to_stack.

Change-Id: I6584c79047a809f28e65faad47d1c7220e7057bb
CRs-Fixed: 2470345
2019-06-21 05:47:59 -07:00
Varun Reddy Yeturu
f31e44d8dc qcacmn: Fix memory allocation failure for nbuf pointers
Fix memory allocation failure for nbuf pointers array in
dp_pdev_rx_buffers_attach(), by allocating a single page
of memory for the pointers and re-using them by iterating
in a loop until the total required nbuf's are traversed,
instead of allocating a huge contiguous memory for pointers
to store the address locations of all the nbuf's.

Change-Id: I47ca8f94405e44d6bdbc43129012df1b65b14ba6
CRs-Fixed: 2464598
2019-06-18 12:25:53 -07:00
Rakesh Pillai
2529ae1c8a qcacmn: Add event history logs for datapath
Add support to log the important events in
datapath, which will help in debugging the
datapath issues.

IRQ handler, Napi poll and srng access start/end
are the events which are currently logged.

CRs-Fixed: 2457854
Change-Id: Iba105b0e79443b670a01a929f999f94e00ea92f2
2019-06-17 10:23:01 -07:00
Tallapragada Kalyan
cea9c935f9 qcacmn: Do not check for msdu Done bit for raw packets
Do not check for msdu Done bit for raw packets as HW
does not set this bit for msdus spread across nbufs.

Change-Id: I9c2af01c6b55600511abeec9ab6fc185fcc6ef36
2019-06-17 02:18:25 -07:00
Mohit Khanna
3ba9372a50 qcacmn: Fix invalid sa_da_idx condition in RX path
Currenly this function, is_sa_da_idx_valid(), called from dp_rx_process
does not take MC/BC packets into account. For broadcast packets e.g.
DHCP offer packets from some APs, this check may fail (incorrectly).
Thus dropping the broadcast packet, when it should have been passed
on to the stack.

Fix is_sa_da_idx_valid function by taking MC/BC packets into account.

Change-Id: Ibbb34134e997e0d5394dfa654be84b9fa43434a3
CRs-Fixed: 2466839
2019-06-15 20:55:03 -07:00
Keyur Parekh
b8149a540c qcacmn: Fix for Not sending Deauth to non-authed STA
If any non authed clients send data packets then
AP should send Deauth Frames to STA. In Current code
we are finding VAP from pdev. And if MAC address are
same for VAPs on both radios then pdev will be wrong.
Because of that VDEV id was coming for non active VAP
and deauth frames were not going out of AP.

Change-Id: Ia28ea4143cec9c876313211962ab98b0e4028ee8
2019-06-10 02:37:43 -07:00
Shashikala Prabhu
0bb59b225f qcacmn: Do not try to alloc memory again when qdf_nuf_alloc fails
Do not try to allocate the memory again when qdf_nbuf_alloc fails in
dp_rx_buffers_replenish().

Change-Id: Iafbe10021bf9f53d93a20d4c8e9543ca6f8aff8a
CRs-Fixed: 2463258
2019-06-06 13:02:25 -07:00
Varsha Mishra
1f4cfb6c58 qcacmn: Fix tx completion and rx stats per wbm/reo ring
Tx completion stats should be counted per wbm ring on tx completion
and not globally. Similarly, rx stats should be counter per reo ring.
Change-Id: I1e4af0d38b23e60de78ca03316861db08ff0811a
2019-05-31 07:40:18 -07:00
Yue Ma
ac6b275768 qcacmn: Record caller and timestamp for pm_runtime_mark_last_busy
pm_runtime_mark_last_busy will extend the timer for runtime suspend.
Recording caller and timestamp can help to debug who may prevent
runtime PM suspend.

Change-Id: I4848a2558197e0fc9b7300421a5a1993817333e4
CRs-fixed: 2457803
2019-05-30 19:29:48 -07:00
Amir Patel
cb99026ade qcacmn: Move WDS feature out of common code
Move WDS feature specific APIs out of common code
as these features are WIN specific. Keep the usage inside
common code under feature specific flags.

Change-Id: Id907a5e22c27fc47e8314449e154525684a27e85
2019-05-29 11:08:21 -07:00
Varun Reddy Yeturu
a7c21dc7f3 qcacmn: Allocate multi page memory for dp_rx_desc_pool_alloc
Allocate memory in multiple smaller chunks for dp_rx_desc_pool_alloc,
and link the pages instead of allocating one big contiguous memory to
avoid memory allocation failures.

Change-Id: Id81de10727555c4ca78963a6f01ed3b992ce9924
CRs-Fixed: 2443999
2019-05-23 20:35:07 -07:00
Sravan Kumar Kairam
0bd6c23c89 qcacmn: Fix decrement flush in progress
When rx buffer queue list is empty flush in progress
atomic variable is not decremented before return. Fix
this by removing the code to check list empty as the
qdf function to remove the node from front will also
do the same check for empty list, so the code fall
through and return at the end of the function.

Change-Id: I29b87eb7f9e5d35918aba6ad1d0ccbbdbf6eee3b
CRs-Fixed: 2444437
2019-05-23 09:30:55 -07:00
Varsha Mishra
09a4c0e6bd qcacmn: Fill skb->priority only for macro ATH_RX_PRI_SAVE
skb->priority is needed only for ATH_RX_PRI_SAVE. This access can
be avoided in regular datapath by using skb->cb for faster access.

Change-Id: I5ef970fa45fa314db7e14284d898c98a59d8591e
2019-05-22 12:13:38 -07:00
Chaithanya Garrepalli
d3d99db55b qcacmn: changes to read all MSDUs of MPDU in single reap
We need to read all MSDUs of MPDU in single reap for RAW mode
to prepare the complete SG list

Change-Id: Iaf2d0b9f32bf10181ce7646bf60c4d7e70aed36b
CRs-fixed: 2320143
2019-05-22 09:06:22 -07:00
Tallapragada Kalyan
9e4b36fd89 qcacmn: Rx optimizations to improve small pkt perf
basically tried reading peer_id from peer structure
to avoid 1 cache-line miss per pkt and access mac address
from frame data for WDS only if WDS condition is valid.
The other optimization is to avoid accessing queue_mapping
field of skb for skb received which is at 140 offset
This again helps to avoid i cache miss.
Another place is to do a memcpy only when we intend to
add an ast entry.

Change-Id: I7e328060c505bc21419d045e77329c2cda9e3644
CRs-fixed: 2388857
2019-05-22 00:18:17 -07:00
Jinwei Chen
5bcc30f51c qcacmn: fix peer ref counter unexpected increasement
Host will drop the RX data that introduced in change
"add counters for sa_idx invalid issue", the related peer
has done ref_cnt + 1, but there is no peer ref_cnt -1 accordingly.
peer ref_cnt increase unexpected, panic happened when rmmod at last.

add the peer ref_cnt decrease operation.

Change-Id: Ie6bc5b57560a93c5f21431838b7bcb1140abfec5
CRs-Fixed: 2454468
2019-05-22 00:18:14 -07:00
Ankit Kumar
e222775d39 qcacmn: Extract tid from REO descriptor and save to skb cb
earlier we were extracting the tid from the rx tlvs, this
was in the last cache line of the 384 byte tlv. we are
extracting various fields from REO descriptor, now we are
also getting tid from the descriptor to avoid accessing
the last cache line of rx TLV there by avoiding one
cache miss per packet.

Change-Id: I1f4f12dca402604692ea374599add6763d68ab01
CRs-fixed: 2449706
2019-05-21 14:43:21 -07:00
Ankit Kumar
0ae4abc97b qcacmn: Replace QDF_DMA_BIDIRECTIONAL to QDF_DMA_FROM_DEVICE in rx
In Rx path, We really don't need to flush data and invalidate.
Hence replacing map/unmap flag to QDF_DMA_FROM_DEVICE.

Change-Id: I3de0c73e11a08a875114167a55fe9fe4432f1dd4
CRs-fixed: 2449712
2019-05-20 11:22:21 -07:00
Pranita Solanke
05862964ab qcacmn: Identify WIN/MCC specific features
Identify the WIN/MCC specific features. Move the features under feature
specific flags. Get rid of WIN/MCC specific code.

Change-Id: Iaf4e5befd7d574a20bea5c078201adbeac3b762c
2019-05-20 09:58:47 -07:00
Ankit Kumar
f2526d44ee qcacmn: Place check under qdf_likely unlikely flag
Place if check inside qdf_likely and qdf_unlikely check
to optimize code through compiler.

Change-Id: I46796247fd09860aa0f62170eb7f7e5ef8e8f896
CRs-fixed: 2455579
2019-05-20 10:46:49 +05:30
Chaitanya Kiran Godavarthi
70aeda1cdd qcacmn: Handle BSS peer in STA mode
1. Set BSS peer for AP during peer-create and for STA in peer-map handler
2. Set Self peer in STA mode
3. Avoid tid cleanup in STA mode
4. Remove redundant selfmac checks in Rx
5. In MEC event handler add a check to ignore MEC events
    when STA is not connected.

Change-Id: I2a34b4742d9dedaa0709c1f4c87f3a06b794f36b
2019-05-16 07:45:55 -07:00
Mohit Khanna
e5a6e94464 qcacmn: Restrict RX softirq poll times
The following changes are made

-Yield dp_rx_process if poll time exceeds
-Yield dp_tx_comp_handler if poll time exceeds
-Interrupt statistics to track various interrupt contexts and
 corresponding interrupt masks
-Add poll times histogram buckets to NAPI stats

Change-Id: I8c7a6bbbb97c7b3dd1dde6ac3a97113c433086a2
CRs-Fixed: 2423879
2019-05-14 18:39:59 -07:00
Ankit Kumar
f90c944dad qcacmn: Access msdu_len from struct cb to avoid cache miss
We are accessing nbuf_len field for every nbuf
and which causes cache hit as we are accessing
it not from 1st cache line. This field is present
in struct cb. Lets access it from here to avoid
cache miss.

Change-Id: I21a81d844a4cc755a0ca0c156bd3f4d5702fd913
CRs-fixed: 2449717
2019-05-14 05:46:31 -07:00
Tallapragada Kalyan
7147b3ccbf qcacmn: RX optimization changes to reduce cache misses
certain fields are now retrieved from reo_destination
ring to nbuf cb. This avoids accessing the RX_TLVs
which are spread across two cache lines. This is
helping improve small pkt (64 byte) performance.

Change-Id: Iee95813356c3dd90ab2e8a2756913def89710fb1
CRs-Fixed: 2426703
2019-05-08 04:47:16 -07:00
Varsha Mishra
9d42f127f5 qcacmn: Fix broadcast stats for host
Count broadcast stats on rx side after rx_tlv_hdr is extracted.
After removing rx_tlv_hdr, nbuf->data points to actual payload.

Change-Id: I20e4029fd84bc3d76e2fd47eba74b9bef72a32c0
2019-05-06 05:52:41 -07:00
Karunakar Dasineni
d8c7ad2228 qcacmn: Support per-ring CCE protocol tag stats
CCE stats are reported across rings today. Since HKv2 is a SMP, it
creates the possibility of missing stats when two or more CPUs are
updating the counters for the same protocol type. In order to avoid
this, we can either use locks or store stats on a per-CPU basis.
Since tagging happens on the core data path, locks are not preferred.
Instead, we use a per-ring counter, since each CPU operates on a REO
ring. Exception packets today go to Ring-0 (also normal rx Reo-0
go to Ring-0). Hence tags are maintained separately for exception
ring as well.

Change-Id: Ib01934619fb026bf64a8ac998eaec2d4df7f5a6e
CRs-Fixed: 2438143
2019-05-01 10:18:35 -07:00
Jinwei Chen
e661127fa1 qcacmn: fix incorrect NSS value in host RX stats
Revert change "Limit maxinum nss number as 2 for MCL platform" and
align with WIN function: hal_rx_msdu_start_nss_get_8074v2().
besides, only increase rx.nss[NSS - 1] when NSS is > 0 and rx packet
type is 11N/AC/AX.

Change-Id: I0a64f00a3d252c806216cc3196e71290f111c88a
CRs-Fixed: 2429329
2019-04-29 22:55:24 -07:00
Sravan Kumar Kairam
ebd627e195 qcacmn: Cache rx frames during dp peer register
Currently frames will be dropped if it arrives before
peer is registered with data path module by control path.
So cache rx frames and flush them to the upper layer when
peer is registered at data path.

Change-Id: I086122fffdcf33e25ba57774ef944550cdd2fa20
CRs-Fixed: 2329308
2019-04-27 06:44:19 -07:00
Karunakar Dasineni
142f9baf47 qcacmn: Add new feature to support protocol tags
With this feature, using appropriate commands, link layer, network layer,
transport layer and some of the application protocols can be tagged with
the user provided tag values for easier identification of protocols. The
supported protocols today are as follows.

ARP, DHCPv4, DHCPv6, DNS over TCP (v4), DNS over TCP (v6), DNS over UDP
(v4), DNS over UDP (v6), ICMPv4, ICMPv6, TCPv4, TCPv6, UDPv4,
UDPv6, IPv4, IPv6, EAP.

Receive packets are tagged by hardware. Tags are applied after the first
matching rule. Hence it is recommended that the rules are
programmed in such a way that tags are configured from application layer
to data link layer to get expected results.

Change-Id: Ibdc2bd2b78234f482074955e89fb93f05988eaca
2019-04-26 15:31:10 -07:00
jiad
5679e39c7d qcacmn: Fix RX buffers refill for driver loading
On low memory system, skb allocation failures are observed in
dp_rx_buffers_replenish during driver loading phase within
dp_rx_pdev_attach code path. Per kernel memory team analysis,
failures are caused by large amount of atomic allocations.
Currently when replenishing RX buffers, srng spinlock is first
grabbed and then skb buffers are being requested, which makes
skb allocation happen in atomic context.

Fix is to create a new API for refilling rx buffers when
loading driver. In the API, skbs are allocated into a
pool without srng lock grabbed. Srng lock is grabbed only
when refilling already allocated skb to rxdma ring.

Change-Id: I9d45a42c9f2b0af7bf1d8031adb474d66ff9db59
CRs-Fixed: 2425798
2019-04-18 17:02:27 -07:00
Tallapragada Kalyan
12a6840949 qcacmn: change qdf_assert_alway to qdf_assert in rx path
change qdf_assert_alway to qdf_assert in rx path

Change-Id: Id9ac6b69b693c3194972cdb61265f867c2267679
CRs-Fixed: 2432396
2019-04-12 02:56:35 -07:00
Mohit Khanna
16cd1b2e8d qcacmn: Add Sanity checks during RX processing
- Check for rx_desc.magic before using a rx_desc retrieved from the reo
  destination ring via rx_buf_cookie (dp_rx_process). Add stats.
- Check if we end up re-using a rx_desc with rx_desc.in_use=1 in the
  replenish path (dp_rx_buffers_replenish).
- Drop RX packet and assert in case MSDU Done failures are seen in
  in the TLV during dp_rx_process. Add stats.
- Disable host2rxdma ring mask for MCL. MCL is not expected to be
  receiving these interrupts.

Change-Id: Iaa345d04b8d48814f88ed6e2237fc67696f6a20c
CRs-Fixed: 2382076
2019-04-02 11:17:32 -07:00
jiad
3b8104bdd3 qcacmn: Support WLAN IPA WDI 3.0 SMMU
Support WLAN IPA WDI 3.0 with SMMU-S1 enabled. Key design
considerations are captured below.

- ring base addresses are passed as struct sg_table and IPA
driver will do the IOVA mapping to IPA domain.
- ring doorbell addresses are passed as physical address and
IPA driver will do the IOVA mapping to IPA domain.
- TX/RX buffers need to be mapped to IPA domain by WLAN driver
via ipa_wdi_create|release_smmu_mapping API.
- IPA doorbell addresses returned from ipa_wdi_conn_pipes are
DDR addresses and WLAN driver needs to do the IOVA mapping
to WLAN domain.

Change-Id: I2398df58c9a9d002af7035f239eda37a86f5d00f
CRs-Fixed: 2422155
2019-03-30 04:53:25 -07:00
Srinivas Girigowda
2751b6d2b3 qcacmn: Consolidate multiple MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
Consolidate multiple (redundant) MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
CDP_MAC_ADDR_LEN
OL_TXRX_MAC_ADDR_LEN
DP_MAC_ADDR_LEN
HTT_MAC_ADDR_LEN
IEEE80211_ADDR_LEN
DEFRAG_IEEE80211_ADDR_LEN
ETHER_ADDR_LEN
HAL_MAC_ADDR_LEN
WLAN_MACADDR_LEN

CRs-Fixed: 2406591
Change-Id: I4a87f8ff556920c7b341bdbba99ec43c97b873f4
2019-03-28 16:50:32 -07:00
Jeff Johnson
a8edf330f0 qcacmn: dp: 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 dp replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: I61f3adab1208682d36235421f44a048e35df346d
CRs-Fixed: 2418258
2019-03-27 06:10:00 -07:00
Venkata Sharath Chandra Manchala
b43ed1cd1a qcacmn: Update rx histogram stats appropriately
Increment number of packets processed per pdev
per interrupt before updating rx histogram
stats counter.

Change-Id: I0d6c59a6a115df168f7755ce94faa90dcc753e13
CRs-Fixed: 2418384
2019-03-26 17:16:48 -07:00
Manjunathappa Prakash
8f70862cd8 qcacmn: Detect dp_rx_process reo descriptor paddr corruption
Compare REO ring descriptor paddr with rx_desc->nbuf->cb->paddr,
possible corruption if they differ.

Change-Id: I064df12495a9934fe2396305a7a4a8cdeacdfd4f
CRs-Fixed: 2398155
2019-03-24 14:55:01 -07:00
Varsha Mishra
a331e6e55f qcacmn: Implement delay VOW stats for hawkeye
Delay counters per TID have been implemented for following types:
1. Linux stack to hw enqueue delay
2. HW enqueue delay to tx completion delay
3. TX interframe delay
4. RX interframe delay
5. RX frame delay from ring reap to networking stack

Change-Id: I836596cbd878a43955c18b4981cb5b7b43d4df5e
2019-03-12 06:10:05 -07:00