Commit Graph

2272 Commits

Author SHA1 Message Date
nobelj
20a3940590 qcacmn: Add fix to support proxy arp function call
a call to osif_proxy_arp need to be invoked inside UMAC_SUPPORT_PROXY_ARP
as it was protected under build macro UMAC_SUPPORT_PROXY_ARP.

Change-Id: I6e165a328ac65fb659cb9fbc3a0ce39fcbb6744b
2021-04-14 18:08:30 -07:00
Harsh Kumar Bijlani
02fbfe0c0a qcacmn: Fix double nbuf unmap error for Pine
When nbuf map-unmap debug is enabled and monitor vap is created on
Pine, then double nbuf unmap error is reported.
This is because in case of Pine, first monitor destination ring is
processed, then first buffer from monitor status ring is processed
to check for ppdu_id difference and then finally monitor status ring
is processed where the same buffer is unmapped again and thus resulting
in the issue.
Add fix to resolve the same.

Change-Id: Ic20b2ead8ef345c4ff568242544d5f69e83fcfdf
2021-04-14 18:08:26 -07:00
Nisha Menon
ab30ba1267 qcacmn: Unmapped IPA buffer results in smmu fault
Check the return status of the IPA api that creates or
releases the smmu mappings of the tx/rx buffers. If the
api returns a failure then assert.

Change-Id: I755765c7c35c901341279eefbc8087d0dce0494c
CRs-Fixed: 2898353
2021-04-13 18:54:00 -07:00
Mohit Khanna
9f35babf04 qcacmn: Set LRO hash keys based on PDEV flag
Currently dp_lro_hash_setup is being done in dp_vdev_attach_wifi3 when
pdev->vdev_count==1. However, this counter is not getting decremented and
may overflow on repeated VDEV attach/detach calls. This may result in
LRO keys being programmed again.
Use a PDEV flag to determine whether to configure LRO or not. Fix
pdev->vdev_count by decrementing it during VDEV detach.

Change-Id: I03cba0d95c30831fbe8047828f7bb2cf4a869213
CRs-Fixed: 2906871
2021-04-13 16:44:03 -07:00
Mohit Khanna
759a7573ed qcacmn: Add structures for FISA pkt history
Add DP data structures to add history in FISA aggregation path.

Change-Id: I2feb2d9fdef8f78f6cbfaf847c199580ceab9887
CRs-Fixed: 2912971
2021-04-13 16:43:59 -07:00
Nisha Menon
5d7e26e27f qcacmn: Dump the rx reo queue descs in ddr
Add iwpriv option 34 to dump the reo rx h/w descs
in DDR for debugging. This cmd will first send cache
flush cmd to REO for all rx tids and invalidate the h/w
cache. Henceforth ensuring that the reo status tlvs and
the DDR values are in sync.
iwpriv wlan0 txrx_stats 34 0
Add fix to ensure bar frame with 2k jump err code is
processed correctly using the REO error code instead of the
REO push reason.

Change-Id: Ia05be668343f3a5d4b3262b8d6a367a50875add5
CRs-Fixed: 2895965
2021-04-13 14:50:51 -07:00
Tiger Yu
f7f01e0c10 qcacmn: Add sanity checking before removing ase from soc AST hash table
Add sanity checking before removing the ase from soc AST hash table to
avoid potential stability issue if ase is not found in the table.

Change-Id: I97b756cd5bdb052b0ce797cca5d96c6bac8f844e
CRs-fixed: 2912024
2021-04-09 00:37:52 -07:00
Yeshwanth Sriram Guntuka
69e696c423 qcacmn: Reset the inv bit in ring desc cookie for jumbo pkts
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
2021-04-08 02:50:56 -07:00
Yeshwanth Sriram Guntuka
a5e6565dd6 qcacmn: Check for equal case in nbuf len sanity
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
2021-04-07 14:32:52 -07:00
Yeshwanth Sriram Guntuka
6512d66c27 qcacmn: Create IPA SMMU maps for host replenished bufs
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
2021-04-07 08:16:35 -07:00
Karthik Kantamneni
1759c5d6cb qcacmn: Rate limit excessive logs in WBM error path
Rate limit excessive logging prints in WBM error path

