Commit Graph

1772 Commits

Author SHA1 Message Date
Shivani Soni
e82dcc6541 qcacmn: HTT stats debugfs deinit from dp_pdev_detach
Deinit of HTT stats debugfs files from dp_pdev_detach to prevent
deleting of files after 'wifi".

CRs-Fixed: 2782235
Change-Id: I77d86225762063af16bc8c2b716ca834698f1520
2020-09-23 05:20:44 -07:00
Yeshwanth Sriram Guntuka
9c4530907a qcacmn: Adjust frag len in Mon mode considering l2 hdr offset
In Monitor mode, frag len is not adjusted taking l2 hdr
padding into consideration. This will result in inclusion
of l2 hdr padding length twice in skb len and would cause
skb expansion due to length exceeding 2048 bytes.

Fix is to adjust frag len taking l2 hdr padding into
consideration.

Change-Id: I31d57621bc71c51ff581a30adb654cd7b9448443
CRs-Fixed: 2781177
2020-09-22 00:43:04 -07:00
nobelj
9e4237dc34 qcacmn: Added WAR to populate rssi info
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
2020-09-21 16:55:55 -07:00
Jinwei Chen
18989f8ede qcacmn: support multiple pages prealloc for descriptor
Support multiple pages prealloc for DP descriptor

Change-Id: I66d4cef3acf69acf4b6fc8e5a6d01c3d67921dca
CRs-Fixed: 2751338
2020-09-21 01:33:16 -07:00
Varsha Mishra
ca0cf99f1d qcacmn: FR-64493 WDS Extended support
Use AST override feature to send out multicast packet in
4 address format. Pass per packet peer_id from osif layer.

Change-Id: Ic86120169c89e7972caa3cc8c967de72670314d0
CRs-Fixed: 2775051
2020-09-19 10:25:26 -07:00
Naga
71b1eaed3e qcacmn: Add stats support for wds ext peer
Add logic to exclude dp peer stats from
dp vdev stats if wds extended is enabled.

Change-Id: I1a5a1794e04f90877916f92b7f4216a525ce6cce
CRs-Fixed: 2778199
2020-09-19 10:25:22 -07:00
Varsha Mishra
c7789836fd qcacmn: Extended WDS solution RX
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
2020-09-19 10:25:18 -07:00
Nisha Menon
a8149aef8f qcacmn: Add qdf api to return data buffer len
Add qdf abstraction api to return the size of the skb
data buffer.

Change-Id: I469dc1cf6db9124b48e041a99a736097bece3f0f
CRs-Fixed: 2767763
2020-09-18 18:23:42 -07:00
Shivani Soni
f1392936e6 qcacmn: Reserve 128 bytes headroom in monitor status buffer
Reserve 128 bytes headroom for monitor status buffer
to accomadate feature specific radiotap header or any other info
in the headroom.

CRs-Fixed: 2775118
Change-Id: I2b1aba26e565b58c48a2e24ad17965aacd6b4526
2020-09-18 10:38:14 -07:00
Debasis Das
82de94ec39 qcacmn: Free cloned nbufs in error condition
While sending me packets, if failure is encountered
either while preparing tx desc or while enqueuing
to h/w,the cloned nbuf's must be freed.The unmap
must be done only if the failure is encountered
for all the me buffers.

Change-Id: I08dbae1fa1820b4fb31119f65e939aead829321b
2020-09-17 21:09:10 -07:00
Debasis Das
c1184913b7 qcacmn: Ensure nbuf count is less than no of segs
While preparing raw packets for transmission, the count
of nbuf belonging to one mpdu must be less than the
number of segments.This makes sure the frags array inside
seg_info does not go out of bounds.

Change-Id: I7fffba7f64da274aa73c558cfc63d90f4419a04d
2020-09-17 21:09:07 -07:00
Ankit Kumar
8528f1fc76 qcacmn: Add feature debug print for RX_MON_MEM_FRAG
Added debug print for RX_MON_MEM_FRAG feature enable
disable log.

Change-Id: Iaa8712755bd1f9a686ec32e2e22ffc1f41da48a6
2020-09-17 13:01:54 -07:00
Manikanta Pubbisetty
905d9e33fb qcacmn: add INI to place FST in CMEM
In addition to firmware capability, add INI param to decide FST
placement in CMEM.

