Commit Graph

1594 Commits

Author SHA1 Message Date
Venkata Sharath Chandra Manchala
f05b2ae5c2 qcacmn: Add hal_rx_msdu_end_l3_hdr_padding_get API
Implement hal_rx_msdu_end_l3_hdr_padding_get API
based on the chipset as the macro to retrieve
sa_idx value is chipset dependent.

Change-Id: Ice1fc2d70e339dc1d80fa6f34f37c5a7aa074be5
CRs-Fixed: 2522133
2019-10-17 15:07:13 -07:00
Venkata Sharath Chandra Manchala
43d563277d qcacmn: Add hal_rx_desc_is_first_msdu API
Implement hal_rx_desc_is_first_msdu API
based on the chipset as the macro to
retrieve first_msdu bit value is chipset
dependent.

Change-Id: I8e8a3aceb225b591b96e6f8453ffbebf1f78e529
CRs-Fixed: 2522133
2019-10-17 15:07:09 -07:00
Venkata Sharath Chandra Manchala
5bf1e5a1da qcacmn: Add hal_rx_msdu_end_sa_idx_get API
Implement hal_rx_msdu_end_sa_idx API
based on the chipset as the macro to
retrieve sa_idx value is chipset
dependent.

Change-Id: Ib874520be9e7ad778c2a9a3c415e5c3047450b31
CRs-Fixed: 2522133
2019-10-17 15:07:02 -07:00
Venkata Sharath Chandra Manchala
59ebd5ee0c qcacmn: Add hal_rx_msdu_end_sa_is_valid_get API
Implement hal_rx_msdu_end_sa_is_valid_get API
based on the chipset as the macro to retrieve
sa_idx valid bit is chipset dependent.

Change-Id: I8bcb7030554331922ed12ea9da3ef51cd64b5c40
CRs-Fixed: 2522133
2019-10-17 15:06:56 -07:00
Venkata Sharath Chandra Manchala
ee90938f62 qcacmn: Add hal_rx_msdu_end_da_is_mcbc_get API
Implement hal_rx_msdu_end_da_is_mcbc_get based
on the chipset as the macro to retrieve
mcbc value is chipset dependent.

Change-Id: I860d259515c31345501080577d7a34beb97e5f60
CRs-Fixed: 2522133
2019-10-17 15:06:48 -07:00
Ankit Kumar
f3557ff4d1 qcacmn: Increase fw_txrx rem stats counter size
rem_stats keeps counter of remaining stats to be processed.
At present this counter is of type uint8_t and hence can
accumulate till 256 counter but num_stats is of type uint32_t.
Hence if remainting stats to be precessed is 256 then rem_stats
value will be 0 as it will only consider LSB 8 BITS and it will
result in stats mismatch and hence memory leak.

Increasing size to uint64_t to accumulate more counter size.

Change-Id: Ifa86c7e4a73a5a700e9033c8756e986d86025cf9
2019-10-16 11:18:32 -07:00
Saket Jha
ce8c3108d5 qcacmn: Clear defrag waitlist in all cases
Rx defrag waitlist was not getting cleared during dp_peer_rx_cleanup in
the case of STA mode even though the tid was getting deleted. This
created a scenario where the next time dp_rx_defrag_waitlist_remove was
called, it was trying to access now invalid memory. If a vdev was
disconnected in the middle of receiving traffic, then the tid would be
deleted but the rx frag waitlist would not. Upon reconnecting, the
reception of the next frag would cause a crash due to the now invalid
memory in the waitlist.

Change-Id: I5bb1a31f38fa45128d0f35fafaddaf729c99489d
CRs-Fixed: 2538879
2019-10-15 22:58:32 -07:00
Jinwei Chen
a3e587120b qcacmn: flush pending vdevs and peers when do pdev deinit
Flush all the pending vdevs and peers when do pdev deinit

Change-Id: Id99ca5394bc96a07b75a44847dbc1c7681355265
CRs-Fixed: 2532199
2019-10-14 05:47:56 -07:00
Rakesh Pillai
ec9faaa73e qcacmn: Set interrupt mode during soc attach
Currently the interrupt mode is set as a part of
interrupt attach. The interrupt mode is needed for
pdev attach and hence it is decoupled from the interrupt
attach, setting the interrupt mode during soc attach.

Set the correct interrupt mode during soc attach.

