Commit Graph

569 Commits

Author SHA1 Message Date
Sravan Kumar Kairam
d55a74c8c9 qcacmn: Register tx completion callback
At the time of dp vdev registration, register tx completion
callback so that tx completions will be called for packets
whose tx completion is requested.

Change-Id: Ic3402f41a0962111901271fc8669974dfea2eb1c
CRs-Fixed: 2416554
2019-04-06 01:54:51 -07:00
sumedh baikady
c2fa7c99c0 qcacmn: Deliver STP pkts from wbm exception path
Vlan tagged STP pkts are received in host from
wbm exception path with wifi parse error code.
This is delivered to stack. Stats added for wifi
parse error and vlan tagged stp pkt count.

Change-Id: I25af5ab403ee7a46b4abe2f60328314d61587b80
CRs-fixed: 2375575
2019-04-02 15:51:44 -07:00
Mohit Khanna
16cd1b2e8d qcacmn: Add Sanity checks during RX processing
- Check for rx_desc.magic before using a rx_desc retrieved from the reo
  destination ring via rx_buf_cookie (dp_rx_process). Add stats.
- Check if we end up re-using a rx_desc with rx_desc.in_use=1 in the
  replenish path (dp_rx_buffers_replenish).
- Drop RX packet and assert in case MSDU Done failures are seen in
  in the TLV during dp_rx_process. Add stats.
- Disable host2rxdma ring mask for MCL. MCL is not expected to be
  receiving these interrupts.

Change-Id: Iaa345d04b8d48814f88ed6e2237fc67696f6a20c
CRs-Fixed: 2382076
2019-04-02 11:17:32 -07:00
Chaithanya Garrepalli
a5ad5822aa qcacmn: clean up AST entries in target recovery case
In case of target recovery clean up the AST entries on
peer before peer cleanup

Change-Id: Ib4f119ec259f0de03b0513a8f0dc8ef4b431f24a
CRs-fixed: 2419890
2019-04-01 02:28:16 -07:00
Jinwei Chen
a42581d479 qcacmn: remove nss info in host tx stats
TX NSS field is not supported from WMB TX completion ring, remove
the NSS print in host TX stats in case introducing some confusion.

Change-Id: I594eb5cd7b2bf88de14f45ff6ad8e3248eb36617
CRs-Fixed: 2350789
2019-03-30 09:37:31 -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
Jeff Johnson
a8edf330f0 qcacmn: dp: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within dp replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: I61f3adab1208682d36235421f44a048e35df346d
CRs-Fixed: 2418258
2019-03-27 06:10:00 -07:00
phadiman
7dd261d614 qcacmn: Free Rx Desc during WiFi unload
Rx desc pools are reused across wifi up
and wifi down, only nbufs part of these
pools are free during down

Free Rx desc pools during WiFi Unload

CRs-Fixed: 2418941
Change-Id: I5cc3a82d99efd84f51f9eb048cf06da5a4495e55
2019-03-26 04:13:12 -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
Naga
65fad66752 qcacmn: Add change to skip monitor ring cfg
Add change to skip monitor ring configuration
for smart and lite monitor through dp_set_monitor_mode
API instead will be handled to configure
cdp_txrx_set_pdev_param from caller as required
during restart, stop and up path.

Change-Id: If842399c64601049efdf9233a83ede5ce368802c
CRs-Fixed: 2421573
2019-03-24 22:26:30 -07:00
Mohit Khanna
3d1e1b7602 qcacmn: Prevent rate stats from printing in kmsg
Do not print rate statistics on the console or kernel logs. Excessive
logging in kernel messages can lead to kernel panic.

Change DP_PRINT_STATS to not print in kernel logs.

Note that this is an interim solution. Ideally these prints from DP
module should be QDF_TRACE_LEVEL_DEBUG and logged to QXDM. Currently
DEBUG trace level is disabled for DP module.

Change-Id: I54af98eda0dd4ea53ae20f25ced6b03287d8b4e4
CRs-Fixed: 2414635
2019-03-24 12:58:12 -07:00
Amir Patel
468bded892 qcacmn: Add RDK statistics changes for Hawkeye
Add RDK statistics changes to collect below stats
a. Tx rate statistics
b. Tx sojourn statistics
c. Rx rate statistics

CRs-Fixed: 2416141
Change-Id: I0c8127cd387b7665a76847f4125977bbb8c5a57a
2019-03-21 23:04:43 -07:00
Shashikala Prabhu
550e69c726 qcacmn: Restrict the tx descriptors for low mem config
For low mem config, use user configured max tx descriptors to limit the
allocation of software tx descriptors.

Use dp_txrx_pflow_update_pdev_params function to print stats and to update
pdev param.

