Commit Graph

790 Commits

Author SHA1 Message Date
Vinay Adella
4ca1bf63ba qcacmn: Flush peer entries, if target is in reset state
Free all references held due to missing unmap command
from the Target

CRs-Fixed: 2185830
Change-Id: Ied4c3fc9f694c32ad0a283942eebb64430082d70
2018-03-05 04:28:24 -08:00
Ruchi, Agrawal
f279a4a02a qcacmn: Correcting CCE Disable Param check
CCE disable param set based on return value
which has to be checked for 1, instead of
any return value non zero

Change-Id: Ia48e5d0f50a49944dbf7ca048aab1220d8989beb
CRs-Fixed: 2132295
2018-03-01 01:35:32 -08:00
Pratik Gandhi
81fe062e7d qcacmn: Add peer protection for pdev control stats
Add protection for vdev & peer while traversing during collecting
control frame stats.

Change-Id: I1e8e4e5f6f94b35644e03ddafc03b0d885d27972
CRs-Fixed: 2189230
2018-02-28 13:22:34 -08:00
Prathyusha Guduri
43bb056ed0 qcacmn: Add fw stats to cdp_pdev_stats
Add htt tx and rx structs from HTT to cdp_pdev_stats.
These Fw tx and rx stats are obtained through HTT events.
athstats application uses cdp_pdev_stats that contains host stats
and fw stats.

Change-Id: Ia063f406bdc6d32a684c4026b8425ecc96faa3db
CRs-Fixed: 2190793
2018-02-27 23:33:48 -08:00
phadiman
7821bf873d qcacmn: Remove direct Target I/F-DP interactions
Add CDP interface for missing DP APIs for use in TARGET I/F layer

Change-Id: I22158bc9120e5e53253c8005772dc1060527249d
2018-02-27 16:04:38 -08:00
Tallapragada Kalyan
9d9cbb6762 qcacmn: Fix memory leak during vdev detach in STA mode
Vdev detach does not happen till all the peers associated
the vdev are deleted. because of DBDC repeater feature,
we are creating a self peer even for STA VAP and were not
deleteing it properly causing a memory leak. This change
fixes this issue.

Change-Id: I39d271bef5d5adc6e94333a3fbc483bdb7067f27
CRs-Fixed: 2193590
2018-02-27 14:07:11 -08:00
Venkata Sharath Chandra Manchala
65812e69c8 qcacmn: Fix for Tx completions counter not being updated in txrx_stats
Tx completion success counters are not being updated correctly.
Accumulate successful completions in tx_success variable.

Change-Id: I290e581e93e03ad23e349c9df7834174d6d3a787
CRs-Fixed: 2191599
2018-02-26 21:44:54 -08:00
Srinivas Pitla
0e3478d8a8 qcacmn: Fix passing right pointer as pdev object
As part of init FR, osif_pdev object stores pdev object, so same has
to be passed as param.

Change-Id: Ic9c41e5ef54fdb80898f10f27a86970e76d1f24c
CRs-Fixed: 2188451
2018-02-26 06:35:04 -08:00
Soumya Bhat
bc719e6b02 qcacmn: Add support to get RSSI of Non associated clients
Add change in driver to get RSSI of non associated clients.

This is done in 2 levels of filtering
1. Send WMI to FW to configure BSSID in HW
2. Filter the neighbour BSSID packets received in host for
the configured client mac

Change-Id: I6b684b83cecb308dac326056aa77537aee07b933
CRs-Fixed: 2148773
2018-02-23 20:01:17 -08:00
Manoj Ekbote
4a59d8de1c qcacmn: Fix issues leading to use-after-free
1. After mem_free() is done for a vdev without peers,
set it to NULL so that later check can catch it.If not,
it could be used to increment stats.
2. After a bss peer is freed, mark it as NULL so that
it is not used again to update stats.

Change-Id: I82e73c29c1409aac1af735ab849e8b07d387acf2
2018-02-23 12:54:45 -08:00
Chaithanya Garrepalli
20d7142933 qcacmn: Removed WDS rx stats from host peer stats
Removed WDS rx stats from host peer stats as this
is not supported in HAWKEYE

Change-Id: Id12be043b584a659ecbec46b6c2efb161d4248d3
CRs-Fixed: 2186376
2018-02-21 18:20:57 -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
Mohit Khanna
9a6fdd5cee qcacmn: Debug prints for monitor mode
Add some debug prints for monitor mode