CRs-Fixed: 2500015
Change-Id: I68496bed68cac5a2a2bd19adf2377bae7eb8783c
2019-10-14 05:47:50 -07:00
Sravan Kumar Kairam
78b01a1e1b qcacmn: Flush srng tp and hp only for flush event
Currently after runtime resume all SW2TCL data and reo cmd
srng rings hp and tp value are flushed. In case of IPA
offload case SW2TCL3 righ hp value will be updated by IPA
and not by host. In case of runtime pm enable host is
setting the value to zero as part of runtime resume which
results in incorrect hp value of SW2TCL3. As part of this
change set flush event for rings which are accessed by host
during link down state and after runtime resume flush the
rings for which flush event is set.

Change-Id: I5c9afa708277cf3a6e6d5ef99447bc21f88cfdcf
CRs-Fixed: 2514621
2019-10-12 22:16:04 -07:00
Rakesh Pillai
01b9b680fc qcacmn: Avoid REO destination change when IPA enabled in P2P mode
In cases where one of the interfaces is a P2P-GO and
IPA has been enabled, the P2P connection establishment
fails.

When IPA is enabled, the REO destination is changed to REO4
which can be reaped only by IPA module. But in case of P2P-GO
interface in operation, this change in configuration causes
all the RX packets to be stalled due to incorrect REO configuration.

Hence, to avoid this case, do not change the REO dest config
when the interface subtype is P2P.

CRs-Fixed: 2498315
Change-Id: Ie9f01c3b353c7c0503e1541d6c79c2f47c9782f3
2019-10-10 13:43:37 -07:00
Jinwei Chen
1c76e897e3 qcacmn: refine dp_vdev_flush_peers logic
Refine dp_vdev_flush_peers,
a. wrap ast entry flushing into dp_peer_flush_ast_entry()
b. if unmap_only is true, logic keep same.
c. if unmap_only is false, also use __dp_peer_find_by_id
instead of dp_peer_find_by_id to get peer object.
only if peer flag valid is true, then call dp_peer_delete_wifi3
to avoid peer member invalid accessing.

Change-Id: I7a6d53e124ff369305b91050731901ff0a43d6af
CRs-Fixed: 2534274
2019-10-10 03:17:47 -07:00
Nirav Shah
c806725022 qcacmn: Do not print periodic flow control stats
Do not print periodic flow control stats for lithium
data path.

Change-Id: Idc05417c23b4c5a3916a2a9fc433960e48d469fe
CRs-Fixed: 2535644
2019-10-09 19:10:53 -07:00
Amir Patel
318bcb8ec3 qcacmn: Fix tx retries and tx failed stats
Update tx retries count even when ACK_BA_STATUS
tlv is not received

CRs-Fixed: 2533830
Change-Id: I99ea57852ae45a349ee088a13d35f62ef6091971
2019-10-09 16:17:10 -07:00
Karunakar Dasineni
fc8fac5233 qcacmn: Fix non-QOS seq number in PPDU stats
Sequence number should be obtained from user_compln_ack_ba_stats_tlv
in HTT PPDU stats messages since enq_bitmap TLVs are not sent for
non-QOS frames.

Change-Id: I2d5ddb8c7397953081df94f77f0bd8a30a581b11
2019-10-09 16:17:05 -07:00
Karunakar Dasineni
13abde98f1 qcacmn: CDP interface to deliver Tx mgmt frames
Add CDP interface to pass on host generated mgmt
frames to DP, to be included in Tx capture.

Change-Id: Ic1a63c137ca546b0ad2b94d92fd5d489e9512a6f
2019-10-07 16:38:23 -07:00
Prathyusha Guduri
bd4fd7a5d2 qcacmn: Fix duplicate AST creation
Only when pdev_id matches, duplicate ast_entry creation is rejected

Change-Id: If29835a4babd4be26a0fdafbef047a79255b2e25
2019-10-06 19:30:26 -07:00
Chaithanya Garrepalli
d3c58a3d99 qcacmn: flush the invalid peer nbuf list in case list length is > 10
In invalid peer path if the ppdu nbuf has more than 10 nbufs
flush the list

Change-Id: I285cc9f78cafe669661860f7aa2f4542526bc412
CRs-fixed: 2453326
2019-10-06 13:46:55 -07:00
Ruben Columbus
814e6cbd83 qcacmn: htt backpressure prints enhancement
keep timestamp for prints and dont print
backpressure messages in an interval of 2 seconds

Change-Id: I00aae02df93ed301e496aa6abc5f071a759f7640
2019-10-04 15:37:05 -07:00
Mohit Khanna
c6e059aca0 qcacmn: IPA WAR for WB2SW release ring
WAR for IPA_OFFLOAD case. In IPA_OFFLOAD case, host provides buffers in
the WBM2SW release ring designated for IPA for TX. So this ring is used
to release TX completions into, by WBM, and also by IPA to pick up
buffers from, for TX.

