Commit Graph

310 Commits

Author SHA1 Message Date
Jeff Johnson
6d3b419417 qcacld-3.0: Remove htt_pdev_t::tx_mgmt_desc_ctxt
The tx_mgmt_desc_ctxt member of struct htt_pdev_t has been unused
since the initial snapshot of the driver, so remove it along with the
unused underlying data structures.

Change-Id: Iebd73c0c9eb8f882ec6a0d01ad2979edb701cb80
CRs-Fixed: 3428241
2023-03-12 07:28:31 -07:00
Venkateswara Naralasetty
0b73cf7d9b qcacld-3.0: Rename CE descriptor macros
Few of the CE descriptor related macros are moved from qdf to
ce_internal.h file. Hence rename the corresponding macros.

Change-Id: I64b74456fb3f349ab65b3c955461ef3693ca318d
CRs-Fixed: 3388380
2023-02-24 00:05:26 -08:00
Karthik Kantamneni
5b66893892 qcacld-3.0: Configure RX ring size based on supported data mode
Configure RX refill ring size based supported nss mode.
In 1x1 mode throughput supported will be less,
it does not require higher RX refill ring size so
in 1x1 mode use reduced refill ring configuration.

Change-Id: Iab1db3e99b1a30cf1dd3d584192363cbffa84ec1
CRs-Fixed: 3376948
2023-01-15 00:36:27 -08:00
Gangadhar Kavalastramath
ac42107b12 qcacld-3.0: Fix wlan idle timeout crash for genoa
Two different crashes are observed due to rtpm get/put count
mismatch for HIF_RTPM_ID_HTT dbgid.
1. During idle timeout shutdown: Missing rtpm related htc packet
   tags for htt_h2t_ver_req_msg(), htt_h2t_frag_desc_bank_cfg_msg()
   and htt_h2t_rx_ring_rfs_cfg_msg_ll() messages cause system crash.
2. During wlan connect: In ol_tx_completion_handler(), rtpm put is
   called without rtpm get.

Fix given:
1. Add relevant HTC_TX_PACKET_TAG_RUNTIME_PUT and
   HTC_TX_PACKET_TAG_RTPM_PUT_RC in the above functions to invoke
   missing rtpm put calls and call htc_dec_return_htt_runtime_cnt()
   to avoid calling rtpm put without rtpm get in htc_cleanup().
2. Remove extra htc_pm_runtime_put() from ol_tx_completion_handler().

Change-Id: Ia9163464af0fc0700046578633e9587c009841f5
CRs-Fixed: 3357909
2023-01-05 14:30:25 -08:00
Jeff Johnson
dc961a7522 qcacld-3.0: core: dp: Fix misspellings
Fix misspellings in core/dp/...

Change-Id: Ibafb9996aeec83ff18fdad269c2ee918afcb397f
CRs-Fixed: 3303628
2022-10-06 02:12:24 -07:00
Jeff Johnson
155dea7b77 qcacld-3.0: Fix misspellings of "return"
Fix misspellings of "return":
Retrun ==> Return
Reture ==> Return
retrun ==> return
reutrns ==> returns

Change-Id: Iad8bc9f4e9d94b05ed47fd91a591ea0dbc92fde2
CRs-Fixed: 3274605
2022-08-29 14:55:28 -07:00
David Oladunjoye
ad41728f81 qcacld-3.0: dp: Replace fallthrough comment with attribute
-Wimplicit-fallthrough is being enabled by default. Some compilers
such as clang require the attribute instead of just a fallthrough comment.

Change-Id: Ie320d97a2df018fb0ad1a39c3fb2683e564d1808
CRs-Fixed: 3217418
2022-06-24 20:06:08 -07:00
Amit Mehta
58a1587cdb qcacld-3.0: Make changes to use QDF status and type
Make changes in packet logging to send QDF status
and type instead of packet log type and status.

Change-Id: I8c1d04a78272159f7d34d6034c41d52e1e44b61d
CRs-Fixed: 3224876
2022-06-23 07:03:36 -07:00
sandhu
afc4244d94 qcacld-3.0: Remove IP from code
Remove qualcomm IP from code

