Commit Graph

63 Commits

Author SHA1 Message Date
Karunakar Dasineni
700ad73754 qcacmn: WAR for duplicate buffers in monitor mode
WAR to discard duplicate indications (buffers and link descriptors)
from monitor DMA seen sometimes on RXDMA2SW ring.

Change-Id: I687b782f54fbbf85ae932ee833ac9263b5879ca6
2018-11-17 10:48:13 -08:00
chenguo
5f7f131a9d qcacmn: Fix double destroy operation about mon_lock
mon_lock is created only once for each PDEV, but is destroyed
according to the RXDMA number. Need to ensure this lock is freed
only once.

CRs-Fixed: 2338573
Change-Id: I3630dd0a3aaf808fa910cd40864042bf23ecc79e
2018-11-09 19:43:35 -08:00
jiad
4320219982 qcacmn: Fix format build error
This change fixes build errors with compiler option
-Werror=format=.

Change-Id: I98b93f776c7d58a12d93e1be3a6acf34486ddfab
CRs-Fixed: 2344756
2018-11-08 09:40:18 -08:00
Venkata Sharath Chandra Manchala
8747958dff qcacmn: Enable Monitor Mode for QCA6390
Support Monitor Mode for QCA6390 as RXDMA1 block is
now removed.
1. Monitor buffers are now received on rxdma_err_dst_ring
2. RXDMA1 monitor status ring is moved to RXDMA0 monitor
   status ring
3. Msdu link descriptors are now returned to WBM descriptor
   release ring.
4. Reap the Monitor buffers and return it to SW Refill ring.
5. Use the same rx descriptor pool for regular and monitor data.

Change-Id: If41e5d13f942da2b97e5aab72b88ae344925ba67
CRs-Fixed: 2297300
2018-10-26 10:39:37 -07:00
Pratik Gandhi
4cce3e03cd qcacmn: Modify min value of DP configuration for emulation
Reducing min value of DP configuration parameter to support
low memory emulation platform.

Change-Id: I524dca73b3ce52e138527c7abd1a9d8d0cbe9ac1
CRs-Fixed: 2309295
2018-09-11 12:03:05 -07:00
Balamurugan Mahalingam
3715aa4dd6 qcacmn: [2/2] Support both qca8074v1 and qca8074v2 from hal
Pass hal_soc handle to hal function calls to invoke appropriate
target specific hal APIs

Change-Id: I1d646875508cab9b2ec2af55441cbece36a020cd
2018-09-04 11:53:38 -07:00
Kai Chen
339b01d8ae qcacmn: Check the MPDU start tag before read ppdu id
Check the MPDU start tag before read ppdu id in MPDU
start TLV in the head of packet TLV.

Change-Id: I0b9a367e148d55a6c667adc8ad16e7c0fdf0a741
2018-08-21 14:16:42 -07:00
Neil Zhao
daf867352c qcacmn: Don't return if mon vap down in dp_rx_mon_dest_process
If mon vap is down, pdev->monitor_vdev will be set to NULL.
Then function returns, this return will causing mon dest ring not reaped,
causing mon dest ring full FW assert.
And it'll causing mon status ring & dest ring out of sync.

Change-Id: Ie10792da2a4a78d959c676c4b4fba3d9ee05c6e6
2018-08-21 14:16:40 -07:00
Kai Chen
0e79b6e5bd qcacmn: Fix ppdu id wrap around issue
When a ppdu id on a ppdu in status ring find a matching ppdu id
in destination ring. The old logic can cause ppdu id is destination
ring stuck on high value before wrap around. The new logic check
ppdu id between status ring and destination ring is no more than
20000.

Change-Id: Ia601403b0a4fc6cdfff980c7745e055c814137b7
2018-08-21 14:16:37 -07:00
Adil Saeed Musthafa
61a21697f6 qcacmn: Add new radiotap header fields
Add the following fields in Radiotap header:
Antenna noise (in dBM)
Vendor Namespace containing the following information
->L_SIG_A
->Device_ID
->L_SIG_B
->PPDU_START_TIMESTAMP

CRs-Fixed: 2285143
Change-Id: I977be73778ab27383f12214c73b56c9b80d9f02d
2018-08-10 20:45:27 -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
chenguo
1b88046171 qcacmn: Add preamble only PPDU support in monitor mode
There are some particular PPDUs which have preamble only:
     * NDP frames
     * TB_PPDU frames
Add support to the above frames.

Change-Id: I7022433d3765575eaf28d7baf3a11e8b6ce13890
CRs-Fixed: 2275161
2018-08-09 14:34:17 -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
30e442b026 qcacmn: Disable monitor mode for QCA6390
Setup monitor mode rings and allocate
descriptors only if QCA6390_MONITOR_MODE is
defined.