In some cases, its observed that when  WBM tries to release a buffer
into this ring, however the ring is full. This causes back pressure,
resulting in a FW crash.

By leaving some entries with no buffers attached, WBM will be able to
write to the ring, and from dumps we can figure out the buffer which is
causing this issue.

Change-Id: Ia0450d36dec643f2631fea13cb0b8facba7425b8
CRs-Fixed: 2535170
2019-10-02 20:01:31 -07:00
Sravan Kumar Kairam
220755895d qcacmn: Free tx desc pool at dp flow control deinit
Currently if tx flow control is enabled allocated tx desc pools
are deleted only in tx flow pool unmap handler from control path.
So cases in which control path unable to handle pool unmap handler
leads to tx desc pool resources memory leak. To handle this free
allocated all tx desc pool resources as part of dp flow control
deinit which is done as part of soc tx detach.

Change-Id: Ib750c2ce39baf7fc5aae5f0c8cb62bc848d2f864
CRs-Fixed: 2511515
2019-10-02 02:48:25 -07:00
Sravan Goud
184a4d99d9 qcacmn: Fix double unmap issue for rx frag packets
Currently as part of rx frag packets handling, nbuf is unmapped,
but the corresponding rx desc unmapped bit is not set. The fragment
is stored until all the frags are received. Only after all the frags
are received defrag packet is reinjected back to reo. While in between
if driver is unloaded, as part of unload rx desc buffer pool is freed.
During buffer free corresponding rx desc unmapped bit is checked and
if the bit is not set buffer is unampped and then freed. This leads
of double unmap in case of the stored frag list buffers. As part of
this change set the unmapped bit during nbuf unmap.

Change-Id: I24cf1e88f3102bc985f95d2dc325509308a7bef9
CRs-Fixed: 2532302
2019-10-02 01:23:14 -07:00
Manjunathappa Prakash
31a575b99e qcacmn: Remove success log instead log on failure
Do not log when we succeed to find the vdev for vdev_id.
Instead log only on failure.

Change-Id: I292839af763a77c2c5e75124b24accbee222d58f
CRs-Fixed: 2501696
2019-09-30 17:35:46 -07:00
Sravan Kumar Kairam
b96e5072de qcacmn: Add runtime pm apis to record last dp rx busy mark
Add runtime pm apis to record last busy mark set by data path
during dp rx process.

Currently for mcl in some scenerios runtime sync suspend is issued
which puts the link in low power state with out waiting for link
inactivity timeout. This leads to throughput degradation in case of
rx direction as in rx processing data path extends the timer by marking
last busy to avoid immediate runtime suspend. But runtime sync suspend
does not take in to account of the link idle timeout value before
suspending the link. So using this apis, before issuing runtime sync
suspend check the duration since last busy mark by data path rx process.
If the duration is less than run time delay just do runtime put.

Change-Id: I694ef6ddec8f11fed44bf3b9e5ae18ad93b6ec24
CRs-Fixed: 2512326
2019-09-30 03:18:14 -07:00
Ruben Columbus
da4d1b37e3 qcacmn: tx completion handler with invalid release source
added stats counter to check invalid release reason other than
FW and TQM in tx completion path.
added assert to make sure host is not releasing descriptors with NULL
address.

Change-Id: I3a30bd0f0c3954ed6435489d9b21f16201d1b840
2019-09-29 04:50:13 -07:00
Chaithanya Garrepalli
cf0b4e2ea6 qcacmn: avoid deadlock in ast create
Fix to avoid race conditions between two locks
a) soc->peer_ref_mutex
b) soc->ast_lock
Right order to for these two locks is to first
acquire a) and then b)

But in ast create path these locks are acquired in
reverse order leading to deadlock.

This change helps in fixing deadlock

Change-Id: I02f802fa12d5f4e4ae3f584cdffe36c9bf717f84
2019-09-28 23:40:54 -07:00
Chaithanya Garrepalli
0e8f23f3a4 qcacmn: fix double free of ME ext buffer
Fix double free of ME buffer in enqueue failed
case

Change-Id: Idf79bff6bd0ffea92dba39a2f7ec6da64a4e193d
CRs-fixed: 2532803
2019-09-28 23:40:48 -07:00
Shashikala Prabhu
5d579844ba qcacmn: Change log level for Special vap channel change
During special vap channel change, we see "monitor vap already created"
print on the console. This is the expected print, because
pdev->monitor_configured is set during wifi up. Therefore, change the
debug level of this print from ERROR to DEBUG.