Change-Id: Icc3f239fbb6874a07272618b1be84d613b8fdc84
CRs-Fixed: 3073862
2021-12-29 04:28:21 -08:00
chunquan
89d3e86717 qcacld-3.0: Send high 32bit addr for no smmu platform which fw need
Host send HTT_H2T_MSG_TYPE_WDI_IPA_CFG cmd to fw, need update
high 32bit addr for non-smmu platform which alloc physical
address more than 4G.
If alloc address is 0x1 5000 0000, it will cut off
bit32 ~ bit63, the value fw get is 0x5000 0000, the address
may be used by peripheral. When fw write addr 0x5000 0000,
assert will happen.

When this change compile on 32bit platform, it will error, for
right shift must less than system width.

Change-Id: If1e84cfdcd15494be3f7327986ff0e91ec7b2b3f
CRs-Fixed: 3097240
2021-12-26 04:26:56 -08:00
chunquan
1fab5f2e75 qcacld-3.0: Send high 32bit addr for no smmu platform which fw need
Host send HTT_H2T_MSG_TYPE_WDI_IPA_CFG cmd to fw, need update
high 32bit addr for non-smmu platform which alloc physics
address more than 4G, like addr 0x1 5000 0000.It will cut
off bit32~bit63, fw get memory is 0x5000 0000, it's maybe
use for peripheral memory.when fw write addr 0x5000 0000,
it will meet some error.

Change-Id: Ic5c5c00c85bdf08e61c9ff0f539989d2e96bb153
CRs-Fixed: 3077016
2021-12-08 14:56:54 -08:00
Vevek Venkatesan
4d80c88564 qcacld-3.0: fix race condition in HL IPA Rx buf SMMU map/unmap
While Rx buffers are getting umapped from net rx context and
if IPA pipes are enabled at same time from MC thread context,
this is leading to race condition and IPA SMMU map/unmap is
going out of sync, in adrestea targets.

To fix this introducing IPA SMMU map lock and sync map/unmap.

Change-Id: Ida4c321d94f9640135c67210c69edb355d827c86
CRs-Fixed: 3021027
2021-08-31 10:08:54 -07:00
Rakesh Pillai
b3e1a44d0b qcacld-3.0: Init-Deinit changes for WCN7850
Changes to initialize/deinitalize WCN7850 from HDD layer.

CRs-Fixed: 2888534
Change-Id: Ia9e44f9fe0b4b6977c55c380756af0656203e4f5
2021-06-04 10:43:31 -07:00
Chaoli Zhou
1b8cab61e9 qcacld-3.0: Support setting IpaUcTxBufCount to non power of 2
Since it has memory limitation on sdx platform,
also it need different TX buffer configuration for
different case, which require the IPA tx buffer
numbers to be configurable but not only be power
of 2. So did such change for Genoa to meet different
IPA TX buffer config.

Change-Id: I4482e8f37957d3bfcd82645cf0dec0257ad80e80
CRs-Fixed: 2865851
2021-04-27 09:14:04 -07:00
Karthik Kantamneni
9fc031bbbf qcacld-3.0: Fix setting HTT frag descriptor address
Currently HTT frag descriptor address is trimmed to 32 bits,
but there is possibility of frag descriptor getting allocated
in range greater than 32 bits when smmu is disabled.

So set the full 37 bits frag address in msdu HTT TX descriptor.

Change-Id: I142d151f6042972eb4a23abdb10cc6ee28ca1613
CRs-Fixed: 2826567
2020-11-26 06:08:23 -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
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
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
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
Vevek Venkatesan
4ad620b903 qcacld-3.0: fix improper data rate in rtap header in monitor mode
In ht monitor mode, mcs data rate is not correctly populated in
radiotap header, so if ht_flag is set, assign mcs value to ht_mcs
to fix it.

Change-Id: If428275671068b31ae1367244c62bc4cac25a2af
CRs-Fixed: 2772405
2020-09-09 14:03:39 -07:00
Chaoli Zhou
075cb24e55 qcacld-3.0: Limit the IPA tx buffer for Genoa
In order to improve the Genoa DBS KPI, need to
increase the IPA tx complete ring size from
1024 to 2048. And the tx buffer count also will
increase from 1023(1024-1) to 2047(2048-1) according.
But in fact, as for wlan fw, it just only reserve
1500(1100 for 5G, 400 for 2.4G) tx desc for packets
from IPA, so some tx buffer will not used here,
which will waste memory. So to save some memory,
export CONFIG_LIMIT_IPA_TX_BUFFER for platform
configuration to limit the max IPA tx buffer count