Change-Id: I9c9bdc1e325eda822a326d64d6445a7112083420
CRs-Fixed: 2271998
2018-07-13 02:58:41 -07:00
Nandha Kishore Easwaran
5840784be3 qcacmn: Fix invalid format specifiers for kernel addr
Change format specifiers to print kernel vaddr from
%p to %pK.

Change-Id: Ice98161bb1b8b5feb1d8ee1ba8a95b7d552f9403
CRs-Fixed: 2211136
2018-06-20 07:59:37 -07:00
Pramod Simha
5a03e749e9 qcacmn: Fix invalid format specifiers for kernel addr
Change format specifiers to print kernel vaddr from
%p to %pK.

Change-Id: Iccb0a4dae03f28533a6933cb6b60449315d159ee
CRs-Fixed: 2211136
2018-06-06 18:56:29 -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
Karunakar Dasineni
bb7848e5b6 qcacmn: Drop MPDUs for some RXDMA errors
Drop MPDUs received with rxdma_overflow_err, rxdma_flush
or rxdma_mpdu_length_err errors on monitor RXDMA2SW ring
since Rx TLVs are not populated properly by HW.

Change-Id: I3d4399f4c2b4bbe21e9f6b1b24369a633e964154
CRs-Fixed: 2233141
2018-05-19 10:56:55 -07:00
Jeff Johnson
7947f90a30 qcacmn: Fix typo "retrived"
Replace typo "retrived" with correct spelling "retrieved".

Change-Id: Icde5e2480be78bdf8bf3befd1ce09b1b427074df
CRs-Fixed: 2238309
2018-05-17 00:47:20 -07:00
Kai Chen
783e038223 qcacmn: Add monitor mode ppdu and mpdu stats
Add monitor mode status ring ppdu stats and destination
ring ppdu/mpdu stats

Change-Id: I702172f40ffc0915b630dd3781a697199bdd20fd
2018-05-14 21:54:53 -07:00
Shaakir Mohamed
4e30c9aba0 qcacmn: Avoid null pointer dereference
Check to prevent null pointer dereference.

Change-Id: Iec0f7d7738aa99994e2cf7b0dae2e6cd4a34c709
CRs-Fixed: 2220175
2018-05-02 14:29:24 -07:00
nobelj
1c31fee00e qcacmn: Configure RXDMA_MONITOR_STATUS on set mon rx filter
a) Configure RXDMA_MONITOR_STATUS to support mpdu_start.
b) Need Monitor other filter in RXDMA_MONITOR_STATUS
to support monitor vap.

Change-Id: I7ac90203f085850906f8c55209a57bb6a5464098
2018-05-02 01:19:40 -07:00
Tallapragada Kalyan
70539512de qcacmn: chain nbufs using phy_ppdu_id for peer invalid case
nbufs received on wbm_release ring were chained based on
first_msdu and last_msdu bits if the peer is invalid for these
frames, but these fields in the rx tlv header were in-correct as
hardware does not decap these msdu's.
Based on inputs from firmware we now changed this logic to
using phy_ppdu_id field from the rx_mpdu_start tlv & rx_attention tlv.

Change-Id: Ifc7faa2d1b0585bcc226e5cb2045fcb29d152273
2018-05-01 21:37:40 -07:00
Lihua Liu
9feb40d5e3 qcacmn: Decrease log level to avoid excessive logging
Change log level from ERROR to DEBUG in function dp_rx_mon_deliver.

CRs-Fixed: 2214694
Change-Id: I1a7fb483beec583c69e5b29c4fabb61e512f6f8f
2018-04-19 14:15:27 -07:00
Shaakir Mohamed
19f4f63c35 qcacmn: Fix AMPDU status info in radiotap header
AMPDU flag check is not present when radiotap header is updated.
This fix will check for rs_flags to check and set AMPDU present

Change-Id: I9e0a703a46459b1013af092f8cb8b7cd35f1a3ce
CRs-Fixed: 2204278
2018-04-16 16:57:05 -07:00
sumedh baikady
eca2de6c6d qcacmn: Fix KW Null dereferencing issues
Fix static analysis KW issues related to
NULL dereferencing.
CRs-fixed: 2220248

Change-Id: Iecf37218782133eaf94f81d975478d71e308eca3
2018-04-14 10:18:02 -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
Sumedh Baikady
12b2b2c897 qcacmn: Use mon_lock while accessing monitor vap
Use monitor mode lock to prevent vap down while monitor
vap is still delivering all MPDUs to radiotap Api.

