Commit Graph

348 Commits

Author SHA1 Message Date
Tallapragada Kalyan
eff377a1d3 qcacmn: do not process duplicate descriptor frame in RX
once in a while the HW is sending a descriptor which
is already processed by host. This can be a potential HW
issue, as a WAR we are not processing such duplicate descriptors
instead increment a counter and continue with next descriptor.

Change-Id: I6c9bc6a9fb4705b42284171a32855411aa5dd73f
CRs-Fixed: 2338543
2019-01-17 10:49:24 -08:00
Tallapragada Kalyan
30d651d13b qcacmn: Adjust mpdu length properly for RAW MPDUs
mpdu length is calculated wrongly in one corner case
resulting in wrongly identifying the last nbuf of the
mpdu, fixed it by properly adjusting the length.
CRs-Fixed: 2368608

Change-Id: Ia7bd3247eb05f2eb4b5de1c65e7190c798128792
2019-01-16 10:37:48 -08:00
phadiman
6c3432b709 qcacmn: Fix array out of bound access
Array mcs_count is of size 13 and the
macro MCS_MAX is 13

mcs_count array should be access only
till 12, hence change the comparison
from <= MCS_MAX to < MCS_MAX

Change-Id: Ieab9a8d1f2a06ff31fa79a062bfcbf96f298f0a1
2019-01-14 17:32:55 -08:00
phadiman
497573091a qcacmn: Add Sanity Checks
Stats are updated periodically and
are categorized to soc, pdev, and
vdev

While the stats are getting updated
and if pdev, or vdev gets detached
in the same time, the stats handlers
will deference a NULL pointer

Hence Add basic sanity checks to DP
layer for soc, pdev and vdev inside
stat handlers

Change-Id: Ic4919b9c205679e1d6e7c571c577339be65c1bad
2018-12-26 03:39:21 -08:00
Pamidipati, Vijay
eb0e456d68 qcacmn: Add missing NULL check in DP rx path
Add a missing NULL check for peer object in rx_da_learn API
Also add missing elements in pdev_stats_cmn_tlv structure.

CRs-Fixed: 2357352
Change-Id: Ie54fd0a6a45f00d60420c391098f22b0097de3ac
2018-12-21 10:05:35 -08:00
Mohit Khanna
16816ae8d0 qcacmn: Enable GRO for TCP packets
Add support for GRO functionality for TCP packets.
- Pass GRO config to DP layer as a part of dp_update_config_parameters
- Add API to read the number of active RX contexts from DP layer
  cdp_get_num_rx_contexts
- Fill GRO info into skb->cb from rx_tlv during dp_rx_process

CRs-Fixed: 2346995
Change-Id: I1c143d8ce2c7522ba2c76142fb6cc82193df5608
2018-12-18 00:08:08 -08:00
Mohit Khanna
705149946b qcacmn: Fix large RX desc pool memory allocation
During dp_rx_pdev_attach and dp_rx_pdev_mon_buf_attach we are allocating
three times as many rx descriptors as there are entries in the ring for
AP usecase. This is not needed for MCL and may need to kmalloc
failures for allocating that much contiguous memory

Allocate only as many RX descriptors as there are ring entries for MCL
usecase.

Change-Id: I8b559a85c3899bcbdc520e71ba5da409314db160
CRs-Fixed: 2342957
2018-12-15 10:07:15 -08:00
Jinwei Chen
214590a2c9 qcacmn: fix nbuf free reuse during invalid peer data processing
For MCL function dp_rx_process_invalid_peer, there is corner case the
nbuf is not data and freed, but invalid_peer_head_msdu pointe to the
same nbuf in pdev is not reset to NULL, then invalid_peer_head_msdu is
reused again.
Reset invalid peer msdu list to NULL when nbuf is freed.

Change-Id: I73058afe9656c34971ea083faa19ef9d90b7f747
CRs-Fixed: 2356531
2018-12-12 12:29:22 -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
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
phadiman
4213e9ca61 qcacmn: Separate MEC, DA and WDS Enable Flags
Add new flags for MEC and DA enable/disable
and keep it independent of WDS enable flag

Change-Id: Idb49c45ebb34a38f876dbdb293806c4e96d49b5d
CRs-Fixed: 2336332
2018-11-15 01:38:27 -08:00
Amir Patel
756d05e9e5 qcacmn: Replace interface of dp stats updation to upper layer
Replace ol_if interface with WDI for dp stats updation to upper layer.
Define a new CDP API to get radiostats.

