Commit Graph

264 Commits

Author SHA1 Message Date
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
Shashikala Prabhu
e11412df5c qcacmn: Add compile time macro to disable rx_pkt_hdr_tlv
Do not process  RX packet header TLV for low memory config profile.
Also, drop decapped frames in invalid peer processing function.

Change-Id: Ifc7721bb25d85c7e277bebf4b962d2f1bfea150c
CRs-Fixed: 2395508
2019-03-08 23:38:04 -08:00
phadiman
449a268392 qcacmn: Reuse Rx Descriptor Pool Array
wifi up/down will cause soc stop and soc
start which will allocate rx desc pool
array memory for each wifi up

This creates memory fragmentation issue
hence reuse Rx descriptor pool array
across wifi up/down and free only nbufs

CRs-Fixed: 2394666
Change-Id: Ic897c733dfba3d8829e2f2f51099cd615b8a7ea2
2019-03-08 20:19:16 -08:00
Varsha Mishra
18281794c8 qcacmn: Implement VOW stats for hawkeye
VOW stats is an extension of regular stats to capture
all drops per TID. Delay counters per TID are also
included.

Change-Id: If6087f37b32cf9ae4bb405190a358ad3c9750dd2
2019-03-06 18:20:42 -08:00
Krunal Soni
c96a1167f8 qcacmn: Use dp_verbose_debug() to print msgs which come excessively
Some of the print messages in Data-path module come very excessively.
Use dp_verbose_debug() API to print them.

CRs-fixed: 2376998
Change-Id: Ibaec3751ce3cbe98492c531548e613c7d17db898
2019-03-06 12:52:07 -08:00
Chaithanya Garrepalli
af34aae9cd qcacmn: add counters for sa_idx invalid issue
Add counters in case where we identify
HW issue where sa_valid and da_valid bit
are set and sa_idx and da_idx are invalid

Change-Id: I690b626dd3c2b7f20b35982514b0f27576221250
CRs-fixed: 2340521
2019-02-27 03:14:02 -08:00
Srinivas Girigowda
03bd4b6b30 qcacmn: Replace struct ether_header with qdf_ether_header_t
Replace struct ether_header with qdf_ether_header_t.

Change-Id: I30d06dcf94e3149bf77f1f99e7a854bc9d7ae3ac
CRs-Fixed: 2404851
2019-02-26 21:18:44 -08:00
Srinivas Girigowda
7950297868 qcacmn: Replace IEEE80211_IS_BROADCAST with QDF_IS_ADDR_BROADCAST
Replace IEEE80211_IS_BROADCAST with QDF_IS_ADDR_BROADCAST.

Change-Id: I199797ea402ee68dd0addf6698aa5ccd0ddc8f97
CRs-Fixed: 2396621
2019-02-23 16:02:59 -08:00
Jinwei Chen
1cb78177e6 qcacmn: Fix REO entry potential overwrite issue
Host SW should not update the cached TP pointer to HW register before
current cached TP REO entry finishes processing, otherwise there is
risk if HW HP catches up to this cached TP, but HW TP value has been
updated to (cached TP + one entry size) now, this TP REO entry might
be overwritten.

Refine it and only update TP pointer to HW when entry processing has done.

Change-Id: I54df3247745717855a67649f440c606c518efd61
CRs-Fixed: 2391658
2019-02-14 03:11:43 -08:00
nobelj
9d8154dcd3 qcacmn: update TID to skb priority
update TID to skb priority before checking process_rx_status.

Change-Id: Ic81666e3cf918f6d089c43ae8234cd7a06fd0ccc
2019-02-04 07:28:30 -08:00
Nandha Kishore Easwaran
f9c44ce2ad qcacmn: Move DA_war flag to SOC level
Moved DA_war flag from vdev level to soc level.
Also disable DA_war when extap is enabled.

Change-Id: I8e8b2ac7835fb8b5bcad603bd1e7d8036ef7719c
2019-01-30 00:03:13 -08:00
Venkata Sharath Chandra Manchala
ec9a530bc0 qcacmn: Fix statistics counters
1. Account for total Tx completions received on wbm2sw release ring.
2. Avoid multiple updates to invalid peer counter on
   wbm error path handling.

Change-Id: I904208e1bd83e98598870a1f05c4b17c3fb20e2d
CRs-Fixed: 2366790
2019-01-21 17:12:47 -08:00
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