Commit Graph

738 Commits

Author SHA1 Message Date
hangtian
67888e2e8d qcacld-3.0: Configure CFG_TGT_NUM_MSDU_DESC through driver config
Configure CFG_TGT_NUM_MSDU_DESC through driver config.

Change-Id: I9667414e526fa7e3e735a209b074db4777c6e86e
CRs-Fixed: 2463898
2019-06-13 04:10:21 -07:00
Nirav Shah
8e89040507 qcacld-3.0: Fix HTC header payload length in case of TSO
In TSO enabled case, update HTC header payload length
after adjusting download length for TSO. Also initialize
download length for every segment to avoid send wrong
payload length.

Change-Id: Ie63d11e5543429d00e40864191f5e7d6a11a689f
CRs-Fixed: 2454727
2019-06-12 23:16:46 -07:00
Ajit Pal Singh
cdbe69a4ad qcacld-3.0: Incase of error return after ol_tx_download_done_base()
In ol_tx_download_done_hl_free() when 'status !=  A_OK',
tx_desc and netbuf are freed in ol_tx_download_done_base() irrespective
of the reference count to tx_desc.
Hence return after ol_tx_download_done_base() if 'status !=  A_OK'.

Change-Id: I2e55d178abc0c2cf30d0f474962f4c06e5c8e327
CRs-Fixed: 2442568
2019-06-08 12:30:16 -07:00
Jiani Liu
6d3b6a16ab qcacld-3.0: Add PTP timestamp socket options TX support
Host need to fill netbuf with qtime instead of tsf. So
host need to add tsf64 enable/disable related functions
and definitions to sync with FW.

The tsf64_time is new added to fw/host structure, so host
need to add parse functions to get tsf64_time from tx_desc.

Change-Id: Ieea0d8f905eb57629d279f8da0e811857b760b1f
CRs-Fixed: 2444456
2019-05-23 22:57:27 -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
Rakshith Suresh Patkar
d31f1e5ed9 qcacld-3.0: Move enum WDI_EVENT to common datapath
Move the enum WDI_EVENT from wdi_event.h to
cdp_txrx_stats_struct.h as it is used in
common datapath.

Change-Id: If3a2dcc481d59e6615e4a50ffbb721bf61fb75c2
CRs-Fixed: 2449966
2019-05-15 05:47:01 -07:00
Srinivas Girigowda
793fd05680 qcacld-3.0: Remove file cds_if_upperproto.h
Remove file cds_if_upperproto.h.

Change-Id: Iaef5431c93e1f13ab8afb908ad6ca140ee22d087
CRs-Fixed: 2436677
2019-04-30 22:27:20 -07:00
hangtian
72704809e5 qcacld-3.0: Add stop_th and start_th for tx flow control V1
Add stop_th and start_th for QCA_LL_TX_FLOW_CONTROL_V2 disabled
platform, which is pdev based tx_desc pool. Change pdev tx_desc pool
size from 1056 to 900, default stop_th is 15% start_th is 25%, this
setting is exactly same as QCA_LL_TX_FLOW_CONTROL_V2. Pause netif tx
queues for all vdevs when stop_th reached instead of dropping frames.
Reduce pdev pool size could significantly reduce firmware wmm drop. Both
of host and firmware frame dropps lead to bad TCP throughput.

Change-Id: I77daf8c9fdef624f8ec479885b7705deb1fef142
CRs-Fixed: 2436772
2019-04-28 18:46:27 -07:00
Sravan Kumar Kairam
53b43e15f0 qcacld-3.0: Modify get tx success ack count api
Modify get tx success ack count api to support it for
lithium datapath by passing pdev reference.

Change-Id: Ibf4396bba941fd4f7e1dc55ca24534fecf54e01e
CRs-Fixed: 2438716
2019-04-26 15:30:52 -07:00
Rakshith Suresh Patkar
1ed1dda57a qcacld-3.0: Adjust pkt download length for TSO packets
In TSO case, if eit header is less than 64 bytes in length,
it will result in unauthorized access to memory that has not
been dma mapped.

For TSO path, adjust the pkt download length before the call
to ce_send_fast(), so that the excess delta is taken into
account and handled.

