Commit Graph

370 Commits

Author SHA1 Message Date
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
Vevek Venkatesan
33ba728fae qcacmn: CONFIG_MCL cleanup in DP layer
CONFIG_MCL cleanup in DP layer.

Change-Id: Icc9947aac290496b3d1bb708639b392815b82070
CRs-Fixed: 2467193
2019-06-27 05:00:13 -07:00
Chaithanya Garrepalli
1a39da4d04 qcacmn: do not send AST update until peer map is received
For newly created AST entry do not send AST update until
we get the MAP event for create

Change-Id: I840ef62825d4537439a4020a8a5a5547b575a664
CRs-fixed: 2468833
2019-06-25 13:07:02 -07:00
Venkata Sharath Chandra Manchala
a6c047026d qcacmn: Add Null check to handle send_delba
Add a null check to avoid dereferencing send_delba
for QCA6390

Change-Id: If44b1ee4ed15918e27578f5bc98b0531d9b7cb29
CRs-Fixed: 2475880
2019-06-25 13:06:44 -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
Manjunathappa Prakash
85de96c698 qcacmn: Do not honor addba response Tx failure in roaming
Add callback to get the roaming status and do not honor addba
response Tx failure.

Change-Id: I148542fc3c629749fc08623f5041f6ca76fee298
CRs-Fixed: 2439721
2019-06-03 02:27:06 -07:00
Amir Patel
cb99026ade qcacmn: Move WDS feature out of common code
Move WDS feature specific APIs out of common code
as these features are WIN specific. Keep the usage inside
common code under feature specific flags.

Change-Id: Id907a5e22c27fc47e8314449e154525684a27e85
2019-05-29 11:08:21 -07:00
Santosh Anbu
c2b2c77261 qcacmn: Remove unused peer mgmt stats
Peer delete request and response stats has been moved to per vap
stats. The time info on assoc, disassoc and deauth was already
cleaned up, but members in the dp_peer struct weren't removed.

Change-Id: Ie4a1b171178d8ad03abd76069cc0777802814993
CRs-Fixed: 2451766
2019-05-29 11:07:59 -07:00
Tallapragada Kalyan
9e4b36fd89 qcacmn: Rx optimizations to improve small pkt perf
basically tried reading peer_id from peer structure
to avoid 1 cache-line miss per pkt and access mac address
from frame data for WDS only if WDS condition is valid.
The other optimization is to avoid accessing queue_mapping
field of skb for skb received which is at 140 offset
This again helps to avoid i cache miss.
Another place is to do a memcpy only when we intend to
add an ast entry.

Change-Id: I7e328060c505bc21419d045e77329c2cda9e3644
CRs-fixed: 2388857
2019-05-22 00:18:17 -07:00
Venkata Sharath Chandra Manchala
c61826c476 qcacmn: Cleanup statistics
1. Move statistics API's to dp_stats.c
2. Move DP_TRACE_STATS to DP_PRINT_STATS
   as it is implemented based on target.

Change-Id: I62f3076a51ca35f0e12cdb0ff0230ea87c2baaf7
CRs-Fixed: 2453443
2019-05-20 20:53:27 -07:00
Pranita Solanke
05862964ab qcacmn: Identify WIN/MCC specific features
Identify the WIN/MCC specific features. Move the features under feature
specific flags. Get rid of WIN/MCC specific code.

Change-Id: Iaf4e5befd7d574a20bea5c078201adbeac3b762c
2019-05-20 09:58:47 -07:00
Chaitanya Kiran Godavarthi
70aeda1cdd qcacmn: Handle BSS peer in STA mode
1. Set BSS peer for AP during peer-create and for STA in peer-map handler
2. Set Self peer in STA mode
3. Avoid tid cleanup in STA mode
4. Remove redundant selfmac checks in Rx
5. In MEC event handler add a check to ignore MEC events
    when STA is not connected.

