Commit Graph

282 Commits

Author SHA1 Message Date
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
Srinivas Girigowda
a47b45f94f qcacld-3.0: Consolidate multiple MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
Consolidate multiple (redundant) MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
PMO_80211_ADDR_LEN
IEEE80211_ADDR_LEN
ETHER_ADDR_LEN
HTT_MAC_ADDR_LEN
ETHERNET_ADDR_LEN
DEFRAG_IEEE80211_ADDR_LEN
OL_TXRX_MAC_ADDR_LEN
QCSAP_ADDR_LEN

CRs-Fixed: 2406592
Change-Id: I829c5799e4724f81af996b23fdd4ea03f4728bc4
2019-03-28 16:49:58 -07:00
Jeff Johnson
6795c3a9aa qcacld-3.0: dp: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within dp replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: I6c5589e430bdd8687122337fe88fb84ba72bab60
CRs-Fixed: 2418391
2019-03-22 17:39:28 -07:00
Alok Kumar
b94a2e7f29 qcacld-3.0: Update Arp Stats for both Tx and Rx Arp Packets
Currently rx_arp_resp_count stats is not updated for ARP packet
during rx in htt_rx_amsdu_rx_in_order_pop_ll as packet type is
not marked as QDF_NBUF_CB_PACKET_TYPE_ARP.
Also, track_arp_ip member of adapter is updated during NUD SET
but track_arp_ip of hdd_ctx is used inside hdd_hard_start_xmit
and hdd_rx_packet_cbk to compare arp src ip.

Update the packet type to QDF_NBUF_CB_PACKET_TYPE_ARP for ipv4 ARP
packet during htt_rx_amsdu_rx_in_order_pop_ll.
Use track_arp_ip member of adapter to compare arp src ip.

Change-Id: I58a678caa8ce4b54b583f76cfcbbb4f46443f448
CRs-Fixed: 2405335
2019-03-14 13:01:20 -07:00
Srinivas Girigowda
69e60dbbde qcacld-3.0: Remove obsolete macros/enums from the code
Remove obsolete macros/enums from the code.

Change-Id: I398f4d65bcfc996bbaf12076b55b7e6cf9e182be
CRs-Fixed: 2414803
2019-03-13 19:41:17 -07:00
Rakshith Suresh Patkar
dd7f36c0dd qcacld-3.0: Move htt_rx specific macros from hif to htt
Add htt_rx specific macros in htt.

Change-Id: I34aca35574a3366e65000f40529e65593a37932e
CRs-Fixed: 2412216
2019-03-12 10:01:22 -07:00
Srinivas Girigowda
98234535e0 qcacld-3.0: Converge *_MIN/MAX() to QDF_MIN/MAX()
Converge multiple MIN/MAX() macros across the stack
to QDF_MIN/MAX().

Change-Id: Ibf622b1e365431fa579005ba8bffdd33b7808da8
CRs-Fixed: 2413868
2019-03-12 02:58:39 -07:00
Jeff Johnson
cdcc910871 qcacld-3.0: Remove extern from htt prototypes
To align with the Linux coding standard as enforced by the checkpatch
script, remove the extern keyword from htt prototypes.

Change-Id: I8a935de8d3cb5ea65ee81d5ba770f6e51608cba9
CRs-Fixed: 2411810
2019-03-08 04:36:53 -08:00
Srinivas Girigowda
a83abf3bbe qcacld-3.0: Modify IEEE80211_FC0_*_QOS to QDF_IEEE80211_FC0_SUBTYPE_QOS
Modify IEEE80211_FC0_SUBTYPE_QOS to QDF_IEEE80211_FC0_SUBTYPE_QOS.

Change-Id: Ide7ce0b8ff66af1706c2781dbe2aecb316613366
CRs-Fixed: 2408230
2019-03-05 11:27:49 -08:00
Srinivas Girigowda
2834495863 qcacld-3.0: Remove cds_ieee80211_defines.h
Remove cds_ieee80211_defines.h file.

Change-Id: I3b7a3f61f82ea15b7975fb5d143257c80382f20d
CRs-Fixed: 2395980
2019-02-26 21:18:05 -08:00
Nirav Shah
da761ede23 qcacld-3.0: Fix datapath statistics print format
Fix datapath statistics print format.

