Commit Graph

885 Commits

Author SHA1 Message Date
Jianmin Zhu
61409803d7 qcacld-3.0: Avoid Rome mgmt nbuf double unmap during SSR
Rome supports mgmt Tx via HTT interface, not via WMI.

When mgmt frame is sent, 2 tx desc is allocated:
mgmt_txrx_desc is allocated in wlan_mgmt_txrx_mgmt_frame_tx,
ol_tx_desc is allocated in ol_txrx_mgmt_send_ext.
They point to same net buffer.
net buffer is mapped in htt_tx_desc_init.

When SSR during Rome STA connected, deauth frame is sent,
but no tx complete since firmware hung already.
Pending mgmt frames are unmapped and freed when destroy vdev.

hdd_reset_all_adapters->hdd_stop_adapter->hdd_vdev_destroy
->wma_handle_vdev_detach->wlan_mgmt_txrx_vdev_drain
->wma_mgmt_frame_fill_peer_cb
->mgmt_txrx_tx_completion_handler.

Don't need unmap and free net buffer of mgmt frames again during
data path clean up, just free ol_tx_desc.
hdd_wlan_stop_modules->cds_post_disable->cdp_pdev_pre_detach
->ol_txrx_pdev_pre_detach->ol_tx_free_descs_inuse.

Change-Id: I2fc658e833cf013bf7048c6bec90d9b247566444
CRs-Fixed: 2694854
2020-06-18 23:21:52 -07:00
Jinwei Chen
3f4590be9a qcacld-3.0: flush batched GRO_NORMAL packets
Kernel 5.4 has applied batched GRO_NORMAL packets processing
for all napi_gro_receive() users. this requires NAPI users to
call napi_complete_done() or napi_complete() at the end of every
polling to flush batched GRO_NORMAL packets.
However, by current wlan driver design, napi_gro_recevie()
is not happened in same NAPI polling context and done in another
thread context, it likely packets which have not been flushed from
napi->rx_list will get stall until next RX cycle.

Fix this by adding a manual flushing of the list right after
napi_gro_flush() call to mimic napi_complete() logics.

Change-Id: Id8c1b9360c380c9631c85f5e048ae2cd2798f65b
CRs-Fixed: 2673959
2020-06-14 22:14:05 -07:00
Saket Jha
160fab39e1 qcacld-3.0: Correct arguments for fisa rx flow setup
Due to recent changes, hal_rx_flow_setup_fse() should receive hal_soc as
argument during rx_flow setup.

Change-Id: Ic39f476b211417469e004d85cd03c6b868d97405
CRs-Fixed: 2706239
2020-06-10 18:13:33 -07:00
Jinwei Chen
d6165e65cb qcacld-3.0: update FISA entry vdev if flow search failed
If FISA flow search is failing by HW, but same FISA flow is
already present in host FISA SW table, vdev will not be updated
accordingly, so RX frame might be dropped due to vdev mismatch
when do FISA flush.

update vdev in FISA SW entry correctly.

Change-Id: I0907c6d2d1e25424fbebd6277f326346deba6569
CRs-Fixed: 2704610
2020-06-08 21:09:34 -07:00
Jinwei Chen
a6758b25d2 qcacld-3.0: Bypass FISA for RX DHCP frame
DHCP frame usually can not be aggregated, but if they go to FISA
path which will require FISA resource support for them, this looks
is not necessary.

Bypass FISA path for RX DHCP frame.

Change-Id: Ic1eac06abb5790813ee4d17ec1df6b215a1bcdb5
CRs-Fixed: 2691447
2020-06-08 10:30:23 -07:00
Manikanta Pubbisetty
e70a618e3f qcacld-3.0: unregister peer hang notifier
Currently, we register the peer hang notifier when the peer unmap
timer elapses, but do not unregister it. We also pass the peer reference
for which the unmap timeout happened as part of the notifier registry.

Since we do not unregister the notfier, there are chances that we
call the notifier with a stale peer reference during the subsequent
hang event which results in a crash; avoid this by unregistering the
peer hang notifier as part of device recovery.

Change-Id: I36bd8d9c1b4e38e1ba9d8c16b79df7f0cd1c9f82
CRs-Fixed: 2688676
2020-06-07 10:13:22 -07:00
Chaoli Zhou
1178ae7db8 qcacld-3.0: Fix htt_status & A_STATUS map dp status wrong issue
Convert the tx complete status or A_STATUS to the correct dp status
before pass to qdf_dp_trace_ptr