Change-Id: Icc5fdfa49e35665b59efce3fc1f1855d84c16140
CRs-Fixed: 2778898
2020-09-17 10:18:38 -07:00
Manikanta Pubbisetty
b36165ae23 qcacmn: export CMEM FST firmware capability to DP
Firmware advertizes its support to place FST in CMEM,
export this capability to DP.

Change-Id: I265246bcfd38a36e34c4ede66e117a92bb185032
CRs-Fixed: 2772238
2020-09-17 10:18:34 -07:00
Manikanta Pubbisetty
2db8a92735 qcacmn: add FSE CMEM HTT response
CMEM FSE details like offset into CMEM where flow search table(FST)
is allocated and the size of the FST will be sent by the firmware
in response to FSE setup message. Adding the logic to parse the
response message and update the CMEM parameters in the SW FST.

Change-Id: Id1dd4b59be02c175da3fc6fcb5ed56e6f491133a
CRs-Fixed: 2771187
2020-09-17 10:18:19 -07:00
Manikanta Pubbisetty
059a6df613 qcacmn: add data structures to place FST in CMEM
Adding data structures required to place FST in CMEM.
CMEM is an on-chip memory in QCA6750.

Change-Id: I39d47d6f0514941497d41301643344ee3b2dad30
CRs-Fixed: 2771186
2020-09-17 10:18:16 -07:00
Yeshwanth Sriram Guntuka
fcdcc1005f qcacmn: Do not set pkt len to HTT_MAX_MSG_SIZE in PPDU ind handling
Skbs allocated for CE1 ring are of size 2048 bytes. On
receiving PPDU stats HTT message, skb is pulled for 8
bytes corresponding to the HTC header length. As part of
dp_ppdu_stats_ind_handler, skb len is set to HTT_MAX_MSG_SIZE.
In the case where skb allocation is exactly of 2048 bytes,
including HTC header length, the aforementioned set_len
causes the skb to be expanded due to lack of tailroom.
This causes the skb data pointer to be changed which results
in invalid memory access.

Fix is to remove the qdf_nbuf_set_pktlen as skb len is
appropriately set by HTC layer.

Change-Id: Ied68c30456dc0e263ccfd03102962233a0e43d9f
CRs-Fixed: 2777516
2020-09-17 00:21:57 -07:00
Ankit Kumar
bdddeb7c22 qcacmn: Add frame vdev id check in tx
Drop frame if it is not for the vap, to which
client is connected.
Enable this check only for ap.

Change-Id: I33d7eb79267490bdb8697e4e45f789e9f6279f0e
CRs-Fixed: 2756304
2020-09-16 09:30:33 -07:00
Debasis Das
26833e494d qcacmn: Unmap previously mapped frags in case of failure
While creating sg frames,if map fails for a fragment,
the previously mapped fragments must be unmapped.
Also, the nbuf mapping should happen for headlength.

Change-Id: I218efa60be7100a661da7bc3783fa25e5203a273
2020-09-16 04:51:55 -07:00
Chaithanya Garrepalli
be355211df qcacmn: initialize dp peer state lock before ast add
As DP peer state lock is used in add_ast API initialize
it before calling this API

Change-Id: I212449f6bd25b05241c35678f2d77f779f4fab4e
2020-09-16 02:33:17 -07:00
Debasis Das
721fccdad5 qcacmn: For me pkts, unmap buffer that holds dest mac
Before freeing me packets, the buffer holding the dest mac
address must be unmapped.

Change-Id: I551666efb0a17245d7d654cdf362a470410ceda4
2020-09-15 16:01:18 -07:00
Jia Ding
9f0246370d qcacmn: Do smmu unmap for IPA TX and RX doorbell registers
During driver initialization, IPA TX and RX doorbell registers
are provided to wlan as physical addresses. With SMMU S1 enabled,
they're mapped to IOVA of wlan domain.

On driver deinit path, do smmu unmap for the two IOVA addresses.