Change-Id: I2a34b4742d9dedaa0709c1f4c87f3a06b794f36b
2019-05-16 07:45:55 -07:00
nobelj
debe2b3b9c qcacmn: support enhance TX capture
support TX capture mode to deliver msdu along with meta data.

Change-Id: Ic84416cc4892e37bfb831dada136a4ff6b615a61
2019-05-10 12:39:30 -07:00
sumedh baikady
c773848bf4 qcacmn: Fix to accept Addba req when BA session is active
Currently, if BA session for a tid is active, we tear down
current session and do not send an addba response. Clients are expected
to send new addba req. But this is not happening, therefore
we accept new addba req after flushing tid queue and then setup
queue with latest addba request values.

Also change is made to not update ssn to 0 so that old sequence
can be continued to use.

Change-Id: I129ce74d7414c3255d5a4360f39fec9ed3d7650f
CRs-fixed: 2428837
2019-05-02 23:39:44 -07:00
Basamma Yakkanahalli
b85768e4e5 qcacmn: Remove HK header dependencies for ipq6018 compilation
Add target specific HW header for ipq6018 compilation.
Remove the 8074 header dependencies for 6018 compilation.

Change-Id: I8e45e3e039a4596c6722538405dcd381918fa6b1
2019-05-02 01:25:01 -07:00
Sravan Kumar Kairam
ebd627e195 qcacmn: Cache rx frames during dp peer register
Currently frames will be dropped if it arrives before
peer is registered with data path module by control path.
So cache rx frames and flush them to the upper layer when
peer is registered at data path.

Change-Id: I086122fffdcf33e25ba57774ef944550cdd2fa20
CRs-Fixed: 2329308
2019-04-27 06:44:19 -07:00
Rakesh Pillai
9498cd70f4 qcacmn: Serialize dp reorder queue setup wmi command
Refactor the code to move the serialization of
rx reorder queue setup wmi command to target-if
layer.

CRs-Fixed: 2431099
Change-Id: I6b383f5e875fec55c3586dfee576894f6eb35f73
2019-04-23 16:18:54 -07:00
syed touqeer pasha
8a0928bf2f qcacmn: Handle flood of update ast messages
Avoid duplicate update AST WMI messages being sent to FW.

Change-Id: Ic2dac80a3ec13e1bef57140b512555dcbabd0587
2019-04-20 02:23:26 -07:00
Mohit Khanna
0255314127 qcacmn: Check delete.pending in get_vdev_from_vdev_id
Currently vdev deletion happens as a part of last
peer's unma and vdev creation happens in a different context invoked
by the upper layer in dp_vdev_attach_wifi3.

In a scenario when the old vdev is being deleted and a new one is being
created, with the same vdev id (e.g. P2p -> SAP transition), its
possible that the old and new vdevs co-exist in the pdev->vdev_list
at the same time. In such a case, the API (get_vdev_from_vdev_id) can
return the old stale vdev, even when a new vdev has been created. This
is not the expected behaviour.

Check for "delete.pending" flag before returning the vdev. If the flag
is set, skip that vdev.

Change some logging to dp_ logging functions.

CRs-Fixed: 2432430
Change-Id: Icadd84059dfbab12910678e5b24007010c15b6a8
2019-04-19 07:53:39 -07:00
Pavankumar Nandeshwar
1ab908e62b qcacmn: add CDP function to process CP peer delete response
Add a CDP function which processes the peer delete response
and deletes the static ast entry for the peer

Change-Id: Id646979ed07bd82609ca08e7ef3201382d07b1de
CRs-fixed: 2385115
2019-04-12 02:56:39 -07:00
Chaithanya Garrepalli
58e7c5e121 qcacmn: In add ast entry call the callback inside ast lock
In dp_peer_add_ast() call the CP callback inside ast lock
to ensure the ast add and delete commands are called in a
sequence

