Commit Graph

2258 Commits

Author SHA1 Message Date
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
Ruben Columbus
e141cea9cc qca-wifi: fix on ppdu_info mem error
Fix mem error by collecting bitmap from mppdu_info before mpdu_info is
free.

Change-Id: I5a8aa1975dd868b60ece6e26f9e74bd7d1a5c2af
2021-02-23 14:30:06 -08:00
Ruben Columbus
3fe93eb170 qca-wifi: filter out frames with tlv miss
using if statement to filter out the frames that might not need to be
counted for stats purposes. this include frames that come in with a
missing tlv.

Change-Id: I828f27cda89934591c4daed9f80dc0794a82833d
2021-02-17 10:25:13 -08:00
Kai Chen
e211b632c0 qcacmn: Use tsft timestamp for CBF in pktlog
Use tsft timer time stamp in HTT STATS IND header for
management TLV of CBF record since pktlog parser use
tsf time stamp in the ptklog record as packet receive
and transmit time.

Change-Id: I9643df11c0f9aa158f7b94e4b2083531044bcf66
2021-02-16 19:16:05 -08:00
Pavankumar Nandeshwar
4ae78ae165 qcacmn: Update the vdev id while updating the ast entry
In client roaming scenarios, when the ast entry is
updated, make sure the ast entry is updated with
new vdev id.

Change-Id: I0bd5235eeb28909cabe48f577d4477789d7be9e8
2021-02-16 17:02:41 -08:00
Linux Build Service Account
2ab342665b Merge "qca-wifi: update sequence number only on valid" 2021-02-16 02:07:42 -08:00
nobelj
5144f963ef qcacmn: Added field to get valid sequence number
sequence number populated from tlv are incorrect for some frames.
Firmware populate correct sequence number for management and control
frame either in payload or tlv itself.

added field to get valid sequence number.

Change-Id: I21b1c34c0d66cb46c3a0baaaa231c952de065534
2021-02-15 22:33:03 -08:00
Karthik Kantamneni
143de06652 qcacmn: Add support to handle OOR error on WBM ring
Add support to handle regular OOR frame error received on WBM ring

Change-Id: Ib290c4911e969debbf482f9495cab83a744f69d7
CRs-Fixed: 2876270
2021-02-15 06:21:32 -08:00
nobelj
8e0ed224dc qca-wifi: Add new WDI event index for tx capture
added new WDI event index for tx capture, share same index cause
corruption when switching different feature without delay.

Change-Id: I392ddbf61ed6384a84e5d7f2ffd06701a68a24b7
2021-02-12 13:13:34 -08:00
Linux Build Service Account
28cf48d39d Merge "qca-wifi: fix update bitmap for end of window" 2021-02-12 04:07:32 -08:00
Vulupala Shashank Reddy
1065dc8179 qcacmn: Refactor compilation flag of pkt capture mode
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
2021-02-11 00:24:33 -08:00
Kai Chen
2667f112d8 qcacmn: Add CBF support for pktlog
Fix issue on enabling packet log.
Fix issue on logging CBF pkt in AP/STA mode.
Fix issue on setting data length 4 bytes aligned in pktlog header
, htt stats indication message header and Rx management TLV header.
Add CBF support for pktlog WMI enable command for firmware to enable
CBF receive.

Change-Id: Ib0067f32d7414be96503c4c67846c1312a59586e
2021-02-10 20:27:29 -08:00
Linux Build Service Account
4527df8b52 Merge "qca-wifi: TxCapture: Fix OOB access of tid array" 2021-02-10 08:43:46 -08:00
Linux Build Service Account
b9c5acecbb Merge "qca-wifi: skip MEC ast entry creation in wlan fw" 2021-02-10 00:11:00 -08:00
nobelj
fb74c3cff8 qca-wifi: update sequence number only on valid
sequence number populated from tlv are incorrect for some frames.
Firmware populate correct sequence number for management and control
frame either in payload or tlv itself.
update the sequence number field only if it is valid.

Change-Id: I66681ebd2bda326a7c05e8af5635d02bc4ae818a
2021-02-09 20:10:24 -08:00