CRs-Fixed: 2326789
Change-Id: Ieaee2fe18fc9a0ad0e259e36f59529fe9bc4e208
2018-10-31 13:21:28 -07:00
Venkata Sharath Chandra Manchala
d18887ee9f qcacmn: Compilation fixes for SM8150 platform
1. Address out of bounds array access while
   populating mcs rates.
2. Use cdp_sec_type enum inplace of htt_sec_type
   for common code.

Change-Id: I0ae1e0acaf7422e73dc26befc9f066f3f424ec6b
CRs-Fixed: 2327153
2018-10-11 10:39:55 -07:00
Tallapragada Kalyan
20b46778a7 qcacmn: Disable DA port learning for HKv2
DA based port learning is not required for HKv2 as
this issue is fixed in HKv2 Hardware

CRs-Fixed: 2329920
Change-Id: If006ce8fe5eb5d7e26ba4d30fd1d9cd43d5da480
2018-10-09 19:58:45 -07:00
Tallapragada Kalyan
2ae71e0531 qcacmn: Add AST entry for Destination MAC in RX path
Because of a HW issue we have added a WAR where we do
learning even on destination MAC address. This will ensure
da_is_valid even for forwarding traffic and HW will cache
this entry for subsequent pkts there by we achieve better
throughput in UL.

Change-Id: Ib61693e9ce52b3a1cdcd4c34eabb3d8368b1ef13
2018-10-05 15:46:53 -07:00
Tallapragada Kalyan
5deeef2fec qcacmn: Add support for MEC stats and null queue stats
Add support for MEC stats and null queue stats

Change-Id: Ie523d8e5cbca6660cd5477d152360db448d75708
2018-10-05 15:46:46 -07:00
Sravan Kumar Kairam
26d471ec56 qcacmn: Take peer ref count and dec it after using
Currently peer reference is used with out taking any ref count.
In parallel context execution on different core peer reference may
be cleaned up in peer unmap event. So take ref count while using
the peer reference and decrement after done with it.

Change-Id: I02ca172cbdc4309fabd3bbbad00940826662bbd3
CRs-Fixed: 2301963
2018-09-27 20:24:36 -07:00
Amir Patel
3217ade780 qcacmn: For Rx multicast/bcast stats, make mcast as superset
make it inline with TX, make multicast stats to
include bcast packets also

CRs-Fixed: 2298834
Change-Id: Id30af0a6ddd784b268b9707ea2df1bcd255dd2cf
2018-09-12 10:23:30 -07:00
Sravan Kumar Kairam
d7d1d6707f qcacmn: Remove vdev wds enable check for intra-bss fwd
Currently wds enable for vdev conditional check is there for
intra bss rx forward. This check will break the intra bss for
the platforms which does not support WDS feature. In this change
remove the wds enable check for dp vdev.

Change-Id: Ib61c53734254b768902704ccb0e2a5c9b53f35f1
CRs-Fixed: 2303905
2018-09-05 09:50:07 -07:00
Jinwei Chen
4673310fba qcacmn: add rx data invalid peer indication
Currently there is no callback for MCL DP to do further action
when receiving data with invalid peer, add it for further processing.

Change-Id: I07c93b5119f0c1a46abba587b6b18c7b691683c7
CRs-Fixed: 2299489
2018-08-28 09:15:02 -07:00
Mohit Khanna
7ac554bda5 qcacmn: Support for DP RX Threads
Add support for DP RX Threads as a part of the FR. Multiple RX
threads can be enabled from the ini. The code is added in a new DP
module outside of the cmn project.

Change-Id: Id966c46c2799d23c2a4fa1c884610955afed3565
CRs-Fixed: 2256470
2018-08-24 18:35:45 -07:00
Aditya Sathish
ded018e406 qcacmn: Clean up dp component prints
Clean up datapath component prints by correcting trace levels for
regularly occurring prints and removing newlines from converged
print APIs since qdf_trace_msh appends them by default.

