Commit Graph

761 Commits

Author SHA1 Message Date
Ankit Kumar
cd66fff1ce qcacmn: Process smart antenna fields from tlv
Process smart antenna fields from tlv
HTT_PPDU_STATS_USR_COMPLTN_COMMON_TLV in tx
completion path and export it to tx_completion.

Change-Id: If14e711b0aee8e583fd329f3c3915904649ffe47
CRs-Fixed: 2491429
2019-08-15 01:28:21 -07:00
Sumeet Rao
511db296dd qcacmn: Add CDP api to set rx_pkt_enable,tx_pkt_enable for a peer
Since tx_monitor mode and rx_monitor mode consume signficant MIPS
when enabled on a per-peer basis, new requirement is to enable such
functionality on a per-peer basis. New CDP APIs are added to set these
per-peer parameters.

CRs-Fixed: 2494471
Change-Id: Ib44845ec98481cc4df36c30f47335522e5274568
2019-08-14 14:30:23 -07:00
Mohit Khanna
698987c896 qcacmn: Send GRO flush indication at end of dp_rx_process
In case of TCP packets being processed by dp_rx_process, send out GRO
flush indication to the thread.

CRs-Fixed: 2500152
Change-Id: I4f464456d423e4680955992c0acf0ed5f4e618b8
2019-08-13 16:23:36 -07:00
Ruben Columbus
4319493562 qcacmn: ring backpressure handler
rxhost ring backpressure:
identifying rings causing rx backpressure after being notified
by FW message. Adding logs to be able to see at what state
the ap was after a backpressure event was triggered.
Adding radio stats (261) as well as napi stats for better
state description.
Change-Id: I395450be6faaf959f91729516a7b229c5b3396ce
2019-08-12 16:18:24 -07:00
Nandha Kishore Easwaran
5d3475b985 qcacmn: Initial changes for pine
Add device ID change and target type checks for pine.
Also remove memory war added for Hk emulation.

Change-Id: Idf531a48a03202d4fb241a92a1d671ee2b94cfbd
CRs-fixed: 2453899
2019-08-11 02:11:41 -07:00
Sravan Kumar Kairam
1e8591a2a0 qcacmn: Dont destroy rx_tid lock for peer reuse
In case of peer reuse case rx_tid locks are destroyed as
part of peer cleanup and are not initialized again. So while
deleting this peer as part of unref delete peer cleanup is done
which again tries to destroy the rx_tid locks which were already
destroyed. This leads to assert complaining destroying lock with
out initialization. So dont destroy the rx tid locks in case of
peer reference reuse.

Change-Id: I860de558950009cae6f62385dd665badfe9964e0
CRs-Fixed: 2504973
2019-08-11 00:47:32 -07:00
Gyanranjan Hazarika
e8047269ee qcacmn: data-path changes for dynamic hw-mode config
This feature enables user to change HW mode dynamically
from DBS to DBS_SBS mode and vice-versa. Currently, HW
mode configuration is only possible through INI setting
requiring a subsequent reboot.

Relevant DP changes are:

1. Add API cdp_txrx_handle_pdev_status_change to pass
pdev 'up' or 'down' status to DP module
2. Add pdev-status check in dp_rx_process_invalid_peer
3. Add pdev-status check in dp_tx_comp_handler to free
buffer and release descriptor

Change-Id: I74b144abb1b0dc41a26a18ad28f872e6457e9653
CRs-fixed: 2490212
2019-08-07 16:22:32 -07:00
Sumeet Rao
c4fa4df717 qcacmn: Add a new feature to support tagging of IPv4/v6 flows
Tags are programmed using wlanconfig commands. Rx IPv4/v6
TCP/UDP packets matching a 5-tuple are tagged using HawkeyeV2 hardware.
Tags are populated in the skb->cb in the REO/exception/monitor data
path and sent to upper stack

CRs-Fixed: 2502311
Change-Id: I7c999e75fab43b6ecb6f9d9fd4b0351f0b9cfda8
2019-08-07 11:28:21 -07:00
Venkata Sharath Chandra Manchala
5ee6efde61 qcacmn: Avoid shadow register access when link is down
When the scheduler thread initiates the WMA_SET_BSSKEY_REQ
we send CMD_UPDATE_RX_REO_QUEUE to REO srng. This is done by
posting a descriptor to the reo command ring and then we
update the HP so that the HW can consume the descriptor.
Avoid accessing HP shadow address when we are in runtime
suspend state. Perform a hif_pm_runtime_get to resume the
link and access the shadow register and once done initiate a
hif_pm_runtime_put to allow device to go into runtime
suspend.