Change-Id: I049f40afb87c66ad5544da583db27d066fe12453
CRs-Fixed: 2439186
2019-04-23 08:18:39 -07:00
Srinivas Girigowda
cb7b8b8065 qcacld-3.0: Replace MAC_ADDRESS_STR with QDF_MAC_ADDR_STR
Replace MAC_ADDRESS_STR with converged macro QDF_MAC_ADDR_STR.

Change-Id: Ib9bd0a93a3ffdb89a42e11200d8b68ce1af86681
CRs-Fixed: 2433317
2019-04-18 13:26:09 -07:00
Ajit Pal Singh
17634e1e48 qcacld-3.0: Add config to enable/disable RX PN_check offload
Add config to enable/disable RX PN_check offload.
Offload PN check to FW for QCN7605 HL data path.

Change-Id: Ieab4442d73957a9e0314d637a513452616f7a48c
CRs-Fixed: 2433079
2019-04-18 00:28:12 -07:00
hangtian
1c37fb9ccc qcacld-3.0: Memory optimize for QCS403 platform
Memory optimize for QCS403 platform, 1x1 chip. Reduce CE1 htt data
dest ring buffer from 512 to 256, reduce CE2 wmi dest ring buffer from
128 to 64, reduce CE9 & CE10 desg ring buffer from 512 to 64, disable
CE11 pktlog. Note: this change only affect specific WLAN build config for
extremely saving memory, for debug purose, there is another build
selecting default WLAN config for reference HW.

Change-Id: I868e74b09cdb11df3dccaa3f9e051da55724983d
CRs-Fixed: 2432631
2019-04-12 05:20:10 -07:00
Ajit Pal Singh
bd3d364871 qcacld-3.0: Disable ol_txrx_peer_release_ref() logs
Disable ol_txrx_peer_release_ref() logs

Change-Id: I8278c76e97e695daa594c057ecf9d40911ac7ccb
CRs-Fixed: 2430023
2019-04-09 04:00:20 -07:00
Srinivas Girigowda
d462f3b993 qcacld-3.0: Multiple cleanup regarding access category
1. Replace TX_WMM_AC_NUM/OL_TX_NUM_WMM_AC with QCA_WLAN_AC_ALL
2. Replace SIR_QOS_NUM_AC_MAX with QCA_WLAN_AC_ALL
3. Replace WME_NUM_AC with QCA_WLAN_AC_ALL
4. Fix the typo sme_qos_u_pto_ac_map

CRs-Fixed: 2430527
Change-Id: Id2b4624d60a2bd7dd1471c65699ef0de1b88aecf
2019-04-06 00:15:56 -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
Mohit Khanna
b7194395ee qcacld-3.0: Handle unregistered OS RX handles in DP RX Thread
On association completion, RX handles are registered with the DP layer
as a part of cdp_vdev_register. It is possible that immediately after
association, host receives RX packets, but RX handles have not been
registered for the vdev with DP layer.

Drop packets in DP RX Thread if OS RX handles are not found for the
vdev.

Change-Id: I3bbd489ec9c5e6f6267521818663b123a85bb3f9
CRs-Fixed: 2419376
2019-03-28 16:50:07 -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
Jingxiang Ge
bd540b1cd0 qcacld-3.0: Get wlan op mode from vdev for pktlog
To avoid using qcacld code in cmn, when getting
wlan op mode, using op mode info from vdev rather
adapter.

Change-Id: If8432aae12800884e3a4567d99319afcdfa9d1f5
CRs-Fixed: 2412315
2019-03-19 21:16:58 -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
Ajit Pal Singh
f9a4a38bcf qcacld-3.0: Remove flag CONFIG_PER_VDEV_TX_DESC_POOL
Remove flag CONFIG_PER_VDEV_TX_DESC_POOL.
Legacy per vdev flow control implementation under
CONFIG_PER_VDEV_TX_DESC_POOL was never used in cld3.0 driver.
For a Genoa a new per vdev flow control implementation for HL systems,
was added under the flag QCA_HL_NETDEV_FLOW_CONTROL.
Hence remove CONFIG_PER_VDEV_TX_DESC_POOL and replace it with
QCA_HL_NETDEV_FLOW_CONTROL or QCA_LL_LEGACY_TX_FLOW_CONTROL whereever
applicable.

Change-Id: Ibdf88e60cff7d3be46924ce7605f468781b5b856
CRs-Fixed: 2373790
2019-03-11 11:14:27 -07:00
Srinivas Girigowda
df90ceacd1 qcacld-3.0: Remove obsolete macros from CDS
Remove obsolete macros from CDS.