Change-Id: I8fa6f0bb8841de68e8dc205ffcb0fde264f1b0e0
CRs-Fixed: 2414452
2019-03-15 23:15:06 -07:00
Varsha Mishra
3e9d647162 qcacmn: Fixing display of Vow Stats
Adding more fields to vow stats display function.

Change-Id: Ic5227e994e55c0ebc99351051d5b409ba0c3f627
2019-03-15 23:15:02 -07:00
Varsha Mishra
a331e6e55f qcacmn: Implement delay VOW stats for hawkeye
Delay counters per TID have been implemented for following types:
1. Linux stack to hw enqueue delay
2. HW enqueue delay to tx completion delay
3. TX interframe delay
4. RX interframe delay
5. RX frame delay from ring reap to networking stack

Change-Id: I836596cbd878a43955c18b4981cb5b7b43d4df5e
2019-03-12 06:10:05 -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
phadiman
449a268392 qcacmn: Reuse Rx Descriptor Pool Array
wifi up/down will cause soc stop and soc
start which will allocate rx desc pool
array memory for each wifi up

This creates memory fragmentation issue
hence reuse Rx descriptor pool array
across wifi up/down and free only nbufs

CRs-Fixed: 2394666
Change-Id: Ic897c733dfba3d8829e2f2f51099cd615b8a7ea2
2019-03-08 20:19:16 -08:00
Mainak Sen
2e43fb26f0 qcacmn: Add support for displaying TID statistics
Framework is added to print per TID Video and delay statistics
Change-Id: Icdf825d0b90b6c698d20d80a16a65b11f4e385a0
2019-03-08 07:39:38 -08:00
Chaithanya Garrepalli
267ae0e416 qcacmn: add support for reset ast entry and table
Add support for reset ast entry and table, also send
ast entry type to upper layers in delete callback

Change-Id: I6b420fba5bab50519e8954a1e796b04bc0768ef8
CRs-fixed: 2384550
2019-03-08 06:04:39 -08:00
Varsha Mishra
18281794c8 qcacmn: Implement VOW stats for hawkeye
VOW stats is an extension of regular stats to capture
all drops per TID. Delay counters per TID are also
included.

Change-Id: If6087f37b32cf9ae4bb405190a358ad3c9750dd2
2019-03-06 18:20:42 -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
Krunal Soni
c96a1167f8 qcacmn: Use dp_verbose_debug() to print msgs which come excessively
Some of the print messages in Data-path module come very excessively.
Use dp_verbose_debug() API to print them.

CRs-fixed: 2376998
Change-Id: Ibaec3751ce3cbe98492c531548e613c7d17db898
2019-03-06 12:52:07 -08:00
Krunal Soni
03ba0f55cf qcacmn: Implement new INI to switch-on/off excessive logging in DP
In datapath, some of the messages get printed everytime when packet
is received or sent. This situation ends up in excessive logging which
leads to stability issue.

In order to fix the situation, provide knob through INI to control
excessive logging and create new macro for logging the message which
comes under per packet path.

Change-Id: I2af5f9bf39540f952138aa8308401a387fe62bf1
CRs-Fixed: 2376998
2019-03-06 12:52:00 -08:00
Ankit Kumar
8dc0e2a679 qcacmn: Add time_latency check for tx_completion
This patch adds support to measure latency  for tx completions

Change-Id: Ifda1c2f7ffaf8276f012e7a458f6f167ad931356
2019-03-05 20:56:42 -08:00
Chaithanya Garrepalli
4fd2fe420f qcacmn: In CDP get_ast_info APIs return astentry when CB is registered
When delete callback is registered for the ast entry return the  ast info
even delete in progress is set

Change-Id: I3ff8a6d49560513c6a18153c5bf901f201e5949f
CRs-fixed: 2384550
2019-03-03 22:25:08 -08:00
Chaithanya Garrepalli
dedc49bb06 qcacmn: initialize DA WAR flag based on target type
In SOC init initialize DA WAR flag based on target
type

Change-Id: I118e712393bdb1498925a2ee36a29819fd2de8b4
CRs-fixed: 2384550
2019-03-03 22:25:03 -08:00
Venkata Sharath Chandra Manchala
69a0ed394a qcacmn: Add counters for wdi messages
Add counters to account for wdi messages from firmware.

Change-Id: I1c12d42ac4d385d2ed27f6eff84dd2fcfd540ab1
CRs-Fixed: 2365971
2019-03-01 23:39:17 -08:00
Amir Patel
ffe9a8626a qcacmn: Fix compilation issue
Add API parameter to dp_getrateindex to fix compilation issue

Change-Id: I2d7f3a29051eb35d88c5699c21cf378bd7f280ff
CRs-Fixed: 2397918
2019-03-01 19:19:35 -08:00
phadiman
a1f798250d qcacmn: Provide API for dp soc reinit
dp_soc_reinit is a flag to check if the
Rx descriptor memory can be reused across
WiFi up/down