Change-Id: I1ad94c8c293c29c9789e6dc761244911a7520707
2020-06-07 08:07:44 -07:00
Rajesh Chauhan
bc611919e0 Revert "qcacld-3.0: Use IS_ENABLED for the definition of kernel module"
This reverts Change-Id: Iaf86c9da2a9946aac09867b5c46dcc79f1b5c37e.
That change fails build for GKI variant.

Change-Id: I6cd7322870023d245fe9d20250ceb0b5d738d214
CRs-Fixed: 2701642
2020-06-06 19:06:09 -07:00
Vevek Venkatesan
dd91edd508 qcacld-3.0: Use IS_ENABLED for the definition of kernel module
Add support and use IS_ENABLED in code, if CONFIG_IPA3 config as
loadable kernel module.

Change-Id: Iaf86c9da2a9946aac09867b5c46dcc79f1b5c37e
CRs-Fixed: 2701642
2020-06-05 06:25:38 -07:00
Rajesh Chauhan
b4a3dddcc6 Revert "qcacld-3.0: flush batched GRO_NORMAL packets"
This reverts Change-Id: Ib3e851c0822a85c4712a1b817cc19dfecf6d0e7a.
First we need to get ABI snapshot/Whitelist updated for the new
kernel API being used in this change and then only we can promote
this change. To unblock promotion, revert this change for now.

Change-Id: I8aae0fe64623034486c9db6275a16654119c06bd
CRs-Fixed: 2673959
2020-06-03 00:45:36 -07:00
Jinwei Chen
d3f4ccf4d6 qcacld-3.0: add vdev->osif_rx failure handling for fisa path
Currently there is no vdev->osif_rx result check in fisa path,
so if vdev->osif_rx returns failure, the RX skb may not have been
handled and it may be leaked.

Add vdev->osif_rx failure handling to avoid skb leak.

Change-Id: I6c194c31bbe71cba5c56c2b93f505225de439b72
CRs-Fixed: 2695084
2020-06-02 13:33:01 -07:00
Jinwei Chen
92f508a5eb qcacld-3.0: flush batched GRO_NORMAL packets
Kernel 5.4 has applied batched GRO_NORMAL packets processing
for all napi_gro_receive() users. this requires NAPI users to
call napi_complete_done() or napi_complete() at the end of every
polling to flush batched GRO_NORMAL packets.
However, by current wlan driver design, napi_gro_recevie()
is not happened in same NAPI polling context and done in another
thread context, it likely packets which have not been flushed from
napi->rx_list will get stall until next RX cycle.

Fix this by adding a manual flushing of the list right after
napi_gro_flush() call to mimic napi_complete() logics.

Change-Id: Ib3e851c0822a85c4712a1b817cc19dfecf6d0e7a
CRs-Fixed: 2673959
2020-05-26 01:40:38 -07:00
Jinwei Chen
b55574eb99 qcacld-3.0: Skip RX TLV header for RX fragment data
In dp_fisa_rx() function, L2 head pointer for fragment data is not
set correctly, actually it points to RX TLV header.
Skip RX TLV for RX fragment data.

Change-Id: Ie326734c657f45024a83792b103f931723148c92
CRs-Fixed: 2686851
2020-05-15 16:38:00 -07:00
Nirav Shah
cf164af18d qcacld-3.0: Add update_seq_num flag to htt_rx_mpdu_desc_seq_num
In case of partial reorder, seq number is sent by FW
when first_msdu bit is set in msdu. For all other msdus host
maintain copy of cur_seq_num_hl in pdev.
cur_seq_num_hl gets updated when htt_rx_mpdu_desc_seq_num API
is called. Currently htt_rx_mpdu_desc_seq_num API is called
from multiple functions. Add update_seq_num flag to make sure that
cur_seq_num_hl updates only during store function.

Change-Id: Ie3178ee6d1642dbeaf0cea032dc80e0ecccc1dc2
CRs-Fixed: 2683869
2020-05-15 06:55:57 -07:00
Nirav Shah
a218ef21d3 qcacld-3.0: Handle last msdu bit not set in partial reorder
In case of partial reorder, handle scenario if last msdu bit
is not set.

Change-Id: I7d0a671886fe2c0f352769bf3e68e2d22408a978
CRs-Fixed: 2669907
2020-05-15 05:24:33 -07:00
Jinwei Chen
6409e4a8c5 qcacld-3.0: add FISA flush when vdev detach
In some case, FISA flush for one FISA entry is missed which
lead to some RX frames stay at FISA entry forever, this will
cause skb leak.
  Do FISA flush per vdev when vdev detach to avoid skb leak.

