Commit Graph

352 Commits

Author SHA1 Message Date
Akshay Kosigi
a4f6e173c1 qcacmn: Replace target related feature values with INI parameters
Introduce INI parameters to fetch feature related values based on target
type and add CDP interface to get dp INI parameters to control path

Change-Id: Id6a3f409106eb7dc01b08a3f1ec00dbe7efc359f
2018-10-01 08:04:59 -07:00
Krunal Soni
a5211f26a2 qcacmn: Fix deadlock in dp_delete_pending_vdev() API
In Data-path, dp_delete_pending_vdev() acquires
pdev->vdev_list_lock in the beginning and calls
dp_tx_flow_pool_unmap_handler() API which further try to acquires
same vdev_list_lock. This situation causes deadlock.

To fix the situation, re-factor dp_delete_pending_vdev() API.

CRs-Fixed: 2320629
Change-Id: Ie565ea07f396d1987fbe45173b49b2f50bb76cea
2018-09-28 01:21:35 -07:00
Sravan Kumar Kairam
26d471ec56 qcacmn: Take peer ref count and dec it after using
Currently peer reference is used with out taking any ref count.
In parallel context execution on different core peer reference may
be cleaned up in peer unmap event. So take ref count while using
the peer reference and decrement after done with it.

Change-Id: I02ca172cbdc4309fabd3bbbad00940826662bbd3
CRs-Fixed: 2301963
2018-09-27 20:24:36 -07:00
Chaithanya Garrepalli
1f64b2453e qcacmn: in tx path set the lmac_id from wlancfg
in tx path set the lmac_id in the tx descriptor
from wlancfg

Change-Id: Ib7f355983142564500a20daa1f0eef41808df449
CRs-fixed: 2320597
2018-09-24 13:02:13 -07:00
Venkateswara Swamy Bandaru
41ebb3396b qcacmn: Fix kernel panic issue in mesh tx path
Add check for headroom before pushing the head for sufficient headroom
to prevent kernel panic in skb push function.

Change-Id: Iafc963f68b35564c7f291e9d91d933b3e31d7daa
CRs-Fixed: 2315569
2018-09-21 02:06:43 -07:00
Chaithanya Garrepalli
29b9a45af0 qcacmn: add pdev NULL check in peer inactivity timer
In dp_txrx_peer_find_inact_timeout_handler ignore pdev
which is already detached

Change-Id: I0349d5f9c8d249cf332727bff3c120ddf38a6807
CRs-fixed: 2312279
2018-09-20 13:10:42 -07:00
Chaithanya Garrepalli
1bbf4f0482 qcacmn: dont reset monitor status ring if monitor vap is created
Do not reset monitor status ring while disabling enhanced stats
when monitor vap is created

Change-Id: I6cef505429a1f73cec6a3b96bd2bbcd1c5539373
2018-09-18 07:50:23 -07:00
Ruchi, Agrawal
fea1a84116 qcacmn: DSCP-TID map change for second hardware
Change to added entries for 48 DSCP TID  map
for second version of hardware.

Change-Id: Ie4aa0e27616e2f03b012e19d025444c8c53fe341
CRs-Fixed: 2315305
2018-09-18 07:50:15 -07:00
Radha krishna Simha Jiguru
273407908f qcacmn: Add AST type to distinquish bss on STA
When a BSS peer gets associated with vap configured in sta mode,
the ast type associated with that entry should be different from
that of regular static entries, The reason being bridge on root AP
can pick up the mac address of AP VAP.

Change-Id: Ie322a015d883e2712f41623f71ccbc255b99baf3
2018-09-18 06:17:18 -07:00
Krunal Soni
7c4565f22f qcacmn: Fix race by acquiring vdev_list_lock before removing vdev
When multiple STA-PEERs are connected to SAP-DUT device and if SAP
is getting shutdown then as part of shutdown:
1) PEER delete happens first and as part of it,
   firmware sends peer_unmap event in interrupt-context.
2) entire peer_unmap handling happens in interrupt_context on one
   of the available CPU-core.
3) as part of peer_unmap handling, driver removes the peer from
   peer_list first and then cleans up its peer data structure.
