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
The DMA Map/Unmap was restricted to buffer size in rx process.
But the Unmap API was not changed when free nbuf in rx desc,
apply the new unmap API.
Change-Id: Id10d746776aa9e41ef3425e166ba0207851358d6
CRs-Fixed: 2716690
Due to changes in datapath init/deinit path, mon_lock spinlock was not
getting created. Create mon_lock spinlock during
dp_rx_pdev_mon_cmn_desc_pool_init.
Add null check to validate rx_tlv_header before calling
hal_rx_mpdu_start_tlv_tag_valid.
Change-Id: I41c781de29f2c8c05ec1bfa90f9c8f742f2539bf
CRs-Fixed: 2693687
Do a logical split of dp_soc_attach and
dp_pdev_attach into Allocation and initialization
and dp_soc_detach and dp_pdev_detach into
de-initialization and free routines
Change-Id: I23bdca0ca86db42a4d0b2554cd60d99bb207a647
Split dp_rx_pdev_attach into dp_rx_pdev_desc_pool_alloc,
dp_rx_pdev_desc_pool_init, dp_rx_pdev_buffers_alloc and
dp_rx_pdev_detach into dp_rx_pdev_desc_pool_free, dp_rx
_pdev_desc_pool_deinit, dp_rx_pdev_buffers_free APIs
This split is made because dp_pdev_init is introduced
as part of this FR and these APIs will be called from
dp_pdev_init/dp_pdev_deinit or dp_pdev_attach/dp_pdev_
detach accordingly to maintain the symmetry to DP init
and deinit path
Change-Id: Ib543ddae90b90f4706004080b1f2b7d0e5cfbfbc
CRs-Fixed: 2663595
Split dp_mon_link_desc_pool_setup to alloc and init APIs and
dp_mon_link_desc_pool_cleanup to deinit and free APIs
This split is made because dp_pdev_init is introduced
as part of this FR and these APIs will be called from
dp_pdev_init/dp_pdev_deinit or dp_pdev_attach/dp_pdev_
detach accordingly to maintain the symmetry to DP init
and deinit path
Change-Id: I36b2a98bd317010124916e0b2779938eba3883ea
CRs-Fixed: 2663595
Enable monitor destination ring interrupt to fix
packet is getting stuck in monitor mode.
Fix and add monitor mode debug count
Change-Id: I74efdcf6a4373dd73e373285c8cd3aa5757cd0b2
In monitor mode, the link descriptor return failure
can occur many times, due to the timer interval.
Logging each failure on the console floods it with
too many unnecessary logs.
Ratelimit the link descriptor return failure in monitor
mode and also change its log level to info.
Change-Id: I5709a33087c6d9271d4246f04ef1acd274fba0f1
CRs-Fixed: 2650480
In mon dest ring, for m_copy mode, MGMT packets are received with
FCS error.Due to which multiple skbs (Head_skb with
attached frag_list) for single MPDU are sent to upper stack.
Add fix to drop FCS error frames in mcopy mode.
Change-Id: I6fbf2ea2bfdc489b56a412ece3c644ba2ce87929
Pointer rx_msdu_link_desc returned from call to function
dp_rx_cookie_2_mon_link_desc which may be NULL and may be
de-referenced latter
CR-Fixed: 2645199
Change-Id: I9ccba61df9571fcc99c5d5493194d5ae43a71a7f
Add following changes:
a. Add CDP API to config full monitor mode
b. HTT configuration changes
c. Init/Deinit changes for full monitor mode resources
CRs-Fixed: 2632442
Change-Id: I06db5194031b3ea0f0c1e5deda20df4bc0faa0b9
pdev_id is being initialized with 0. Since 0 is valid pdev_id, though
pdev is not present for that id, it is being accessed.
Initialized pdev_id to 0xFF by default. Added checks on API to
detect valid pdev_id value corresponding to lmac_id
Change-Id: I2b2a38783615494ccc08e265702815f7e562214b
Fix the issue on block ACK on response to BAR frame.
Parse BAR frame received from monitor destination ring and
generate block ack frame from BAR frame and previous block
ACK frame.
Change-Id: Ifc242b3850630aa25827b003a1e2078a9228358a
Move dp monitor inline APIs to header file from dp_rx_mon_dest.c
to dp_rx_mon.h to use it in component dev
CRs-Fixed: 2626054
Change-Id: I3a31dacd7d7e817f144708f9bda5536808080864
Intercept monitor destination path for NDPA frames,
use it to generate noack frames for tx capture.
Change-Id: Ia54196bd84729a7863954b6deec7e02b52f23556
CRs-Fixed: 2605672
For qcn9000, As part HW enhancements, PPDU_ID is sent
in reo_entrance_ring descriptor instead of RX_MPDU_START
tlv. Add support to read ppdu id from descriptor.
Modify existing hal API hal_rx_hw_desc_get_ppduid_get ()
arguments to pass RxDMA ring HW descriptor.
Usage:
a. Use hal_rx_hw_desc_get_ppduid_get () -
to get ppdu id from rx_tlv_hdr or hw descriptor based on target.
for qcn9000, this API gets ppdu_id from HW descriptor,
for other platforms, gets ppdu_id from rx_tv_hdr
b. Use hal_rx_get_ppdu_id () - to get ppdu_id from rx_tlv_hdr
Change-Id: I5838227c12cde50cbb2a9da7a0d8056b8b9b7ef5
Add a framework to configure varying buffer size for both data and monitor
buffers.
For example, with this framework, the user can configure 2K SKB for Data
buffers, monitor status rings, monitor descriptor rings, monitor
destination rings and 4K SKB for monitor buffers through compile time.
Change-Id: I212d04ff6907e71e9c80b69834aa07ecc6db4d2e
CRs-Fixed: 2604646
Add the datapath changes for supporting
the newly added IPCI bus type for QCA6750
CRs-Fixed: 2597326
Change-Id: I27e3e9f746eb383e85c7345150bda03320d041b9
1. Move all LMAC rings to SOC from pDEV
2. Dynamically obtain lmac->pdev mapping while handling LMAC interrupts
Change-Id: Ib017d49243405b62fc34099c01a2b898b25341d0
Add monitor mode support to capture packets over 6GHz frequencies by
getting capture frequency from pdev.
Change freq type to qdf_freq_t.
Change-Id: I7b6edc43e254dc98a3c2939c369874bec9d16ddd
CRs-Fixed: 2568970
Link descriptor were getting freed by the pointer
of the previous freed link descriptor. This patch
fixes by copying the address of the current in a
local descriptor info and using it to free the
current.
Change-Id: I95e137ba5b1f0ad21b0e6fb39f6671e1d5b65ba6
CRs-Fixed: 2577624
Degrade log level from ERROR to INFO_HIGH to prevent excessive
logging into dmesg console.
Change-Id: Ic0ef72cf2564ed2354b3db4d6e09e7ac7c832560
CRs-Fixed: 2582400
Head_pointer == Tail_pointer is treated as ring empty and
Tail_pointer + 1 == head_pointer is treated as ring full,
hence replenish count should be num_entries-1 to avoid
buffer ring treated as empty or full.
Change-Id: I157834a86380bcd2f03679510357ad3ca5550374
CRs-Fixed: 2569491
Add the following support for QCA6490:
1. Initialize the qca6490_hal_hw_txrx_ops
2. Initialize the hw_srng_table
3. Attach hal_qca6490_attach
Change-Id: Ic53c520ef804eb4fbe1434c704e9040c83011d3d
CRs-Fixed: 2522133
Implement hal_rx_hw_desc_get_ppduid API based
on the chipset as the macro to retrieve
ppduid value is chipset dependent.
Change-Id: I7d3457d731ea486f04367f98f9f18d3f1c0fcfd7
CRs-Fixed: 2522133
Implement hal_rx_msdu_end_l3_hdr_padding_get API
based on the chipset as the macro to retrieve
sa_idx value is chipset dependent.
Change-Id: Ice1fc2d70e339dc1d80fa6f34f37c5a7aa074be5
CRs-Fixed: 2522133
Implement hal_rx_desc_is_first_msdu API
based on the chipset as the macro to
retrieve first_msdu bit value is chipset
dependent.
Change-Id: I8e8a3aceb225b591b96e6f8453ffbebf1f78e529
CRs-Fixed: 2522133
In the sdx platform, WLAN monitor mode is disabed,
in other words, CONFIG_FEATURE_MONITOR_MODE_SUPPORT
will be set to n, but dp_mon_buf_delayed_replenish
hasn't be defineded if it set to n, which can cause the
runtime unknown symbol issue. So add the definition
for it.
Change-Id: Iec50f7cc5ed6f94e2f5a40fbc6594c2830d1359f
mac_id is used to get rx_desc_pool for monitor ring and mac_for_pdev is
used for srng for monitor buf. Use appropriate id to get correct
combination of hw ring and sw desc for monitor rings.
Change-Id: I7e4467e9568056e55cbabfef8f97ce94ad9c1b1c
CRs-Fixed: 2512292
Map mac_for_pdev appropriately for both MCL & WIN,
since MCL have multiple monitor buffer rings and
WIN just has one mon buffer ring, below API helps
identify accurate monitor buffer ring for both cases
CRs-Fixed: 2502051
Change-Id: I3929f3f7717d795850a41f4148397d87b0415118
Tags are programmed using wlanconfig commands. Rx IPv4/v6
TCP/UDP packets matching a 5-tuple are tagged using HawkeyeV2 hardware.
Tags are populated in the skb->cb in the REO/exception/monitor data
path and sent to upper stack
CRs-Fixed: 2502311
Change-Id: I7c999e75fab43b6ecb6f9d9fd4b0351f0b9cfda8
Add code to replace usage of void pointers from
HAL layer and instead use appropriate opaque pointers
Change-Id: Id950bd9130a99014305738937aed736cf0144aca
CRs-Fixed: 2487250
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
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
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
Size of rx_pkt_hdr tlv structure is used to check if there is enough
space in the SKB to add radiotap header.
The issue is seen due to a single SKB can hold the multiple TLVs and
the next subsequent SKB has the data. In this case, there is no headroom
available in the second SKB. Therefore crash seen while adding the
radiotap header in the second SKB.
To fix this issue, check if the SKB has enough headroom space. If not,
drop the frame.
Change-Id: Icd11f946c0aee974dde2ef21f59cfe3d8b87fa5d
CRs-Fixed: 2480719
destination ring MPDU processing is stuck because ppdu id is
not sync between monitor status ring and monitor destination ring.
Add logic to detect destination ring process stuck and jump over
destination ring stuck entry.
Change-Id: I17d9b5fba06a28239ec64d864ae7944ae04a7dae
The channel number is always 0 from HAL RX PPDU TLV, then monitor
mode frames radiotap channel frequency is always 2407, get the
correct channel number that we saved when set monitor channel.
Change-Id: Ib927fe9aca3a4c1f98845fe37c9b1d37d1d6cf5a
CRs-Fixed: 2471161
Currently the failure in dp_rx_pdev_mon_attach, during
dp_pdev_attach_wifi3, does not cleanup the rx buffers
and hence that memory is leaked.
Follow the proper cleanup sequence to avoid leaking
the rx buffer memory.
CRs-Fixed: 2451982
Change-Id: Idef308e11c46fe3e7ae9199a6fcf05ca83210b6b
In case of duplicated rx descriptors from hardware,
it will hit issues in __dma_inv_range(), __qdf_nbuf_unmap_single.
Detect the duplicates, skip processing them, drop the mpdu.
CRs-Fixed: 2413816
Change-Id: I7efd4b0c1bda5578578927bb22fe9d487758897d
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
Track PPDU Id history from monitor status and destination
rings, and display as part of monitor stats.
Change-Id: I7b8985f93b1cdb6eb5210bba5a65e9bfb617a710
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
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
Compiler threw error 'defined but not used [-Werror=unused-function]'
when macro DISABLE_MON_CONFIG defined.
Wrap those functions by DISABLE_MON_CONFIG, which used only
within DISABLE_MON_CONFIG.
Change-Id: Idd92b9c481d580a6ca3df39963fa98e11d9d0753
CRs-Fixed: 2418584