Change-Id: Ie6bdf885c740a99b089290257ea6936d5804d142
CRs-Fixed: 2679221
2020-05-15 05:24:30 -07:00
Jinwei Chen
bf047d7143 qcacld-3.0: Bypass FISA for non-regular RX delivering frame
Bypass FISA for non-regular RX delivering frame

Change-Id: I835229379779057f1b8cddcfffc3b3863137e5bc
CRs-Fixed: 2683727
2020-05-14 13:04:13 -07:00
Surabhi Vishnoi
c25f24b8d8 qcacld-3.0: Add support for HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND msg
Add support to parse the HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND
message. This target to host message is received when CFR feature
is enabled.

Change-Id: I592cd5ca663018f2958550e6e3e383bb796ee168
CRs-Fixed: 2680730
2020-05-12 15:35:56 -07:00
Manjunathappa Prakash
ecade686b9 qcacld-3.0: Check for NULL dereference before access
Check for NULL dereference before accessing it.

Change-Id: Id2dc5f2c0f54f0c7681d2a26a53e7190ef46aba2
CRs-Fixed: 2668241
2020-05-08 16:10:35 -07:00
Manjunathappa Prakash
b6a71494fe qcacld-3.0: Use %pK format specifier in dp_rx_thread logs
Cleanup logging, usage of %p or %pk will lead to information leak.
Always use %pK instead when ever logging the address.

Change-Id: Id60782855f242175183f88e9f1c2efb9eb578404
CRs-Fixed: 2677373
2020-05-08 16:10:31 -07:00
Manjunathappa Prakash
52c3189299 qcacld-3.0: Use %pK format specifier in dp_rx_fisa logs
Cleanup logging, usage of %p or %pk will lead to information leak.
Always use %pK instead when ever logging the address.

Change-Id: Id11e1b52b394eb10bb2b32fc2ee2e04116f98026
CRs-Fixed: 2677373
2020-05-08 16:10:27 -07:00
Ananya Gupta
16c13ea0b8 qcacld-3.0: Initialize peer_timer_bitmask
peer_timer_bitmask of hang_data was uninitialized which may
contain a garbage value.
Initialized the variable with 0.

Change-Id: I5875bb0d121bcbf14a2afc9efec6697cf4b4dba4
CRs-Fixed: 2680955
2020-05-08 14:25:35 -07:00
Manikanta Pubbisetty
174d2ccae5 qcacld-3.0: drop frames in the RX thread queue during peer unmap
Because of a race that happen during vdev delete, RX packets can get
queued to the RX thread after the RX flush (done as part of peer deletion)
and by the time RX thread is woken up for processing, the netdev pointer
would be NULL leading to a crash.

Avoid this by dropping pending frames in the RX thread during peer unmap
as well.

Change-Id: Id79d7d05c487fcabfd104a15dc4038d48703b07c
CRs-Fixed: 2681195
2020-05-08 14:25:27 -07:00
Vulupala Shashank Reddy
d965a28c1c qcacld-3.0: Update OFDM and CCK flags for packet capture mode
Add support to update OFDM and CCK flags for packet capture
mode.

Change-Id: I1acb6b512360b6236a119070aba97409e316646c
CRs-Fixed: 2676302
2020-05-06 01:26:29 -07:00
Vevek Venkatesan
3acd66498f qcacld-3.0: add NULL check before soc dereference
This is to fix the error of missing soc NULL check.
Before dereferencing soc for decoding pdev handle,
add the NULL check for soc.

Change-Id: Idade64fd88790e9a6faffceb99fc42dcd683677d
CRs-Fixed: 2668317
2020-04-30 03:35:11 -07:00
Ananya Gupta
e6bb014360 qcacld-3.0: Add null check to osdev object
Add null check to osdev to avoid invalid access.

Change-Id: If34bc94cd23e3b4f1149a57b43bcc136575ec06c
CRs-Fixed: 2658532
2020-04-11 18:25:08 -07:00
Rongjing Liao
5806e9951f qcacld-3.0: add pointer 'vdev' null check in TXRX module
Add pointer 'vdev' null check for KW issue. In ol_tx_non_std()
when 'vdev' is null, return the pointer of msdu buffer.

Change-Id: Ic82db8c649de09dda42ae588bda7e58c036ae161
CRs-Fixed: 2645407
2020-04-07 20:18:25 -07:00
Yeshwanth Sriram Guntuka
d251c49727 qcacld-3.0: Remove recovery notifier from ol layer
Remove ol recovery notifier to log ce info as the notifier
is added in hif layer.

Change-Id: Ia3b56f677d7207f7b650ee1060032c285fa946fe
CRs-Fixed: 2649143
2020-04-02 14:31:11 -07:00
Yeshwanth Sriram Guntuka
250dd30af0 qcacld-3.0: Add support for logging hang event data
Add support to register recovery notifiers to log
hang event data.

