Extend radiotap header to append ACK status and tx retry count
for packets sent to virtual mon interface.
Change-Id: If110a7de736c3efc0d477617089669104c6f1690
CRs-Fixed: 2627707
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
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
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
Consider case where vdev is valid but deliver function
callback is deregistered. Check for null delivery function.
Change-Id: If17f1d680a10c2009a910172a66cd8dcf7cdffbd
CRs-Fixed: 2613162
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
Return control after dropping NULL vdev msdus and make sure to
NULL terminate the fisa_flow->head_skb.
Change-Id: I50e469f603b48cb578db30aaaaa9f974d469fde1
CRs-Fixed: 2613251
Validate vdev before delivering the packets for vdev.
Drop the packets if vdev is deleted.
Change-Id: If92d0fba04d96e3830bb4e6f04c395b4fcd54f84
CRs-Fixed: 2606760
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
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
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
Currently many layers store the datapath handles i.e.
pdev and vdev handles and use them for passing as an
argument to the CDP APIs. This gives way to possible
race conditions, where the datapath handle provided by
the outer layer might be a stale pointer, which in turn
leads to unexpected results.
Remove the storage and usage of all the datapath handles
from the layers currently using them.
- cds_context
- vdev objmgr
- pdev objmgr
Change-Id: Icf24bd3792af203d1a06e153f0badd6e7405559f
CRs-Fixed: 2602199
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
In dp_rx_tm_suspend, suspend_event should be reset before waiting
for it. otherwise, the suspend function will be break.
Change-Id: I9132f45b02386c54fb8e27f0f7c2c71205450c9d
CRs-Fixed: 2606227
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.
Also remove the ops which are used to store
and retrieve such handles, that no more needed.
- register_peer
- clear_peer
- change_peer_state
- peer_get_ref_by_addr
- peer_release_ref
- peer_state_update
- get_vdev_by_sta_id
- register_ocb_peer
- get_peer_state
- get_vdev_for_peer
- update_ibss_add_peer_num_of_vdev
- remove_peers_for_vdev
- remove_peers_for_vdev_no_lock
- copy_mac_addr_raw
- add_last_real_peer
- is_vdev_restore_last_peer
- update_last_real_peer
- peer_detach_force_delete
Change-Id: I5134ca882f5fcf0e5941317e48712717eddb58fe
CRs-Fixed: 2541708
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
Today we enqueue nbuf list to rx_thread via nbuf frags_list.
If deliver_head happens to have frags_list then it is delivered alone.
Remaining list of skbs are delivered using frags_list of next skb.
It does not takecare to update QDF_NBUF_CB_RX_NUM_ELEMENTS_IN_LIST of
the new head_skb with remaining num skbs, make sure to update it.
Also add nbuf_queued to take care of this accounting.
Change-Id: I5557b5c56576c46fc8564a87a27d167b8785bb95
CRs-Fixed: 2559875
There might be race condition when doing RX GRO flush between dp_rx_thread
and vdev detach thread.
Only doing RX GRO flush in the dp_rx_thread context, and use the events to
sync with dp_rx_thread and vdev detach thread.
Change-Id: I2dbf92c2c11e950ca790dd7429c8bb235c239d0c
CRs-Fixed: 2601826
If there are still RX packets pending in the napi gro_hash list, do RX GRO
flush after flushing the RX thread pending packets when detach the vdev to
avoid net_device might be invalid later which has been stored already in
the pending skb.
Change-Id: Iff0a5cf49c87b91b8cae3dbcb541d1cf0bc480a6
CRs-Fixed: 2598149
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
Function ol_txrx_hl_tdls_flag_reset will call function
ol_txrx_get_vdev_from_vdev_id, it will return NULL vdev
because ol_txrx_hl_tdls_flag_reset is called before
TAILQ_INSERT_TAIL(vdev).
So, move it after TAILQ_INSERT_TAIL(vdev).
Redefinition of 'pld_pcie_register_driver' when
CONFIG_PLD_PCIE_CNSS not defined. For Hastings WHUNT,
HIF_PCI is defined but CONFIG_PLD_PCIE_CNSS is not defined.
So, replace CONFIG_PLD_PCIE_CNSS by HIF_PCI and
CONFIG_PLD_PCIE_FW_SIM.
Change-Id: I05e58516efe6a9a445168a27df9e0cfc9de2e50c
CRs-Fixed: 2589802
Currently txrx_ops.tx.tx is given vdev handle
as its argument, which is directly accessed
by the caller. This can cause a race-condition
in access of the respective handle if it has
been deleted in parallel.
Hence as a part of cdp convergence, pass only
the vdev_id, which will be used to get the
respective handle and hence avoiding unwanted
access of the handle if it has been deleted.
Change-Id: Ie158a2ba805f52658cd6fb12c969fc0d677c1815
CRs-Fixed: 2541631
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.
- txrx_data_tx_cb_set
- txrx_mgmt_tx_cb_set
- txrx_mgmt_send_ext
- txrx_pdev_attach_target
- txrx_pdev_detach
- txrx_vdev_attach
- txrx_vdev_register
- txrx_vdev_detach
- txrx_peer_create
- txrx_peer_delete
- txrx_peer_delete_sync
- txrx_fw_stats_get
- txrx_get_vdev_from_vdev_id
- txrx_pdev_set_ctrl_pdev
- txrx_pdev_attach
- txrx_get_vdev_mac_addr
- txrx_pdev_post_attach
- txrx_pdev_pre_detach
- txrx_get_ctrl_pdev_from_vdev
- txrx_get_mon_vdev_from_pdev
Change-Id: Ib8b0b1edd63e7c3f8813b11ca26b50ec121fe255
CRs-Fixed: 2541459
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
For cdp_hl_fc_set_td_limit() API, use channel frequency instead of
channel number.
Change-Id: Ic053be33ac7c7cbd2543b0208a1184b3f20a4346
CRs-fixed: 2565734
In case of TSO, same skb results in multiple tx_desc after
segmentation. To avoid multiple free of skb "skb->users"
count is used. Currently, race condition is observed while
incrementing "skb->users" count in ol_tx_ll_fast and before
that, tx_completion is received for all the segments which
are sent before. In this case, "skb->users" count will be 1
so, skb is removed from the skb debug node which leads double
free of skb when tx completion is received for the last segment.
To fix this, increment the "skb->users" count before sending
first segment and decrement only iwhen the last segment.
Change-Id: I26000fcda8715b737cac803ec8e64c0fb640dfe4
CRs-Fixed: 2582617
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
Protect pktlog funcitonality under given mutex to avoid possible
race condition between pktlog_release/pktlog_open and pktlogmod_exit.
Also call pktlogmod_exit before calling wdi_event_detach to avoid
accessing freed memory in pktlog release.
Change-Id: I452af523338788447f5c2764e883165237083f7d
CRs-Fixed: 2087777
Local peer_id is being cleaned up across DP, HDD and PS/WMA.
So, any references to local peer_id/sta_id will be replaced
by peer mac address and all interactions between the layers
will be based on peer mac address.
Cleanup local peer id from ol_txrx APIs.
Change-Id: Ibc893fdf1f091f9fc423fca71eb96ee405373d99
CRs-Fixed: 2529036
Local peer_id is being cleaned up across DP, HDD and PS/WMA.
So, any references to local peer_id/sta_id will be replaced
by peer mac address and all interactions between the layers
will be based on peer mac address.
Cleanup unusued ol_txrx APIs which are based on local peer id.
Change-Id: Ia6949796bf6109884ec066544c39183f934f7d72
CRs-Fixed: 2529014
Currently control path handles of pdev/vdev/peer
are given as arguments to cdp ops, which are
directly accessed by dp layer. This can cause a
race-condition in access of the handle if it
has been deleted in parallel.
Hence as a part of cdp convergence, pass only
the psoc handle which can be accessed all over
to retrieve objmgr_pdev from psoc.
- rx_mic_error
- txrx_pdev_attach
- txrx_vdev_attach
- txrx_peer_create
Change-Id: Iaec8b913810f9035faa0010117cdff19bdded37f
CRs-Fixed: 2541431
Add logic to queue and bundle packets before
giving it to scheduler to ensure predictive HTC
bundling for improvement in TX throughput.
Change-Id: Ib00135ca59b4c5f0f05edc93dca115bf17174a36
CRs-Fixed: 2561671
The query for an interface opmode returns the opmode
of a particular interface without checking if that
particular virtual interface handle is valid or not.
Fix this by checking the virtual interface handle
before trying to get the operation mode for that
particular interface.
CRs-Fixed: 2572981
Change-Id: I05b5f88455d6374adb41a037d3c5dda905de1497
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
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
Currently the cdp apis 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/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.
Converged bus_ops
- bus_suspend
- bus_resume
CRs-Fixed: 2539749
Change-Id: I7f57c09fe4620f90c5cfab781635f6f0ada08ec5