Commit Graph

327 Commits

Author SHA1 Message Date
Amir Patel
57e7e055f2 qcacmn: Filter rx fcs error frames for m_copy mode
Filter fcs_err frames and pass only first fcs ok msdu payload
from ppdu to upper layer

Change-Id: Ibf739193275f4f5a5c3e786abbbaa45165b5aa13
CRs-Fixed: 2439392
2019-07-05 14:32:20 -07:00
Linux Build Service Account
438e248a07 Merge "qcacmn: user_id check while accessing ppdu_info->rx_msdu_info" 2019-07-01 06:04:51 -07:00
Naman Padhiar
7c8bfaede5 qcacmn: Add prototype for hal_reo_cmd_set_descr_addr
Add declaration to avoid compile time error in case of
strict compilation rule.

Change-Id: I69dc2feeab9bd804cb72793418ee743860fd2088
2019-06-30 09:47:15 -07:00
Chaithanya Garrepalli
08b2c7a134 qcacmn: user_id check while accessing ppdu_info->rx_msdu_info
Add max user_id check while accessing ppdu_info->rx_msdu_info[]
to avoid out of bound array access

Change-Id: Ifcc298d1fd8bd00db5eb2d1777a7ff5af894afe6
CRs-fixed: 2477005
2019-06-27 02:14:09 -07:00
Venkata Sharath Chandra Manchala
d8b05b54d7 qcacmn: Add support to log CE DST and STATUS ring events
1. Record hp/tp for ce dst and status ring to keep
   a track of the last reaped and posted buffers.
2. Add union ce_srng_desc to record ce srng descriptor
   information.

Change-Id: I6f4728893d629c60f676826bf806b725326fb83d
CRs-Fixed: 2465492
2019-06-25 13:06:54 -07:00
Vevek Venkatesan
735d9fedfc qcacmn: CONFIG_MCL cleanup in HAL layer
CONFIG_MCL cleanup in cmn driver HAL layer.

Change-Id: I1fa4657a8ffa87d571157e635ecedf8e8af0bf07
CRs-Fixed: 2467203
2019-06-20 08:45:43 -07:00
Kai Chen
e0dd94dd4c qcacmn: Add user id range check to prevent out of range access
A random crash may be caused by out of range access. Add MU
user id check to prevent out of range access.

Change-Id: I531d6c03024c4a6af4e0db97ea00d0874aaef387
2019-06-14 16:23:38 -07:00
Rakesh Pillai
56320c1e4d qcacmn: Fix calculation of getting head/tail pointer
The current calculation of head/tail pointer for
srng gives an index in the array by skipping
entry_size dwords.
The head/tail pointers are preffered to be the
index values like in the srng registers, which
brings them in alignment with the other usage of
head/tail pointers.

Fix the calculation of head/tail pointers for srng
by avoiding the division by srng entry size.

CRs-Fixed: 2469332
Change-Id: If9a167f3fac3cb39ebe59618e9ad2224d9e54bcc
2019-06-14 12:58:31 -07:00
Amir Patel
1d4ac98ffe qcacmn: Add rssi_chain support for lithium
Read rssi_chain per nss per bw and from rx status TLVs
and update to host data structures.

CRs-Fixed: 2445933
Change-Id: I275e9e502a0a724410fc189ac293cadc8f2981e0
2019-06-12 17:45:57 -07:00
Balamurugan Mahalingam
6a2601a26c qcacmn: Use qca8074v2 hal source files for qca6018
qca6018 and qca8072v2 uses the same WCSS block and the source
files of qca8074v2 shall be used for qca6018 as well

This will also ensure all fixes for qca8074v2 gets auto
propagated to qca6018 as well.

Change-Id: I2ead316c7ed16b6ee315bda05ce82d268ba04bbb
2019-06-08 12:30:40 -07:00
Karunakar Dasineni
acc8b565b3 qcacmn: Protocol tag support in lite rx monitor
Add protocol tagging support in lite rx monitor mode.

Change-Id: I1966fc4f54e1f4a1486162a88853f68f7644a766
CRs-Fixed: 2448517
2019-05-30 19:29:52 -07:00
Chaithanya Garrepalli
ab234e56f6 qcacmn: Add Cached Descriptor support for DP SRNGs
Add support to configure any HAL SRNG descriptor to
be allocated from cached memory area. This is to
optimize of CPU cycles spent on uncached
memory accesses. Also added prefetch of cached
descriptors