Change-Id: Ifb69959b78740bf4a0fca7b7611a2da0ef740413
CRs-Fixed: 2908240
2021-04-06 18:43:06 -07:00
Ruben Columbus
5708cdac6f qcacmn: remove preamble from peer delayed stats
delete copy preamble from ppdu_desc to peer in data type case.
this will give mu_bar preamble of a data frame instead of ctrl frame.

this will not affect tx_capture given that preamble is copied to
phy_type in ppdu_desc from ppdu_desc preamble itself.

this should fix issue with pulling information from ppdu descriptor by
having data frames with low mcs. mcs was correct but preamble gave
impression that frame was a data but it was a ctrl frame.

Change-Id: Id82e6eb98af0e9488227bff43fc77f188eee77e3
2021-03-31 19:06:27 -07:00
sandhu
30d75bfe8a qcacmn: Add Null check function pointer
Add NULL check for function pointer vdev->osif_proxy_arp .
Which is leading to a NULL pointer derefrence error.

Change-Id: I850d10da879231255970572487260e75fe2e3a78
CRs-Fixed: 2909911
2021-03-31 17:12:07 -07:00
Amir Patel
7efbf8cb35 qcacmn: Enable full monitor mode during vap up
Currently full monitor is enabled at vap create time and disabled
at vap deinit time, this results not configuring full monitor
mode during vap up time leading to backpressure on montor status ring.

To have symmetry, enable full monitor mode at during vap init.

Change-Id: I7828a7f2af400cfa094dc6d6139646760c932f09
2021-03-25 16:22:06 -07:00
Nandha Kishore Easwaran
bcc7d05422 qcacmn: Record PN and OOR error per peer
Record PN error and OOR error per peer and display the
error count in fc_peer_stats.

Change-Id: I694efbcaa280659f7a62f1343e26a196067cc524
2021-03-24 12:04:29 -07:00
Pavankumar Nandeshwar
f3998b3f1d Revert "qcacmn: Reset rxdma2host dst ring mask for ipq5018 target"
This reverts commit I513a78639898c6f2bd9ea5418def03d64d7232d0.

Change-Id: Ia5952dae9c08a2227b0f6369cfe652007df41919
2021-03-24 06:44:27 -07:00
Manikanta Pubbisetty
86e32fb122 qcacmn: assert on processing invalid RX ring descriptors
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
2021-03-24 06:44:23 -07:00
Ananya Gupta
6432642d91 qcacmn: rx desc sanity for reo error entry
Same cookie was provided in REO srng and REO exception
ring. As a result, NULL pointer dereference occurred in
dp_rx_reo_err_entry_process.
To fix this, adding nbuf paddr sanity check in
function dp_rx_reo_err_entry_process.

CRs-Fixed: 2892345
Change-Id: Ie359921d8a270a3428b8286792941e84b0c68425
2021-03-24 04:33:32 -07:00
Nitin Shetty
2c31ece247 qcacmn: adding peer_id check for MEC
adding peer_id check to MEC detection.

Change-Id: I717d65c4ba33feac2ac488548efe3fdf95598ca8
2021-03-24 02:12:26 -07:00
Karthik Kantamneni
09f1f1fe46 qcacmn: Fix IPA SMMU mapping issue for RX buffers from refill pool
Refill pool buffer IPA mapping is done during allocation time,
but in some cases where IPA pipes enable/disable happens in between
previous mapping is not valid which is causing SMMU fault from IPA module.

Fix this by moving IPA mapping before replenishing buffers to RXDMA ring.