Change-Id: I85ef1c3e99bef504abf09eebf9ace760b68f35f1
CRs-Fixed: 2768303
2020-09-15 09:28:54 -07:00
Naga
c4cd90a9c4 qcacmn: FR-64492 WDS Extended support
- Added data structure for wds ext peer
- Enhanced DP peer structure to maintain
  wds ext peer data structure, which inturn
  maintain pointer to osif device.
- Enhanced DP vdev structure to maintain feature
  configuration, which will be updated during vdev
  creation when feature is flag is set at control
  psoc.
- Enhanced cdp_vdev_param_type and cdp_config_param_t
  to set wds ext configuration into DP vdev
- Enhanced cdp_cmn_ops structure and corresponding
  call back definitons to get peer id, which will
  be saved in osif private structure and to set
  wds ext peer rx.
- Enhanced cdp_ctrl_ops to send event to control
  path when 1st 4 address frame is received from
  backhaul.

Change-Id: Ide0ea54e7b2d480ad646fb84b6e4e3108930f986
CRs-Fixed: 2773492
2020-09-15 07:19:50 -07:00
Srinivas Girigowda
a104d7b453 qcacmn: dp: Remove redundant __func__ from the logs
The logging macros implicitly takes care of embedding function name
in the log, hence there is no need to include __func__ again.
Getting rid of redundant __func__ reduces driver memory footprint.

Change-Id: I26bfac840ac6732ac83fb008db8e1702996eb21e
CRs-Fixed: 2774457
2020-09-15 02:45:47 -07:00
Mainak Sen
6f892d8f22 qcacmn: Enable hlos tid override on STA VAP
Enable hlos tid override support on STA VAP
as required for EasyMesh.

Change-Id: Idef271c2459cdb58847313ae04f09917b1858031
2020-09-14 09:55:22 -07:00
Rakesh Pillai
c013de5747 qcacmn: Fix the identifier names for SWLM
The identifiers for SWLM are named incorrectly.
Fix these incorrect naming in SWLM.

Change-Id: I107c22df96c65997a349c0dc1a746e06f1c5b5fa
2020-09-11 16:17:46 -07:00
Chaithanya Garrepalli
3ac6dedea7 qcacmn: update peer reuse logic and add peer state lock
With new design, peer is deleted from hash table in
cdp_peer_delete. Hash table search in dp_peer_can_reuse
API at cdp_peer_create will always fail

Update the peer reuse logic to search from inactive list.

Insert peer to inactive list from cdp_peer_delete() and
in peer reuse case search in inactive list to get
peer.

Also add a new lock to protect peer state transition

Change-Id: I2e672fc4a9346c95d67716d437538dd0f96b2207
2020-09-11 13:55:42 -07:00
Ananya Gupta
f7771e45d8 qcacmn: Add NULL check for mem_info tx ring and rx refill ring of ipa
Currently, check is performed only on tx_comp_ring and rx_ready ring,
after getting the resource from soc in pdev.ipa_res.
Adding check for tx ring and rx refill ring as well.

Change-Id: I462073357bcd2b4a3f5e888d77d84621855f973c
CRs-Fixed: 2771401
2020-09-11 11:50:30 -07:00
Debasis Das
59d63401a5 qcacmn: Use next link_desc instead of msdu_count
MSDU count is not reliable in all cases.Hence it is better
to check whether next_link_desc is valid or not and then
free the MSDUs in the next descriptor and subsequently
release both the current and next link descriptor back to HW.

Change-Id: Ie5ea3be547f9aed6673293221f6b47661cd92cce
2020-09-11 11:50:20 -07:00
Ananya Gupta
34c53389f7 qcacmn: Remove check for ring_desc in dp_rx_defrag_store_fragment
ring_desc is being validated in dp_rx_err_process before passing
the ring_desc to dp_rx_defrag_store_fragment.
Hence removing the additional checks for ring_desc.

Change-Id: Ib863ea4d512075beed58f09ff6167aa2a556efea
CRs-Fixed: 2771408
2020-09-11 07:36:54 -07:00
Guisen Yang
1eaa090cf2 qcacmn: Fix compilation error
There's no declaration for API dp_peer_qos_stats_notify().
Define the API  as "static inline".