Change-Id: I2544e8596d48e2f5549bf687a764c16d73397545
CRs-fixed: 2267945
2019-05-29 11:08:12 -07:00
nwzhao
d7196d8dd4 qcacmn: fix rx path dma-inv-range, unmap-single issues
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
2019-05-24 12:17:55 -07:00
Ankit Kumar
e222775d39 qcacmn: Extract tid from REO descriptor and save to skb cb
earlier we were extracting the tid from the rx tlvs, this
was in the last cache line of the 384 byte tlv. we are
extracting various fields from REO descriptor, now we are
also getting tid from the descriptor to avoid accessing
the last cache line of rx TLV there by avoiding one
cache miss per packet.

Change-Id: I1f4f12dca402604692ea374599add6763d68ab01
CRs-fixed: 2449706
2019-05-21 14:43:21 -07:00
nwzhao
ea2ffbb331 qcacmn: skip processing duplicate descriptor in dp_rx_err_mpdu_pop
If there's a HW duplicate rx descriptor from hardware,
it'll cause a NULL pointer issue in
__dma_inv_range in dp_rxdma_err_process.
In this case, skip procssing it as a workaround.

CRs-Fixed: 2398327
Change-Id: I5639e5fc9a3a06e6762448ec7cb2ea58d9ae8160
2019-05-15 21:34:29 -07:00
Mohit Khanna
e5a6e94464 qcacmn: Restrict RX softirq poll times
The following changes are made

-Yield dp_rx_process if poll time exceeds
-Yield dp_tx_comp_handler if poll time exceeds
-Interrupt statistics to track various interrupt contexts and
 corresponding interrupt masks
-Add poll times histogram buckets to NAPI stats

Change-Id: I8c7a6bbbb97c7b3dd1dde6ac3a97113c433086a2
CRs-Fixed: 2423879
2019-05-14 18:39:59 -07:00
Karunakar Dasineni
8075637d77 qcacmn: Add DP structures to minidump
Add calls to log some data-path structures to minidump.

Change-Id: Ib94e22e9e44ad314eaaff3d6ab57f2c60082e8ec
CRs-Fixed: 2444081
2019-05-14 16:23:09 -07:00
chenguo
73c7b7c744 qcacmn: more debugging information about invaild TX release source
1) Add one counter to track the invaild TX release source
2) Capture he descriptor that caused the issue
3) Print the invalid release source

CRs-Fixed: 2380964
Change-Id: I0dc410ae2e7c9df58ef53e3f20ca7979d086659e
2019-05-04 02:07:34 -07:00
jiad
09526ac0d1 qcacmn: Fix REO2IPA reo destination routing
Observed that when IPA offload is enabled, RX packets
are not routed correctly to IPA ring. Currently only
IX0 of REO_DESTINATION_CTRL_IX registers are remapped,
which only covers 3-bit reo_destination_indication of
range 0 to 7.

Fix is to remap REO_DESTINATION_CTRL_IX2|3 registers
so that reo_destination_indication of range 16 to
31 can also be routed REO2IPA ring when IPA offload
is enabled. Upon IPA offload is disabled, save values
of IX2 and IX3 are reset back to HW.

Change-Id: I3428b450ab10076d27c7628a3729e8cec088bd94
CRs-Fixed: 2434331
2019-04-30 02:13:28 -07:00
Jinwei Chen
e661127fa1 qcacmn: fix incorrect NSS value in host RX stats
Revert change "Limit maxinum nss number as 2 for MCL platform" and
align with WIN function: hal_rx_msdu_start_nss_get_8074v2().
besides, only increase rx.nss[NSS - 1] when NSS is > 0 and rx packet
type is 11N/AC/AX.

Change-Id: I0a64f00a3d252c806216cc3196e71290f111c88a
CRs-Fixed: 2429329
2019-04-29 22:55:24 -07:00
Pranita Solanke
5cac6f52ae qcacmn: Remove WCSS_VERSION macros used inside hal
Remove WCSS_VERSION macros which were used for emulation inside
HAL

