Commit Graph

589 Commits

Author SHA1 Message Date
Rakesh Pillai
2b88f071f9 qcacmn: cdp: Convergence of cdp_mob_stats_ops
Currently the cdp apis are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev/vdev id or peer mac address, which will be
used to get the respective handles, and hence
avoiding the unwanted access of the handles if
it has been deleted.

Converged mob_stats_ops
- clear_stats

CRs-Fixed: 2539824
Change-Id: Id424b939c8ef77bd9fae55eaa4c08023efc32093
2019-11-11 23:08:42 -08:00
Rakesh Pillai
e5430cb03e qcacmn: Handle vdev_id as parameter for txrx stats handler
The datapath vdev handle is not to be used outside
datapath layer. So the cdp api for getting txrx stats
will pass vdev_id instead of the vdev handle.

Pass vdev id instead of vdev handle for the cdp api
used to get txrx stats. Use the vdev_id to retrieve
the corresponding vdev handle in the txrx stats handler.

CRs-Fixed: 2560364
Change-Id: I57b6c6b232d122583e85929fa972d68bc54e84e0
2019-11-08 01:45:26 -08:00
Chaithanya Garrepalli
6bc8263586 qcacmn: do not store vdev_id in ast_entry
Remove the vdev_id feild from ast_entry structure

Change-Id: I0f79d13399212397c4c88aa5c39d422719a17137
2019-11-05 05:39:45 -08:00
Rakesh Pillai
534a143d8f qcacmn: Add support to flush rx packets for a vdev
When a particular vdev is deleted, the corresponding rx
packets which have been queued to the rx thread are not
flushed. Hence when such packets are submitted to the
network stack, the dev for this skb will be invalid,
since we have already freed the adapter.

Flush out the packets in the rx thread queues, before
deleting the vdev.

CRs-Fixed: 2543392
Change-Id: I2490d0f5ce965f62152613a17a59232521ca058f
2019-11-01 00:18:13 -07:00
Venkata Sharath Chandra Manchala
c9e344de3d qcacmn: Set the reo destination ring ctrl register
The reo destination ctrl registers
HWIO_REO_R0_DESTINATION_RING_CTRL_IX_2_ADDR and
HWIO_REO_R0_DESTINATION_RING_CTRL_IX_3_ADDR are used for mapping
msdu packets to different reo rings.
For QCA6390,
reo remap values varied from 0 - 7 so every 3 bits in
the register were used to map to a particular reo ring.
For QCA6490,
reo remap values vary from 0 - 9 as two extra reo rings are
added so we are using 4 bits in the register to map to a
particular reo ring.
Use the macros directly provided in the header files
to map reo rings.

Change-Id: I6d64266d3b388b3453b7df959048e3d693cf0a40
CRs-Fixed: 2544102
2019-10-30 05:58:57 -07:00
Venkata Sharath Chandra Manchala
8a4812f7fc qcacmn: Enable TSO Stats for Lithium based products
Add support to account for TSO jumbo packets on the
Tx path and print the statistics using dumpStats 3.

Change-Id: I6cc446df5c84e3ac436d922935fcd559e0704ec5
CRs-Fixed: 2356244
2019-10-28 07:11:53 -07:00
Pavankumar Nandeshwar
5d3171d70e qcacmn: Add vdev_id to vdev_handle map in dp
Add a vdev_id to vdev_handle map in dp for faster
retrieval of vdev using vdev_id.

Change-Id: Ie19e09dd2e2b3d99317146d1b4cecdb5147a3cdd
2019-10-24 21:42:11 -07:00
Chaithanya Garrepalli
8b58459630 qcacmn: remove unused rx_opt_proc from dp_peer
Cleanup unused rx_opt_proc from dp_peer

Change-Id: I83401689f408f04c6f084dd83eb40dfacb295919
2019-10-22 12:46:13 -07:00
Jinwei Chen
13219389f1 qcacmn: fix compilation issue in dp_vdev_flush_peers
Fix compilation issue in dp_vdev_flush_peers.