Change-Id: Ie8fe319fcb737720f7400a165e134b6a18bd15b5
CRs-Fixed: 2243843
2018-08-10 18:11:21 -07:00
Chaithanya Garrepalli
95fc62f8fc qcacmn: populate RSSI for the neighbor clients
Populate the RSSI value for the non associated clients
added in pdev->neighbour_peers_list from monitor status
ring

Change-Id: I509d06bec6eafe8377681c8a3da9a64f301c3c73
CRs-fixed: 2286571
2018-08-06 13:44:01 -07:00
Pamidipati, Vijay
3756b7603e qcacmn: DBDC repeater mode changes in AST
Add new ast_get_type API for DBDC repeater feature.
Add other changes required in WDS and MEC handling
required for DBDC repeater feature to function properly.

Apply sta kickout logic to handle roaming cases
only within same radio. For roaming across radios, DP should
rely on control path.

Change-Id: If9b35720082dd87de40827843a14238e818bc454
2018-08-06 13:43:58 -07:00
Balamurugan Mahalingam
96d2d41c87 qcacmn: Fix compilation issues and a minor issue
Removed qdf exports on functions defined in target specific
header files and defined those functions as static. Revert
changes on hal_rx_msdu_end_sa_idx_get and make
hal_rx_msdu_end_da_idx_get target specific

Change-Id: I2858b1d77118f0a26b54bf983bd342c7a4fe757d
2018-07-21 00:03:36 -07:00
Balamurugan Mahalingam
d0159640ea qcacmn: Separate hal for qca6290 and qca8074
Create separate individual hal_srng_table and hal register
offset in target specific source files. Create separate
functions for qca6290 and qca8074 for few hal rx tx
functions as the macro value differs between the chipsets.

Assign target specific hal tx, rx ops as part of hal_attach
and call respective hal tx, rx ops through callbacks.

Change-Id: Ibbf490c678c39fdd9d54191aad7aaec786db30ec
2018-07-21 00:03:20 -07:00
Venkata Sharath Chandra Manchala
faa0d8b30a qcacmn: Update statistics counters
Account for tx.success and tx.comp_pkt stats counters
at peer level and propagate them to pdev level.
NSS stats need to be updated for all packets.

Change-Id: I18de95217690c9234060253671e0d5e1ef295e2a
CRs-Fixed: 2270816
2018-07-18 00:18:15 -07:00
Mohit Khanna
163c3170a1 qcacmn: fix dptrace for data packets
Enable tracing for TX/RX data packets
Donot print stats with 0 value

Change-Id: I4bab6537494c4ee0fe290e3778fb5662bf5abd66
CRs-Fixed: 2269193
2018-07-13 02:58:46 -07:00
Akshay Kosigi
1a9c6d1d4c qcacmn: Rename osif_pdev and os_if_vdev in dp_pdev and osif_dev
structures

Rename osif_pdev to ctrl_pdev and os_if_vdev to ctrl_vdev in dp_pdev and
osif_dev structures respectively which are
pointing to objmgr_pdev and objmgr_vdev structures to maintain
uniformity

Change-Id: Ida95a1a90ea74513573f00c652338baee3df897a
CRs-Fixed: 2241362
2018-07-09 02:02:23 -07:00
Chaithanya Garrepalli
a173a184ae qcacmn: fix the stats counter in raw mode
use hal_msdu_len instead of qdf_nbuf_len to get
the packet length and correct the packet length
for first msdu of a amsdu

Change-Id: I7410cb6bd98743f3b01019c9e394c32c77c3a30e
CRs-Fixed: 2228232
2018-06-25 08:51:11 -07:00
chenguo
51d0f4e5ac qcacmn: Delete obsolete RX statistics number of BW and frame type
Before showing DP statistics, per VDEV and per peer statistics
counters will be aggregated together and stats.rx data member of
PDEV will be set to all zeros. So only need to update per peer
statitics counters in RX stats_update.

Delete the obsolete PDEV stats.rx update operations.