Change-Id: Ic17ae603f698568ba8ccb6b4e3f332a475e67a7b
CRs-Fixed: 2395980
2019-03-08 18:53:37 -08: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
Alok Kumar
ea3b23bc74 qcacld-3.0: Fix callback function type for cds_ol_rx_thread_cb
To address kernel control flow integrity (CFI) issues related to
type mismatch, correct input argument type for ol_rx_data_cb().

Change-Id: Iafefe5dc3d946e3d67743de1a662aa3b0511cf5d
CRs-Fixed: 2407160
2019-03-07 23:53:53 -08:00
Sravan Kumar Kairam
c047d29ff2 qcacld-3.0: Add IPA over GSI support
For IPA WDI3.0 veresion IPA uses GSI FW. So add IPA
over GSI support.

Change-Id: I3ecdb0b365e6004f7694d19ea8165233f00c6335
CRs-Fixed: 2368038
2019-03-07 02:01:37 -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
Rachit Kankane
87b16541a3 qcacld-3.0: Update ol_txrx_update_last_real_peer
Update function ol_txrx_update_last_real_peer to pass vdev instead of
peer structure.

Change-Id: I869756a45efb1e3f37d280596ae509960d9a3ceb
CRs-Fixed: 2397246
2019-03-05 05:36:24 -08:00
Srinivas Girigowda
a987746e2c qcacld-3.0: Replace struct ether_header with qdf_ether_header_t
Replace struct ether_header with qdf_ether_header_t.

Change-Id: I250b9c72828595c738cf3cfdca69ba6de66ef8aa
CRs-Fixed: 2395980
2019-02-26 21:18:23 -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
Rakshith Suresh Patkar
5f9efa342a qcacld-3.0: Post PEER_UNMAP_RESPONSE cmd to mc thread in ho fail
Unable to send WMI_PEER_UNMAP_RESPONSE_CMDID for peer ids in case
of WOW + ROAM failure scenarios, where target is suspended. This
will cause peer ids leak in the firmware.

Post the PEER_UNMAP_RESPONSE cmd to mc thread in case of ho fail.

Change-Id: I5b9e0fc874ab31f401f7adc8cff22fbc20811acb
CRs-Fixed: 2396094
2019-02-26 16:28:45 -08:00
Wu Gao
814ce703b4 qcacld-3.0: Format ini descriptions
Some ini descriptions are different to common, and some of them
include wrong information, so correct them and use unified form.

Change-Id: I36348fb26a03cab254fd309d792125b8a21ad02f
CRs-Fixed: 2402446
2019-02-24 21:34:47 -08:00
Srinivas Girigowda
9cd6c340b0 qcacld-3.0: Replace IEEE80211_IS_BROADCAST with QDF_IS_ADDR_BROADCAST
Replace IEEE80211_IS_BROADCAST with QDF_IS_ADDR_BROADCAST.

Change-Id: I199797ea402ee68dd0addf6698aa5ccd0ddc8f97
CRs-Fixed: 2395998
2019-02-23 16:02:36 -08:00
Dustin Brown
207286b118 qcacld-3.0: Provide reason to QDF_DEBUG_PANIC()
A common pattern in WLAN to panic the driver is to log the reason and
then unconditionally panic. QDF_DEBUG_PANIC() takes a reason string to
help make the reason for the panic more obvious, but it is not always
used. Ensure all callers of QDF_DEBUG_PANIC() provide a reason string.

Change-Id: I3d23a8980adaeaa1a9798a4a6b0fba1f36eb52ad
CRs-Fixed: 2403829
2019-02-23 14:06:21 -08:00
Alok Kumar
688eadbcc0 qcacld-3.0: Register peer_unmap_sync_cb during wma_tx_attach
Register peer unmap sync callback in pdev during wma_tx_attach
to be accessed in ol_txrx.

Change-Id: I16909ae51e3ca55714c8d1f9f07d7a02f651c190
CRs-Fixed: 2398856
2019-02-23 01:49:21 -08:00
Rajeev Kumar Sirasanagandla
ed4d1b34fd qcacld-3.0: Fix function type for ol_txrx_pdev_attach_target
To address kernel control flow integrity (CFI) issues related to type
mismatch, correct the return type of ol_txrx_pdev_attach_target().