Change-Id: Ie6c5eb791b6f832f311a6e89489aebef37094d8f
CRS-Fixed: 2901819
2021-03-23 23:43:33 -07:00
Jeevan Kukkalli
c3c6473b36 qcacmn: Set mon delayed replenish entries
Set monitor delayed replenish entries for target type
QCA5018/QCN6122

Change-Id: I2042dfd2b1ff975907d829e1f111daf40f0f8e3c
CRs-Fixed: 2888346
2021-03-23 23:43:29 -07:00
Radha Krishna Simha Jiguru
12f0091fad qcacmn: Do not account rx_desc_alloc fails for Rx packet error
Rx desc alloc failures foes not really reflect rx packet errors.
So rx desc alloc failures shall not be counted as packet errors

Change-Id: I85ed478bbb3af24ff680a338aca86d3b4548ad8d
2021-03-23 21:39:34 -07:00
Ruben Columbus
2216aa520b qcacmn: lock on queue
Adding lock for dp_txrx_ppdu_stats_handler given
that insertion and deletion happen in different cores.

Change-Id: Ic0102d615f02cbfed70acc1114a314426466638e
2021-03-18 13:47:18 -07:00
Subrat Dash
589ec44aa3 qcacmn: Fix compilation issues when WDS feature is enabled
Fix compilation issues when CONFIG_FEATURE_WDS flag is enabled.

CRs-Fixed: 2899655
Change-Id: I65fcee6269ad41918bc8e968532249a3e4a4ad35
2021-03-18 07:43:17 -07:00
Subrat Dash
ecb559ab6f qcacmn: Add check to discard multicast echo packets
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
2021-03-18 07:43:13 -07:00
Linux Build Service Account
f4729e7ebf Merge "qcacmn: Fix invalid nss value from Rx PPDU stats for 11g clients" 2021-03-15 16:38:24 -07:00
Neha Bisht
2a1614de67 qcacmn: Fix invalid nss value from Rx PPDU stats for 11g clients
Fix invalid value of nss coming from Rx PPDU stats for 11g clients

Change-Id: I433af84ba6579ee37fcaa718fff1b2e47987012e
2021-03-15 07:22:51 -07:00
Linux Build Service Account
614ad55e26 Merge "qcacmn: Fix memleaks in Rx refill buffer pool" 2021-03-15 06:12:08 -07:00
Karthik Kantamneni
ca0a3ae0ac qcacmn: Fix memleaks in Rx refill buffer pool
Rx refill lock is not in sync during deinit path causing
mem leak of refill buffers. Set the Rx refill lock during deinit path.

Change-Id: Ic7d07c0fcaae26f6a269afcba4d593be1d5eacad
CRs-Fixed: 2898006
2021-03-15 02:49:23 -07:00
Linux Build Service Account
d0de446be6 Merge /local/mnt/workspace/dharilak/git_history/src/qca-wifi-oss into wlan-cmn.driver.lnx.2.0
Change-Id: I483b74ee86ef648b9e75251097c33a18f9e0f884

* /local/mnt/workspace/dharilak/git_history/src/qca-wifi-oss: (1722 commits)
  Move files dp_txrx_wds.c/.h with history from qca-wifi-oss to CMN project
  qca-wifi: Filter to add AP channel report based on opclass
  qca-wifi: Handle memory leak and LOCK in dfs_precac
  qca-wifi: Add a dispatcher for reg_is_chan_disabled
  qca-wifi: TxCapture: Protect access to defer_msdu_q
  qca-wifi: Do not add 80MHz non DFS channels in precaclist
  qca-wifi: add fix for last set bit to update ba size
  qca-wifi: Move dfs_set_nol back to common code
  qca-wifi: fix on ppdu_info mem error
  qca-wifi: Add definitons for resource profile APIs
  qca-wifi: Command to configure max auth failure packets
  qca-wifi: Add lock for EXTAP table
  qca-wifi: Remove IEEE80211_PARAM_EXT_IFACEUP_ACS
  qca-wifi: Add command to configure scheduler watchdog timeout
  qca-wifi: filter out frames with tlv miss
  qca-wifi: Add new WDI event index for tx capture
  qca-wifi-oss : Start RCAC on 80MHz for 160MHz current operating width
  qca-wifi: update sequence number only on valid
  qca-wifi: fix update bitmap for end of window
  qca-wifi: TxCapture: Fix OOB access of tid array
  ...
