Commit Graph

307 Commits

Author SHA1 Message Date
Chaithanya Garrepalli
7c8cf12b76 qcacmn: add API to get ast entry from peer ast list
We are adding AST entry to ast_table from
dp_rx_mcast_echo_check in STA mode as in STA mode
we will not get the peer map event.

Find AST entry from the peer ast list to get ast entry
added in host for that particular peer. As in QWRAP
mode there can exist multiple peers with same mac address
and corresponding AST entries will be added

Change-Id: Ia75f88c03c4d0eba0edbebf8e8f40d41396543d5
CRs-fixed: 2307540
2018-10-08 01:53:25 -07:00
Tallapragada Kalyan
5e3a39c8d3 qcacmn: add support for Secondary HMWDS ast entry
add support for Secondary HMWDS ast entry

Change-Id: Ibf77659cbc2d7e2b536736d89e747549e269e68c
CRs-Fixed: 2312270
2018-10-06 08:16:22 -07:00
Tallapragada Kalyan
2ae71e0531 qcacmn: Add AST entry for Destination MAC in RX path
Because of a HW issue we have added a WAR where we do
learning even on destination MAC address. This will ensure
da_is_valid even for forwarding traffic and HW will cache
this entry for subsequent pkts there by we achieve better
throughput in UL.

Change-Id: Ib61693e9ce52b3a1cdcd4c34eabb3d8368b1ef13
2018-10-05 15:46:53 -07:00
Chaithanya Garrepalli
1b0579d9a6 qcacmn: remove reference of self_ast_entry in peer while deleting it
Reset the self_ast_entry in peer to NULL when self_ast_entry is deleted
to avoid use after free or double free conditions

Change-Id: Ic1779e35cbd98ddc0333808152e4c388449a45af
CRs-fixed: 2321768
2018-10-03 02:44:41 -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
d203e2d6ab qcacmn: changes in add ast to support HKv2
Changes to find the AST entry based on pdev_id as
AST entry per pdev can exist in HKv2

Change-Id: I27e66f4671fe2c5eca4c496d6220e94f087f2c18
CRs-fixed: 2317790
2018-09-27 18:54:18 -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
Chaithanya Garrepalli
157543d36f qcacmn: free all the ast entries before freeing ast table
While freeing the AST table traverse through table and
free any AST entries present in the table

Change-Id: I87382da2425380938d91ee1980a9c356c0f647ef
CRs-fixed: 2275212
2018-09-17 09:39:04 -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
Radha krishna Simha Jiguru
d359eb4268 qcacmn: Send ast hash value to NetAP
Send the ast hash value received in peermap to
NetAP for offload mode

Change-Id: I094c890d651fbe14d995a299d6a369394512c8b2
2018-09-17 09:38:58 -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
Radha krishna Simha Jiguru
91f9949832 qcacmn: Send ast_hash for peer create in nss
Add support to send ast hash during peer create.
This value will be used for packet enqueue to transmit block.

Change-Id: Iea188a4b60f96d7770037265d12e534ee2b55bba
2018-09-14 03:12:38 -07:00
sumedh baikady
faadbb6cd0 qcacmn: Handle addba req with incompatible buffersize
In HKv1 HW there is a buffersize setting per peer, hence
once we set buffersize we have to stick to this for all
subsequent requests for all tids. If buffersize in Addba
request is more than first session's buffersize, we restrict
buffersize to old value, else we send respond with new size
and send delba to previous sessions not compatible with new
buffersize

Change-Id: Ia71d994ee06ca7b37d93273f5fa69547f816dd20
Crs-fixed: 2247816
2018-09-10 04:25:29 -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
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
Karunakar Dasineni
6a5267501f qcacmn: Fix 'need_status' during rxtid deletion
Set 'need_status' while sending REO queue update command
for deleting REO queues to get status from HW, which will
trigger callback to cleanup and free the queues.
Also fix issue in initializing REO command descriptor, causing
command number to be cleared.

Change-Id: Ie30fc80f76d835e239dd0b3d3e78c7f32bfa09a4
2018-08-27 22:07:33 -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
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
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
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
Gyanranjan Hazarika
7f9c050df4 qcacmn: ba_window size in WMI for rx_reorder_queue_setup
ba_window_size_valid and ba_window size support is missing
while sending wmi_peer_reorder_queue_setup. This is needed
for handing 256 BA which is not FW default.

Change-Id: I3218921c48c0f82225b7992076e73ac0acf7bd11
CRs-fixed: 2285423
2018-08-07 02:19:31 -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
Mohit Khanna
890818bd02 qcacmn: Return NULL peer for invalid local_id
Return NULL peer in case an invalid peer->local_id is passed to the
peer_find_by_local_id API. In case this peer is already deleted,
the local_id may be invalid, hence simply return a NULL value.

Change-Id: I0cbae4138daa643dfa07b88caf6f32d3948d6d42
CRs-Fixed: 2280399
2018-08-01 14:20:47 -07:00
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