Change-Id: Ia774b41c01ee2e2e3bbc2902b776e03eb4109057
2019-04-29 04:17:59 -07:00
Karunakar Dasineni
142f9baf47 qcacmn: Add new feature to support protocol tags
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
2019-04-26 15:31:10 -07:00
Kai Chen
52ef33fca3 qcacmn: Support enhanced Rx capture
Support Rx capture mode to deliver first 128 bytes of
each MSDU, along with some meta data.

Change-Id: I1ffa8b1a029d46f68aa78520bacc019de8af7a82
2019-04-19 04:08:56 -07:00
sumedh baikady
3ee6100b41 qcacmn: Modify default aging timeout for Reo
Modify aging timout in reo based on access category
to match cascade.
For BE, BK, VI use 100ms and VO uses 40ms.

Change-Id: I09267b6540460a13728bddc92a7e72157d6ce569
Crs-fixed: 2418294
2019-04-04 20:58:58 -07:00
Keyur Parekh
44d8f8f9b1 qcacmn: Populate LTF size for Rx stats
Populate LTF size value from TLV for HE and modify
HE_LTF enum value to match with Firmware values

Change-Id: I8e5cce31cbae4aa8722050b06d89c933b74aa752
2019-04-02 11:17:38 -07:00
Srinivas Girigowda
2751b6d2b3 qcacmn: Consolidate multiple MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
Consolidate multiple (redundant) MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
CDP_MAC_ADDR_LEN
OL_TXRX_MAC_ADDR_LEN
DP_MAC_ADDR_LEN
HTT_MAC_ADDR_LEN
IEEE80211_ADDR_LEN
DEFRAG_IEEE80211_ADDR_LEN
ETHER_ADDR_LEN
HAL_MAC_ADDR_LEN
WLAN_MACADDR_LEN

CRs-Fixed: 2406591
Change-Id: I4a87f8ff556920c7b341bdbba99ec43c97b873f4
2019-03-28 16:50:32 -07:00
Debasis Das
c39a68da37 qcacmn: Support for 8021p pcp to tid mapping
Add HAL and DP support to configure
8021p PCP to TID mapping tables into Hardware.

Change-Id: I8a54970c8c4ef56f3c487b6e648c4411b3abde0e
2019-03-25 14:24:36 -07:00
Kiran Venkatappa
07921611b4 qcacmn: Use HTT message to disable rx_pkt_header tlv
On low memory platform rx_pkt_header tlv is not subscribed to get a
savings of 128bytes in skb. This is required to reduce the skb size from
4K to 2K on 32-bit platforms. Use HTT_H2T_MSG_TYPE_RX_RING_SELECTION_CFG
message to unsubscribe rx_pkt_header tlv for rxdma ring.

Change-Id: Ie684f1ca1de9c824a869b4e13fd0ee1d068004e7
CRs-Fixed: 2408424
2019-03-08 23:38:07 -08:00
Shashikala Prabhu
e11412df5c qcacmn: Add compile time macro to disable rx_pkt_hdr_tlv
Do not process  RX packet header TLV for low memory config profile.
Also, drop decapped frames in invalid peer processing function.

Change-Id: Ifc7721bb25d85c7e277bebf4b962d2f1bfea150c
CRs-Fixed: 2395508
2019-03-08 23:38:04 -08:00
Krunal Soni
9911b44343 qcacmn: Use hal_verbose_debug() to print msgs which come excessively
Some of the print messages in HAL module come very excessively.
Use hal_verbose_debug() API to print them.

CRs-fixed: 2405028
Change-Id: I4b4754af65c00edb571de898527026b6183ef15f
2019-03-06 12:52:10 -08:00
Keyur Parekh
25ee316744 qcacmn: Modify HE GI enum values and populate ldpc for HE
In PPDU Rx stats GI value for HE displaying wrong,
because of wrong enum values. Corrected enum values
to match GI values to Tx stats.

Also LDPC shows always 0 in PPDU Rx stats for HE.
Populated LDPC value for HE case as well to display
in PPDU Rx stats.

Change-Id: I6054d3e8c8e8672bcc2d43daa8a6e2a1bc859985
2019-02-27 03:13:52 -08:00
Mohit Khanna
5f2634882b qcacmn: Mark RING_ID_DISABLE for WBM ring during init
Set the RING_ID_DISABLE flag for WBM_IDLE_LINK ring during
hal_srng_src_hw_init_generic.