Change-Id: I170398134d0a5eb30fecba78641fadfa2cfb236f
CRs-Fixed: 2545597
2019-10-19 19:25:47 -07:00
Venkata Sharath Chandra Manchala
e69c9c2ac0 qcacmn: Add support for QCA6490
Add the following support for QCA6490:
1. Initialize the qca6490_hal_hw_txrx_ops
2. Initialize the hw_srng_table
3. Attach hal_qca6490_attach

Change-Id: Ic53c520ef804eb4fbe1434c704e9040c83011d3d
CRs-Fixed: 2522133
2019-10-17 15:12:14 -07:00
Jinwei Chen
a3e587120b qcacmn: flush pending vdevs and peers when do pdev deinit
Flush all the pending vdevs and peers when do pdev deinit

Change-Id: Id99ca5394bc96a07b75a44847dbc1c7681355265
CRs-Fixed: 2532199
2019-10-14 05:47:56 -07:00
Rakesh Pillai
ec9faaa73e qcacmn: Set interrupt mode during soc attach
Currently the interrupt mode is set as a part of
interrupt attach. The interrupt mode is needed for
pdev attach and hence it is decoupled from the interrupt
attach, setting the interrupt mode during soc attach.

Set the correct interrupt mode during soc attach.

CRs-Fixed: 2500015
Change-Id: I68496bed68cac5a2a2bd19adf2377bae7eb8783c
2019-10-14 05:47:50 -07:00
Sravan Kumar Kairam
78b01a1e1b qcacmn: Flush srng tp and hp only for flush event
Currently after runtime resume all SW2TCL data and reo cmd
srng rings hp and tp value are flushed. In case of IPA
offload case SW2TCL3 righ hp value will be updated by IPA
and not by host. In case of runtime pm enable host is
setting the value to zero as part of runtime resume which
results in incorrect hp value of SW2TCL3. As part of this
change set flush event for rings which are accessed by host
during link down state and after runtime resume flush the
rings for which flush event is set.

Change-Id: I5c9afa708277cf3a6e6d5ef99447bc21f88cfdcf
CRs-Fixed: 2514621
2019-10-12 22:16:04 -07:00
Rakesh Pillai
01b9b680fc qcacmn: Avoid REO destination change when IPA enabled in P2P mode
In cases where one of the interfaces is a P2P-GO and
IPA has been enabled, the P2P connection establishment
fails.

When IPA is enabled, the REO destination is changed to REO4
which can be reaped only by IPA module. But in case of P2P-GO
interface in operation, this change in configuration causes
all the RX packets to be stalled due to incorrect REO configuration.

Hence, to avoid this case, do not change the REO dest config
when the interface subtype is P2P.

CRs-Fixed: 2498315
Change-Id: Ie9f01c3b353c7c0503e1541d6c79c2f47c9782f3
2019-10-10 13:43:37 -07:00
Jinwei Chen
1c76e897e3 qcacmn: refine dp_vdev_flush_peers logic
Refine dp_vdev_flush_peers,
a. wrap ast entry flushing into dp_peer_flush_ast_entry()
b. if unmap_only is true, logic keep same.
c. if unmap_only is false, also use __dp_peer_find_by_id
instead of dp_peer_find_by_id to get peer object.
only if peer flag valid is true, then call dp_peer_delete_wifi3
to avoid peer member invalid accessing.

Change-Id: I7a6d53e124ff369305b91050731901ff0a43d6af
CRs-Fixed: 2534274
2019-10-10 03:17:47 -07:00
Nirav Shah
c806725022 qcacmn: Do not print periodic flow control stats
Do not print periodic flow control stats for lithium
data path.

Change-Id: Idc05417c23b4c5a3916a2a9fc433960e48d469fe
CRs-Fixed: 2535644
2019-10-09 19:10:53 -07:00
Karunakar Dasineni
13abde98f1 qcacmn: CDP interface to deliver Tx mgmt frames
Add CDP interface to pass on host generated mgmt
frames to DP, to be included in Tx capture.

Change-Id: Ic1a63c137ca546b0ad2b94d92fd5d489e9512a6f
2019-10-07 16:38:23 -07:00
Shashikala Prabhu
5d579844ba qcacmn: Change log level for Special vap channel change
During special vap channel change, we see "monitor vap already created"
print on the console. This is the expected print, because
pdev->monitor_configured is set during wifi up. Therefore, change the
debug level of this print from ERROR to DEBUG.