Change-Id: I24c3e046a5769f03a0f1969360cccdbe55b81d45
CRs-Fixed: 2495720
2019-08-05 18:53:08 -07:00
nobelj
7b0e27336e qcacmn: Fix OFDMA stats counter
user info with delayed ba stats are stored and stats are updated later
on receiving BAR.

Change-Id: I574dd94d5a7db2160953b5d5d302eff18f4f8648
2019-08-05 16:46:06 -07:00
Ankit Kumar
1c69ca1112 qcacmn: Added rx errors and dropped stats
Rx dma error and reo error are accumulated at pdev level.
Rx error consists of:
 - desc_alloc_failure [No free desc available]
 - csum error [IP/TCP_UDP]
 - mic_err
 - rx_dma_error
 - reo_error
Rx dropped consists of:
 - msdu_not_done
 - mec
 - mesh_filter
 - wifi_parse
 - non_rx_drop
 - non_radiotap_update_err

Change-Id: I4166a32ce94630e8a3ccad7a2551eedf9493e292
CRs-Fixed: 2499563
2019-08-05 09:31:50 -07:00
Aniruddha Paul
f4ab426805 qcacmn: Skip the Host Tx desc allocation for single offloaded radio
This changes takes care of the below issues.
1. Skip the host allocation of software Tx descriptors
   for single band NSS offloaded radio configuration.
2. Reset the reo frag destination to alternate select
   for single band offloaded radio configuration.

Change-Id: I3930f266ff9d81d876dda437b29b1ca83d542e12
2019-08-01 00:02:29 -07:00
Varsha Mishra
6e1760c2c4 qcacmn: Handling vlan tagged frames for multipass phrase feature
1. Remove vlan tag in tx and enqueue to hardware.
2. Add vlan tag in rx after peer-vlan_id lookup.

Change-Id: I932202540ac03cabdd20ffd4849fe759ea8a7abb
2019-07-29 09:55:41 -07:00
Prathyusha Guduri
f1f12acb9c qcacmn: Add tx desc device limit
Limit the total number of tx descriptors allocated using tx_device_limit
ini configurable parameter.

Change-Id: I00b4aa089b235e45bc6c445c57ce32b977d872c3
2019-07-29 04:31:09 -07:00
Ankit Kumar
b5029b0a9c qcacmn: Add rx_errors stats
Update rx error stats. It is a summation of below failures:
 - desc_alloc_failure [No free desc available]
 - csum error [IP/TCP_UDP]
These failure stats are updated at pdev level and no need
to aggregate this.Directly add at pdev level and export.

Change-Id: I0a5fa8f972babf092163f3cb2d0093547ded4877
CRs-Fixed: 2496037
2019-07-29 02:22:50 -07:00
Akshay Kosigi
a870c6181a qcacmn: Change to clean up of void pointers
Add code to cleanup usages of void pointer usages
in DP code.

Change-Id: I0736bcc0a547d858ed02f1ee59084a44e5fe4bec
CRs-Fixed: 2487249
2019-07-27 13:43:04 -07:00
Akshay Kosigi
67c8bb9e06 qcacmn: Remove void ptr usage in DP cal client
Make change to remove void pointer usage in DP cal client
instead use cdp opaque pointers.

Change-Id: Ie966ebb7b6bb937d4ee1d6dce3b040804e61ac37
Crs-Fixed: 2484412
2019-07-27 13:42:56 -07:00
Akshay Kosigi
eec6db94bd qcacmn: Remove void pointer usage for ctrl psoc
Make change to remove usage of void pointers for
ctrl psoc in DP and instead use a opaque pointer
struct cdp_ctrl_objmgr_psoc.

Change-Id: I9fac21db1156378fc10b95cf10517afa4364da00
CRs-Fixed: 2484411
2019-07-27 13:42:49 -07:00
Akshay Kosigi
0bca9fb200 qcacmn: Change to remove void pointer usage for HAL SRNG
Add code to remove void pointer usage for hal_srng
and use opaque pointer dp_hal_ring_t instead.

Change-Id: I6907f7376d7fe3c9180b8795bd96f49fead2ec64
CRs-Fixed: 2484404
2019-07-27 13:42:41 -07:00
Akshay Kosigi
383b6d5095 qcacmn: Move HTT usage from core DP
Remove dereferencing of htt_soc structure from dp layer
and instead use HTT APIs.