Change-Id: I725b14a35f453e416a3721fd6c1b68ce59a8c1c0
CRs-Fixed: 2392172
2019-02-23 14:06:56 -08:00
Mohit Khanna
d31b666c22 qcacmn: Set RING_ID_DISABLE for WBM_IDLE_LINK_RING
Currently RING_ID_DISABLE field of the
UMAC_WBM_R0_WBM_IDLE_LINK_RING_MISC register is set to 0. In this
configuration, the producer ring may take the libery of snooping the
datastruct passing through it. This may cause 12 MSBs of the last dword
to be replaced by RING_ID field. This happens when ENTRY_SIZE of the
ring is 2.
Set RING_ID_DISABLE (=1) to avoid this snooping.

Change-Id: I40f71131f8fd27871597dd254fb37ce4614fe92a
CRs-Fixed: 2392172
2019-02-23 14:06:53 -08:00
Abhiram Jogadenu
d81f5b148d qcacmn: hal and spectral kbuild changes for CFR
Adding hal support and including CFR libs in spectral's ko.
CRs-Fixed: 2372061

Change-Id: I7545c594fd2a004f9d34835414549bd51ff09e4f
2019-02-20 06:21:12 -08:00
Jinwei Chen
1cb78177e6 qcacmn: Fix REO entry potential overwrite issue
Host SW should not update the cached TP pointer to HW register before
current cached TP REO entry finishes processing, otherwise there is
risk if HW HP catches up to this cached TP, but HW TP value has been
updated to (cached TP + one entry size) now, this TP REO entry might
be overwritten.

Refine it and only update TP pointer to HW when entry processing has done.

Change-Id: I54df3247745717855a67649f440c606c518efd61
CRs-Fixed: 2391658
2019-02-14 03:11:43 -08:00
Sandhya Mahadevan
091c291f38 qcacmn: Fixing misleading indentation warnings
To fix misleading indentation warnings caused
due to gcc upgrade.

Change-Id: I807552011a49d7d132476f0ebf0fa50593a15c7e
2019-01-31 07:51:45 -08:00
Sravan Kumar Kairam
4c6a8a9123 qcacmn: Zero out the memory of hal shadow pointers
Currently hal shadow pointers after memory allocation
are not memset to zero. In case of SMMU S1 enable when
host starts to access hal srng the random value of shadow
memory is copied to host cached values which leads to accessing
the rings even when HW has not updated to it. So zero out
the memory of hal shadow ring pointers after memory allocation.

Change-Id: I10ac6bfff957e953ee9caa15056ce3fa9d57b70e
CRs-Fixed: 2368491
2019-01-29 14:32:03 -08:00
chenguo
d37a822ae3 qcacmn: Limit maxinum nss number as 2 for MCL platform
As a hot fix before h\w part change, just limit maxinum nss number
to 2 for MCL platform.

CRs-Fixed: 2377796
Change-Id: Iad205804be90b6803ff2f1afa79076dde9b77013
2019-01-17 22:20:50 -08:00
Tallapragada Kalyan
eff377a1d3 qcacmn: do not process duplicate descriptor frame in RX
once in a while the HW is sending a descriptor which
is already processed by host. This can be a potential HW
issue, as a WAR we are not processing such duplicate descriptors
instead increment a counter and continue with next descriptor.

Change-Id: I6c9bc6a9fb4705b42284171a32855411aa5dd73f
CRs-Fixed: 2338543
2019-01-17 10:49:24 -08:00
chenguo
33f505ac30 qcacmn: New TLV sequence supporting for UL OFDMA in monitor mode
According to the ucode and mac team, the new TB-PPDU (UL OFDMA
Dat frame) from any other users using the TLV's fields below:

    * PHYRX_RSSI_LEGACY (has a reception type field that is
			 set to UL-MU)
    * PHYRX_RSSI_HT
    * PHYRX_COMMON_USER_INFO (has a reception type field that is
			 set to UL-MU)
    * PHYRX_USER_INFO (has more detailed modulation info)
    * PHYRX_USER_INFO (Could be more than one)
      ...
    * PHYRX_DATA
    * PHYRX_DATA (Could be more than one)