Change-Id: I908d8048afbf3210bddaafc2c19b177ec8209085
CRs-fixed: 2212004
2018-04-01 19:40:48 -07:00
Manjunathappa Prakash
86f4ba70f3 qcacmn: Allocate HW link desc pools for each mac
MCL operates on both macs with single pdev. So allocate HW link
descriptor pools for each macs.

Change-Id: I5a373bfbd1d15557e1fc66b8af17c2a130cdf5f9
CRs-Fixed: 2176848
2018-03-20 15:55:02 -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
Neil Zhao
0bd967d021 qcacmn: fix mon vap RX skb size issues
1) for raw mode, drop frames with invalid size
2) for non-raw mode, fixed issue that
frag list data_len's not properly calculated

The length issues will introduce kernel issues
during skb_linearize() at upper OS network stack layer.

Symptoms:
1)
WARNING: at net/core/skbuff.c:1782
PC is at skb_copy_bits+0x1b8/0x230

2)
kernel BU at net/core/skbuff.c:1615!
PC is at __pskb_pull_tail+0x70/0x2e4

CRs-fixed: 2188754

Change-Id: I848ec976cd922708ffd02d8272ea5a6f3bce2a00
2018-03-05 11:11:41 -08:00
Karunakar Dasineni
de3c3a0c11 qcacmn: Ignore monitor pkt ring TLVs during flush
TLVs in monitor packet buffers might be incomplete during
RXDMA flush, and should not be used to check PPDU IDs against
status ring PPDU IDs. This was causing stall in monitor
destination ring processing.

Change-Id: I99729beb65936477ea42cf5939da2036f36ee303
CRs-Fixed: 2193051
2018-02-28 03:23:14 -08:00
nobelj
9ab76e283f qcacmn: Add support for ppdu length in ppdu_stats
Rx PPDU length is calculated from number of MSDU length in each MPDU
Rx PPDU stats are populated after updating PPDU length.

Change-Id: I2af6a82eaddc4e791d4e7445c933a5886304e8f3
2018-02-27 21:17:19 -08:00
Mohit Khanna
e1d7e0ecc9 qcacmn: fix double unmap issue in monitor mode
Currently while reaping the rxda destination ring in dp_rx_mon_mpdu_pop,
we end up un-mapping the nbuf twice when -
1. msdu_ppdu_id > ppdu_id
2. msdu_ppdu_id = ppdu_id

For case 1, we exit from the dp_rx_mon_mpdu_pop without reaping the
descriptor completely, but we unmap the nbuf corresponding to it.
Next, when case 2 happens, we end up un-mapping the nbuf again to reap
the same descriptor.

Introduce a flag in the rx_desc to keep track of un-mapping the nbuf. If
the nbuf is already unmapped, donot unmap it.

Change-Id: Icb64fbc00312d6d0e6d41f7b475eb1285530c3d0
CRs-Fixed: 2185301
2018-02-16 22:58:09 -08:00
Mohit Khanna
9a6fdd5cee qcacmn: Debug prints for monitor mode
Add some debug prints for monitor mode

Change-Id: Ie12279c832647cac9e1f152c98fa0205dd9d495e
CRs-Fixed: 2173407
2018-02-16 22:58:07 -08:00
Mohit Khanna
33ed0312fa qcacmn: set mpdu next to null during msdu stitching
In monitor mode, when we try to stitch msdus together into an ampdu
to be sent to the stack (dp_rx_mon_restitch_mpdu_from_msdus),
we aggregate them together via frag_list. In the current code,
for the first msdu in which the frag_list is populated (if there are
more than one msdus to be sent to stack), the next pointer (skb->next)
is not set to NULL. This causes the HDD code to process the next
pointer leading to issues double free issues.

Set the next pointer for the first msdu(with frag_list) to NULL.

Change-Id: I60d1d463c7bbb602e4b199fbb691340ad6247bc5
CRs-Fixed: 2173405
2018-02-15 16:21:24 -08:00
Karunakar Dasineni
37995ac196 qcacmn: Fixes for monitor ring stall issues
STATUS_DONE is missing sometimes in monitor status ring,
causing stalled processing in host and backpressure to RXDMA.
Adding a WAR to skip such entries.
Also increased the size of monitor link descriptor ring since
multiple descriptors are used for large MPDUs.

Change-Id: I556b4196482ed738471afc1f7e7b73cf3f8fbc51
2018-02-08 07:55:48 -08:00
Karunakar Dasineni
b71ad04168 qcacmn: Fix link descriptor pool cleanup
Set link descriptor memory address to NULL after freeing to ensure
it is not freed again. This is seen with soc_detach called during
attach failures.