Change-Id: Ie12279c832647cac9e1f152c98fa0205dd9d495e
CRs-Fixed: 2173407
2018-02-16 22:58:07 -08:00
Pamidipati, Vijay
d3478efb89 qcacmn: Add CDP interface for attach/detach of extended DP
Add APIs to be used by extended DP modules to attach/detach
their respective handles with Core DP module.

Change-Id: I63cf0883f7462a11b49666bda697c7e872d7b925
2018-02-15 14:10:53 -08:00
Aniruddha Paul
9d7dc27fe2 qcacmn: Masked out the Host Tx Desc allocation for NSS offload
Masking out the tx_desc and tx_ext_desc allocations for NSS offloaded
radios.
CRs-Fixed: 2188417

Change-Id: Ibe949a899da1dd2c815ce6a10c355f7ee5976e7a
2018-02-14 07:49:24 -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
Stephan Raj Ignatious Durairaj
e5dd51ce96 qcacmn: remove inact timer multiple initialization
Inactivity timer initialization is moved from dp
attach to soc attach as the timer is being
initialized multiple times in case of multiple
radios

Change-Id: I85d1d8710ccc7531c43ec82378c3ca0b65d26cf9
2018-02-12 17:22:43 -08:00
Soumya Bhat
0d6245c0ac qcacmn: PPDU stats debug enhancement
1. Assert if length received from FW is not equal to
   the expected length
2. Count the number of PPDU stats received by host and
   print in "iwpriv athX txrx_stats 260"
3. Optimize the PPDU stats tag mask sent to FW for
   enhanced stats enabling

Change-Id: I60019de93bb3914955a03546504efc820c960746
CRs-Fixed: 2170704
2018-02-12 07:34:57 -08:00
Ruchi, Agrawal
8e2796b8ac qcacmn: assert in rx path
Assert happened in rx path because rx reo rings setup
is done and after that default routing information is
updated, if any time elasped any buffer received in
exception ring falsely. Setting route information before
intialize.

Change-Id: I48c7292db0823d3eac639429f956dff1fcc41cae
2018-02-11 23:20:52 -08:00
chenguo
cda25129be qcacmn: Configure correct parameters for STATS_RESET command
For HTT_DBG_EXT_STATS_RESET command, FW need to config from
param0 to param3 according to below rule:

PARAM:
-- config_param0 : start_offset (stats type)
-- config_param1 : stats bmask from start offset
-- config_param2 : stats bmask from start offset + 32
-- config_param3 : stats bmask from start offset + 64

CRs-Fixed: 2177891
Change-Id: I8723baf9af8ea469d080922db74c5e602903e4a3
2018-02-09 05:32:53 -08:00
Prathyusha Guduri
184b640cbd qcacmn: Move cdp_stats to cdp_txrx_stats_struct.h
To expose cdp_pdev_stats to athstats, move cdp_stats from
cdp_txrx_cmn_struct.h to cdp_txrx_stats_struct.h and include
cdp_txrx_stats_struct.h wherever needed

Change-Id: I0e86527d47f5c6056a3bfbf5e8151594879427f3
CRs-Fixed: 2183725
2018-02-09 01:51:30 -08:00
Karunakar Dasineni
37995ac196 qcacmn: Fixes for monitor ring stall issues
STATUS_DONE is missing sometimes in monitor status ring,
causing stalled processing in host and backpressure to RXDMA.
Adding a WAR to skip such entries.
Also increased the size of monitor link descriptor ring since
multiple descriptors are used for large MPDUs.

Change-Id: I556b4196482ed738471afc1f7e7b73cf3f8fbc51
2018-02-08 07:55:48 -08:00
Venkateswara Swamy Bandaru
58c8085e21 Revert "Revert "qcacmn: Mesh throughput enhancements""
This reverts commit I7421f3572c46ed27a2d96724b2bbbe40c0704e5f.

Change-Id: I8c44b0e893f81aadf7aa4404538776f27a579d76
CRs-Fixed: 2180219
2018-02-06 07:44:57 -08:00
Karunakar Dasineni
b71ad04168 qcacmn: Fix link descriptor pool cleanup
Set link descriptor memory address to NULL after freeing to ensure
it is not freed again. This is seen with soc_detach called during
attach failures.