Change-Id: Id6769d680b3304cebf00b2348fb5b9a3bc9c7368
CRs-Fixed: 2773655
2020-09-11 01:32:25 -07:00
Manikanta Pubbisetty
90dea34ae2 qcacmn: add debug stats for REO ID mismatch
Add statistics if the packets of the flow are coming on
a different REO than the one configured. This would help
in debugging the race conditions where the packets of the
same flow arrive on different REO rings.

Change-Id: I73714c4ad64e00df06c72ac4ae5f7567adeab505
CRs-Fixed: 2771719
2020-09-10 23:19:31 -07:00
Ankit Kumar
30f857cb67 qcacmn: MCopy and lite monitor feature handling in case of frag
Add logic to handle mcopy and lite monitor feature
in case of frag.

Change-Id: I45fcbd22b1dcb1f68ee93a69f29fbac85cb0aafa
2020-09-10 21:00:55 -07:00
Harsh Kumar Bijlani
12c7f7a08b qcacmn: Change max headroom for monitor destination buffer
Macro MAX_MONITOR_HEADER is used to specify the max. headroom size for
different buffer rings. With the monitor frag feature, macro
DP_RX_MON_MAX_MONITOR_HEADER is required to specify the headroom size for
the monitor destination buffers as per the the approch being used.

Change-Id: Ic4c0132292008942d7d443235e5f54d7eaa77e74
CRs-Fixed: 2772048
2020-09-10 17:03:28 -07:00
Rakesh Pillai
08e5f5bf9d qcacmn: Add cdp API to enable/disable SWLM
Add CDP APIs to enable or disable the Software
latency manager.

Change-Id: I1ec182e97a245ec5848660fa912eebe83cfba2fc
CRs-Fixed: 2769030
2020-09-10 03:15:13 -07:00
Rakesh Pillai
02723d3bc2 qcacmn: Add INI support for SWLM
Add support to enable or disable the
Software latency manager via INI

Change-Id: I4acde4d5d2b9813de8f64f336d4b3b8c25e67b63
CRs-Fixed: 2769029
2020-09-10 01:04:39 -07:00
Rakesh Pillai
b6835a9413 qcacmn: Add support to dump SWLM stats
Add the support to print the software
latency manager statistics.

Change-Id: I7b6f77eefc6f4f800996dc868d41e7e0f7dd3331
CRs-Fixed: 2769020
2020-09-10 01:04:35 -07:00
Rakesh Pillai
156a7ecfc0 qcacmn: Coalesc the tx head pointer writes
Add the support to coalesc the tx head pointer
register writes to reduce the number of PCIe
writes.

Change-Id: I4fea22464c2bf6930bac42dab72c1c2fc5fa18e2
CRs-Fixed: 2769017
2020-09-10 01:04:25 -07:00
Rakesh Pillai
21af5ba8cf qcacmn: Add data structures for SWLM
Add the necessary data structures for the
software latency manager.

Change-Id: Ibf55f0eef7ee6602b007de39a28f09c4622bd356
CRs-Fixed: 2769004
2020-09-10 01:04:20 -07:00
Rakesh Pillai
4b6f9e082b qcacmn: Add CDP API to save low latency connection count
The 11g and 11a connections are latency critical and
hence the tx coalescing cannot be applied on traffic
running for these connections.

Add a CDP API to save the number of low latency
connection in the dtapath vdev handle. The Software
latency manager can use this information to decide
and skip the tx register write coalescing for packet
transmission on low latency connections.

Change-Id: Iff51867447e9d4537a3637cb65d94e184e4249ef
CRs-Fixed: 2769025
2020-09-10 01:04:15 -07:00
nobelj
a5219e6980 qcacmn: modify ppdu desc print log level
modify ppdu desc print that flooding the console

Change-Id: I30342dfade7967ac3bc7cb9740697fc09e4ade03
2020-09-09 14:03:55 -07:00
Guisen Yang
60b35027b2 qcacmn: Set the default value for variable 'ret'
The variable 'ret' in ‘__dp_ipa_tx_buf_smmu_mapping()’ maybe
used uninitialized. Set one default value for it.