CRs-Fixed: 2237020
Change-Id: Iba6437e6010dd8f87a3f152a529a8b0bc632972d
2018-05-21 10:26:36 -07:00
Jeff Johnson
ff2dfb217b qcacmn: dp: Fix misspellings
Address the following issues in the dp folder:
CHECK: 'availble' may be misspelled - perhaps 'available'?
CHECK: 'catagory' may be misspelled - perhaps 'category'?
CHECK: 'endianess' may be misspelled - perhaps 'endianness'?
CHECK: 'exceded' may be misspelled - perhaps 'exceeded'?
CHECK: 'explicitely' may be misspelled - perhaps 'explicitly'?
CHECK: 'Inteface' may be misspelled - perhaps 'Interface'?
CHECK: 'lengh' may be misspelled - perhaps 'length'?
CHECK: 'messsages' may be misspelled - perhaps 'messages'?
CHECK: 'miscelleneous' may be misspelled - perhaps 'miscellaneous'?
CHECK: 'Ouput' may be misspelled - perhaps 'Output'?
CHECK: 'poiter' may be misspelled - perhaps 'pointer'?
CHECK: 'Poiter' may be misspelled - perhaps 'Pointer'?
CHECK: 'psuedo' may be misspelled - perhaps 'pseudo'?
CHECK: 'registerd' may be misspelled - perhaps 'registered'?
CHECK: 'requred' may be misspelled - perhaps 'required'?
CHECK: 'retreive' may be misspelled - perhaps 'retrieve'?
CHECK: 'succesfully' may be misspelled - perhaps 'successfully'?
CHECK: 'vaild' may be misspelled - perhaps 'valid'?
CHECK: 'virtaul' may be misspelled - perhaps 'virtual'?

Change-Id: I66b9cdc6115dd133b385e60c9d02cefd1bd0bac3
CRs-Fixed: 2241574
2018-05-19 19:41:02 -07:00
Chaithanya Garrepalli
8aaf9b6959 qcacmn: ignore l2_hdr_offset in rx path for raw mode
In case of raw mode HW does not set the l2 header offset.
ignore this field in rx for rawmode.

Change-Id: I6e08a9540f55fdb97b21e4939256e6e5b9076e77
CRs-Fixed: 2243850
2018-05-18 03:34:50 -07:00
Tallapragada Kalyan
51198fc4ee qcacmn: Add counters for IP, TCP/UDP checksum errors
Add counters for IP, TCP/UDP checksum errors reported by
hardware.

Change-Id: Iaeb9280bc1ad4a287eee409d92ad0c95dc9f2c77
2018-05-17 16:55:19 -07:00
Anish Nataraj
7b6d21f763 qcacmn: Populate Rx Raw, Tx Nawds multicast counters
Aggregate vdev level tx nawds multicast counter and rx raw
unicast packet counters from peer level

Change-Id: Iee466587d67286e5bf8f87e8ce516ce8e00e6f68
CRs-Fixed: 2233242
2018-05-16 00:28:33 -07:00
Chaithanya Garrepalli
9b3988c245 qcacmn: Populate rx raw stats at peer level
Add rx raw unicast packet counters from peer level

Change-Id: I13f9aaf5c62be86f5ba3cc750d5ee1ec698f424f
CRs-Fixed: 2233242
2018-05-16 00:28:28 -07:00
Prathyusha Guduri
02ed94801a qcacmn: Add support in DP for enabling multiqueue support
Enable multiqueue on VAP with 4 Tx and Rx queues in lithium.

In Rx path set the rx queue of skb based on the reo ring id on which it
is received.

In Tx path use the queue_mapping of skb to map to the hardware Tx ring
on which it has to be transmitted.

Change-Id: I103a21e91d1ed5c0e1d8441863d4fcd273b7bed9
2018-05-14 03:00:07 -07:00
Chaithanya Garrepalli
72dc9132a6 qcacmn: Raw mode re-factoring and cleanup in rx
Cleaned raw mode specific code and moved the rx
processing to single API dp_rx_sg_create

Change-Id: I7696786d9a0f10983d3299956b46b2ec76b388a5
CRs-fixed: 2204824
2018-05-11 21:12:39 -07:00
Tallapragada Kalyan
bc62989ce4 qcacmn: Handle NULL objects properly
handle qdf_nbuf_unshare failure cases and NULL peer
in pn_error handler properly.

Change-Id: I9d271bed512a7e84a16d2b6c5b34f13235fc54e9
CRs-Fixed: 2221457
2018-05-11 16:18:10 -07:00
Ruchi, Agrawal
2755048d7d qcacmn: Remove NAWDS Rx Drop Count length counter
Remove NAWDS Rx Drop Count as it is not required,
drop packets in rx where length is not
available.