Change-Id: I9b930d5f983d57a7359ba9f97ea65050c4f54a8a
CRs-Fixed: 2649142
2020-03-30 21:18:10 -07:00
bings
83c7c370d1 qcacld-3.0: Fix build error when WLAN_SUPPORT_RX_FISA defined
Fix print format in core/dp/txrx3.0/dp_fisa_rx.c
Both cds_ieee80211_common_i.h and net/ieee80211_radiotap.h define
IEEE80211_CHAN_*, so only one header is needed in wlan_hdd_tx_rx.c

Change-Id: Ie9c3a7ea04e9b71acf96f007515a7ae6c0def938
CRs-Fixed: 2644359
2020-03-20 17:05:31 -07:00
Vevek Venkatesan
02f5dfc5d7 qcacld-3.0: add pld_smmu_unmap support for BENGAL
Add support for pld_smmu_unmap and enable it for
BENGAL target.

Change-Id: I7f6d6f965b7664342bca29b49f05f8eb62737a0c
CRs-Fixed: 2642663
2020-03-18 15:37:21 -07:00
Jinwei Chen
bfe5d6b90c qcacld-3.0: fix skb leak possibility due to no failure handling
fix skb leak possibility due to no failure handling.

Change-Id: I0bd1e4cacdb408010057e35127a1ce9758c2e9c7
CRs-Fixed: 2627321
2020-03-13 06:47:03 -07:00
Vevek Venkatesan
d0f3e3ae0c qcacld-3.0: reduce stack size during ipa_setup
Reduce stack size by allocating pipe_in memory
dynamically during ipa_setup.

Change-Id: I33692b5a5dd920a2784fab4294af84d827cb092b
CRs-Fixed: 2638947
2020-03-11 20:34:49 -07:00
Ananya Gupta
4df4cd18a5 qcacld-3.0: Check peers in other vdev
Update vdev value after every iteration to find the same
peer id.

Change-Id: I30763a1669da3e4637f4017c29955356235bb2bd
CRs-Fixed: 2628586
2020-02-28 07:25:52 -08:00
Vulupala Shashank Reddy
af204caea6 qcacld-3.0: Add support to include ACK status and tx retry count
Extend radiotap header to append ACK status and tx retry count
for packets sent to virtual mon interface.

Change-Id: If110a7de736c3efc0d477617089669104c6f1690
CRs-Fixed: 2627707
2020-02-27 11:44:49 -08:00
Vulupala Shashank Reddy
88ab94ce0a qcacld-3.0: Process Tx data packet for pkt capture mode
Process Tx data packets and post into mon thread for
packet capture mode

Change-Id: I71e48b024c3e9b9e92d5dc3ec22e55a384ff572f
CRs-Fixed: 2619330
2020-02-26 10:06:38 -08:00
Vulupala Shashank Reddy
a2deef8c83 qcacld-3.0: Process Rx data packet for pkt capture mode
Process Rx data packets and post to the mon thread for
packet capture mode

Change-Id: Id8ae54677615c27d61c6def1a521c509f602863b
CRs-Fixed: 2618941
2020-02-26 10:06:27 -08:00
Jingxiang Ge
9a4d95c3fd qcacld-3.0: Fix dp_rx_thread hang issue
Issue happens as below scenaio:
1 suspend happens, but dp_rx_thread didn't finish in time,
  so timeout happens for suspend_event, here suspend will
  return success to kernel.
2 resume happens before dp_rx_thread to reset resume_event,
  and resume finished.
3 if dp_rx_thread finished and blocking with resume_event,
  and in following test, suspend didn't come(longer then
  hang detect time).
4 hang detect will alarm.

Fix is to return failure if dp_rx_thread can't be suspend
in time. Suspend can triger again later.

Change-Id: Ifbfdef5bb1c8d6e00b8fa5cc5e6dc74d3495c9ea
CRs-Fixed: 2626468
2020-02-24 00:20:35 -08:00
Chaoli Zhou
bf1debc03a qcacld-3.0: Refine ol_txrx_ipa_wdi_tx_smmu_params for different target
Currently, Linux Kernel 4.9 doesn't support WDI3/WDI2 over GSI,
so it missed the definition of is_txr_rn_db_pcie_addr &
is_evt_rn_db_pcie_addr, and we should not call the relevant API
for Linux Kernel 4.9 + ROME target. So refine the function
ol_txrx_ipa_wdi_tx_smmu_params to fix compile issue.