Change-Id: Ia290b74d9be20691eac3ebc50f6cc3fff3e94953
CRs-Fixed: 2529580
2019-09-28 08:11:15 -07:00
Shashikala Prabhu
ecec78cea5 qcacmn: Use correct transmitter address for MIC error processing
When NO_RX_PKT_HDR_TLV is disabled, host gets the 802.11 header from the
RX packet header TLV (rx_pkt_hdr_tlv). When this macro is enabled, host
gets the 802.11 header from the raw data frame.

In case of MIC failure, host receives the decaped frame. This decaped
buffer does not have 802.11 header. Upper layer uses receiver and
transmitter address to process MIC failure. Therefore, get the RA and TA
address from rx_mpdu_start_tlv and passed it to upper layer.

Change-Id: Id5631051892d2e1b38b7833a0599fdc49ca2f6b7
CRs-Fixed: 2525613
2019-09-26 02:37:17 -07:00
Tallapragada Kalyan
ab357a99ff qcacmn: Send VLAN LLC frames to stack
VLAN LLC frames were dropped, instead these frames
are now given to stack for further processing.

Change-Id: Icaffc2e4755036fca0e2f606e29b41c58364e329
CRs-Fixed: 2508086
2019-09-25 01:09:07 -07:00
Manoj Ekbote
82a4606b8b qcacmn: Add ioctl param to retrieve MBSS status
Add parameter to know if MBSS feature is enabled or disabled.
During 'wifi detect', the wireless config file is changed and
there's no way to figure out status of MBSS feature.

Change-Id: Ie56244097fd15efc71213f23e5afcb57188c9386
CRs-fixed: 2531506
2019-09-24 14:00:07 -07:00
Kai Chen
99efa0dce4 qcacmn: Enable peer filtering for enhanced RX capture
Enable peer filtering for enhanced RX capture.

Change-Id: Ic8d27b575721f6fe3bae06ed7d23b1ff300306c9
2019-09-23 20:35:31 -07:00
Subhranil Choudhury
5985716a66 qcacmn: Add correct ast-idx in the Tx Descriptor
Add ast-index instead of ast hash value in the transmit
descriptor as specified by Hardware team.

Change-Id: Id5965d6f41aa89af7680ad6f45d1611631ffcff4
2019-09-23 10:40:23 -07:00
Saket Jha
1d97e0c080 qcacmn: Featurize legacy Helium DP
Memory optimization of legacy Helium DP (ol_*.*,htt_*.*)

Change-Id: Ie00c59d95e90efdf585a05962a073f688dcb2a2a
CRs-Fixed: 2508727
2019-09-19 20:55:22 -07:00
narayan
7d5c0c3d59 qcacmn: Add cmd to disable same ssid feature
Add a command to globally disable same ssid feature from uci

Change-Id: If995f673f6b0bd3cecc48293cb579e517b623e74
CRs-Fixed:2522146
2019-09-17 10:20:36 -07:00
Saket Jha
52e54333f4 qcacmn: Delete all peers during SSR
During SSR in dp_vdev_flush_peers function, the else condition finds peers
to delete by calling dp_peer_find_by_id. If the delete_in_progress_ flag
has already been set to TRUE, then dp_peer_find_by_id will return NULL
and not delete the vdev object. Calling __dp_peer_find_by_id will always
return peer id so all peers are sure to be deleted.

Change-Id: I86bf2bdda7ebc5a9c2f4bbc877392ebff9cbaf59
CRs-Fixed: 2513104
2019-09-16 17:23:27 -07:00
Subhranil Choudhury
4ee1b5e28d qcacmn: Add cache-set-num in HKv2 Tx path
Add the infrastructure to add cache-set-num field in
tx descriptor of HKv2.

Change-Id: Iec9423c3c90f868341b56ced795cd0bb73c9766a
2019-09-15 22:48:47 -07:00
Chaithanya Garrepalli
09837d28a2 qcacmn: Do not add AST entry when PEER exist
Do not add WDS AST entry when peer exists with
same mac address

Change-Id: I533f431bb8c137d484c21fe8e411b1da7fe0d0cb
CRs-fixed: 2514962
2019-09-15 22:48:42 -07:00
Jinwei Chen
b02de7ed1c qcacmn: Degrade log level in dp_get_vdevid
Degrade log level from INFO to INFO_HIGH in function dp_get_vdevid,
this is to prevent console log output which may impact spinlock lock
/unlock time.