4) so between peer getting removed from peer_list and
   peer data structure getting cleaned up;
   control thread (hdd_vdev_destroy/IOCTL/mcthread),
   which is running on different CPU core in process-context,
   takes control.
5) control thread checks if peer_list is empty. If it is empty then
   cleans dp_vdev structure.
6) so when interrupt_context is cleaning up peer data-structure queue,
   it gets stability issue while accessing dp_vdev structure which is
   already cleaned up by control thread.
Fix the situation by cleaning-up the peer data-struct first and
then remove peer from peer_list

CRs-Fixed: 2291861
Change-Id: I39675bbe4448df57911963942800cbcede508917
2018-09-17 16:10:52 -07:00
Kiran Venkatappa
ed35f4499d qcacmn: Add logic to wait for wds del resp before peer create
WDS entry should be removed before adding peer with same mac address.
iIn DBDC mode, this can be ensured only by waiting for response for WDS
delete from FW before creating peer. Add logic to defer AUTH until WDS
is removed from FW.

Change-Id: Ie76d08c4817f953504913ae6cc49fc5388169e4a
CRs-Fixed: 2270592
2018-09-17 09:39:01 -07:00
Chaithanya Garrepalli
2467ed1445 qcacmn: avoid wds source port learning for STA in HKV2
Changes to avoid WDS source port learning in STA mode
if ast override feature is supported by HW

Change-Id: I248c8815429e7417dcf3f451912ee5f037af9c25
2018-09-15 21:21:23 -07:00
Chaithanya Garrepalli
3e93e5f8ae qcacmn: changes to enable peer map V2 messaging
Host changes to enable HTT version 2 messaging for
PEER map and unmap in FW and changes to handle these
messages in host

Change-Id: Ifbe478212bbbc9c9ea1c1e4791c7a78407c376cc
2018-09-15 11:11:04 -07:00
Pratik Gandhi
4cce3e03cd qcacmn: Modify min value of DP configuration for emulation
Reducing min value of DP configuration parameter to support
low memory emulation platform.

Change-Id: I524dca73b3ce52e138527c7abd1a9d8d0cbe9ac1
CRs-Fixed: 2309295
2018-09-11 12:03:05 -07:00
sumedh baikady
59a2d33a2d qcacmn: Use monitor direct for smart monitor
Set monitor direct filter when smart monitor is
enabled. Deliver header from NAC if md bit is set
and smart mesh feature is used.

Change-Id: If1ef865e013c21bbb58bcb89a87856b12d6c7278
Crs-fixed: 2246660
2018-09-08 12:29:31 -07:00
Venkata Sharath Chandra Manchala
a7d5874dba qcacmn: Account for fragmented packets
Account and print fragmented packets received
on the Rx error path.

Change-Id: I078b6524e8de279445bf5f1f156655c354a169b6
CRs-Fixed: 2303817
2018-09-06 11:48:16 -07:00
Venkateswara Swamy Bandaru
6ca4112f46 qcacmn: Remove SW WAR in rawmode for qca8074v2 target
Remove SW WAR in rawmode for qca8074v2 target. Added flag in
vdev structure which will be filled during vdev attach time.
Based on the flag war is applied.

Change-Id: Id91d6359b0a575b1f2b1222e56ac93a0e08a3c73
CRs-Fixed: 2296584
2018-09-05 06:47:16 -07:00
Balamurugan Mahalingam
3715aa4dd6 qcacmn: [2/2] Support both qca8074v1 and qca8074v2 from hal
Pass hal_soc handle to hal function calls to invoke appropriate
target specific hal APIs

Change-Id: I1d646875508cab9b2ec2af55441cbece36a020cd
2018-09-04 11:53:38 -07:00
Sravan Kumar Kairam
31ee37a1dc qcacmn: Implement lithium dp ops to change peer ref count
There are many instances where outside DP peer reference is
used. This may lead to potential invalid access as the peer
reference used outside DP can be deleted in peer unmap. So
implement DP ops to give peer handle by incrementing peer ref
count and also to decrement the peer ref count.

Change-Id: I54b131e4ce4fde888e5d0e69f81c6da8633e2787
CRs-Fixed: 2307529
2018-09-03 12:59:53 -07:00
Nandha Kishore Easwaran
e03102f60d qcacmn: Remove DP_INTR_POLL flag
Remove DP_INTR_POLL FLAG as polling is now handled runtime using
hif_is_polled_mode_enabled. This is needed as 8074 works on interrupts
whereas 6290 is still working on polling mode

