Commit Graph

231 Commits

Author SHA1 Message Date
Balamurugan Mahalingam
f72cb1f1ff qcacmn: include hal_hw_headers.h header file
macros and fw cmn headers included in hal_internal.h is moved
to a new hal_hw_headers.h to avoid these getting included in hif
layer. Include the new hal_hw_headers.h file

Change-Id: I3390ae9e71ca561d94a265e1fdf4d9354e7b2474
2018-07-21 00:03:27 -07:00
Alok Kumar
fcdb185203 qcacmn: Add cdp ops to set/get timestamp for management frames
Add cdp ops for timestamp setter/getter function for peer based on
mac address.

Change-Id: I7025fdd7540f47bb4d3f95ef6d9f2ef92af5f1f1
CRs-Fixed: 2275985
2018-07-18 00:18:12 -07:00
Krunal Soni
304792abd8 qcacmn: Fix peer ref counting leak while finding and deleting peer
There are two instances where peer ref counting leak has been observed
1) When DUT-STA is connected to AP1 and if it tries to roam to AP2 or
   to same AP1 then as part of roam sync indication, it needs to delete
   the old peer and create the new peer. Deletion of old peer is
   happening through force delete operation which is No-OP for some of
   the platforms. In such cases, do normal peer delete operation, so
   that peer ref count can be deleted properly.

2) When looking up peer by its associated vdev, driver goes one by one
   all peers and check their associated vdev and compare with given
   vdev. If it doesn't find the match then it returns without releasing
   the reference count.

CRs-Fixed: 2263607
Change-Id: Ibcad72943258e531e29498961d3d7e692fd05b36
2018-07-10 18:42:09 -07:00
Akshay Kosigi
1a9c6d1d4c qcacmn: Rename osif_pdev and os_if_vdev in dp_pdev and osif_dev
structures

Rename osif_pdev to ctrl_pdev and os_if_vdev to ctrl_vdev in dp_pdev and
osif_dev structures respectively which are
pointing to objmgr_pdev and objmgr_vdev structures to maintain
uniformity

Change-Id: Ida95a1a90ea74513573f00c652338baee3df897a
CRs-Fixed: 2241362
2018-07-09 02:02:23 -07:00
Pramod Simha
6e10cb2dd6 qcacmn: Add CDP API to set key in data path
1. Add CDP API to set encryption key in datapath.
   Used to perform RX TKIP demic.
2. Fixes to RX TKIP demic function.

Change-Id: Ia14caeb71a320b4746f4303cf6611f1b6e4947ae
CRs-Fixed: 2214749
2018-07-02 16:09:03 -07:00
Gurumoorthi Gnanasambandhan
d733cd7d30 qcacmn: Reset seq number during key install
Reset seq number during roaming key set. REO error 5 is seen
when expected seq number is higher than received seq number.

Change-Id: Ifa7be042479685ac52f571d0e94f3165b239db08
2018-06-29 02:15:47 -07:00
Ryan Hsu
9d56e3a4c0 qcacmn: sanitize the range of local_id before using it
Sanitize the local_id before accessing to the local_peer_ids pool.

Change-Id: I5cd2f19d493360d384de895dccfaf51d3008b5b7
CRs-fixed: 2247672
2018-06-20 02:30:57 -07:00
Lin Bai
f1c577ee03 qcacmn: Cleanup defrag waitlist when removing peer
Peer's RX TID may already be added to defrag's waitlist when it is
removed. Then use-after-free occurs when waitlist be accessed later.
Remove current peer's entries from waitlist, before it is freed.

As waitlist may be accessed from two contexts, additional lock
introduced to protect waitlist.

