Commit graph

681 Commits

Autor SHA1 Nachricht Datum
Yeshwanth Sriram Guntuka
b4377be446 qcacld-3.0: Do not do PN check in case of WEP security
In WEP connection, IV values used for consecutive packets
could be random and need not be monotonically increasing
or consecutive in case of fragments. This could result in
incorrect drop of fragments.

Fix is to not do PN check in case of WEP security.

Change-Id: I8bfe16f3bf68752f4279b3fae1cf485a3abc1af7
CRs-Fixed: 2977416
2021-06-28 07:22:29 -07:00
Yeshwanth Sriram Guntuka
e4322f1e96 qcacld-3.0: Add support for GCMP in rx de-fragmentation
GCMP header and MIC are not removed for received
fragments which will result in incorrect ethertype
and presence of LLC hdr in the data when the frames
are sent to network stack.

Fix is to add support for GCMP in rx de-fragmentation
path.

Change-Id: I83ed29a766e40e32f4b712342ebd40d08a2c65e0
CRs-Fixed: 2942099
2021-06-23 14:08:51 -07:00
Qun Zhang
086ebbc79e qcacld-3.0: notify TKIP mic failure to upper layer under fragement case
It's also needed to notify supplicant when TKIP michael mic failure was
detected under fragement case, so supplicat can start 60s protect policy
for association.

Change-Id: I9383d653ac957425e09a60a2f495e575741d073a
CRs-Fixed: 2942680
2021-06-02 15:54:12 -07:00
Yeshwanth Sriram Guntuka
03ec0027f3 qcacld-3.0: Add support to flush fragments for a particular peer
Add support for flushing fragments for a particular peer.

Change-Id: I91236d2edc73317380590458b974013a02e858a1
CRs-Fixed: 2860131
2021-05-13 06:19:43 -07:00
Yeshwanth Sriram Guntuka
7ccead5da9 qcacld-3.0: Do not intrabss fwd frag EAPOL frames in HL
Do not intrabss forward fragmented EAPOL frames that have
DA different from the SAP vdev mac addr when high latency
is enabled.

Change-Id: Idb6e6c001f4dae51c2181e70ab9adbbb964f0ee3
CRs-Fixed: 2942096
2021-05-12 14:31:13 -07:00
Yeshwanth Sriram Guntuka
62374f3883 qcacld-3.0: Do not intrabss forward fragmented EAPOL frames
Do not intrabss forward fragmented EAPOL frames that have
DA different from the SAP vdev mac addr.

Change-Id: I4145227c9b02fe8cec86ef4ffc3bc2025f906923
CRs-Fixed: 2888467
2021-05-12 12:30:49 -07:00
Yeshwanth Sriram Guntuka
5deab77487 qcacld-3.0: Modify check to ensure consecutive PN for frags
Modify check to ensure packet number is consecutive for
fragments and drop the fragments if the check fails.

Change-Id: Ica24f65aff65ca58bb010c876f27964b5b2bae6a
CRs-Fixed: 2860242
2021-05-12 12:30:45 -07:00
Yeshwanth Sriram Guntuka
403bc635eb qcacld-3.0: Drop mcast and plaintext frags in protected network
Multicast frames should not be fragmented and plaintext
frags should not be reassembeld in protected network.

Fix is to drop mcast frags and plaintext frags received
in protected network.

Change-Id: I98cf0715f5832f2f86f86b79dbdbc3a7c86dbfd0
CRs-Fixed: 2860245
2021-05-12 10:34:49 -07:00
Gururaj Pandurangi
9996bc7175 qcacld-3.0: Remove feature flag WLAN_FEATURE_11W for pmf
Remove all of the conditional compilation for pmf since this
feature is mandatory for future scope from protocol point
of view.

Change-Id: Id3a2127e9ecb343ad2a0354dcbc331c22167d7fb
CRs-Fixed: 2852630
2021-03-18 00:39:42 -07:00
Surabhi Vishnoi
5fd71222a8 qcacld-3.0: Fix incorrect condition for TSO frags in pkt capture
The number of fragments in TSO packet are assembled incorrectly
due to wrong loop condition in packet capture mode.
Fix the condition to assemble all segments of TSO packet
correctly in packet capture mode.