2021-03-15 14:04:01 +05:30
Linux Build Service Account
8d43c6de3e Move files dp_txrx_wds.c/.h with history from qca-wifi-oss to CMN project
Change-Id: I28045bd5190af08dbd89cbd6a7b5dab254bc794c
2021-03-15 12:23:07 +05:30
Karthik Kantamneni
65b108ef77 qcacmn: Rate limit excess logs in Tx completion path
Rate limit excess logs in Tx descriptor completion path

Change-Id: I737e0e55c2032f89a002adb60fbb68932bef77e0
CRs-Fixed: 2893995
2021-03-13 03:36:10 -08:00
Linux Build Service Account
e3ca9a22ea Merge "qca-wifi: add fix for last set bit to update ba size" 2021-03-11 22:08:38 -08:00
Varsha Mishra
a2ac29d45c Revert "qcacmn: Handle EAPOL frames in wbm error ring"
This reverts commit I66df0b53a36d99b3e9d9000e0bd93bf7677c221d.

Change-Id: I42d01f330f45e07f95f7b45fe1aaf22fba19fbd9
2021-03-11 18:46:49 -08:00
Yeshwanth Sriram Guntuka
b23bcc8b6b qcacmn: Add support to reset SOC rx ext stats
Add CDP interface to support reset of soc rx ext stats.

Change-Id: I381f9b6b27d8d023b1932b7d8587df240c1ff4d0
CRs-Fixed: 2889565
2021-03-11 09:48:46 -08:00
Manikanta Pubbisetty
14d38b77fb qcacmn: disable EXT grp irqs and drain TXRX during suspend
Any update to the SRNG TP/HP when the device is in low power
state would result in system errors. It is recommended to disable
EXT grp irqs and drain TXRX before sending power save enter command
to the FW. This will ensure that no interrupts are received while
in power save mode and as a result there wont be any HP/TP updates.

Change-Id: Ibf952bbc2c6d13fb3e4ca6b4845bc9cc887fa694
CRs-Fixed: 2883135
2021-03-11 19:41:34 +05:30
Nisha Menon
ed3a77563a qcacmn: Add wbm head/tail pointer stats to dp_txrx_stats
Add wbm head/tail pointer stats to dp_txrx_stats and ring
usage percentage for all SRC and DST rings.
Stats added to the following cmd: iwpriv wlan0 txrx_stats 26 0

CRs-Fixed: 2865996
Change-Id: I7d144d87c5f3485ec9ba85f50b036b69a64e53c6
2021-03-11 18:01:27 +05:30
Aditya Kodukula
7679b0651a qcacmn: Add params to the wlan_minidump_remove function
For the minidump feature, the wlan_minidump_remove function
definition is modified. So, update the function parameters
accordingly at all instances of the wlan_minidump_remove function.

Change-Id: I5a346f6cdf423ece02fb08d68e4422251af54876
CRs-Fixed: 2860435
2021-03-09 21:07:01 -08:00
Basamma Yakkanahalli
4adab0e0a9 qcacmn: enable reo_status ring process in NSS offload mode
Add support to process reo_status rings in NSS offload mode
for lowmem profile.

Change-Id: If5aa3649f33fa8e1a9b328b8506dd398646d179c
2021-03-08 15:17:12 -08:00
Vevek Venkatesan
7cda609ffb qcacmn: assert if SMMU-S1 map/unmap of IPA doorbell addr failed
If the SMMU-S1 mapping/unmapping of IPA doorbell addresses
failed, do assert.