Change-Id: Ia290b74d9be20691eac3ebc50f6cc3fff3e94953
CRs-Fixed: 2529580
2019-09-28 08:11:15 -07:00
Kai Chen
99efa0dce4 qcacmn: Enable peer filtering for enhanced RX capture
Enable peer filtering for enhanced RX capture.

Change-Id: Ic8d27b575721f6fe3bae06ed7d23b1ff300306c9
2019-09-23 20:35:31 -07:00
Saket Jha
52e54333f4 qcacmn: Delete all peers during SSR
During SSR in dp_vdev_flush_peers function, the else condition finds peers
to delete by calling dp_peer_find_by_id. If the delete_in_progress_ flag
has already been set to TRUE, then dp_peer_find_by_id will return NULL
and not delete the vdev object. Calling __dp_peer_find_by_id will always
return peer id so all peers are sure to be deleted.

Change-Id: I86bf2bdda7ebc5a9c2f4bbc877392ebff9cbaf59
CRs-Fixed: 2513104
2019-09-16 17:23:27 -07:00
Chaithanya Garrepalli
11b7ea2bc5 qcacmn: pass client mac address also to nac rssi API
Add client MAC address while calling upper layers to
configure NAC RSSI

Change-Id: Ib7b0140ee4d194fe86c37d862fc6024b61481011
2019-09-12 01:46:32 -07:00
Shashikala Prabhu
8fe9679be0 qcacmn: Use qdf aligned mem alloc APIs in DP component
Replace dp_srng_mem_alloc() by qdf_aligned_mem_alloc_consistent() and
qdf_aligned_malloc() in dp_srng_setup().

Change-Id: Iae236a3cc19ec7a9f94b04382d37fc95e6ed622f
CRs-Fixed: 2462455
2019-08-28 02:39:37 -07:00
Sumeet Rao
2b730bbc76 qcacmn: Reorganize protocol and flow tagging changes to wifi-host component
Reorganize protocol and flow tagging changes to wifi-host component.

CRs-Fixed: 2501573
Change-Id: Ic6bc9548fd8bb66c2f8bae4740a4dcad4002f720
2019-08-22 12:35:28 -07:00
Sumeet Rao
3953e0ad69 qcacmn: Check nss enabled config before programming flow search table
In cases where NSS offload is enabled, we currently do not support
flow-based search (flow tagging). Check for NSS offload enabled flag
prior to configuring the flow search table in target/hardware.

CRs-Fixed: 2502311
Change-Id: I291c610fe568ac36bacb3c21fd14feb544332b20
2019-08-16 12:44:37 -07:00
phadiman
baaa7b98ce qcacmn: Replace %p with %pK format specifier
Replace %p with %pK specifier in dp_main
module

Change-Id: I637f5a4ddc827011aa48295ea50544632d1a9a76
2019-08-16 08:22:53 -07:00
Amir Patel
44bd807fa7 qcacmn: Fix memleak in m_copy mode
1. Assign correct first msdu payload
2. Reset mpdu fcs ok bitmap upon reception of next ppdu
3. Free rx_ppdu_buf_q in error cases

Change-Id: I4f2e687d51d1e10693adc9cfcdee49190ba6815c
CRs-Fixed: 2502889
2019-08-16 02:58:08 -07:00
Jinwei Chen
0f015f2b53 qcacmn: support changing driver mode to monitor
support monitor mode enablement by changing driver mode.

Change-Id: I5436b21f4f554101e74590757ed2ac05d2d84fa0
CRs-Fixed: 2491560
2019-08-16 02:58:05 -07:00
Rakshith Suresh Patkar
fb42ec3909 qcacmn: Cleanup dp_get_vdev_by_sta_id [PEER_ID_PHASE1]
Cleanup dp_get_vdev_by_sta_id to be peer mac address based
from local peer id based.

Also, modify the API cdp_peer_get_vdev_by_sta_id with additional
argument for peer mac address.
Rename cdp_peer_get_vdev_by_sta_id to cdp_peer_get_vdev_by_peer_addr.

Change-Id: I889538b5ea7ebac8973dcaaa5ebdad1ac495e791
CRs-Fixed: 2504569
2019-08-15 20:38:29 -07:00
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