CRs-Fixed: 2244566
Change-Id: I8f1935973372a81086e9dbd992ac771b6709a677
2018-06-06 07:39:38 -07:00
Jeff Johnson
ff2dfb217b qcacmn: dp: Fix misspellings
Address the following issues in the dp folder:
CHECK: 'availble' may be misspelled - perhaps 'available'?
CHECK: 'catagory' may be misspelled - perhaps 'category'?
CHECK: 'endianess' may be misspelled - perhaps 'endianness'?
CHECK: 'exceded' may be misspelled - perhaps 'exceeded'?
CHECK: 'explicitely' may be misspelled - perhaps 'explicitly'?
CHECK: 'Inteface' may be misspelled - perhaps 'Interface'?
CHECK: 'lengh' may be misspelled - perhaps 'length'?
CHECK: 'messsages' may be misspelled - perhaps 'messages'?
CHECK: 'miscelleneous' may be misspelled - perhaps 'miscellaneous'?
CHECK: 'Ouput' may be misspelled - perhaps 'Output'?
CHECK: 'poiter' may be misspelled - perhaps 'pointer'?
CHECK: 'Poiter' may be misspelled - perhaps 'Pointer'?
CHECK: 'psuedo' may be misspelled - perhaps 'pseudo'?
CHECK: 'registerd' may be misspelled - perhaps 'registered'?
CHECK: 'requred' may be misspelled - perhaps 'required'?
CHECK: 'retreive' may be misspelled - perhaps 'retrieve'?
CHECK: 'succesfully' may be misspelled - perhaps 'successfully'?
CHECK: 'vaild' may be misspelled - perhaps 'valid'?
CHECK: 'virtaul' may be misspelled - perhaps 'virtual'?

Change-Id: I66b9cdc6115dd133b385e60c9d02cefd1bd0bac3
CRs-Fixed: 2241574
2018-05-19 19:41:02 -07:00
Jeff Johnson
bd6e61f610 qcacmn: Fix typo "funtion"
Replace typo "funtion" with correct spelling "function".

Change-Id: I05db828dd5830d4b95467ed5494f319113de9252
CRs-Fixed: 2238309
2018-05-17 00:47:29 -07:00
Jeff Johnson
97a1cc5caf qcacmn: Fix typo "paramters"
Replace typo "paramters" with correct spelling "parameters".

Change-Id: I7b82a1c3fda1e826840152fb1a23102f3c23fdb8
CRs-Fixed: 2238309
2018-05-17 00:46:57 -07:00
Chaithanya Garrepalli
2f5727960b qcacmn: Initialize dp peer map memory after WMI service ready
Initialize the peer map and peer hash memory based on the config
received from target in service ready event

Change-Id: I8e1b62cd9586f5b2be7acb863a106d2486be1b35
CRs-Fixed: 2223428
2018-05-02 03:19:29 -07:00
Pamidipati, Vijay
3b0f9169c5 qcacmn: add wildcard search support for peer_hash_find
Add option to ignore vdev_id match to peer hash lookup API
when vdev_id is passed as 0xff to the API, it ignores vdev_id
argument

This option is needed for usecases like peer level statistics
display where only MAC address is known and vdev_id is not known

Also add the missing accounting of rx broadcast frames in the
overall statistics

Change-Id: I9939ac8bf30f6be3d216f9aa28d52560bf445e06
2018-04-25 13:35:06 -07:00
Pamidipati, Vijay
d578db10c0 qcacmn: Handle STA roaming to another AP/Repeater
Add support in DP WDS source port learning handler to kickout a STA,
when direct associated peer(SA) roams to another AP/Repeater and
reachable via TA peer

Change-Id: I84d0b92c9b4e39c05f4d7c25b3f5afb1d535ca02
CRs-Fixed: 2219924
2018-04-17 05:09:05 -07:00
sumedh baikady
68450abc57 qcacmn: Fix peer NULL check in peer map handler
For FTM mode we receive peer map events without
peer created. This change checks for peer NULL case
to access peer vdev.

Change-Id: I1998e33ca3d9338dba939dc760dcf7bfdb70d1e3
Crs-fixed: 2212203
2018-04-10 18:43:55 -07:00
Chaithanya Garrepalli
e323f80584 qcacmn: remove assert for peer delete_in_progress from peer map
At the time of peer map delete_in_progress can be set for newly
created peer in case host send sends the peer delete to FW before
we receive the peer map even from FW

Hence removing the assert to check delete_in_progress flag in
peer map

Change-Id: I28b2f46cf4fdd12bf98ce54dd7dcea68d96dc795
CRs-Fixed: 2216550
2018-04-03 02:56:22 -07:00
Chaithanya Garrepalli
0323f80221 qcacmn: Correct peer create-delete sequence
If peer with given MAC Address
already exists, just increment the refcnt
instead of allocating a new peer and deleting older
peer object. This avoids unnecessary memory fragmentation.