Change-Id: I7338cb8c64fcb652c95f42bcb9e998a6f043cecf
CRs-Fixed: 2160703
2018-02-05 21:39:57 -08:00
Keyur Parekh
71ab9ef0b7 qcacmn: Populate mon_rx_status structure fields
Update mon_rx_status fields for HE case. Also
added rs_fcs_err field to structure and populate
its value.

Change-Id: I4681543c7d6c6c7ac0d666cd93072caaee285585
2018-01-17 23:38:07 -08:00
sumedh baikady
87d4967274 qcacmn: Fix Assert in dp_rx_mon_mpdu_pop
Disabling checking of msdu_done in monitor mode

Change-Id: I6c935dd74312a7023d5903346af9e2174c5ca7ce
Crs-fixed: 2167329
2018-01-11 10:08:00 -08:00
Karunakar Dasineni
65b626eb3d qcacmn: Monitor status PPDU ID wraparound handling
Check PPDU ID wraparound in monitor mode processing.

Change-Id: I9e1dcc7b22d4db8006e945e360b3744f548fb122
CRs-Fixed: 2160214
2017-12-27 01:26:16 -08:00
Pranita Solanke
a12b4b305c qcacmn: Add support for missing Node statistics
Add support for following node statistics for Lithium DP
1) Number of Tx unicast MSDUs and bytes
2) Last Tx and Rx rate
3) Excessive retries per AC

Change-Id: If533df25e5299bf399bed85ace99763aab74134e
2017-12-07 05:37:29 -08:00
psimha
2ab65cbbd5 qcacmn: Pass dev strcut to qdf_mem_free_consistent
Pass dev info to the qdf_mem_free_consistent so that the kernel can track
the memory & prevent false double free detection.

Change-Id: I82a00ce9adc3638caee3f1ae325ec041fb2bd1fe
CRs-Fixed: 2144237
2017-12-05 17:37:12 -08:00
Tallapragada Kalyan
a867edf5ee qcacmn: pass correct argument to qdf_nbuf_alloc
till date we were passing wrong argument to qdfnbuf_alloc
now we are passing the right argument.

Change-Id: Ie3ee8f1d870b410cbea3236d2fa42ae035a67e0f
2017-11-24 02:36:53 -08:00
Yun Park
fd269b5021 qcacmn: Remove kernel includes from datapath
To abstract kernel header inclusion, create a new QDF APIs for all IPA
APIs and redirect all IPA API calls through QDF interfaces.

Change-Id: I7bff975ad7cb32fc128320c124633594471e0a1f
CRs-Fixed: 2098907
2017-11-11 19:25:09 -08:00
Kai Chen
a0affa4174 qcacmn: Fix the packet capture issue on AMSDU/AMPDU
There is issue on receive RAW( Not Decap) long packet
that cross one skb in monitor mode. This issue is seen
to capture AMSDU/AMPDU packet that is use more than
on SKB.

Change-Id: Ic50b316818925b1d327634abc103430d8dde9f36
2017-10-24 23:50:25 -07:00
Kai Chen
1374d4b101 qcacmn: Remove buffer allocation for holding amsdu llc header
Remove buffer allocation for holding amsdu llc header. The
next amsdu llc header is copied to the end of previous msdu
skb buffer.

Check if monitor vdev pointer is NULL on packet delivery
on monitor mode to avoid crash.

Change-Id: I61dc53900c34f34d8dccb2e8b71cbdf5e005f61e
2017-10-23 22:08:27 -07:00
Houston Hoffman
41b912cfff qcacmn: DP logging adjustments (1)
Adjust logging to reduce printing to the console by datapath.

Change-Id: I9354cf939a6edcf6cd6fc66dbeb4638b517f30da
CRs-Fixed: 2117150
2017-10-20 12:17:26 -07:00
psimha
eae1b41e33 qcacmn: Fix uninitialized access to rx desc pool lock
Add a check to prevent access to a uninitialized lock.
This occurs on the failure path of pdev attach.

Change-Id: I8be9d7c97095a3ba96b6d1a8599ee2412eb8f5d6
CRs-Fixed: 2099448
2017-10-06 14:18:03 -07:00
Jeff Johnson
3f217e2a81 qcacmn: dp: Replace instances of unadorned %p
Replace instances of unadorned %p in dp.

Change-Id: I8d9c0f6efe5f03a582a36d7ff39a905a5de576a7
CRs-Fixed: 2111274
2017-09-28 04:48:10 -07:00