Change-Id: I6b796f9b6504c763e6df2cf49b15bf3eecfbdf69
CRs-Fixed: 2483401
2019-07-27 13:42:31 -07:00
Chaithanya Garrepalli
4a5189bbbf qcacmn: remove unused fields in dp_peer
Cleanup the unused fields in data path peer

Change-Id: I334389c5f08705df363a88e14db07a3d8e0eb16d
2019-07-25 05:09:24 -07:00
Kiran Venkatappa
115309a008 qcacmn: Delay monitor buffers replenish to monitor VAP create
Monitor buffer are required only when monitor VAP is created. Allocate
these buffers only when montior VAP is created. This provides memory
savings when no monitor VAP is created/required.

Change-Id: I3ddaef00615f00fd13adb2789469a62f1a0af165
CRs-Fixed: 2491873
2019-07-24 21:43:36 -07:00
Karunakar Dasineni
a46da42b53 qcacmn: Remove freed DP structures from minidump
Remove entries previously added to minidump during
data-path detach.

Change-Id: Ib69803e8ea58e5b4e0f045d3037730a5b6700c8d
2019-07-24 17:10:06 -07:00
Akshay Kosigi
aefbe07345 qcacmn: Add change to remove void usage
Add code to remove void pointer usage for
API dp_peer_unref_delete

Change-Id: If346ea8c174c1fbf705aa52598e703424be943a2
CRs-Fixed: 2480828
2019-07-17 04:49:54 -07:00
Akshay Kosigi
283e2358f4 qcacmn: CONFIG_WIN Macros to be moved out of DP/HAL
Remove CONFIG_WIN usage from Lithium DP and HAL module.

Change-Id: If388e45cb3e7e31493edd422a2f4c40f0dd4a799
CRs-Fixed: 2474613
2019-07-15 06:39:40 -07:00
phadiman
4dc5e1f636 qcacmn: Remove unused field - is_bss
Remove unused field is_bss from AST
stats which is not serving any purpose

Change-Id: I5f63d9a027b5390802fab13ceab9d7d219a81e5a
2019-07-12 02:05:32 -07:00
Venkata Sharath Chandra Manchala
2b8a2a0648 qcacmn: Avoid using freed pdev in dp_rx_bar_stats_cb
dp_reo_cmdlist_destroy frees any pending reo_cmds.
Each reo_cmd is associated with a handler which takes
reo_cmd->data as an input. This reo_cmd->data is a pdev
for dp_rx_bar_stats_cb. So validate pdev before
accessing it further.

Change-Id: I1c2d46d3e3f5ede4491500978153f501ebdeee87
CRs-Fixed: 2478910
2019-07-10 02:56:32 -07:00
sumedh baikady
3a3b8fca39 qcacmn: Remove hw_nac_support flag for HKv1
The hw_nac support flag is used for HKv2 only
for indicating monitor direct feature in HKv2
HW. This is not required for HKv1 and was added
for test purpose only.

Change-Id: If44b2acc06d5bf65fcb1934fab2e68c5c7e0f651
Crs-Fixed: 2485142
2019-07-09 18:51:04 -07:00
Vevek Venkatesan
acd3a070da qcacmn: enable DP AP Bridge when SAP mode turned on
Enable DP AP Bridge when SAP mode turned on, CONFIG_MCL cleanup.

Change-Id: I96fa3c263064fe4e438c98246d02dbc50437984b
2019-07-05 10:26:37 -07:00
nobelj
aa57301f00 qcacmn: Fix ppdu info release during detach
queued ppdu info list are free at wrong function causing leak.

Change-Id: I4fb75c5612095af8c965d46ebafd401dd0ed7bf9
2019-07-03 08:56:06 -07:00
Rakesh Pillai
746c5c67d6 qcacmn: Initialize peer bufq and info_lock on reuse
Currently in case when a peer handle is reused, the
info_lock and bufq resources are not getting initialized.
Hence when this peer handle is deleted upon the subsequent
peer delete, the info_lock and bufq resources are freed
without being initialized.

Initialize the peer info_lock and bufq resources when
the peer handle is being reused.