Change-Id: Id1c95fc93f1d7335eb199afa59b2077a36641dc3
CRS-Fixed: 2401250
2019-02-20 02:55:51 -08:00
hangtian
127c953c7f qcacld-3.0: Use qdf_mem_zero for zero initialization
Use qdf_mem_zero for zero initialization.

Change-Id: Ic2b8d907623cf67a4569aaf01398c1b3a2bff707
CRs-Fixed: 2376644
2019-01-14 08:38:03 -08:00
Jeff Johnson
40d289ec79 qcacld-3.0: Remove macro HTT_TX_DESC_PADDR()
Macro HTT_TX_DESC_PADDR() is unused. Furthermore, it references
tx_descs fields which do not exist. Since it couldn't possibly be
used in its current form, remove the macro.

Change-Id: I62b2d7bc3291ba6c2dc486196076827cfc22d8ec
CRs-Fixed: 2375421
2019-01-07 08:47:15 -08:00
Rakshith Suresh Patkar
c107967468 qcacld-3.0: Use new accessor macro for map_index in qdf_nbuf_cb
The existing accessor macro NBUF_MAP_ID is obsoleted due to
restructuring of qdf_nbuf_cb.

Use new macro QDF_NBUF_CB_RX_MAP_IDX to access map_index.

Change-Id: I23650781cdd770f25b72a0a5fe55acc12d71cb64
CRs-Fixed: 2370724
2018-12-23 21:58:36 -08:00
Alok Kumar
6f20e30949 qcacld-3.0: Avoid rx_ring.refill_debt count to become negative
Here rx_ring.refill_debt can become negative if filled count
returned from htt_rx_ring_fill_n() exceeds the rx_ring.refill_debt.

This is possible because inside htt_rx_ring_fill_n() we always refill
num = qdf_atomic_read(&pdev->rx_ring.refill_debt). Here we do not take
care of already served debt.

Taken care of above by subtracting debt_served from refill debt.

Change-Id: I0c154c978b711da2d8497c50f730619767787188
CRs-Fixed: 2365566
2018-12-21 02:40:32 -08:00
Jeff Johnson
c44540a879 qcacld-3.0: Remove unused htt_fw_stats macro ROUND_UP_TO_4
Macro ROUND_UP_TO_4 in htt_fw_stats.c is unused, so remove it.

Change-Id: I2aea830bee4d9e40546a02ee8715995e662cbeb2
CRs-Fixed: 2366962
2018-12-17 13:12:01 -08:00
Rakshith Suresh Patkar
0f6375c2b7 qcacld-3.0: Enable use of new htt header format
If FW supports new htt format include only payload length in
the header length.

Change-Id: Ia668d73dcae3eb4adc1a4cfb0498b34d8c38f522
CRs-Fixed: 2361564
2018-12-10 05:36:45 -08:00
Lin Bai
6abb0f08e5 qcacld-3.0: Typecast DMA address properly when printing
Change Icdcfcdd10400aa2fad64441aa863087cc1c3766e use %llx to print
qdf_dma_addr_t. While qdf_dma_addr_t defined as 'unsigned long',
if without definition from kernel header.
Typecast DMA address to 'unsigned long long', before using %llx to
print DMA address directly.

Change-Id: Ic9527b494ac1aa2d47567a7dab5f0786913f4921
CRs-Fixed: 2355624
2018-11-28 01:36:43 -08:00
Lin Bai
e8ce5c5744 qcacld-3.0: Fix format error when printing DMA address
Compiler threw error as -Werror=int-to-pointer-cast when casting
DMA address to void pointer.
Use %llx to print DMA address directly.

Change-Id: Icdcfcdd10400aa2fad64441aa863087cc1c3766e
CRs-Fixed: 2350605
2018-11-21 13:47:22 -08:00
Nirav Shah
7c8c171e05 qcacld-3.0: Remove unnecessary prints from data path
1. Remove error prints for qdf_mem_malloc APIs.
2. Remove unnecessary __func__ from data path prints.