Change-Id: Ifd7be13e56c12b2cb4e6a5000b355c9fa972962d
CRs-Fixed: 2877021
2021-02-25 11:43:22 -08:00
Karthik Kantamneni
153db6d0a5 qcacld-3.0: Fix race during peer deletion in roaming scenario
There is possiblity of peer being accesed in rx napi context,
when peer is getting freed up at same time from scheduler
thread context in roaming scenario.

To avoid this race free up the peer when unmap handlers received
from F.W for all the peer ids.

Change-Id: Ia0b1fcc6b56e91efe914ca431aeac6e83b773a81
CRs-Fixed: 2867382
2021-02-25 04:03:22 -08:00
Karthik Kantamneni
2d3be81051 qcacld-3.0: Fix MIC verification in helium family
Currently MIC verification is not proper for fragmented packets,
fix MIC verification for helium family.

Change-Id: Iac95c579287bafedf6521b38f2c628fd08cca72d
CRs-Fixed: 2869483
2021-02-03 05:41:26 -08:00
Qun Zhang
c07607873c qcacld-3.0: Update deficient_desc when the TX pool is replenished
It's needed to update deficient_desc count when the deficient pools
are replenished, otherwise, when there are multiple interfaces and
do intetfaces on/off stress test, it's possible some interfaces will
run out of system tx pool descriptors when do ol_tx_flow_pool_resize,
and other interface can't get any available tx descriptors.

Change-Id: I07ded6c7f39637f6f2734edac5add8fef7bb8cf3
CRs-Fixed: 2857659
2021-02-02 19:02:38 -08:00
Karthik Kantamneni
8c1447c31d qcacld-3.0: Add NAN UDP/TCP checksum offload DP cfg entry
Recently NAN UDP/TCP checksum offload INI is added
but corresponding DP cfg entry is missing.
Add NAN UDP/TCP checksum offload DP cfg entry.

Change-Id: I9c6549cbe4cb9e67a538c0743d99404b515e2006
CRs-Fixed: 2815904
2020-11-26 16:38:36 -08:00
Tiger Yu
f702106630 qcacld-3.0: Enable TSO/SG feature by the FEATURE_TSO/dp_sg_support
The hdd_set_netdev_flags enable the TSO feature regardless of the
FEATURE_TSO, which will cause the performance regression issue on
the non-tso supported chip.

Enable TSO feature based on the FEATURE_TSO, and enable the SG feature
separately by ini dp_sg_support for legacy chip to fix it.

Change-Id: I0fcb189069f0aa2069ae8427ad96a8db25a91a2f
CRs-Fixed: 2812953
2020-11-22 21:13:12 -08:00
Amruta Kulkarni
65fe69ff37 qcacld-3.0: Add support for STA + monitor mode
In mission mode, add support for virtual add/del monitor
mode interface. In addition to STA vdev, create and maintain
a new vdev for monitor interface.

Change-Id: I91ea8e56976cce92f9b1ae308d4bd0fb30815366
CRs-Fixed: 2818499
2020-11-19 22:45:53 -08:00
sandhu
a31cfcd002 qcacld-3.0: Add function to convert HW to qdf status
Enhance qdf tx rx to hw tx completion status mapping.
Add inline function to convert hw status to qdf
status. Add dummy argument to qdf_dp_trace_ptr function.

Change-Id: If225bf385a3ce12f354f761594bf3d51ff710a13
CRs-Fixed: 2810592
2020-11-19 20:39:02 -08:00
Guisen Yang
c169b214f9 qcacld-3.0: Check pointers for NULL before use
Some pointers returned from functions may be NULL, so fix these
issues to aviod some null pointer usage.

Change-Id: Ic2e801013d9edf1442b1317fe82718d2e89f9210
CRs-Fixed: 2772605
2020-11-12 16:53:51 -08:00
Srinivas Girigowda
04d156c944 qcacld-3.0: dp: Remove logs for cds_get_context() checks
cds_get_context() function already takes care of logging the
caller function name in case of any error.
Hence there is no need to add the error log again.
Getting rid of these unnecessary logs reduces driver memory footprint.

CRs-Fixed: 2816598
Change-Id: Ide7e1cacb3752f8e9e5797629549079bf4ab8557
2020-11-12 13:53:28 -08:00
Kai Liu
52aec7a272 qcacld-3.0: Enhance hang info feature
Use separate hang reason for case that lack of credit after suspend.
Meanwhile add hang buf offset check to avoid overflow.