Change-Id: Id5d4c5a220b588747f3d1981627f6253d7c3305b
2020-08-31 17:20:59 -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
Karthik Kantamneni
4a7bc29161 qcacld-3.0: Enhance logging in RX path to check refill failures
Enable logging feature which helps to check rx ring refill failure.

Currently rx ring refill count is updated same time from multiple
places without protection, so use atomic variable for refill count.

CRS-Fixed: 2740225
Change-Id: Icd88d351cb15d0f18edf0b986e4de95dbe4e6989
2020-08-02 00:02:47 -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
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
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
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
Chaoli Zhou
b991ddfe99 qcacld-3.0: Change dma address size to 8 bytes for Genoa IPA
Currently, sizeof(qdf_dma_addr_t) is 4 bytes, but IPA driver
and WLAN FW always use 8 bytes, we should follow up with them,
otherwise, the numbers of rx complete ring entries will not be
same in both sides. Meanwhile, for tx complete ring, during the
first time initialization, we fill the buffer address with 4
bytes, while GSI FW read 8 bytes address content from tx complete
ring, which should cause the GSI FW get invalid address on the half
way and cause the smmu fault issue. So fill 8 bytes length buffer
address to the tx complete ring can avoid such issue.

Change-Id: I61021627b634d4b1525727cc944ee410ed3154db
2020-01-22 16:25:43 -08:00
Vevek Venkatesan
e9fa59de57 qcacld-3.0: cdp: Converge cdp_ctrl_ops
Currently cdp ops are given pdev/vdev handle
as its arguments, which is directly accessed
in those APIs. This can cause a race-condition
in access of the respective handles, if it has
been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev_id/vdev_id which will be used to get the
respective handles and hence avoiding unwanted
access of the handles if it has been deleted.

Also deleting few ops which stores and retrieves
such handles and adding ops to set/get pdev params.

- txrx_set_safemode
- txrx_set_drop_unenc
- txrx_get_pdev_param
- txrx_set_pdev_param
- wdi_event_sub
- wdi_event_unsub

Change-Id: Ib3511cbdead75b30e899dbf00f936ffdae316b71
CRs-Fixed: 2541657
2020-01-20 17:50:23 -08:00
Alok Kumar
2107a96e37 qcacld-3.0: Add driver support for QCA6750
Add driver support for QCA6750

Change-Id: I9e6716d5ed9f91532aba422c32b46b43760a0e88
CRs-Fixed: 2602141
2020-01-20 01:10:01 -08:00
Yeshwanth Sriram Guntuka
872ba80018 qcacld-3.0: Put the htc pkt in freelist on htc_send_pkt failure
In case of nbuf map failure as part of htc_send_pkt for
tx credit flow disabled endpoints, htc pkt is not put
back in the freelist as return status is not checked
resulting in memory leak.

Fix is to put the htc pkt back in the freelist based on
status returned by htc_send_pkt.

Change-Id: I9173fa3684bc887a360b92d48b689c53a5ad5dbe
CRs-Fixed: 2593729
2020-01-03 12:20:36 -08:00
Hangtian Zhu
8edf8c6c17 qcacld-3.0: Fix monitor mode radiotap bw and rssi info
For vht bw, there is a transformation of rx_status->vht_flag_values2
in qdf_nbuf_update_radiotap_vht_flags(), so strictly copy
rx_status->vht_flag_values2 from rx_desc, do not transform twice which
leads to wrong vht bw.
For rssi, only show first mpdu rssi info in a ppdu, firmware reports
-86 rssi_comb for mpdus other than the first one, calculate
ANTSIGNAL by adding with noise floor will show a wrong rssi for those
mpdus.