Change-Id: I41faba7002be37c442d306199876c2204120fe31
CRs-Fixed: 2892321
2021-03-06 23:57:54 -08:00
Karthik Kantamneni
f5fe106f3f qcacmn: Sanitize Rx buffer length received from H.W
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
2021-03-05 01:18:22 -08:00
Linux Build Service Account
4d9e508907 Merge "qca-wifi: TxCapture: Protect access to defer_msdu_q" 2021-03-04 08:12:32 -08:00
Amir Patel
6c6f067b65 qcacmn: Fix monitor link descriptor memory alloc failure
In existing approach, monitor rings get initalized
on monitor vap init time,
For linux 5.4 kernel, physical contiguous memory(512Kb) is not
available on vap init time.
Initialize monitor related rings on monitor vap creation time
to get required memory.

Change-Id: I288c27cfcf77b3d224c2f21bbe8ac65670f32dda
CRs-Fixed: 2865141
2021-03-03 00:49:09 -08:00
Chaithanya Garrepalli
76112c241f qcacmn: fix use after free of tx descriptor
In dp_tx_send_msdu_multiple API fix use after
free of tx_desc in case of HW enqueue failed

Change-Id: Iec0375e394c706fa0c39ee18728ac1c02090461c
2021-03-02 14:22:45 -08:00
Karthik Kantamneni
f93e080576 qcacmn: Rate limit tid not setup DP error log
There is possiblity of receiving fragmented packets just before
tid setup is done, so rate limit the tid not setup error log
to avoid excessive cosole logging.

Change-Id: I372d3904650fcbf2ad11313da1087da52a0d3dc6
CRs-Fixed: 2884897
2021-03-02 14:22:40 -08:00
Padma Raghunathan
f79c413026 qca-wifi: TxCapture: Protect access to defer_msdu_q
1. Address missing spinlock protection while trying to append
"msdu_comp_q" to "defer_msdu_q".

2. "qdf_nbuf_queue_append" attempts to access "two" lists -
reads "msdu_comp_q" and modifies "defer_msdu_q", hence it is
essential to acquire locks meant for both the lists.
	- Acquire "tid_lock" for "defer_msdu_q"
	- Acquire "tasklet_tid_lock" for "msdu_comp_q"

Change-Id: Ib84ff4dc4ec3efa08181bba5068e422450026943
2021-03-02 07:58:48 +05:30
Pavankumar Nandeshwar
cc26b39f01 qcacmn: skip current rx_desc when in_use bit is not set
As a software WAR for hardware issue where we are
getting wrong cookie value for a buffer which is already
mapped to another rx_desc with different cookie id and
is already has in_use bit set, we will skip the
processing for the current rx_desc when in_use bit
is not set.

Change-Id: I9f469bf1f4b03e0fb9a6694d9445a0c690224ccb
2021-02-28 23:52:12 -08:00
Karthik Kantamneni
c9cec76270 qcacmn: Avoid per packet Rx refill buffer pool lock
Avoid per packet Rx refill buff pool lock, instead
acquire/release lock for burst of nbuf's replenishment.

Change-Id: I778cb9702d31d4b8911cca4e7f06f12c50ef6df9
CRs-Fixed: 2884208
2021-02-25 23:21:25 -08:00
nobelj
4570ba437f qca-wifi: add fix for last set bit to update ba size
update last set bit after enqueue bitmap modified as ba size are updated
based on last set bit.

Change-Id: I56223b8b6ad67445de6d27080b20a34b256c592a
2021-02-24 11:33:58 -08:00
Basamma Yakkanahalli
5c02cbbc5e qcacmn: Reset rxdma2host dst ring mask for ipq5018 target
During interrupt mask initialization bitmap of rxdma2host
destination ring mask is filled in host mode.
To avoid spurious interrupts reset this interrupt mask
when NSS offload is enabled.

Change-Id: I513a78639898c6f2bd9ea5418def03d64d7232d0
2021-02-23 23:40:23 -08:00