Change-Id: I7338cb8c64fcb652c95f42bcb9e998a6f043cecf
CRs-Fixed: 2160703
2018-02-05 21:39:57 -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
Aniruddha Paul
91dfd50160 qcacmn: Add API to change Rx Fragment DST ring
Add API to change the Rx Fragment DST ring based on the SoC NSS
config
CRs-Fixed: 2175933

Change-Id: I2e3f0b82d301538f54d9790d55eeccdd0f6fa154
2018-01-30 23:55:20 -08:00
Prathyusha Guduri
be41d97175 qcacmn: add dp_tx_send_exception
dp_tx_send_exception is an exception path that transmits frames
through FW by setting DP_TX_DESC_FLAG_TO_FW

Change-Id: Id6abfcd2bf060c4fe3aaca91634f3be501530a7e
CRs-Fixed: 2176814
2018-01-30 13:40:37 -08:00
Subhranil Choudhury
eea6738ef9 qcacmn: Move peer activity marking to a common place
Move the peer Rx activity to PPDU_stats_handler
which is common for both NSS offload and Host datapath modes.

Change-Id: I06c3dd14d117cc291e3b19076ddfc7f3be00e602
CRs-Fixed: 2176385
2018-01-30 05:39:07 -08:00
Pranita Solanke
a5a3ae721e qcacmn: Add support for Tx and RX Broadcast Packets
Add counters to display the broadcast packets on Tx and Rx side

Change-Id: I85bea07b83d34dc15b185297e7ec63208d8ab8e8
2018-01-30 05:39:04 -08:00
Venkateswara Swamy Bandaru
b2864fabe4 Revert "qcacmn: Mesh throughput enhancements"
This reverts commit I89ff27994477a5637979a9cd6a397286144b2535.

Change-Id: I7421f3572c46ed27a2d96724b2bbbe40c0704e5f
CRs-Fixed: 2177160
2018-01-26 09:20:39 -08:00
nobelj
c8eb4d60fb qcacmn: Add support to get monitor filter
on get_monrxfilter, it get the filter value set in dp_pdev struct

Change-Id: I6590ae90a606643177d905c3542edd39dbcf539a
2018-01-25 09:25:40 -08:00
Anish Nataraj
28490c4c5e qcacmn: Add checks in rx_mon_status handler to filter spurious frames
1. find_first_bit API returns Size value if it doesn’t find any bit set.
   This was causing VOICE AC counter to go high even for TID 0
2. Reset stats was not resetting the stats immediately
3. Added checks to avoid spurious stats increment
4. Detect data/mgmt pkt to avoid spurious stats increment

Change-Id: Ic9c5695fc7bdf58d1237e7e20bb79378a02a21f6
2018-01-25 05:08:23 -08:00
Pranita Solanke
a38c7a3b04 qcacmn: Fix scn_stats issue
Move the stats update to per pdev stats update function

Change-Id: I586927cb60eae188ce792fff34c67cde003c3f01
2018-01-24 23:47:01 -08:00
psimha
fc2f91b86a qcacmn: Add RX defrag timeout handler
Add tid to the defrag waitlist & timeout if further fragments are not
received.

Change-Id: Iff2d2c23fe796cf70bcc6aa43ab02a308a33ee9f
CRs-Fixed: 2174750
2018-01-23 22:29:16 -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
Anish Nataraj
072d897705 qcacmn: cck,nss and preamble update fix
cck rates were getting updated for ofdm rates
and nss index were getting wrongly incremented
fixed the same

Corrected sgi and preamble too

Change-Id: I2dabb685de6e0bd4ba5094845cde228b3c32e2a9
2018-01-19 12:20:24 -08:00
Pranita Solanke
ed0aba69a9 qcacmn: Rx and Tx peer statistics update
* Update the pkt_type counters correctly within the array bound
 * Add support for NSS counters on Tx side
 * Update ampdu flag in PPDU struct
 * Add support for ampdu flag in hal_ppdu struct

Change-Id: I79ea52727124ea4be4d82912cb2513ea58e2af10
2018-01-18 02:33:34 -08:00
Santosh Anbu
2280e86440 qcacmn: Componentize extender AP
Remove dependency of extender ap on VAP layer and radio(ic) layer data
structure

Change-Id: Ib336f518847abd1b29f5ea3cfd1a508dc2cd14e8
CRs-Fixed: 2148247
2018-01-14 07:25:34 -08:00
chenguo
1dead6f99e qcacmn: Fix pointer dereference after memory free
The pointer to peer is dereferenced after memory free in peer
_unref_delete function. Fix the issue by changing function
call sequence.