Change-Id: I776d85cea2cf0f48beeed351ed0643699d805d54
CRs-Fixed: 2588768
2019-12-23 04:14:22 -08:00
Nirav Shah
7d75434e39 qcacld-3.0: Add credit tracking for HL Data Path
Add credit tracking for HL Data Path in DPTRACE.
Also update proto_bitmap to dynamically enable/disable
credit tracking.

Change-Id: Idd9216b634586f3a81c2194ea4bd2122a472154a
CRs-Fixed: 2574053
2019-12-13 07:03:11 -08:00
Nirav Shah
23c5c3eaf8 qcacld-3.0: Print FW tx path counters in txrx_fw_stats
Print FW tx path counters in txrx_fw_stats.

Change-Id: I2adfa6121b6b8b0afa743f7d7f4f0adbbd4626ed
CRs-Fixed: 2583155
2019-12-11 00:19:01 -08:00
Nirav Shah
3c677d7708 qcacld-3.0: Display FW rx_ovfl_errs count in txrx stats
Display FW rx overflow count in txrx stats.

Change-Id: I53afeb03303b8ee0df9d906d7a8de1d916c6c143
CRs-Fixed: 2571542
2019-11-27 14:15:41 -08:00
Alok Kumar
6220137b8d qcacld-3.0: Populate correct RSSI value for Monitor packets
In Monitor Mode, RSSI is always -96 for packets in TCPDUMP.
Populate the correct RSSI value in Monitor Mode.

Change-Id: Iba9fe7091043d27828f4742058ed3d389cde7e26
CRs-Fixed: 2568129
2019-11-22 05:35:23 -08:00
Vevek Venkatesan
29076ec1d8 qcacld-3.0: cdp: Converge cdp_ipa_ops
Currently cdp ops are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev_id or vdev_id or peer mac address,
which will be used to get the respective handles,
and hence avoiding the unwanted access of the
handles if it has been deleted.

- ipa_get_resource
- ipa_set_doorbell_paddr
- ipa_set_active
- ipa_register_op_cb
- ipa_get_stat
- ipa_tx_data_frame
- ipa_uc_get_share_stats
- ipa_uc_set_quota
- ipa_enable_autonomy
- ipa_disable_autonomy
- ipa_setup
- ipa_enable_pipes
- ipa_disable_pipes
- ipa_rx_intrabss_fwd

Change-Id: I678d7a7de7132417ff6051b0fd6da5d14426d21e
CRs-Fixed: 2540861
2019-11-21 06:12:04 -08:00
Yeshwanth Sriram Guntuka
521b6b254b qcacld-3.0: Increase the rx debug buffer list size
Increase the rx debug buffer list size to 8k to
capture more history.

Change-Id: I56d37e5c25653daa9dac76328808e99ed24a7bff
CRs-Fixed: 2542805
2019-10-25 04:40:32 -07:00
Manjunathappa Prakash
458f6fe460 qcacld-3.0: Add changes to support qca6490
Add changes to support qca6490 chip.

Change-Id: I861d88f6c9aba5285eff17c188bf335d50839d56
CRs-Fixed: 2522129
2019-10-17 15:06:24 -07:00
guangde
3e57c247d2 qcacld-3.0: update PTP timestamp for Rx packet
Host driver could not get correct timestamp of Rx AMPDU packet sometimes.
The reason is PTP timestamp is stored in PPDU_END info, only last msdu
description contain it.Rx indication which sent from target has limited
number of MSDU.If none of them is last msdu, Host driver will not get
the correct timestamp.
Add two parameters to record the last system time and timestamp. If
Host driver detect no last msdu in Rx indication, It will calculate the
timestamp according to the difference of two parameters and current
system time.

Change-Id: Iea94f5c0a681ec1d377cbed9dd5b00b100223cc7
CRs-Fixed: 2513659
2019-09-17 03:56:00 -07:00
Alok Kumar
cdf1205941 qcacld-3.0: Fix buffer overflow in HTT MSG handling
If the firmware gets compromised, the values sent to
the driver could result in buffer overflows.

Validate HTT MSG "msg_word" to avoid buffer overflows.