Change-Id: Ic1ecb2f0e2c5fcf5d15766921326a8cd80e67103
CRs-Fixed: 2522041
2019-09-13 20:21:58 -07:00
Shashikala Prabhu
fdf5499a36 qcacmn: Update the peer rssi for entire packet bandwidth
Peer rssi is updated with the rssi measured on primary 20 and
not on the entire bandwidth.
Scale the peer rssi value by packet bandwidth offset.
Packet bandwidth offset for packet bandwidth of 20/40/80/160 is
0/3/6/9 dB.

Change-Id: I13eb8c17ec9828c0025d6b3a92a8b26b971268a1
CRs-Fixed: 2518598
2019-09-12 08:43:16 -07:00
Chaithanya Garrepalli
11b7ea2bc5 qcacmn: pass client mac address also to nac rssi API
Add client MAC address while calling upper layers to
configure NAC RSSI

Change-Id: Ib7b0140ee4d194fe86c37d862fc6024b61481011
2019-09-12 01:46:32 -07:00
Mainak Sen
f3053eb1d1 qcacmn: Add fields for Tx TQM and FW exception drops
VoW stats should contain fields to count TQM and FW exception
drops

Change-Id: I71a81b8e9cc9428b5c727d77c0eeec5bb23a2b42
2019-09-09 07:08:34 -07:00
Varsha Mishra
10b86d636a qcacmn: Set in_use bit of last allocated descriptor as 0
With current implementation in_use bit for last descriptor is not
getting set as 0. Removing redundant code and setting in_use bit
for last descriptor as 0.

Change-Id: Ia1945fcb814136128d18a8aec473ed1b4786dd9e
2019-09-08 01:07:32 -07:00
Debasis Das
7a081368a1 qcacmn: Fix use-after-free while draining reo cmd ring
While draining the pending reo cmd's during wifi down,
the tid array from the peer structure is used in debug
statement.However,the peer is freed much before
the drain operation.This leads to use-after-free access.

Change-Id: Idf92ccd0fe4eba3eed8a97ac83485de8fccb0f24
2019-09-07 12:29:01 -07:00
Rakshith Suresh Patkar
162d95556e qcacmn: Cleanup peer local id references from DP RX
Local peer_id is being cleaned up across DP, HDD and PS/WMA.
So, any references to local peer_id/sta_id will be replaced
by peer mac address and all interactions between the layers
will be based on peer mac address.

Cleanup references to peer_local_id from the
following APIs:
 1) dp_rx_process
 2) dp_rx_process_rxdma_err

Change-Id: Ia1c8bd091759132367718e6c6d5f67cf5a98e507
CRs-Fixed: 2512706
2019-09-06 22:25:09 -07:00
Rakshith Suresh Patkar
db4909518d qcacmn: Fix compilation issue in dp_get_vdev_by_peer_addr
Fix compilation issue in dp_get_vdev_by_peer_addr due to
erroneous comma.

Change-Id: Ife337860c0a7cdf7cb9f9305f3999d5203bf7a5e
CRs-Fixed: 2520670
2019-09-06 02:58:17 -07:00
Tallapragada Kalyan
d92f598f75 qcacmn: Pass pdev to dp_peer_stats_notify API
Pass pdev to dp_peer_stats_notify API instead of de-referencing
this from peer structure.

Change-Id: I5dc679283f5822f44b4140aefb3aee44a826c720
CRs-Fixed: 2500647
2019-09-04 11:31:12 -07:00
Ruben Columbus
b7a1c5782d qcacmn: monitor RXDMA drop feature
Adds new INI variable for threshold control.
Host sends message to target with new threshold info.
If buffer reaches threshold then MAC drops incoming monitor frames.

Change-Id: Id659d7df68a5ec0b22fb571dc1ffa4990f8fcc4f
2019-08-29 22:11:08 -07:00
Chaoli Zhou
fd20986e6a qcacmn: Fix runtime unknown symbol issue
In the sdx platform, WLAN monitor mode is disabed,
in other words, CONFIG_FEATURE_MONITOR_MODE_SUPPORT
will be set to n, but dp_mon_buf_delayed_replenish
hasn't be defineded if it set to n, which can cause the
runtime unknown symbol issue. So add the definition
for it.

Change-Id: Iec50f7cc5ed6f94e2f5a40fbc6594c2830d1359f
2019-08-29 00:24:31 -07:00
Paul Zhang
1275896960 qcacmn: support msdu rx retry statistics
Add the interface to support the rx retry statistics.

Change-Id: I02bbf2e69eefbd7ef61ab2540c1aacabb4ce3aef
CRs-Fixed: 2505486
2019-08-28 12:43:06 -07:00