Change-Id: Ic794d02672cd663598da66b9e75924c41b5ef0e8
CRs-Fixed: 2801343
2020-10-30 13:03:23 -07:00
Vevek Venkatesan
d9d707266a qcacld-3.0: fix the error in smmu_enable conditional check
Fix the error in smmu_enable condition check for IPA Tx buffer
and also add the flag to mark smmu map/unmap.

Change-Id: I1a9b768c6f17a76b7a857367f342ffbe82e48379
CRs-Fixed: 2793156
2020-10-09 09:43:14 -07:00
Guisen Yang
7608656e86 qcacld-3.0: Change ROME IPA pipe names
With IPA team's request, in order to match
the pipe setting in the ipa driver of linux
kernel 4.14, we need to change ROME IPA
pipes from IPA_CLIENT_WLAN1_CONS and
IPA_CLIENT_WLAN1_PROD to IPA_CLIENT_WLAN3_CONS and
IPA_CLIENT_WLAN3_PROD. Meanwhile change MCC pipe
to IPA_CLIENT_WLAN2_CONS. Also add one feature
flag to avoid affecting other SPs

Change-Id: I99dd442801b1278742c19e4565da2201e1303607
2020-10-07 15:16:18 -07:00
Vevek Venkatesan
bbcf12c70d qcacld-3.0: add cdp ops for IPA Tx buf smmu_unmapping
Add cdp ops for IPA Tx buf SMMU-S1 unmapping and
call unmap from ipa_uc_ol_deinit if IPA uc_loaded,
also assert if mapping/unmapping failed.

Change-Id: I79f293fcf5d6f02e3a01d6c8ff829f4ca87e76e8
CRs-Fixed: 2788811
2020-10-05 17:50:08 -07:00
Srinivas Girigowda
eab3348cb2 qcacld-3.0: dp: Remove logs for qdf_mem_malloc() checks
qdf_mem_malloc() function already takes care of logging the
caller function name and line number in case of any allocation error.
Hence there is no need to add the error log again.

Getting rid of these unnecessary logs reduces driver memory footprint.

Change-Id: If24f25fb61bda6f9cd18ec45c5ded2eb53748736
CRs-Fixed: 2781932
2020-09-25 12:59:55 -07:00
Chaoli Zhou
781829f879 qcacld-3.0: Do ipa tx buffer map after ipa register callback invoked
Do ipa tx buffer map after registering IPA ready
callback with IPA driver. Otherwise ipa_is_ready
flag always is false while calling cds_smmu_map_unmap
from htt_tx_ipa_uc_wdi_tx_buf_alloc, and then
it will not really make tx buffer map take effect

Change-Id: Ib2fee8e5b68d5ba06c8079d39c0a5695087cbc2b
2020-09-24 05:56:07 -07:00
Karthik Kantamneni
a8603fc937 qcacld-3.0: Add P2P UDP/TCP checksum offload DP cfg entry
Recently P2P UDP/TCP checksum offload INI is added
but corresponding DP cfg entry is missing. 
Add P2P UDP/TCP checksum offload DP cfg entry.

Change-Id: If1c4a898f23541ca9d1c674b7650d1f9998e59c6
CRs-Fixed: 2779963
2020-09-18 10:37:58 -07:00
Yeshwanth Sriram Guntuka
843e288336 qcacld-3.0: Fix possible NULL pointer dereference
Pointers returned by wlan_ipa_get_iface API and
cds_get_context API are not NULL validated at few
places. Add NULL checks for these pointers to avoid
possible NULL pointer dereference.

Change-Id: I44f226c2ce97afd6ad2ff9cde5cd70d9d12bc3d2
CRs-Fixed: 2775197
2020-09-15 09:28:43 -07:00
Jia Ding
0358fd452a qcacld-3.0: Provide soc handle and pdev id for IPA cleanup
To do SMMU unmap for IPA TX and RX doorbell registers, provide
soc handle and pdev id to CDP layer.

Change-Id: I6e4fcc7d96d3dabe9dcbb85b9d7193e898d9a73e
CRs-Fixed: 2768306
2020-09-15 09:28:40 -07:00
Srinivas Girigowda
8fb7e79124 qcacld-3.0: dp: Remove redundant __func__ from the logs
The logging macros implicitly takes care of embedding function name
in the log, hence there is no need to include __func__ again.
Getting rid of redundant __func__ reduces driver memory footprint.