Change-Id: If76bf8dca34555e56074e74792f3283b6b5a28d3
CRs-fixed: 2424637
2019-04-11 12:38:49 -07:00
phadiman
b1007509b1 qcacmn: Free memory only if it is allocated
peer attach failed due to memory allocation failure
which triggered soc restart, as part of soc restart
peer detach tried to free AST hash table and entries
which was not allocated.

For peer hash table and AST hash table free only if
the memory is allocated

CRs-Fixed: 2425963
Change-Id: Ib7a624c91f544f1a8da2b96b4d342a13b9f3b162
2019-04-03 23:52:53 -07:00
Sravan Kumar Kairam
4f6b8f5608 qcacmn: Serialize dp reorder queue setup wmi command
Currently rx reorder queue setup command is sent from soft irq
context. There exists race condition between resume command sent
from worker thread context and this command sent from soft irq
context. In parallel execution on different cpu cores if the wmi
suspend flag is not sent to false as part of resume command at the
time of sending the rx reorder queue setup wmi command, the command
will not be sent. So serialize the rx reorder queue setup command
by posting to scheduler thread.

Change-Id: Ib4d0fb99df142be39d2d35e7f405130c0747efac
CRs-Fixed: 2410175
2019-04-02 15:16:11 -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
Tallapragada Kalyan
c741308260 qcacmn: Increase AST table size to 4k
As fw has doubled the skid length we need to increase
the table size from 2k to 4k

Change-Id: Iaf46c9451220ce8e890cdf1909841917029ce32f
2019-03-20 22:10:36 -07:00
Subhranil Choudhury
9bcfecf548 qcacmn: Add vdev_id argument to peer-delete
Add vdev-id as argument to peer-delete callback
function.

Change-Id: I8a43ed53c5f7ad64f1f4cb7aeb925e285752b7b5
2019-03-16 14:28:31 -07:00
sumedh baikady
6d66c7e1b6 qcacmn: Remove redundant check for BA state
In handling addba request, if we receive a request
for a tid that is in IN_PROGRESS state, we ignore
this new request.

Change-Id: I71e3f78cf43f25c184161669a359a4b703cab3cd
Crs-fixed: 2408140
2019-03-11 14:20:53 -07: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
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
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
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
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
Chaitanya Kiran Godavarthi
e0b3414ea7 qcacmn: Change debug module ID to QDF_MODULE_ID_DP
QDF_MODULE_ID_DP is the module id to be used for debug
prints in the dp_peer.

Change-Id: I661239cb7773aa157d503e9acd82a90343089d6b
2019-02-15 22:49:58 -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
Chaithanya Garrepalli
9ff4c54c25 qcacmn: Avoid NULL dereference in peer unmap handler
Avoid NULL dereference in peer unmap handler

Change-Id: I4dfc6e5fe4c254c6534af187b705efdab706b366
CRs-fixed: 2369001
2019-02-12 02:10:41 -08:00
Manjunathappa Prakash
a5a3a1e49d qcacmn: Ignore fragmented packet before peer TID setup
peer->rx_tid[tid].array is initiailized when peer TID is setup.
It seems like we are processing the fragmented Rx packet before peer
TID is setup. Drop the fragmented packet in this case.

Change-Id: Ic076e59a9074efff9fed9f9154aa973c41f67341
CRs-Fixed: 2388684
2019-02-07 20:36:13 -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
nobelj
fdfe7ea3cf qcacmn: Fix memory leak in rx tid setup
Take care to handle failure case resource leakage
in TID setup.

Change-Id: I83fbe2c5edcf0c7554d8e64eba8987fbc15502c2
2019-02-04 13:08:07 -08:00
phadiman
d2e88e3895 qcacmn: Reduce Log Level
Add, delete and update AST DP
functions print logs at TRACE
level

Reduce the log level from TRACE
to DEBUG to avoid ML Framework
from interpreting these logs

CRs-Fixed: 2385978