Change-Id: I6c4b110f626d84da055821c5f210a3d000b6ff15
CRs-Fixed: 2317315
2018-11-16 05:08:30 -08:00
Will Huang
a47dca3872 qcacld-3.0: Map as QDF_DMA_BIDIRECTIONAL for PMF tx frame
Some target which support sending mgmt frame based on htt would DMA
write this PMF tx frame buffer, it may cause smmu check permission
fault, set a flag to do special DMA map.

Change-Id: I3686be211374d2c316726fa3248dedce87c3faed
CRs-Fixed: 2332329
2018-10-30 01:46:01 -07:00
Amar Singhal
ddd2cf98d2 qcacld-3.0: Unlock the rx_ring spin-lock appropriately
Unlock the rx_ring.rx_hash_lock spin-lock when returning due to
failure to do smmu map_unmap.

Change-Id: I1b905c0ad529c80f78807c030920121ee0909825
CRs-Fixed: 2299785
2018-09-06 10:05:27 -07:00
Alok Kumar
a13db78b09 qcacld-3.0: Add pre-allocated pool of SKBs for Rx ring
In low memory condition, RX ring may become empty when all
SKB buffers attached to the ring get consumed and kernel is
unable to allocate SKB buffer during replenish.

Create a pre-allocated pool of skbs during driver load time
and request the buffer from this pool in low memory case.

Change-Id: If8c6a4fe04f3c931dc60dcffe28e45166eab9835
CRs-Fixed: 2306861
2018-09-06 01:41:52 -07:00
Manjunathappa Prakash
1bc742d65e qcacld-3.0: Do not log DP info logs on the console
Reduce the log level so that logs appear on cnss-diag log instead on
console.

Change-Id: I66ba3a941b9c6be9ec4fb04af39f9362822787d2
CRs-Fixed: 2296841
2018-08-17 16:13:06 -07:00
Dustin Brown
83044c26d3 qcacld-3.0: Remove redundant recovery-enabled checks
cds_trigger_recovery() already checks for various conditions before
actually triggering recovery. One of these checks ensures that recovery
is enabled, but some callers are checking to see if recovery is enabled
before calling cds_trigger_recovery() as well. Because of this, some
important checks are skipped, and crashes can occur when they should
not. Remove the redundant checks at the call sites for
cds_trigger_recovery() so that all of the recovery conditions are
properly handled, and the wlan driver avoids crashing when it should
not.

Change-Id: I8c26a002b66496a1eb06263f3f8b91ead739e3ac
CRs-Fixed: 2296008
2018-08-15 01:17:42 -07:00
Nirav Shah
e6194ac8ad qcacld-3.0: Update data path statistics log level
Do not required to print function and line number
for data path statistics function which is invoked
by ioctl.
Change data path statistics to info print so
that it can be printed in dmesg as well.

Change-Id: I4b5ea4202255ace71dbb6f9a4bbff6f93e496425
CRs-Fixed: 2278885
2018-08-14 02:15:39 -07:00
Venkata Sharath Chandra Manchala
9ac1620c82 qcacld-3.0: Add conditional QCA6390_HEADERS_DEF flag
Add a conditional compilation QCA6390_HEADERS_DEF flag to compile
htt_rx_restitch_mpdu_from_msdus.

Change-Id: I6b526f2dd5d56338e520ec138512b7cf2d849d0c
CRs-Fixed: 2275699
2018-08-08 12:53:42 -07:00
jitiphil
900e0e617a qcacld-3.0: Reuse preample type, vht_sig_a_1 and vht_sig_a_1
In monitor mode, current implementation
uses the preample type, vht_sig_a_1 and vht_sig_a_1
values associated with each mpdu, instead of reusing
the values from the first mpdu, to calculate data rates.

This is causing incorrect rates to be recorded in monitor mode logs
Reuse preample type, vht_sig_a_1 and vht_sig_a_1 of first
mpdu till the last mpdu is reached.

Change-Id: Ia6e5c1b3b0cc8d8b27f16cdfbd469fdba5c4a8f2
CRs-Fixed: 2276766
2018-08-06 04:21:25 -07:00
Nirav Shah
575282cd60 qcacld-3.0: Featurize DSRC(802.11p) implementation
Featurize DSRC(802.11p) implementation

Change-Id: I64baee9d26b2300b7a7282ad2eff031c0b02b0b2
CRs-Fixed: 2287352
2018-08-06 04:21:21 -07:00