Change-Id: I878671f03be0727bca3bca5dfd82eae4e353c6e1
CRs-Fixed: 2768575
2020-09-03 19:27:23 -07:00
Karthik Kantamneni
5e148e5431 qcacld-3.0: Fix nbuf double free for TSO packets
Nbuf users count is not updated properly during failure
case of TSO transmission this is leading to double free.

Fix is to update nbuf users count properly during failure cases.

Change-Id: I68722ec9e62157624dc8a2cd00fd479b9e9e7794
CRs-Fixed: 2759727
2020-08-26 01:35:34 -07:00
Srinivas Girigowda
451c5f8601 qcacld-3.0: dp: Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF
Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF.

CRs-Fixed: 2752355
Change-Id: I40cab2cd3dc959dfab4eb7f32756308338de675b
2020-08-22 16:00:35 -07:00
Arun Kumar Khandavalli
16d9ba73d0 qcacld-3.0: Correct the tlv length of the hangdata
The Tlv of the hang data is reduced to 2bytes from the 4bytes
change the structure definitions accordingly.

Change-Id: Ic535a7b985d028076d14afebe603dfa3fd8e94d3
CRs-Fixed: 2753804
2020-08-14 02:03:10 -07:00
Karthik Kantamneni
054e0b9b4f qcacld-3.0: Check refill debt count during rx data stall
When rx data stall happens due to ring refill failure
check for refill debt count.

CRS-Fixed: 2740233
Change-Id: Ib88074f0e7ed9a64b522a64ff669af87626ce1da
2020-08-02 02:00:55 -07:00
Jianmin Zhu
3e3b907f84 qcacld-3.0: Legacy tx flow control fails and log floods
In DUT sta mode, when tcp/udp stream between sta and PC ethernet at same
subnet, dst mac addr of each tx skb is not bssid, but ethernet mac of the
PC. Since only self peer and bssid peer are created on DUT, the ethernet
mac addr of the PC can't be found from peer list at all by
ol_txrx_peer_find_hash_find_get_ref, ol_txrx_peer_get_ref_by_addr and
ol_txrx_get_vdev_by_peer_addr return NULL. For each tx skb, 2 txrx log
will print and be saved to storage by cnss_diag, throughput is impacted
and LEGACY_TX_FLOW_CONTROL doesn't work too.

Fix: In sta mode, use connected bssid to find dp peer and vdev.

Log sample:
18769633: [soft_i][0x650c858e][08:11:05.109017]wlan: [0:IH:TXRX] PDEV
not found for peer_addr:a0:36:9f:21:18:88
18769633: [soft_i][0x650c85b3][08:11:05.109019]wlan: [0:IH:TXRX]
ol_txrx_get_tx_resource: Invalid peer address: a0:36:9f:21:18:88

Change-Id: Ib87bbe5cbb1c8d0aa31d06b32dc98d9b3b9456b3
CRs-Fixed: 2715377
2020-07-24 17:51:11 -07:00
Yeshwanth Sriram Guntuka
621395dfc7 qcacld-3.0: Send flag as part of tx complete notification
Add support to send tx status flag as part of notify tx
completion.

Change-Id: Ifcfbc6d5e43fc1e7723cd3e2e20e07c2d198a7f9
CRs-Fixed: 2724843
2020-07-22 11:55:16 -07:00
Surabhi Vishnoi
0412d9a24f qcacld-3.0: Call the ucfg cfr api when CFR HTT msg is received
Firmware sends the HTT msg which has information about the
CFR. This information is required by CFR component to get the
CFR data capture.
Call CFR ucfg api to pass this CFR related info to the CFR component.

Change-Id: I6e9bdd991d8e7f84f35231900fc00ed18e89f835
CRs-Fixed: 2724722
2020-07-14 02:01:39 -07:00
Vevek Venkatesan
e28544d9ee qcacld-3.0: initialize peer hang_data in recovery_notifier_cb
Initialize peer_hang_data in  ol_peer_recovery_notifier_cb.

Change-Id: I04d819ba9048b1877dadd4d0678424f2e6fa5b1a
CRs-Fixed: 2719727
2020-06-29 19:15:36 -07:00
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
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
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
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
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
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