CRs-Fixed: 2476985
Change-Id: Ib442b02e05b8934a6f7c614e1fc643598637fea5
2019-07-01 02:24:51 -07:00
Tallapragada Kalyan
17254eddc8 qcacmn: Delete WDS AST entry if the hw_peer_id is invalid in peer map
Delete WDS AST entry if the hw_peer_id is invalid in peer map
in cases where the HW exceeds the max hash skid it can support
the AST entry will not be added and as an indication of this
the host will receive a peer map event with hw_index as 0xffff
Host has to check for this type of hw_index and appropriately
delete the AST entry from the HOST table.

Change-Id: I9a135517440b9b20edd3ffd990d89876b7e34047
CRs-Fixed: 2460116
2019-07-01 02:24:47 -07:00
Debasis Das
8e068f4023 qcacmn: Fix memleak during wifi unload
The soc common cleanup should be called from
pdev_deinit path to prevent leak of m/r allocated
for spinlocks and Tx descriptors.

Change-Id: Ie8ad3d164ab07f37f8143d1fe147e5cbabbb4991
2019-06-30 08:42:25 -07:00
Saket Jha
78976eaa91 qcacmn: Release lock in dp_reset_monitor_mode
Release mon_lock in dp_reset_monitor_mode function before returning
if status is not successful.

Change-Id: I321cd55225ed3cc5e5b4a752fb10604d05fb9a56
CRs-Fixed: 2462725
2019-06-21 13:40:21 -07:00
Vevek Venkatesan
de31ff656d qcacmn: add feature flags to featurize DP operations
Add feature flags DP_FLOW_CTL for DP flowctl ops,
DP_PEER_SUPPORT_OPS to support peer handling in DP,
DP_POWER_SAVE for power saving ops in DP, DP_CON_MON DP_MOB_DEFS
DP_INVALID_PEER_ASSERT DP_PRINT_NO_CONSOLE and DP_INTR_POLL_BOTH.

Change-Id: I01dafadf6578c0b5f36ab3ef56624912fb66b100
CRs-Fixed: 2467170
2019-06-21 03:09:23 -07:00
Venkata Sharath Chandra Manchala
cb6d0c0741 qcacmn: Create a wlan configuration table for ring types
1. Add config table to accommodate per ring type
   configuration to have a finer control over the
   ring.
2. Provide struct wlan_srng_cfg interface to add
   more parameters to control the ring.
3. Add interrupt threshold configuration parameters
   to wlan_srng_cfg structure.
4. Add WLAN_CFG_INT_TIMER_THRESHOLD_WBM_RELEASE_RING
   and WLAN_CFG_INT_TIMER_THRESHOLD_REO_RING to have
   different timer values for REO and WBM ring.

Change-Id: Ied50e3241ab2cc181ca4ed7f126959cd5d9d2de5
CRs-Fixed: 2455297
2019-06-20 18:36:24 -07:00
Mainak Sen
95101bb281 qcacmn: Remove CONFIG_WIN flag for VoW stats
Use V3_STATS_ENABLED flag instead of CONFIG_WIN

Change-Id: I1559d67f005c4cba2472970ea3bd49826c16a047
2019-06-20 14:45:24 -07:00
Jinwei Chen
e1ffcf089e qcacmn: fix monitor packets radiotap channel incorrect issue
The channel number is always 0 from HAL RX PPDU TLV, then monitor
mode frames radiotap channel frequency is always 2407, get the
correct channel number that we saved when set monitor channel.

Change-Id: Ib927fe9aca3a4c1f98845fe37c9b1d37d1d6cf5a
CRs-Fixed: 2471161
2019-06-19 10:33:06 -07:00
Vivek
030ffadb08 qcacmn: Free srng buffer only when allocation is successful
In srng setup, we set srng alloc size, and allocate memory
for srng buffers.
Even if allocation fails, srng alloc size is set,
which is done even before the allocation is attempted.

In srng clean up path, we attempt to free the memory,
since srng alloc size is set,
but for which allocation had failed,

Instead, when freeing srng buffers, check if we have
a valid address also for srng buffer and then free,
instead of checking srng alloc size only.

Change-Id: I1f2de526e27b7b8d97535bf4c2235c82ffd3ce5f
CRs-Fixed: 2452219
2019-06-18 12:25:57 -07:00
Tallapragada Kalyan
ae7baa998f qcacmn: disable cached descriptor support if NSS is enabled
disable cached descriptor support if NSS is enabled

Change-Id: If0eee42dc07947944e39ef6d98de271ce79419ac
2019-06-17 18:24:34 -07:00
Rakesh Pillai
2529ae1c8a qcacmn: Add event history logs for datapath
Add support to log the important events in
datapath, which will help in debugging the
datapath issues.