Change-Id: Ib4b41eefe88410137c3845090783ee43adb9147c
CRs-Fixed: 2191474
2018-05-07 07:38:53 -07:00
chenguo
04d38d67ae qcacmn: Correct RX NSS statistics counter for txrx_stats commands
While doing RX NSS statistics counting, only MU_MIMO and MU_OFDMA_
MIMO frames are taken into consideration. So all NSS counter for
SU frames are missed.

Add RX NSS statistics counting for SU frames.

CRs-Fixed: 2228332
Change-Id: I5ee9b8f03177d31f5891a2e4e616b5740fec35f6
2018-05-03 04:43:41 -07:00
Neil Zhao
488763687b qcacmn: fix tid overwrite/save FRs for HK
Fix tid overwrite and save features' brokage for HK

Change-Id: I71985a73f65ad4ddf79ae9a2efb00c5de12b9cd8
2018-04-26 16:02:11 -07:00
Aditya Sathish
6add3db0d6 qcacmn: Fix Multicast RX Bytes and TX Packet Value in Node Stats
Fix for setting the right length when incrementing Rx Multicast
Bytes value

Fix for incrementing the Tx multicast packet value by correctly
returning the peer pointer to the stats function.

Change-Id: I46d59b7a71936d6eefdcba4419d0737f70aa4d48
CRs-Fixed: 2220973
2018-04-16 08:48:08 -07:00
Venkata Sharath Chandra Manchala
16fcceb7de qcacmn: Change the buffer manager
Change the buffer manager from HAL_RX_BUF_RBM_SW3_BM to
HAL_RX_BUF_RBM_SW1_BM to handle regular and error packets.

Change-Id: I696d41f6cf0be1d5045ab27841ccc3ee2afea7de
CRs-Fixed: 2189452
2018-04-06 13:25:31 -07:00
Tallapragada Kalyan
e33a5632b8 qcacmn: add abstraction to update rx stats
Add a new API to update the stats which will be
called from dp_rx_process instead of updating stats
directly from within the dp_rx_process function

Change-Id: I13bdfd1606c3ceb2e38921ffa0cf3fe9f29c57ee
CRs-Fixed: 2189088
2018-04-05 07:46:47 -07:00
Venkata Sharath Chandra Manchala
bcfa6d8683 qcacmn: Add lock to protect rx_desc_pool
Create a lock for protecting rx descriptor
pool allocation during initialization and destroy it
during unloading the driver.

Change-Id: Icd489e400dab9bb648709134dcaa24c4d7724aa6
CRs-Fixed: 2215430
2018-04-01 21:02:38 -07:00
Manjunathappa Prakash
d9ce350f01 qcacmn: Initialize and reap both 2.4GHz and 5GHz MACs
Initialize MAC1 along with MAC0. 2.4GHz monitor mode operates on
MAC1 so initialize MAC1 and reap both MAC0 and MAC1.

Change-Id: Id281def37d460b224f5f571893266f193846fd0c
CRs-Fixed: 2176848
2018-03-20 15:54:58 -07:00
Chaithanya Garrepalli
974da2640a qcacmn: Avoid reference of peer object after peer_teardown
In API dp_peer_find_by_id return NULL if delete_in_progress
bit is set, this will avoid referencing peer memory which will
be free in peer_unmap event asynchronously.

Change-Id: Ieab559b9274a886809a9baa9bb348d348e924625
CRs-fixed: 2194265
2018-03-20 07:38:25 -07:00
jinweic chen
c3546321b6 qcacmn: add nbuf map result check when replenish
add the nbuf map result checking when replenish rx
nbuf to monitor status ring, this could avoid the
case nbuf map failed and invalid dma address
posted to HW or do unmap for unmapped nbuf.

Change-Id: I45cfc015f71a2d7295f7fcb4803bd6e68e2752d4
CRs-Fixed: 2182546
2018-03-13 06:00:59 -07:00
Soumya Bhat
bc719e6b02 qcacmn: Add support to get RSSI of Non associated clients
Add change in driver to get RSSI of non associated clients.

This is done in 2 levels of filtering
1. Send WMI to FW to configure BSSID in HW
2. Filter the neighbour BSSID packets received in host for
the configured client mac

Change-Id: I6b684b83cecb308dac326056aa77537aee07b933
CRs-Fixed: 2148773
2018-02-23 20:01:17 -08:00