PATCH[6/7]:
This patch consists following changes:
-Move monitor related pdev variables to struct dp_mon_pdev
-Move monitor relted soc variables to struct dp_mon_soc
-Move cookie to monitor link desc va to monitor file
-Add APIs to access monitor related variables
-Add dummy APIs to build without monitor support.
Change-Id: I032a480b1383d061f984cee3ba6b10ac7a0ff350
CRs-Fixed: 2983781
skb_set_len and skb_pull operations are done in both
dp_rx_deliver_to_pkt_capture_no_peer and
dp_rx_deliver_to_stack_no_peer. Due to this, in the
issue scenario, EAPOL frame gets dropped in roaming
scenario since qdf_nbuf_is_ipv4_eapol_pkt returns
false.
Fix is to do a skb_push_head operation in
dp_rx_deliver_to_pkt_capture_no_peer API before
exiting.
Change-Id: I071a5248f9f8577c8a21547f67ec53d707dee0be
CRs-Fixed: 2982188
Currently, no NULL check is made for the value of dp_pev.
Adding a NULL check to avoid NULL dereference.
Change-Id: I2712b7e2fd53ba3a346878e73d2eedac161c5935
CRs-Fixed: 2955365
Revert "qcacmn: drop duplicated EAP frames from REO exception path",
allow all EAP frame delivering to stack including retried ones.
Change-Id: I73733841c1feb21d5b5fd160856a8fe9c21168fc
CRs-Fixed: 2959701
Refactor FISA packet history to not access "struct rx_pkt_tlvs". This is
because this structure may be different for Li and BE chips and should
not be accessed directly and only via hal_soc->ops in common code.
CRs-Fixed: 2888556
Change-Id: I0d9f2785a81c130a2dc506020a02ee5581c0bbd3
Implement core DP rx processing to functions in to corresponding
architecture specific be/li rx files. Keep common utility functions
in DP common files.
Change-Id: I40083e10772fd2b6ce2f1fa9e197f2ad92d0522a
CRs-Fixed: 2891021
Optimize refill buffer pool feature code to be
light weight on CPU, so that refill thread will
consume less CPU resources and also replenishing
RX buffers will be done faster.
Change-Id: I849ca60558c6197003d95e7d54fdb5f837cdc217
CRs-Fixed: 2950166
While Rx buffers are getting umapped from net rx context if IPA
pipes are enabled at same time from MC thread context this is
leading to race condition and IPA map/unmap is going out of sync.
To fix this introducing IPA mapping lock and IPA mapping need to
be handled with lock held.
Change-Id: I9fa71bdb6d4e4aa93fc795cc5dd472a181325991
CRs-Fixed: 2945063
Drop non-EAPOL frames from unauthorized peer in security mode.
Enabling this feature by default with this change.
Change-Id: I9878b37088149e34f456a38a9c0f722e4c5ee49a
CRs-Fixed: 2943789
In monitor mode, when the channel is set to any 2G band channel
the mac_id passed to dp_mon_process API is 1. As part of
dp_rx_buffers_replenish, refill history is logged and the
mac_id is used to index into the history array. The array is
of size 1 and OOB access would happen when ring_num which
is the mac_id, passed in is 1.
Fix is to pass the pdev->lmac_id instead to
dp_rx_refill_ring_record_entry and add ring_num sanity check.
Change-Id: Id824ec8b01e7923ad74771d5f34a25f5fccb65f3
CRs-Fixed: 2939544
Add support for Rx refill ring history, maintain records of refill info
during RXDMA ring replenish.
Change-Id: I034014eacfc510ec6f416fca601fa864326de9c2
CRs-Fixed: 2930005
When a msdu scattered across multiple nbufs is received
in REO2SW ring and the remaining nbufs are not yet
available in the ring, loop in dp_rx_process is exited
without resetting the invalid bit in the ring desc cookie.
This will result in an incorrect assertion failure when
the same entry is processed the next time.
Fix is to reset the invalid bit in ring desc cookie
when the loop is exited in the above msdu scattered
scenario.
Change-Id: Ie5cfa1fb8ea1db4b7a0a4837545ecbfdfbb8719a
CRs-Fixed: 2916296
MSDU with len 1654 is received in the REO2SW ring and
the total len of the pkt would be 1654 + 392 (pkt tlvs)
+ 2 (l2 hdr padding) = 2048bytes. The nbuf len sanity
checks for strictly less than 2048 bytes which results
in the assertion failure.
Fix is to add the equal case when validating the
nbuf len.
Change-Id: I7e5d1df10339c8d7908a12001c2322028965a8fe
CRs-Fixed: 2916351
Buffers replenished post processing entries in the
REO2TCL ring do not have ipa smmu mappings created
when RX_PREALLOC_BUFFER_POOL feature is disabled.
This will result in SMMU fault when IPA HW accesses
such replenished buffers.
Fix is to create IPA SMMU mapping for replenished buffers
when RX_PREALLOC_BUFFER_POOL feature is disabled as well.
Change-Id: I0fe611a1279b91a3e45bc269348e05de9015d596
CRs-Fixed: 2915686
Currently, we break the dp_rx_process() reap loop when we encounter
a ring descriptor with invalid bit set in SW cookie. If the HW
has copied old/stale entries in the ring, then we will end up
processing the same entry every time we try to reap the ring.
Instead, assert on processing such invalid entries so that
we can obtain useful debug information.
CRs-Fixed: 2904509
Change-Id: Iddde959a573ddf4ca364e1fb7a54ed0eaf4dc169
The bridge forwards the multicast packets to all the
interfaces attached the bridge.
When the STA network interface receives such packets
from bridge and send it to the AP, it is echoed back
from the BSS.
These packets are not intended for the bridge as it
will lead to looping.
Add a check to detect and drop such packets when
received back from the BSS.
Refactor dp_rx_mcast_echo_check function to fix
compilation errors from the above change.
CRs-Fixed: 2894272
Change-Id: I3f9e92c3598af11d3ff4e6b9b8afbc4110a926fc
Check if Rx single msdu length including padding and tlvs length
is greater than Rx buffer size allocated to H.W and raise error
to catch out of bound access.
Change-Id: I7c70b8a0b6828f7fd88a19141f9087430085c13a
CRs-Fixed: 2873933
Avoid per packet Rx refill buff pool lock, instead
acquire/release lock for burst of nbuf's replenishment.
Change-Id: I778cb9702d31d4b8911cca4e7f06f12c50ef6df9
CRs-Fixed: 2884208
Refactor WLAN_FEATURE_PKT_CAPTURE_LITHIUM to WLAN_FEATURE_PKT_CAPTURE_V2
to remove hardware name from compilation flag.
Change-Id: I5a30b33d8bd6065d12e7c89c666c2f0cab66344e
CRs-Fixed: 2869827
Add and initialize a preallocated pool of buffers which can
be used to replenish RX buffers. During replenish, the buffers
from the pool are used instead of allocating/mapping a new buffer
in the softirq context. This preallocated pool will be refilled
in thread context.
Change-Id: Idf3bd7d25c5d57ddba105ccd8fab672c26a184f1
CRs-Fixed: 2869345
The memory below 0x2000 is reserved for the target use,
so any memory in this region should not used by host.
But on some third-party platforms, we observe such
memory is allocated for RX buffer, which cause HW/FW
NOC error, then RX is stuck. To address this,
re-allocate RX buffers when small buffer appear.
Change-Id: Iad118e82f3fe10f92cbf5f7388dc0960542fc03c
CRs-Fixed: 2707190
Add support to process RX offload packets in packet capture mode.
To distinguish rx offload packets from normal rx packets,
DP_PEER_METADATA_OFFLOAD bit is set in peer metadata, based on value
of this bit rx packet is delivered to stack or packet capture
component.
Change-Id: Ice656a0bc14efd0382c4949d695daa8e926ce41e
CRs-Fixed: 2856792
In security mode, allow only EAPOL frames in receive path
when peer is not authorized. This feature is enabled per VAP
based on vdev flag and will be applicable for all peers in that
VAP
Change-Id: Ic5dea09c2083f31e8cd301a0cdc3565f247b735c
rx_ring_history is an array of pointers, address of pointer is
always a non-NULL value, this always passed the NULL check,
which leads to NULL pointer dereference, fixing the same.
Change-Id: I401203a6f2a5930869cf4002ac0e714d3fdba62f
CRs-Fixed: 2844038
Low memory profiles like 256M and 16M profiles support
only NSS Wi-Fi offload mode and HOST data path APIs are
not used in NSS offload mode
Disable HOST data path APIs which are not used in both
NSS Wi-Fi offload mode and in HOST mode (in NSS offload mode)
CRs-Fixed: 2831478
Change-Id: I6895054a6c96bd446c2df7761ce65feef662a3cc
In HKv1, if smart monitor mode is enabled on RE,
we are getting invalid peer frames with RA as STA
mac of RE and the TA not matching with any NAC list
or the the BSSID.Such frames need to dropped in order
to avoid HM_WDS false addition.
Change-Id: If641052c3f0ac5ce49afcc52062462d8b7eaa0e6
If a continuation bit is set in msdu desc info and reported
length can fit in single buffer avoid SG processing
Change-Id: I6e8c3e1e657c372d5d915450dda20ba26bac495f
Get reo destination indication from REO2SW ring descriptor,
store it to qdf_nbuf_cb of skb.
Change-Id: I5a4c504b2550229a77a435b1f5ddb78c4abe51aa
CRs-Fixed: 2809080
Assertion when detecting rx desc nbuf sanity check failure to get more
info in the RX refill buffer ring for default version.
Change-Id: I8d0255e2f13e2b993f5651b788f895ea06187bf9
CRs-Fixed: 2800602
rssi value is always zero when retrieved from tlv header.
so added war to populate rssi value from stored value
of peer instead.
Change-Id: I6d5127438dae1f3891e3e78c97be93b79b4ee128
1. Register peer->osif_peer for per-STA netdevice delivery.
2. Wi-Fi 3-address frame packets received would be processed
through AP netdevice.
3. Wi-Fi 4-address frame packets received would be processed
through per-STA netdevice.
Change-Id: I102874ea1de9fba40ab7f0e2c32c9de1c9b4d075
1. Add flag to support hlos id override feature in dp vdev
2. Update tid from nbuf->priority in dp_tx_send
3. Update tid to nbuf->priority in dp_rx_process
Change-Id: I66e8d77733a667f3f60b77e0d7bb444f7c5ad93d
Add debug support for VDEV refcount to take
refcount by module id and decrement corresponding
refcount with same module id
Change-Id: I15c075816994ba70155fefbc0bce208b20fb9a59
Add new API dp_vdev_get_ref_by_id() which will return vdev
pointer by holding a reference. Caller of this API has
to ensure that this reference is released by calling
dp_vdev_unref_delete() API
New lock soc->vdev_map_lock is introduced to protect
vdev id to object array
Change-Id: I883e328932e35ef31254125492dbae20cebe0e00
Remove the peer backpointer in ast entry and store
peer_id instead
Assign peer_id in AST entry in AST MAP event,
also add the ast entry to peers ast list
In AST map & AST unmap APIs use ast find by vdev_id
Change-Id: I74d9828dc309149d98f6f577b5c8304cb087fd76
Add support to get the peer reference with module id
To help debug the peer reference related issues
Change-Id: Ie20c7e710b9784b52f2e0f3d7488509282528a00