Change-Id: I76a3ffca4e907fccfdfd1b6857de721623f455d5
CRs-Fixed: 2209045
2018-04-02 15:21:55 -07:00
Chaithanya Garrepalli
4c7099f001 qcacmn: Add lock for update ast entry
Add lock protection while update of ast entry for
peer

Change-Id: I0f61add9a06174303b40b017a6f1f2d202f3cf55
CRs-Fixed: 2210301
2018-03-30 02:46:44 -07:00
Chaithanya Garrepalli
974da2640a qcacmn: Avoid reference of peer object after peer_teardown
In API dp_peer_find_by_id return NULL if delete_in_progress
bit is set, this will avoid referencing peer memory which will
be free in peer_unmap event asynchronously.

Change-Id: Ieab559b9274a886809a9baa9bb348d348e924625
CRs-fixed: 2194265
2018-03-20 07:38:25 -07:00
Tallapragada Kalyan
71c46b9357 qcacmn: WDS and AST specific code under different compile time flag
Based on requirement from customer we have re-organised
AST specific and WDS specific code under different compile
time flags.

Change-Id: Icbb0dff7c2e7a2239d82c296468fa8d3e4f53021
2018-03-20 05:59:07 -07:00
Anish Nataraj
0dae67614e qcacmn: Assign bss peer in peer map event
Assign num_mpdu to mpdu_tried_mcast for mcast stats updation
Defer bss peer assigning till peer map event arrives
Do not set delete_in_progress for bss Peer

Change-Id: I0881ea3c8804990c336d97cb7b239a991ec64fa9
2018-03-20 02:10:07 -07:00
Tallapragada Kalyan
7a47aac367 qcacmn: Remove AST entry from previous peer ast_list for ast update
Remove ast entry from the previous peer ast_list and add it to the
new peer ast_list when ast_update is called

Change-Id: Ic6e628ec2c225e6743d042fe3f3e227cb1864a3c
2018-03-14 09:57:13 -07:00
Ruchi, Agrawal
d536f88dda qcacmn: Add correct peer macaddr entry for son
Adding correct peer mac addr for HM_WDS son to avoid
target assert

Change-Id: I3c8ecbf46e336997597893c5093e7de698a61182
CRs-Fixed: 2195984
2018-03-13 11:05:37 -07:00
Karunakar Dasineni
31b98d4cd7 qcacmn: Fix memory leak during REO cmd ring drain
Fix possible REO descriptor leak while draining REO
command ring by invoking command status handlers with
special error code.

Change-Id: I2fe5f60489b57a4b0a287e67e5610112f7292677
2018-03-02 19:34:25 -08:00
Ruchi, Agrawal
d6ba7ae230 qcacmn: Correct return values on ast entry add
Return value on dp_peer_add_ast where not correct
resulting in unnecessary flooding of print.
Correct the return values for the AST APIs

Change-Id: I03983995e96314cae91db95fe02edda4564baa46
CRs-Fixed: 2183715
2018-03-01 01:35:28 -08:00
Karunakar Dasineni
25f1b0434b qcacmn: Change REO queue descriptor delete sequence
Change REO queue descriptor delete sequence to flush base and
extension descriptors separately, since flushing base descriptor
alone results in extensions flushed by HW much later,
sometimes after freeing descriptor memory, causing use-after-free
corruptions. Also increase REO command and status ring sizes
since number of commands per RX TID flush has increased with
this change.
Fix interrupt batch count setting for non pkt/buffer rings,
which includes REO status ring.
Also remove callbacks during reo command list destroy,
done as part of SOC detach. This should not be done since
callbacks will access stale data structures that are freed
as part of PDEV/SOC detach.

Change-Id: I4337454d3f53cc0b3c3014ef07cc2ba13cfebb18
CRs-Fixed: 2175989
2018-02-17 09:42:22 -08:00
Tallapragada Kalyan
57b6bb3e1d qcacmn: Add support for DBDC repeater
Added CDP callback APIs so the DBDC repeater module
outside of cmn_dev can add, delete and update the AST
entries. Also with this change the sending of wds cmds
to fw is tied to adding AST, deleteing AST and updating
the AST entries.