Change-Id: I0e7fdc338d462735dc216c929b1b5a99dc984435
2018-09-03 05:11:19 -07:00
Ruchi, Agrawal
2cbca3b050 qcacmn: msdu time lag update for tx completion
msdu time from hwenqueue to tx completion as part of
msdu stats.

Change-Id: I71ba6f1dec0505e4fa09b5fb123f21912b08b9c5
CRs-Fixed: 2286774
2018-08-31 00:51:20 -07:00
Ruchi, Agrawal
234753cb0f qcacmn: add cal client timer change for peer stats
Cal client timer change for updating peer stats
per sec.

Change-Id: Ie6540fcf0e4699bff9156d87c17a5c73664a6230
CRs-Fixed: 2286826
2018-08-31 00:51:17 -07:00
Krunal Soni
a88d618314 Revert "qcacmn: Add cdp ops to set/get timestamp for management frames"
1) This reverts commit
   I7025fdd7540f47bb4d3f95ef6d9f2ef92af5f1f1

2) Reverted changes have been taken care through:
   Idd7617782e71ee187eef7fcb3523c05b49f82094

CRs-Fixed: 2300055
Change-Id: Icc47ded9a585e356b7eae1ad53ffea6668510308
2018-08-30 13:40:52 -07:00
Yue Ma
af4272dbab qcacmn: Check pending TX packets before runtime suspend
If there are pending TX packets, abort runtime suspend.

Change-Id: I3680142c3c35ddb946b32040adfcee6bdcad710c
CRs-fixed: 2302214
2018-08-28 20:10:51 -07:00
sumedh baikady
1f8f319500 qcacmn: Add support for cfgtool ba aging timeout cmd
Adds dp handlers for cfgtool80211 cmd to get/set
block ack aging timeout.

Change-Id: I74bb6e9e25c01f1e712066cb1e41e9adb6619662
CRs-fixed: 2193128
2018-08-28 14:46:35 -07:00
Venkata Sharath Chandra Manchala
7f30b27044 qcacmn: Reduce the log level for dumpStats
Reduce the log level for TX/RX path stats
as excessive logging is causing timeouts.

Change-Id: I3c7ef1f75373bfd319b02aab98f5bef099086bac
CRs-Fixed: 2298368
2018-08-28 13:09:51 -07:00
Sravan Kumar Kairam
51d4664cb5 qcacmn: Reduce log level in peer unmap softirq context
Currently host is taking long time to process the peer unmap
event from FW which is executed in softirq context. Reason is
as part of unref delete spin lock is taken and error level logs
are logged and error level logs take more time to process when
some other printks are already in progress to write to console.
This is leading to change interface failure from SAP to STA as
due to longer time processing of peer unmap event.

Reduce the severity of log level such that logs are directed to
wifi logger logs instead to console.

Change-Id: I543619036aa06c9ac4d97d18e44465b3c9b71806
CRs-Fixed: 2271260
2018-08-25 02:11:38 -07:00
Mohit Khanna
7ac554bda5 qcacmn: Support for DP RX Threads
Add support for DP RX Threads as a part of the FR. Multiple RX
threads can be enabled from the ini. The code is added in a new DP
module outside of the cmn project.

Change-Id: Id966c46c2799d23c2a4fa1c884610955afed3565
CRs-Fixed: 2256470
2018-08-24 18:35:45 -07:00
Sravan Kumar Kairam
ae20c9e9b5 qcacmn: Move log with error debug level outside of spinlock
In some cases, error level logs take more time to process when
some other printks are already in progress to write to console.
As this error log inside spinlock, so when some other core is also
competing for this spinlock, that core keeps iterating in a loop.
After some time spinlock panic may trigger as it is suspected that
this core is locked on this spinlock.

This fix moves the error log outside spinlock so that the other
core don't have to wait to acquire spinlock due to this.