Provide an API which checks the flag and
returns either true or false based on the
value set

CRs-Fixed: 2354186
Change-Id: I8c1afbfe0f743d7c9ab37a42a9ef0c6ac1fbf39c
2019-02-27 09:56:10 -08:00
Chaithanya Garrepalli
af34aae9cd qcacmn: add counters for sa_idx invalid issue
Add counters in case where we identify
HW issue where sa_valid and da_valid bit
are set and sa_idx and da_idx are invalid

Change-Id: I690b626dd3c2b7f20b35982514b0f27576221250
CRs-fixed: 2340521
2019-02-27 03:14:02 -08:00
Surya Prakash Raajen
3a01bdd783 qcacmn: Add CDP api to fetch data rates
Add new CDP api to fetch data rates accordingly
from datapath

Change-Id: I1cf08d396e0f611c61a02c868c9c31759ef52a79
CRs-Fixed: 2394226
2019-02-26 16:28:57 -08:00
Chaithanya Garrepalli
4c952f1039 qcacmn: For HKv2 use ast find by pdev in case of roaming
When client roams from repeater to AP we need to delete the
existing WDS while creating a peer. In this case use AST search
by pdev_id to find the AST entry when ast_override support is
enabled for soc

Change-Id: I1c7bfb8173416b6e155d3c58e94c395028c9b16d
CRs-fixed: 2399868
2019-02-25 20:13:29 -08:00
Karunakar Dasineni
f8ec0cbe57 qcacmn: Fix defrag waitlist flush issues
Check if peer is valid before access during flush.

Check waitlist during peer cleanup even if REO queue was
not allocated, since these are independent.

Add a timeout to avoid calling flush function too frequently.

Change-Id: Ib8da2014f81a48ccc3ca6a330209a942ac0998a2
2019-02-24 01:30:00 -08:00
Venkata Sharath Chandra Manchala
cad74add80 qcacmn: Add support for full pktlog
1. Enable CE5 and allow it to service
   pktlog messages from the firmware.
2. Register full pktlog callback handlers
   for handling sw_events and full tx pktlog.

Change-Id: Ifb70ac0993f2402201f88758845f730cf677b1a0
CRs-Fixed: 2388906
2019-02-21 23:25:30 -08:00
hangtian
fe681a5c2d qcacmn: Use qdf_mem_zero for zero initialization, dp part
Use qdf_mem_zero for zero initialization, dp part.

Change-Id: I8cd5d43b554bf355dfcff0463ba4acb6d22ba254
CRs-Fixed: 2378005
2019-02-21 01:46:39 -08:00
Jeff Johnson
6889ddf7bb qcacmn: Replace CONVERGED_TDLS_ENABLE feature flag
The CONVERGED_TDLS_ENABLE feature flag was originally introduced when
the TDLS feature was being componentized so that one could select
either the legacy implementation or the componentized implementation.
That componentization activity has concluded and the legacy
implementation no longer exists. To align with the current usage
remove all legacy TDLS code and switch to using the FEATURE_WLAN_TDLS
feature flag since that more accurately describes the code being
protected.

Change-Id: Ieef785844bd25b06604167eae2f52e39717f502f
CRs-Fixed: 2395694
2019-02-20 09:09:44 -08:00
Vinay Adella
5dc5551bde qcacmn: Use the correct dp_peer find API for unmap & delete peer
Use __dp_peer_find_by_id, as this will return the peer, even if
delete is in progress. This is needed, if the FW has crashed and
there is no response expected

Change-Id: I0f77184860622b06f793fcfd321547ea41e958cd
CRs-Fixed: 2392817
2019-02-18 23:19:45 -08:00
Aditya Sathish
f8074d87b2 qcacmn: Add return path for fc_peer_stats for peer mac address
Add return path for fc_peer_stats for peer mac address if the peer
is connected to another pdev.

The DP peers are maintained at the SOC as such there is no check
to make sure that the peer is for a particular pdev.

This issue is especially seen when an end user invokes
fc_peer_stats in wifi0 for a peer that is connected to wifi1. In
such a case, we should be returning an error since the peer is not
connected to the pdev that the user application is directed to.

Change-Id: Ie1142c508605bfcf2fd49adc863879eee98fffe6
CRs-Fixed: 2397052
2019-02-18 00:43:56 -08:00
Aditya Sathish
8a7357548a qcacmn: Remove dedicated CDP API for mcastenhance 6 AST lookup
Remove dedicated CDP API for mcastenhance 6 AST lookup and replace
the calls with generic APIs