Change-Id: Icb170ad1e57513519f3d9b122ab4feed6a4efcb8
CRs-Fixed: 2402963
2019-02-23 00:25:53 -08:00
Rajeev Kumar Sirasanagandla
0ce92bf6d5 qcacld-3.0: Fix function type for wdi_event_sub
To address kernel control flow integrity (CFI) issues related to type
mismatch, correct the return type of wdi_event_sub().

Change-Id: Id51c6523ddd5d6f5835f7aa08a3a7b2940d2c50b
CRs-Fixed: 2402961
2019-02-23 00:25:49 -08:00
Rajeev Kumar Sirasanagandla
815a7dfa5d qcacld-3.0: Fix function type for wdi_event_unsub
To address kernel control flow integrity (CFI) issues related to type
mismatch, correct the return type of wdi_event_unsub().

Change-Id: I45d090cb4011ca659e30b2f7be6c2b7d32bbba4b
CRs-Fixed: 2402957
2019-02-23 00:25:45 -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
Lin Bai
1a73a41b4c qcacld-3.0: Implement converged packetdump API
Packetdump invokes legacy data path API directly without
considering underlying HW:
1. ol_register_packetdump_callback
2. ol_deregister_packetdump_callback
Global pointer pdev_txrx_ctx will be casted to struct ol_txrx_pdev_t
always even Lithium (use struct dp_pdev) underlying, and overwrite
struct dp_pdev unexpected.

Wrap with cdp API to avoid.

Change-Id: I4f587c5378726b7cc4b340760f1112b054610da1
CRs-Fixed: 2400472
2019-02-18 09:14:10 -08:00
Rakshith Suresh Patkar
da3aa3367d qcacld-3.0: Unpause priority queue before all netif queues
In ol_tx_flow_pool_map_handler, we will unpause all netif
queues. Unpausing will fail if any queue bitmap is not
cleared and pause_map remains non zero.

To avoid this, unpause priority queue before unpausing all
non priority queues.

Change-Id: If9a4e5d923b300aa03f01847da1ad64e8d6c61ef
CRs-Fixed: 2391158
2019-02-04 13:07:51 -08:00
Alok Kumar
604b033e71 qcacld-3.0: Send peer unmap conf based on peer unmap count
Send the peer unmap conf commnad to FW for a peer_id only if
UNMAP for that peer_id is received either for three times if
RFS is enabled or one time if RFS is not enabled.

Change-Id: Idba2c406f7ad7d770fe8326e8a0d6ac7fab10252
CRs-Fixed: 2387480
2019-01-28 14:37:34 -08:00
Sravan Kumar Kairam
5c65634429 qcacld-3.0: Check if peer id exists before adding
Currently peer id is added to map unmap array with out
checking if its already added before. This leads to having
duplicate entries and host sends peer unmap conformation
to FW with duplicates which leads to FW assert. So check
if peer id exists before adding to the array.

Change-Id: Ifcf73145f241e8ad48ff0eba9d87880565e65bb6
CRs-Fixed: 2381577
2019-01-24 12:30:15 -08:00
Manjunathappa Prakash
8b68663ddc qcacld-3.0: Hold peer reference when handling unmap_timer_work
There is race when unamp_timer_work and peer is deleted. Hold the
reference to peer while handling the peer_unmap_timer_work.

Change-Id: Ie6cef3f13e55ab7d2310f0fff4254cde3e3c96e1
CRs-Fixed: 2381036
2019-01-22 05:06:06 -08:00
Madhvapathi Sriram
3e6627a9f9 qcacld-3.0: Optimize schedule msg post error logging
Change-Id: Ieaddca5f141c99c42ed4a7c954dea2788e353640
CRs-Fixed: 2373015
2019-01-22 02:37:31 -08:00
Sravan Kumar Kairam
dd5a74a70f qcacld-3.0: Set skb cb for rx peer cache frames
There is a race condition while flushing the rx cache frames
from MC thread and same time from RX thread. So for rx cache
frames set QDF_NBUF_CB_RX_PEER_CACHED_FRM to avoid using gro
receive and use skb receive with local bh disable.

Change-Id: I5ece8ddf876d27ad3d24b0ba751fe3e3886608e2
CRs-Fixed: 2378342
2019-01-14 15:15:47 -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