Change-Id: I38be80ba3cb65dd77520ca39bf6210e9711f56da
CRs-Fixed: 2299628
2018-08-23 19:50:11 -07:00
Pamidipati, Vijay
3eab5b1b92 qcacmn: Add a missing lock for del_ast
Add a missing lock for protecting AST table while
deleting an AST entry in STA roaming case

Change-Id: I38b08c71e4080867780ba81063ac9d7a73962e04
2018-08-23 13:50:22 -07:00
Venkata Sharath Chandra Manchala
599b14ce03 qcacmn: Fill appropriate statistics value
Update stats request value if statistics request
from user level is greater that CDP_TXRX_STATS_HTT_MAX value.

Change-Id: I0e36200021fb70662481bc823a95f9e64a8b1e14
CRs-Fixed: 2291842
2018-08-22 18:07:25 -07:00
chenguo
4d877b8ea5 qcacmn: Delete duplicated rate info code in statistics printing
Using common function to replace the duplicated rate info code in
statistics of data path for TX, RX and peer info printing.

Change-Id: I80d296001b95d7a5ff11d7ce538e16f86e7e67e8
CRs-Fixed: 2291395
2018-08-22 14:54:53 -07:00
sumedh baikady
df4a57cd31 qcacmn: Handle 2k exception and rate limit delba
Upon receiving 2k jump exception, send delba
and track delba tx status and retries.

Change-Id: Ida35256233869dfa390c40030c9296b9c48481ce
Crs-fixed: 2239856
2018-08-20 01:36:58 -07:00
Pamidipati, Vijay
13f5ec2749 qcacmn: Enable DBDC WAR in Root AP mode
In current code, DBDC WAR for AST applies only for repeater mode.
Add support to enable this even in AP modex, for use in SON usecases

Change-Id: I82791fbae0cc86ac6d951c4d85b709c755334273
2018-08-17 10:30:45 -07:00
Venkateswara Swamy Bandaru
37ce7097c7 qcacmn: Add static compilation option to enable DP polling
Add static compilation option to enable DP polling irrespective of
HIF polling is enabled or not.

Change-Id: I64544a8f1a6f56eba9ddbf200c9157a165e68e9d
CRs-Fixed: 2292401
2018-08-16 00:47:59 -07:00
Venkateswara Swamy Bandaru
29757ad9ee qcacmn: Add DP support for qca8074v2
Add datapath support for qca8074v2.

Change-Id: I8d1a84f011b8fccedd85ca445a0e69a1a4071f72
CRs-Fixed: 2292314
2018-08-13 19:57:52 -07:00
Adil Saeed Musthafa
61a21697f6 qcacmn: Add new radiotap header fields
Add the following fields in Radiotap header:
Antenna noise (in dBM)
Vendor Namespace containing the following information
->L_SIG_A
->Device_ID
->L_SIG_B
->PPDU_START_TIMESTAMP

CRs-Fixed: 2285143
Change-Id: I977be73778ab27383f12214c73b56c9b80d9f02d
2018-08-10 20:45:27 -07:00
Ruchi, Agrawal
2a6e6143a3 qcacmn: Add change for disconnected peer stat
Add change for disconnected peer stats ,
will remove from bss_peer
and will store in vdev, bss peer will have only multicast
stats for connected and disconnected peer.

Change-Id: Id294d1f3218dbfabcc252bac04f1a3e5f543a247
CRs-Fixed: 2290723
2018-08-10 18:11:32 -07:00
Aditya Sathish
ded018e406 qcacmn: Clean up dp component prints
Clean up datapath component prints by correcting trace levels for
regularly occurring prints and removing newlines from converged
print APIs since qdf_trace_msh appends them by default.

Change-Id: Ie8fe319fcb737720f7400a165e134b6a18bd15b5
CRs-Fixed: 2243843
2018-08-10 18:11:21 -07:00
Chaithanya Garrepalli
a822b190c4 qcacmn: do not delete self AST entry while AST flush
Add check to avoid deleting self ast entry when ast
table is flushed

Change-Id: Icd9b9665941afedecaaba159f9f654d3e26c496e
CRs-fixed: 2286836
2018-08-09 04:24:22 -07:00
Chaithanya Garrepalli
95fc62f8fc qcacmn: populate RSSI for the neighbor clients
Populate the RSSI value for the non associated clients
added in pdev->neighbour_peers_list from monitor status
ring