IRQ handler, Napi poll and srng access start/end
are the events which are currently logged.

CRs-Fixed: 2457854
Change-Id: Iba105b0e79443b670a01a929f999f94e00ea92f2
2019-06-17 10:23:01 -07:00
Amir Patel
420a8d3c6d qcacmn: Add bss peer check for rate stats flush request
To avoid flushing bss peer rate stats, add bss peer check
for rate stats flush request

Change-Id: If69ec38efca2b447f3fafa080bafae75017e50fc
2019-06-14 06:15:33 -07:00
Varun Reddy Yeturu
a0bb4d6ec1 qcacmn: Free the Rx descriptor pool in error case
Free the Rx descriptors pool if there is a failure
in allocating memory for nbuf during
dp_pdev_rx_buffers_attach()

Change-Id: If4fcfcfdc2fe70c8c4753518ca020a7d8b0bd2b5
CRs-Fixed: 2464596
2019-06-13 13:56:27 -07:00
Akshay Kosigi
fb0877f2d6 qcacmn: Use module specific kbuilds for config params
write module specific macros inside module/config and
use these inc files inside the kbuild of the module using those
macros.

Change-Id: Ide18770973f35d0e5c45e2474b24256107f40d8c
2019-06-12 20:04:12 -07:00
Amir Patel
5dc47f56dc qcacmn: Move multicast enhancement feature out of common code
Move WIN specific multicast enhancement feature API/data
structure outside common code

Change-Id: I35b10d61bd969a4ab6a864a55dd215049981c0c9
2019-06-07 03:23:56 -07:00
Balamurugan Mahalingam
ee6ca9bbc7 qcacmn: reset hw ring intr mask to skip WMAC2 irq
IPQ6018 platform has only two LMAC.
Disable registering interrupts for third hw ring.

Change-Id: I5a68e8c09ac53603cfa50c798b167af12bc3bbc4
2019-06-05 12:56:44 -07:00
Aditya Sathish
8482a0c0fc qcacmn: Add support to update vdev stats through CDP
Add CDP support to update vdev stats from the higher
layers.

The CDP API takes a buffer which is then used to
update parts the cdp_vdev_stats structure depending
on the stats ID that is sent through the API.

This change adds support for vdev tx ingress stats
only. Extended support can be added as required
by adding a new stats ID.

Change-Id: I13d6fb946c8a3dbb0b499b7b026d83b080411d15
CRs-Fixed: 2384177
2019-06-01 05:09:23 -07:00
Jinwei Chen
40de1db036 qcacmn: Fix RX defrag lock destroy without create issue
current Soc RX defrag lock create/destroy flow as below:
1. dp_soc_attach_wifi3
2. dp_pdev_attach_wifi3-->dp_soc_cmn_setup-->RX defrag lock create
3. dp_pdev_detach_wifi3 (no RX defrag lock detroy)
4. dp_soc_detach_wifi3 --->RX defrag lock destroy
here if step2 is skipped for some failure case, step4 will still
try to destroy RX defrag lock, panic happened.

add dp_soc_cmn_cleanup() function in step3, move RX defrag lock
destroy from step4 to step3 dp_pdev_detach_wifi3-->
dp_soc_cmn_cleanup, also move others like reo cmd lock, tx flow
control related lock.

Change-Id: Ic77ddf21e9cefc6d6b747aaad227c732fa2ae2c4
CRs-Fixed: 2447701
2019-05-31 14:50:45 -07:00
Rakesh Pillai
6c1cdf307a qcacmn: Fix memory leak in dp pdev attach failure case
Currently the failure in dp_rx_pdev_mon_attach, during
dp_pdev_attach_wifi3, does not cleanup the rx buffers
and hence that memory is leaked.

Follow the proper cleanup sequence to avoid leaking
the rx buffer memory.

CRs-Fixed: 2451982
Change-Id: Idef308e11c46fe3e7ae9199a6fcf05ca83210b6b
2019-05-31 07:40:22 -07:00
Varsha Mishra
1f4cfb6c58 qcacmn: Fix tx completion and rx stats per wbm/reo ring
Tx completion stats should be counted per wbm ring on tx completion
and not globally. Similarly, rx stats should be counter per reo ring.
Change-Id: I1e4af0d38b23e60de78ca03316861db08ff0811a
2019-05-31 07:40:18 -07:00