Change-Id: Ic2c5613be57d7eaffc233ee601f136694f81f848
CRs-Fixed: 2369606
2019-02-17 22:12:54 -08:00
Tallapragada Kalyan
a702362d34 qcacmn: Check for MAX_AST entries when adding AST entry
check for max_ast entries supported by FW and add the
entry on host accordingly.

Change-Id: Ief70ba631bb41d50c79d3673e3eea0c45b0c1e19
CRs-Fixed: 2355947
2019-02-12 04:47:37 -08:00
Amir Patel
1ea85d4671 qcacmn: Add support for STA inactive time in Hawkeye
Currently there is not STA inactive time support for lithium.
Read inactive_time from htt_peer_stats_cmn_tlv by sending
HTT_DBG_EXT_STATS_PEER_INFO to firmware.
After sending command, wait on completion variable till
firmware to response, trigger completion upon firmware response.

CRs-Fixed: 2319219
Change-Id: I93e6343641ae5c72610a57dd6ba551cca0b010c1
2019-02-09 11:52:40 -08:00
Chaithanya Garrepalli
8fb487704b qcacmn: add sync between peer teardown and add ast
Protect peer delete in progress under lock to avoid
addition of AST entry after peer tear down

Change-Id: I21ec1dde67339406ad1b5ac99d37b6ce8d021fde
CRs-fixed: 2384110
2019-02-05 06:29:59 -08:00
Krunal Soni
53add6504b qcacmn: WAR to drop MPDU with incorrect sw_peer_id
In certain scenarios where AP sends OFDMA TCP packet to
multiple STAs in HE80 mode in poor RSSI conditions, it has been
observed that host in STA gets in to null_q_descr handling case and
rxtlv doesn't carry correct sw_peer_id. Due to this,
driver can't find correct peer from table and ends up sending deauth
frame to handle invalid peer case. The TA is valid and host is able to
find the peer using the TA.

Apply workaround by detecting this special case and drop the frame.

CRs-Fixed: 2367420
Change-Id: I0cbdbb8e9976e739c959062261fc1c946e446d63
2019-02-04 13:08:03 -08:00
Nandha Kishore Easwaran
f9c44ce2ad qcacmn: Move DA_war flag to SOC level
Moved DA_war flag from vdev level to soc level.
Also disable DA_war when extap is enabled.

Change-Id: I8e8b2ac7835fb8b5bcad603bd1e7d8036ef7719c
2019-01-30 00:03:13 -08:00
Dustin Brown
9ae2232af0 qcacmn: Don't define dp_bus_suspend/resume for WIN
dp_bus_suspend and dp_bus_resume are currently defined for both WIN and
MCL, but only used by MCL. Move their definitions such that they are
under the same #define's as their usages.

Change-Id: Idd17fa0a521f7474d481fbaf5d2c7cfd4138c774
CRs-Fixed: 2387904
2019-01-29 16:54:46 -08:00
Amir Patel
17b91788b0 qcacmn: Update vdev list and peer list access locking in below order
a. Acquire peer list lock
b. Acquire vdev list lock
y. Release vdev list lock
z. Release peer list lock

Change-Id: Ifc1e57fd1a243d909ca65421f269830d24d6b31b
CRs-Fixed: 2372947
2019-01-29 16:54:42 -08:00
Pavankumar Nandeshwar
753eed32c1 qcacmn: free the dp peers before cp peers in fw recovey case
Free the pending dp peers before cp peers in fw recovey case,
to make sure dp peers release all cp peer references they hold.

Change-Id: Ie6c7562e7214f40be895cf8a57a1aa6245d717cb
CRs-fixed: 2383984
2019-01-29 09:58:12 -08:00
Pamidipati, Vijay
b113bbc335 qcacmn: Fix a race condition in WDS timer attach
WDS aging timer is dependent on a flag which is set in soc_cmn_setup,
but in current implementation wds_timer_attach is done from soc attach
and soc_cmn_setup is involed from pdev_attach. Fix this race condition
by moving wds_attach to soc_cmn_setup

Change-Id: Ia88201c627b434b85e56daadd0c7ab20e6ce0b3f
CRs-Fixed: 2373127
2019-01-25 15:19:06 -08:00
nobelj
4e9d51f914 qcacmn: Populate MU-MIMO user pos and mu group id
populate TX OFDMA and TX MU MIMO information from
user rate tlv and display the same in fc_peer_stats.

Change-Id: If1dab15bbdf391fba00a701abd6024c420d1d8f7
2019-01-24 09:59:06 -08:00
Venkata Sharath Chandra Manchala
965035c642 qcacmn: Access soc handle after null check
Dereference soc handle after checking if soc
handle is valid.

Change-Id: Ifc409ab410b0ff41ad7d45c422f147325d7adadf
CRs-Fixed: 2382178
2019-01-22 05:06:20 -08:00