Change-Id: I6073029f61a358da32bcc0dcfc339d9bb7ee8218
CRs-Fixed: 2213659
2019-09-10 12:22:52 -07:00
Visweswara Tanuku
2e839e540c qcacld-3.0: Genoa: SDIO: Handle Tx Padding & Credits
In Genoa SDIO ADMA implementation Host sends packets to FW in
multiples of SDIO Block size.
If the packet/bundle is not block aligned Host adds padding at the
end of Packet/Bundle.

If the TX packet plus padding exceeds one FW TX Buffer, Padding data
will occupy the next FW TX buffer. Same applies for bundle TX packet.

For above scenario, HTC_FLAGS_PADDING_CHECK of HTC header Flags is used
to notify the FW that - Padding data follows the currentHTC packet

Since the padding data will take one extra FW Tx Buffer, host need to
handle the extra Tx credit being used by the padding data/buffer

CRs-Fixed: 2516619
Change-Id: Ie2d2292fabb30e1a13eebe4d11b57f452e42afa8
2019-09-08 07:37:21 -07:00
Nirav Shah
812a159948 qcacld-3.0: Fix return value of htt_rx_frag_pop_hl
Return number of msdus poped as return value for
htt_rx_frag_pop_hl to process fragmentation indication
correctly.

Change-Id: I104c04757aa8bfac5d6516b1455e1e0506b460a4
CRs-Fixed: 2419759
2019-08-29 04:33:52 -07:00
Ajit Pal Singh
407d6d84b8 qcacld-3.0: Deduct HTT credit from TXQ group also
In HL data path, when HTT credits are used outside the HL scheduler,
credits are getting deducted form target_tx credit only.
When CONFIG_FEATURE_HL_GROUP_CREDIT_FLOW_CONTROL is enabled, credits
should be deducted from TXQ group also.

Change-Id: Ice4160043fc1d812686f8ce7ee310110299d2276
CRs-Fixed: 2485819
2019-08-26 00:26:46 -07:00
Nirav Shah
718d14b1ee qcacld-3.0: Add support for addba/delba HTT message
In case of high latency data path, addba/delba messages
needs to be handled to support partial reorder.
This reverts commit b8919e14c5
and fix below security isses in ol_tx_addba_handler.
1. handle memory allocation failure scenario.
2. Free array memory before assign new memory to avoid
   memory leak.

Change-Id: I4f577c9e8bcb40f70ffb1b305659a059eac68d8d
CRs-Fixed: 2488966
2019-08-12 01:27:32 -07:00
Rakshith Suresh Patkar
02f3d31c2f qcacld-3.0: Use new HDD callback for rx mic error
Post rx mic error information to HDD via new HDD mic
error callback(hdd_rx_mic_error_ind) registered to
.rx_mic_error member in dp_ol_if_ops.

Change-Id: Ia1e2b78a94dddba48937995ecf62fb5a7ae4139d
CRs-Fixed: 2488452
2019-07-22 11:36:11 -07:00
Nirav Shah
9b25064c31 qcacld-3.0: Use correct variable for excess retry count
Use correct variable to display excess retry count in
pdev tx fw stats.

Change-Id: I93fa3a064cf26e423fb9d5aead9e1deed341ff7a
CRs-Fixed: 2468832
2019-06-15 00:26:03 -07:00
Jiani Liu
a8fd170e7a qcacld-3.0: Add PTP timestamp socket options RX support
Host need to fill netbuf with qtime instead of tsf. So host first
need to set enable_ppdu_end to 1, so that FW will pass ppdu_end
contents to host, and host can translate tsf64_time into qtime.
The tsf64_time is new added to fw struture, so host will need
add it accordingly to struct hdd_adapter, and keep it updated
in time synchronization function <hdd_update_timestamp>.

Change-Id: Ib19ac1411c4e17624c012f188297c9f2122642d2
CRs-Fixed: 2444456
2019-05-21 16:45:09 -07:00
Ajit Pal Singh
3d50c8e7d0 qcacld-3.0: Do not change bus/target delta for QCN7605
Do not change bus/target delta for QCN7605. All the credits
received from FW will be released to the schheduler.

Change-Id: I17dbd1a4545d8b577ea521773c17506a0fc818cf
CRs-Fixed: 2423138
2019-03-28 16:50:12 -07:00