CRs-Fixed: 2167698
Change-Id: Iebd8f958bde4964c16a3c312d037e8f06e319350
2018-01-14 07:25:31 -08:00
Venkateswara Swamy Bandaru
e91dd92e8b qcacmn: Mesh throughput enhancements
Sending all frames to firmware will have high throughput impact.
Queue mesh frames also to TCL/TQM and send cloned frame to firmware
only if meta header information is changed to update meta header
information. Increased meta info size as per new ext2 header.

Change-Id: I89ff27994477a5637979a9cd6a397286144b2535
CRs-Fixed: 2162643
2018-01-13 02:17:50 -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
Pamidipati, Vijay
8e79865e11 qcacmn: Correct the data type of byte count variable
Use a 64-bit data type for byte count variable to prevent
data overflow.

Change-Id: I0e4927ebeece05cb9ee0360400e6a0da27862d32
CRs-Fixed: 2165595
2018-01-11 14:25:52 -08:00
Tallapragada Kalyan
53f9e39a43 qcacmn: Fix sanity issue during peer delete
during peer delete we are trying to update peer stats to
vap_bss_peer, but in STA mode we do not have bss_peer,
this is resulting in an assert during peer delete in STA mode.

Change-Id: Ie302dd74caf2df3ffe0a57e9ecd22a0c31cbcb60
CRs-Fixed: 2168929
2018-01-10 00:25:26 -08:00
chenguo
7853b790bf qcacmn: Free all resources when VDEV is detached
TX descriptors should be unmapped and freed when VDEV is detached.
Or else it will cause memory leak in qdf_mem.

CRs-Fixed: 2163178
Change-Id: I59da73787786f78c1f057e4daad7b4d53e7fbe4c
2018-01-08 18:28:40 -08:00
Tallapragada Kalyan
4f894924e0 qcacmn: Fix vdev stats reset to zero on peer disassoc
vdev stats are getting reset to zero when a peer disassoc
with the AP. the fix is basically update peer stats to
bss_peer just before we delete the peer.

Change-Id: Ibada4ab82fbb68f32df89bdbae8b172bc8973fe7
2018-01-08 02:07:27 -08:00
Stephan Raj Ignatious Durairaj
ba29129dfb qcacmn: dp support for inact timers
Added dp path function pointers for inact
timers and set params used in WifiSON
Load Balancing Daemon

Change-Id: Ic23d7b562b476c0fb92c8734b029a4e1632599a5
2018-01-04 17:37:47 -08:00
Manoj Ekbote
376116e052 qcacmn: Handle error case with HAL SRNG setup
If hal_srng_setup() fails, memory allocated for srng
is not freed resulting in a leak. Free the memory in
that case. In future, return error to caller and
assert when invalid ring ID is used during setup.

Change-Id: I6f3a7494a5c5e861652f3a38d18c220cd9a6eef2
2018-01-03 14:17:00 -08:00
Nandha Kishore Easwaran
47e7416b12 qcacmn: Add check to drop mcast loopback packet
Added a check in RX path to detect multicast loopback packets in
qwrap mode. In qwrap mode, there are multiple station vaps and
multicast loopback packet from one station vap should not come into
the other station vap. Added a check for this by iterating through
the vap list and checking if any of the vdev mac address matches
with the source address of the packet.

Also added a new vdev parameter to check if qwrap isolation mode is
enabled. In qwrap isolation mode, loopback packets should not be
dropped.

Change-Id: I7d35bf657a87337871156e4caec9038432e23a87
CRs-fixed: 2149190
2017-12-28 01:26:17 -08:00
Soumya Bhat
7422db894d qcacmn: PPDU stats
Add following changes in the context of PPDU stats
1. Mirror copy mode enhancements
2. Fix memory leak due to mgmt. TLV
3. Reset RX monitor lite ring when enhanced stats disabled

Change-Id: Ifb260929290bc483dc05b152a11cd675104f3a0d
2017-12-26 07:24:48 -08:00
Pranita Solanke
fc2ff39199 qcacmn: Add multicast and unicast packets stats for BSS peer
Add support to display multicast packets stats. Also
avoid sending message to target-if layer for every MSDU
to update node statistics

Change-Id: I7bb73d97bd8a02a601d191040a9a5730a9584d3d
2017-12-21 15:26:05 -08:00