Change-Id: Ifd5c24a95e7e9f69297afff5d7a3235cfa27aaf5
2019-01-28 12:21:00 -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
Chaithanya Garrepalli
9cc562c53b qcacmn: Modify CDP AST APIs to synchronize add and delete cmds to FW
Change the CDP abstraction APIs for ast entry find, add and delete
to avoid external references for ast entry in upper layers

Process the HTT v2 peer map messages which will be enabled for
nexthop ast entries and use these messages instead of WMI event
for HKv1 WAR where we have to wait for delete confirmation from
target event which is processed in control path

Change-Id: Ifa91a259c0762344deb8ab89e868fc5554d75543
CRs-fixed: 2354951
2019-01-17 02:22:24 -08:00
chenguo
8df4d46103 qcacmn: Remove the unnecessary info printing in SIRQ context
dp_reo_desc_free function can be executed in SIRQ context, so it
should not be expected that INFO printing which might cause locks
holding too long.

CRs-Fixed: 2367454
Change-Id: Ic77126fa62329547494ec6b672111c6183fadac2
2018-12-21 10:05:28 -08:00
Nandha Kishore Easwaran
8dd440d33c qcacmn: Add extra check in mec event when replacing ast entry
Check if the ast_entry peer is same as the peer received
in MEC event before removing the wds entry. This check is
required for wds repeater scenarios. When a multicast packet
goes from station to the rootap via the repeater, a mec event
will be received in host but the entry should not be replaced.

Change-Id: Ia6fae9f08b411b481fc6d7c3f829bd127f92caec
2018-12-05 02:18:10 -08:00
Krunal Soni
d3eb8bcff8 qcacmn: Initialize the PN and plumb it to HW
Initialize the PN to the value which is given by upper layer
and plumb it to HW.

Change-Id: If6b14d2b9b92e4571a85cb20dc445608d5f56961
CRs-Fixed: 2350954
2018-11-30 08:28:28 -08:00
jiad
5eb6276a46 qcacmn: Fix misleading-indentation build error
This change fixes build errors with compiler option
-Werror=misleading-indentation.

Change-Id: I56e0921b1319852109d978cf239b54c2941a0e8e
CRs-Fixed: 2353199
2018-11-30 03:40:41 -08:00
Kiran Venkatappa
74e6d8b510 qcacmn: Enable AST workaround only for HKV1
HKV1 does not have support to maintain per pdev AST table.
Hence workaround is required to ensure that AST entry is deleted before
adding an entry with same MAC. This syncronization needs to done across
pdev. This workaround in required on for HKV1, add changes to enable
workaround only for HKV1 and disabled for other platforms.

Change-Id: I9aa43ea51fdff2f02cdcc8ff7e906c7305446317
CRs-Fixed: 2344921
2018-11-22 00:43:47 -08:00
sumedh baikady
61cbe85a14 qcacmn: Per tid BA window size enhancement for HKv2
For HKv2, BA window size can be configured on per tid
basis as opposed to per peer basis on Hkv1. This per
peer per tid configuration on Hkv2 is for Tid 0 to 7.

Change-Id: Ic4afee92792af829a9ad8fdfc211625743b9d052
2018-11-21 22:59:19 -08:00
Pavankumar Nandeshwar
2a2b7fecb0 qcacmn: remove the host ast_entry after deleting in FW
Removet the host ast_entry after sending delete ast_entry
to the firmware. This will handle the situation where we
might receive an add request for the same ast_entry,
while we are waiting for delete response from the firmware.

Change-Id: I105504a9c6a1e8e53bef9f3d011c10f846fd098e
CRs-Fixed: 2347989
2018-11-15 01:38:36 -08:00
Ruchi, Agrawal
93bcf1292f qcacmn: Take reference for peer before adding ast
Add reference for peer before adding ast entry
Reference is taken to avoid any synchronization
issue wrt to peer when adding ast entry.

Change-Id: Id3116daed84ad15eba515fedddb1146845542742
CRs-Fixed: 2335943
2018-11-13 22:44:40 -08:00