Change-Id: I509d06bec6eafe8377681c8a3da9a64f301c3c73
CRs-fixed: 2286571
2018-08-06 13:44:01 -07:00
Pamidipati, Vijay
3756b7603e qcacmn: DBDC repeater mode changes in AST
Add new ast_get_type API for DBDC repeater feature.
Add other changes required in WDS and MEC handling
required for DBDC repeater feature to function properly.

Apply sta kickout logic to handle roaming cases
only within same radio. For roaming across radios, DP should
rely on control path.

Change-Id: If9b35720082dd87de40827843a14238e818bc454
2018-08-06 13:43:58 -07:00
Sumedh Baikady
1c61e0664d qcacmn: Block Ack state machine enhancement in DP
Move the state to in_progress when we process addba
request and upon tx comletion of addba response, move
the state to active. Any addba request received during
in_progress is ignored and reo queue is updated with
window size 1 and set to inactive.

Change-Id: I69cfbc162d873f9e6842ca3e7971146dafba2695
Crs-fixed: 2188927
2018-08-02 02:48:51 -07:00
Venkata Sharath Chandra Manchala
0cb3198ecb qcacmn: Enable support for REO Queue Stats
Map the cdp api call to a datapath handle to print REO
Queue Stats.

Change-Id: I14f880e9fc3743991fd7c8441326c23b7c3bdff8
CRs-Fixed: 2217649
2018-08-01 20:37:35 -07:00
Alok Singh
40a622b062 qcacmn: Add check for bpr feature
Disable m_copy/enhanced_stats feature causes the bpr feature disable.
Hence add check for bpr feature status during enable/disable of m_copy
and enhanced_stats.

CRs-Fixed: 2275686
Change-Id: I5592b422823446374ce560fe3653990be4c796b0
2018-08-01 03:50:18 -07:00
Vivek
126db5db3f qcacmn: Add INI support for Lithium DP configuration items
The current Lithium DP configuration items are hard
code and cannot be configured for different values
without rebuilding the driver

Add the INI configurability option for the Lithium
DP config parameters

Change-Id: I30012903ccb0654bdff706beff80655313aca289
CRs-Fixed: 2246404
2018-07-30 02:53:39 -07:00
Ruchi, Agrawal
c3e68bc67d qcacmn: desc na change
Part of base changes, move due to dependency on
other changes.

Change-Id: I7d640d2976c4c2c2c156a5223683dc4b28559577
CRs-Fixed: 2283286
2018-07-27 14:25:16 -07:00
Amir Patel
0291157bef qcacmn: Add new members for DP componentization
To consolidate the stats spread over across UMAC, OL_IF
layer and process at respective datapaths depending
on platforms.

Change-Id: I87d02c767a309e7aeef88a124567259debc1bba5
CRs-Fixed: 2283286
2018-07-27 14:25:11 -07:00
Soumya Bhat
14b6f26e71 qcacmn: Add multicast address in tx_capture header
In existing code peer's mac address is populated in tx_capture
receiver address field. In case of multicast and broadcast packets
the packets is transmitted on BSS peer so in case of broadcast/multicast
packets the transmitter address is same as receiver address in tx_capture
header.

Add change to populate receiver address field with ethernet destination
address in case of bss peer is tranmit status.

Change-Id: Ie9495d51391454313b1697ecedb8e8dec0459565
CRs-Fixed: 2261473
2018-07-25 01:24:31 -07:00
Mohit Khanna
dba82f2bfe qcacmn: Add API to get mon mode mask in interrupt mode
Currently, monitor mode mask is being set while in interrupt mode. If
monitor mode rings are being processed in timer context(polled), both
timer and RX softirq end up processing monitor mode rings leading to
race condition. Monitor mode ring processing code is written to be
executed by a single context - either timer or softirq, not both.

Add an API to return zero monitor mode mask while in interrupt mode in
case timers are being used to process monitor mode rings.
So, in case packet log is enabled(based on a timer), regular interrupt
processing will not process monitor mode rings. It would be
done in a separate timer context.

Change-Id: I5cf5c881c2e2e07bac1b46646ee2a3b7cf42ef13
CRs-Fixed: 2266353
2018-07-24 16:58:33 -07:00