Change-Id: I050d7f8613f9a5ae05d6a269dece53db624d18e2
2020-02-23 06:16:50 -08:00
Manjunathappa Prakash
fa1ec29f1d qcacld-3.0: Get the required FISA TLVs back in fisa handling
FISA handling requires additional TLVs. dp_rx core handling
skips TLVs, recover back TLVs in FISA.

Change-Id: I6a4cbb91415facabae04e11d323b29673a7eade4
CRs-Fixed: 2618478
2020-02-20 06:39:07 -08:00
Manjunathappa Prakash
b1c5012090 qcacld-3.0: Update vdev in fisa_flow to takecare vdev change
Fisa flow in FT still exists even after vdev teardown. Same vdev
type is reinitialized with different vdev pointer.
So take care to update the fisa_flow vdev with current vdev.

Change-Id: Ib52c6d1ea5354532a42fd0065db740c96d78ebc6
CRs-Fixed: 2621691
2020-02-19 03:33:20 -08:00
Vulupala Shashank Reddy
e96d28ed64 qcacld-3.0: Register/deregister packet capture callbacks
Register/deregister packet capture callbacks.

Change-Id: I16e2c61349fc26d1166ac4b06dc160871c383846
CRs-Fixed: 2619312
2020-02-17 21:21:19 -08:00
Manjunathappa Prakash
a79c85f229 qcacld-3.0: Check for null deliver function in fisa
Consider case where vdev is valid but deliver function
callback is deregistered. Check for null delivery function.

Change-Id: If17f1d680a10c2009a910172a66cd8dcf7cdffbd
CRs-Fixed: 2613162
2020-02-15 10:11:20 -08:00
Chaoli Zhou
803ea570f6 qcacld-3.0: Set pcie addr flag for IPA tx/rx ring
As for WDI2 over gsi, IPA driver adds is_txr_rn_db_pcie_addr
and is_evt_rn_db_pcie_addr in ipa_wdi_pipe_setup_info and
ipa_wdi_pipe_setup_info_smmu these two structures to check
if doorbell address is PCIe mapped address or not. So, it
need to set such flag from wlan host driver for IPA transfer
and event rings.

Change-Id: Ic71a460c6e87f5b77be737fa9a8e860ab7424e82
2020-02-14 09:02:00 -08:00
Manjunathappa Prakash
13dcee71cb qcacld-3.0: Return control after dropping NULL vdev msdus
Return control after dropping NULL vdev msdus and make sure to
NULL terminate the fisa_flow->head_skb.

Change-Id: I50e469f603b48cb578db30aaaaa9f974d469fde1
CRs-Fixed: 2613251
2020-02-12 11:57:26 -08:00
Manjunathappa Prakash
00cce59bcd qcacld-3.0: Check validity of dp_vdev while flushing
Validate vdev before delivering the packets for vdev.
Drop the packets if vdev is deleted.

Change-Id: If92d0fba04d96e3830bb4e6f04c395b4fcd54f84
CRs-Fixed: 2606760
2020-02-12 11:57:09 -08:00
Manjunathappa Prakash
db8c24946b qcacld-3.0: Aggregate the msdus of UDP flow
Aggregate the UDP flow msdu in to jumbo msdu and deliver to stack.
Stack handling of jumbo msdu saves the CPU mips.

Change-Id: I5a5d3fdbf3037d3b538f737bf4de8edc06260ab1
CRs-Fixed: 2600268
2020-02-12 11:56:17 -08:00
Manjunathappa Prakash
1fef6fba0c qcacld-3.0: Add logic to learn and program the flow in to FT
Check the HW TLVs to identify if the flow is already programmed.
If flow doesnot exist make an entry to SW and HW flow table.
Invalidate FSE cache to make fse read updated FT entry

Change-Id: I6acc539c5c7994e438ebb2af9cb3bb5ecbf6e120
CRs-Fixed: 2600268
2020-02-12 11:55:58 -08:00
Manjunathappa Prakash
77686579c1 qcacld-3.0: Allocate and initialize the FST for FISA
Add FST setup functions for allocating SW and DDR HW FT.

Change-Id: I13e7d5a40c7440f95d2308e0da5a883557b6b399
CRs-Fixed: 2600268
2020-02-12 11:55:44 -08:00
nakul kachhwaha
964cd0e528 qcacld-3.0: Fix compilation issue on kernel v4.19
Removed ol_tx_hl_vdev_bundle_timer definition for
kernel v4.15 as __os_timer_shim will wrap the kernel
timer handler API prototype as per new definition for
kernel v4.15 and above.

Change-Id: I873ba706050ea8020e4af7133c86ef8aabb93d53
CRs-Fixed: 2602835
2020-02-11 02:38:51 -08:00