Change-Id: I48d31962236860f50e16b771abaf3b8825b798df
2018-02-13 02:00:41 -08:00
Sathyanarayanan Esakkiappan
38c6f988d5 qcacmn: Pass psoc/pdev object as ctrl objects to DP
pass psoc/pdev object as ctrl pointers to instead of legacy objects.
It introduces new APIs to get feature pointers of psoc/pdev.

DP attach API param modified to pass ctrl psoc (psoc object)

Change-Id: I3d83f28c3e72e5ee984a4220b9d5cf3c4522b501
CRs-Fixed: 2177109
2018-02-03 15:11:15 -08:00
Karunakar Dasineni
372647d95a qcacmn: Avoid REO queue setup after peer deletion
REO queue setup is getting triggered from processing
pending null queue exceptions in WBM release ring, after
sending peer delete command to FW, but before peer unmap
is received, causing target assert. Mark peer deletion
before sending peer delete command to avoid this.

Change-Id: I2d85d01e049cb37d9321beeee8e41f44e40e68ad
CRs-Fixed: 2155420
2018-01-19 13:34:25 -08:00
Gyanranjan Hazarika
99a58d3b1a qcacmn: Add support for setaddbaresp cmd for HE
Addba recieve/response logic has been implemented in
host for HE instead of in FW like VHT. setaddbaresp
is not hooked to the dp module yet to set the addba
response from userspace. Implement the required logic
for HE to support this command.

Change-Id: I49cceca299db06d41f2cafa690f5ba59e01f1f4a
CRs-fixed: 2163475
2018-01-13 01:28:23 -08:00
sumedh baikady
e3947bd8d6 qcacmn: Add stats for BA per Tid
Adds stats for number of ADDBA, DELBA requests,
pn size and window size per tid.

Change-Id: Ib7e3a9b948439695afd9a952fe46ac42ac58c653
CRs-fixed: 2151863
2017-12-16 19:25:08 -08:00
Lin Bai
fca7640032 qcacmn: Fix memory leak when failing to delete RX TID
During RX TID deletion, if FLUSH_CACHE REO cmd fail to be sent,
the required callback function won't be invoked, hence
local allocated REO desc and related TID queue desc will leak.

Do clean up when REO cmd failed to be sent.

CRs-Fixed: 2155929
Change-Id: I02ff4a2340ad32986c30b935a376924bb75edb67
2017-12-14 17:45:18 -08:00
chenguo
85d964f48b qcacmn: Add AST type for DP path
There is a hard-coded AST type number used for DP path, which will
cause poor readability. Fix this problem by using a pre-defined
constant type value.

CRs-Fixed: 2142975
Change-Id: I3520970bf59ea7152a0851cfdc3b8e7943ddbc19
2017-12-13 23:38:12 -08:00
Yun Park
11d46e0476 qcacmn: Optimize data path logging
Remove or lower log level to reduce log from data path which affects
to TPUT.

Change-Id: I7d4344c80cefb4a9539644ef50ff2074d80d6548
CRs-Fixed: 2143250
2017-12-07 22:34:10 -08:00
Manjunathappa Prakash
c850ec6e18 qcacmn: Move AST handling functions under WDS compile flag
Move AST handling functions in side WDS compilation flag.

Change-Id: If8fb93e513b1a645b5d9c7fb73df0ed90770010d
CRs-Fixed: 2131812
2017-11-16 07:22:06 -08:00
Chandru Neginahal
2a4e5d2262 qcacmn: Proxy STA fails to connect to ROOT AP in QWRAP mode
Correct the logic to send peer create command in nss
wifi offload mode.

Change-Id: If88a18798af9ee9273c9580ca1fd725a15f07eef
CRs-Fixed: 2119796
2017-11-16 02:48:42 -08:00
Yun Park
601d0d868a qcacmn: Fix IPA WDI3 Tx issues
Fix bug to enable IPA WDI3 Tx H/W path.

Change-Id: Ice691dccc649b38971985cd8da042719d943cec7
CRs-Fixed: 2085751
2017-10-23 22:08:28 -07:00
Pratik Gandhi
51b6b6d21b qcacmn: Control frame stats Rx BAR frames
Add Pdev level stats for Rx BAR frames.