CRs-Fixed: 2329959
Change-Id: Ib5fa1734a5525d2b2d1db8756166f259be30b9c0
2019-01-03 22:29:40 -08:00
Keyur Parekh
f72cbe544a qcacmn: populate NSS value and Translate MCS value for HT
This change will resolve displaying NSS value
in stats in case of HT. And also it will give
proper NSS value to calculate rate value. Modify MCS
value to match with Tx stats from firmware.

Also retain original MCS value to use in radiotap code
for HT case.

Change-Id: I4dad068262a5e9188a5935db6b2cbf8d14138e7e
2018-12-27 17:48:03 -08:00
sumedh baikady
706eecf986 qcacmn: Fix incorrect HE-GI and HE-LTF value in radiotap
Updating the driver to match new radiotap definitions for
HE fields.

Change-Id: Icab3f535e708299b1e3981f0003982256b3b7010
Crs-fixed: 2355982
2018-12-27 15:36:03 -08:00
Mohit Khanna
5868efa4bf qcacmn: Split RX TLV prints to multiple lines
Currently we are printing one single big print to dump the RX TLVS. This
is causing truncation at the QDF_TRACE level, which can accommodate only
512 bytes or so right now. Split the RX TLV print, so that it can fit
int the QDF buffer.

CRs-Fixed: 2370080
Change-Id: I1385ab0dfe2a52e34132487ac55973e291d84db5
2018-12-24 03:32:57 -08:00
Basamma Yakkanahalli
7b6855aa3e qcacmn: Add hal_get_hw_hptp_generic hal_ops to ipq6018
Added missed hal_get_hw_hptp_generic
'Get HW head and tail pointer value for any ring' to ipq6018.

Change-Id: Idc4b595ab6c52558542cf6f87e36f590bf93123f
2018-11-30 08:28:33 -08:00
Basamma Yakkanahalli
5f7cfd49c2 qcacmn: Device and Target type support for qca6018
Added target and device type support for qca6018.

Change-Id: I85382bf053d0a5f34cfaf0cca78a4b66b4265989
CRs-Fixed: 2323023
2018-11-27 00:32:00 -08:00
Venkata Sharath Chandra Manchala
443b9b4da2 qcacmn: Print HP/TP Stats
Extend txrx_stats to print current HP/TP
Status for UMAC rings.

Change-Id: I50332f7507fdf1841dee51f0b1e97ef4ea68f04f
CRs-Fixed: 2332191
2018-11-13 06:56:15 -08:00
Mohit Khanna
efdae7f1bf qcacmn: Reduce log level in hal_srng.c
Functions hal_update_srng_hp_tp_address and hal_set_one_shadow_config
are dumping a lot of information, which is not needed.

Reduce INFO log levels to DEBUG.

Change-Id: I210cd5493d758685312b7851eb37e05ce93b6071
CRs-Fixed: 2342960
2018-11-09 19:43:33 -08:00
Adil Saeed Musthafa
8325200db5 qcacmn: Fix for wrong packet type in monitor mode
In monitor mode, the packet type is wrongly filled radiotap header as
11n when the actual incoming packet is 11b frame.
The packet type field is common for all MPDUs and is obtained from
PPDU_END_USER_STATS and hence no need to overwrite that value from the
MPDU specific TLV in the function hal_rx_mon_hw_desc_get_mpdu_status

Change-Id: I97f96e64012636f562f7ac2e4a91b63ffc7553db
CRs-Fixed: 2333915
2018-11-07 02:58:15 -08:00
Adil Saeed Musthafa
ae6a73dac7 qcacmn: fill timestamp and lsig in hal_rx_status_get_tlv_info
This was added earlier but got lost during HAL code refactoring

Change-Id: I9b7acc17aa68b1a2b6bc1c7fec0c39231c84a82e
CRs-Fixed: 2339289
2018-11-06 22:40:01 -08:00
Pramod Simha
95c59f2993 qcacmn: Add force wake APIs for register access
Add force wake request/release API before accessing
BAR+4K register space.

Change-Id: I6583d24925de9f4464f800e19c2d27c0d1b62819
CRs-Fixed: 2302152
2018-10-31 11:50:51 -07:00