CRs-Fixed: 2771822
Change-Id: Ibf4bf6aa2076de84b3a47122ff4f3cae055cd0f7
2020-09-09 01:45:23 -07:00
Neha Bisht
78efc5e526 qcacmn: Change log level of print in qos_stats_notify
Change log level of print from qdf_err to dp_err in
dp_peer_qos_stats_notify to avoid console flooding

Change-Id: I214942135826a6b94e6cf0b34b69d2c662a35e7b
2020-09-08 15:05:54 -07:00
Shivani Soni
7f1f32855a qcacmn: Initialize HTT stats debugfs in dp_pdev_post_attach
Initialize HTT stats debugfs in dp_pdev_post_attach

CRs-Fixed: 2771470
Change-Id: Ic9eb290c5b420ce6691e1afac7799f04a64168d4
2020-09-08 11:02:44 -07:00
Rakesh Pillai
97fb02b65a qcacmn: Fix the stale and invalid cookie logging
Currently the stale cookie and invalid cookie
counters are being logged inter-changeably.

Fix the logging for stale and invalid cookie counter.

Change-Id: I43346fe961ee750a3baa1bf8c2da2551fb06e973
CRs-Fixed: 2770877
2020-09-07 08:50:20 -07:00
Mainak Sen
60cdb2185c qcacmn: Hlos tid override support in dp vdev
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
2020-09-07 01:03:42 -07:00
phadiman
6510531b81 qcacmn: Remove dp_tx_pdev_detach API
dp_tx_pdev_detach API takes care of flushing
tx descriptors and multicast enhancement mem
cleanup

dp_pdev_deinit takes care of cleaning up the
above actions and dp_tx_pdev_detach is simply
a redundant piece of code

Hence remove dp_tx_pdev_detach API and call
dp_tx_desc_flush directly from dp_pdev_deinit

CRs-Fixed: 2769303
Change-Id: Ic798793e81eefc7dc905ca7552fdca13e9fddd8c
2020-09-05 10:27:22 -07:00
Jinwei Chen
b8a17e378b qcacmn: provide REO2SW1 ring as REO_DST option when IPA is enabled
Currently when IPA is enabled, all RX frames will be routed to IPA
ring REO2SW4 by default, there is no REO2HOST option. once IPA RX/TX
is slow, then likely will give RX back pressure to wlan RXDMA. per
FW feature request, when IPA RX is slow or stuck, route RX frames to
wlan host to mitigate issue, thus provide REO2SW1 ring as REO_DST
option into HWIO_REO_R0_DESTINATION_RING_CTRL_IX_0.
To make sure if without FW dynamic REO_DST ring switching change,
current host change should not give chance that RX frames
route to host when IPA is enabled, select CTRL_IX_0 index 2 to
set REO_DST option, the reason is: if RX hash is enabled, CTRL_IX_2
and CTRL_IX_3 index 16~31 is REO_DST option filled with REO2SW4,
if RX hash is disabled, then CTRL_IX_0 index 1 and 4 filled with
REO2SW4 is REO_DST option configured by
WMI_HOST_PEER_SET_DEFAULT_ROUTING, so CTRL_IX_0 index 2
is only used for FW dynamic ring switching.

Change-Id: I6af12e07472dbdd4ab6d97f24e9fd4082c4e7328
CRs-Fixed: 2767844
2020-09-04 03:23:49 -07:00
Ankit Kumar
5eb6324b3e qcacmn: Modify frag restitch param for frag based handling
Dont pass las_msdu as a param to restitch func for frag
approach as it doesn't contain valid value and is not used
in the restitch api.

Change-Id: I974a8ae5e6ce4a9bf04985cbd37e103700f48301
2020-09-03 15:25:13 -07:00
phadiman
dbb0787de4 qcacmn: Modify wlanstats context to RDK stats context
peer wlanstats context is used only for RDK Plume stats
but the name is misleading as wlan statistics

Hence rename peer's wlanstats_ctx to rdkstats_ctx and
the APIs the APIs around the same

CRs-Fixed: 2767192
Change-Id: I9e8955554b94fa29a3964fed729a95a4db67c8f6
2020-09-03 04:04:17 -07:00