Change-Id: I1cce56559fd1ffec11f873e35cb1c42b49c1c9ff
CRs-Fixed: 2110552
2017-10-23 01:55:58 -07:00
Houston Hoffman
41b912cfff qcacmn: DP logging adjustments (1)
Adjust logging to reduce printing to the console by datapath.

Change-Id: I9354cf939a6edcf6cd6fc66dbeb4638b517f30da
CRs-Fixed: 2117150
2017-10-20 12:17:26 -07:00
Yun Park
92af713fa2 qcacmn: Fix Intra-BSS forwarding issue
Extract ast_table manipulation functions from WDS feature flag

Change-Id: I029e151f608a6bb60344d817d7b7c75b86ca981b
CRs-Fixed: 2110304
2017-10-05 16:11:31 -07:00
Jeff Johnson
3f217e2a81 qcacmn: dp: Replace instances of unadorned %p
Replace instances of unadorned %p in dp.

Change-Id: I8d9c0f6efe5f03a582a36d7ff39a905a5de576a7
CRs-Fixed: 2111274
2017-09-28 04:48:10 -07:00
Pamidipati, Vijay
899e775769 qcacmn: Add support to dump Host AST table
Add support to print Host AST table contents and
AST statistics

Change-Id: I669d547657fe9d826d2aed59cf8dbb06bc100996
CRs-Fixed: 2099205
2017-08-29 23:41:34 -07:00
Radha krishna Simha Jiguru
f70f991f45 qcacmn: Send peer create to NSS only for connected peers
Send peer create to NSS only when peer map comes for connected peers.
When peer map comes for WDS peers only update WDS peer specific entries.

Change-Id: I32d785180bcd1dae2703d40b55f4536685f10439
2017-08-17 20:51:16 -07:00
Tallapragada Kalyan
1c14d5d8e9 qcacmn: MEC loopback check even when sa_is_valid not set
There is a case when the multicast/broadcast frame gets loop backed
even before a MEC WDS entry gets added, in this case
the MEC check based on sa_is_valid will fail, hence added
another ast lookup check.

Also fix the ast entry iterator to use _safe option, since
we are deleting ast entries in the same iterations

Change-Id: I0567893783649d991c3623a61c60fbc63d1a24ef
2017-08-17 14:55:13 -07:00
Tallapragada Kalyan
fb72b637f7 qcacmn: AST based MEC support for HAWKEYE
Implemented MEC support using AST entries rather than
using a separate MEC table.

Change-Id: Ifaafb4be1f8a981ad28609ea9740e8bbccec9046
2017-08-17 14:55:11 -07:00
Yun Park
fde6b9e551 qcacmn: Enable WLAN host data path support for IPA WDI3.0
Change to support WLAN Napier host autonomy data path architecture.

Change-Id: I07f7592d547bb796a3c12bbc4745cee22e2c0022
CRs-Fixed: 2064810
2017-08-07 17:47:38 -07:00
Aniruddha Paul
662d734e4e qcacmn: Fix for NSS peer create message
Change-Id: I5c1c632e9d78fddc9db8ffc898dc26352d6c0a85
2017-07-21 20:15:19 -07:00
Pamidipati, Vijay
b8bbf16192 qcacmn: Add support for WDS aging
Add support for monitoring receive traffic from WDS nodes and
aging out inactive WDS nodes

Change-Id: Iedea826832a5421714c00bccadc6e0dc4acd4c7e
CRs-Fixed: 2004658
2017-07-15 11:38:57 -07:00
Karunakar Dasineni
3da0811330 qcacmn: Fix REO stats prints
Split stats prints since they are truncated to 512 bytes due recent changes in
QDF_TRACE. Also flush REO queue descriptor cache after fetching stats to help
dumping from memory (for debugging).

Change-Id: Ie1d00766bd452d32cbc7085e95b66fb11bb9893c
2017-07-11 23:48:11 -07:00
Linux Build Service Account
429221b907 Merge "Revert "qcacmn: test change to validate on how to exclude MCL changes in WIN"" 2017-06-21 09:53:26 -07:00