Currently as part of TDLS connection if TLDS connection is formed
on secondary vdev, osif_vdev of secondary vdev is updated with
osif_vdev of primary vdev.
Due to osif_vdev update, during vdev delete 1st vdev will call
API to free osif_vdev. When 2nd vdev try to access the osif_vdev
it will result in invalid pointer access.
As current change was done to handle case where osif_vdev
for MLO connection used to point to 2 different interfaces
and where secondary interface used to point to NULL/dummy netdev.
As per latest change osif_vdev will point to per vdev dp_link
which for MLO connection will have single interface. So osif_vdev
update is not required anymore.
So, to fix invalid/stale pointer issue remove osif_vdev update for
TDLS connection.
CRs-Fixed: 3814466
Change-Id: Icac13d88411ca572c9d5823a6bd2d3d5b1ba632f
Currently there is no way to distinguish between
Local Packet Capture and STA+Mon mode as both mode
uses same monitor interface. So to distinguish between
two mode in local_packet_capture enable case use
mon_flags which can be passed during monitor interface
add time. If "flags otherbss" is passed during
monitor interface add driver will consider current mode
as STA+MON mode, LPC otherwise.
Change-Id: I56a724697bb187d0b809b6c43c7b5bf4b7d15ca7
CRs-Fixed: 3739438
Currently STA+Mon mode is not supported in LPC case
as both mode uses monitor interface to capture
packets. So to distinguish between two different
monitor modes add changes to store monitor interface flags
Change-Id: Ied43fa50adac200bed47a4044245baca4d6cc84f
CRs-Fixed: 3739291
Currently during runtime suspend, in dp_find_missing_tx_comp(),
TX descriptors are freed forcefully if the TX completions for
those descriptors do not arrive within 60 seconds.
In certain rare corner cases, there is a chance of TX buffer (that is
in the enqueue path) getting freed in the TX completion path due to
delayed completions. This results in NULL pointer dereference.
Following is the sequence of events for such a case,
1. dp_find_missing_tx_comp() frees a TX descriptor
2. Different buffer gets attached to the same TX descriptor
3. Delayed completion for the previous TX arrives and frees
the buffer in point 2.
Defer the free in dp_find_missing_tx_comp() when there is a delta in
HP/TP for the TX/COMP rings. If HP & TP are not same, then there is
high chance of processing the delayed completion beforehand, thus
avoiding the aforementioned race.
Change-Id: Ia835928f85ea0f79d0187a55333cb8959d0a72e9
CRs-Fixed: 3721341
Add vdev delete notify callback for DP vdev, which
is called when dp_vdev is freed. This will notify
the osif/non-cmn dp layer upon dp_vdev delete.
Change-Id: I22110ebd048066e84644c04b4903c50dd61c61a4
CRs-Fixed: 3696638
Sometimes when the stats of MLD_PEER is requested, Access
Violation may occur because peer_stats[1], which does not
exit, may be accessed. This change fixes this issue by
aggregating the stats of all link_peer into peer_stats[0].
Change-Id: Ib8138d4b95bef39b084756dd9f9ffae67967100a
CRs-Fixed: 3678284
This change optimizes rx reorder queue setup by using
tid_bitmap, which contains a group of tids, to set up
multi tids at a time instead of one tid after another.
Change-Id: I161b0c812c436ef79d2d1db693b8d0ac41505878
CRs-Fixed: 3661593
Currently if the msdu_done bit is not set in the
rx_pkt_tlvs, the buffer is unmapped and freed.
There was an issue seen where hardware accessed a
buffer address, which probably was delivered to driver
without DMA of data to the buffer (thereby unmapped
and freed before hw attempted second access). This
results in unwanted recovery.
Based on the above hypothesis, add a workaround
to skip the unmap-and-free of any buffer for which
the msdu_done bit was not set in the rx_pkt_tlv.
Also mark the corresponding rx_desc as in_err_state.
The rx_desc corresponding to such aforementioned
msdu_done failure msdus are stored in a rolling
list, where the old entry is force unmapped & freed
when a new entry needs to be added. This force
unmap-and-free of the oldest buffer gives an uncertain
amount of delay between it being reaped from rx ring and
actual unmap-and-free.
Change-Id: Ibf8f3c886118d532af818466cb46218d88146271
CRs-Fixed: 3667674
Currently the local_link_id is assigned to each
link peer, during peer setup, with an incremental
number, based on the number of peer setup being
done for the link peers corresponding to the same MLD.
The above logic does not handle the link switch case,
where any particular link peer can be created and deleted
multiple times, thereby leading to 'n' number of peer
setups, each assigning an incremental number as the
local_link_id to the link peer. Due to this the local_link_id
value will exceed the MAX_MLO_LINKS ceiling value, and
when this local_link_id is used to set the frequency band
it leads to an out-of-bound array access.
In order to fix the above mentioned scenario, maintain
a mapping of link peer mac address to local_link_id inside
the txrx_peer (common for all link peers) and use this mapping
table to get the local_link_id. This will make sure that during
any link re-purpose, the link peer being setup will regain the
local_link_id which it was assigned during the first time it was
setup.
Change-Id: Ia78413efe328c81bab74b3a048214d3807b6c6c4
CRs-Fixed: 3658539
Currently if txrx_peer is NULL in Tx completion or rx process
band update will not happen, which will result in invalid band
issue during connectivity logging.
To fix the issue maintain local link id and use link id to
find link peer and update band information in nbuf cb
based on peer frequency.
Change-Id: Ia5a6001fbc167a497660dc7be39a3e641dd28896
CRs-Fixed: 3654696
Make sure that the global dp tx desc pools are cleaned
up only once during MLO umac reset.
Change-Id: Id6e0ac6532b11ffb9ea190b6ab4d481fb486d853
CRs-Fixed: 3647660
If IPA is enabled, index 1/2 in array soc->tx_comp_ring[] will
not be initialized, but initialize index 3/4 instead, if access
to index 1/2, NULL pointer dereference issue appeared.
use soc->num_tcl_data_rings as number of TX completion ring
wlan host interested, it differs between IPA enabled/disable case.
Change-Id: I92b4e2c9971f93136a9f4e60ae3de32140aa2477
CRs-Fixed: 3647677
During the target recovery avoid mld peer peer deletion
before all the link peers gets deleted.
if peers are deleted during the recovery DP will not receive
peer unmap event as FW is asserted, resulting peers will be
deleted form the mld link peer list where as available in
peer id to obj map. if primary soc goes for the recovery
then mld peer is getting deleted forcefully, where as other
link peer in non primary soc is having reference to mld peer
which is already freed
Change-Id: If4dcd822f4c9bc98757952725592eb6a3f64a5db
CRs-Fixed: 3625483
In case of UMAC reset if in_use buffers are sufficient
to fill complete RX refill ring we are replenishing
only 1/3rd ring at pre-reset.
In case of low threshold interrupts disabled ring might
be never refilled. At post reset refill complete ring.
Change-Id: I0e4ed942120619ef357bc91f8cbbab8c1fd1b06e
CRs-Fixed: 3628996
Added cdp support to get/set
dp debug logging in per packet path.
Enable debug logs only if dp debug logging
is enabled.
With this change there is benefit of all CPU
average around 1% to 1.5%
Change-Id: Ibe0ca4c75211cace4c5fca9ec0bce1c594ca8a6b
CRs-Fixed: 3623910
Currently host is not printing peer info in
dp_get_peer_state, due to which its difficult
to check for what peer state is returned for
which peer.
To fix the issue print peer info in dp_get_peer_state
and print additional peer info in dp_peer_mlo_setup
and dp_peer_state_update
Change-Id: Iccaf46f1eb778c42e5039da14499b82502508727
CRs-Fixed: 3620093
When WDS_EXT feature is enable, Host needs to redirect
the data packets to WDS extended netdevice.
Change is added the support for forwarding the RX packets
when received from IPA as an exception by deriving the
correct netdevice interface.
Change-Id: I083a1acc72023f3ebe6ea36ec05a5706f89c16bc
CRs-Fixed: 3597357
Set fast_tx when ol_stats are disabled in
ultra_fastpath to avoid Tx completion overhead.
And also includes following fixes:
cdp support to get jitter stats
cdp support to set/get vow stats
cdp support to get Sojourn Stats
Change-Id: I8bdb176edbdf210b4dedfaa117f058f57bd17241
CRs-Fixed: 3604215
Wait for firmware response only if the response
is pending after posting the txrx stats query to firmware.
Change-Id: Ib300f97bc2cc08a2947be9021ff3e399191d1c8e
CRs-Fixed: 3599915
Currently from dp_set_peer_param while calling dp_set_peer_freq
there is direct return which can result in peer refleak. as there
is reference taken in dp_set_peer_param.
To fix the issue instead of direct return break and release reference.
Change-Id: Ic3cfe993de64566afc13157810b80d3b3b28d244
CRs-Fixed: 3608000
TSF auto report is a stand alone feature, which can
be used to sync TQM clock and TSF clock, more than
one features depend on it.
Introduce a new build flag WLAN_FEATURE_TSF_AUTO_REPORT
to decouple it from uplink delay feature.
Change-Id: I5c62bee08d44234dc4936b3c63f3060edec30df8
CRs-Fixed: 3560244
Make sure that the pre reset done notification is sent
only once during Umac reset.
Change-Id: I1d9e1d8caef49443d25e879086043e815ea087a1
CRs-Fixed: 3594653
add wrapper function to dp_txrx_get_peer_stats to handle
identical mlo and link peer case
Change-Id: Ia2d05eca143dd2759c6765c54f26da7f73210271
CRs-Fixed: 3595756
Enable interrupts in monitor mode for wcn6450.
Interrupt configuration related code is moved from dp_main.c file to
dp_rings_main.c file as part of 'Ie58eae34a2da77c2d63870fab74b9d2d9d49c14a'
as Evros does not use dp group interrupts.
Move back the interrupt configuration related code from dp_rings_main.c
to dp_main.c to enable interrupts in monitor mode for wcn6450.
Change-Id: I7a3cbbe905072dad1cf38799ac6ef441281f78f9
CRs-Fixed: 3565734
Add arch ops for dp_mlo_chip_id to avoid access
of dp_soc_be struct for LI platforms
Change-Id: Idc7612ef3c517aa62668fe15e51b5e5ec74bb253
CRs-Fixed: 3582795
During dp_vdev_flush_peers after peer unamp ref_cnt
for peer is set to 1. Which in case if peer unamp
for MLD peer is called before link peers from dp_vdev_flush_peers,
it will result in MLD peer delete before link peer.
To avoid MLD peer delete before Link peer, after peer unmap
in dp_vdev_flush_peers do not explicitly set ref_cnt as 1
for MLD peer.
Change-Id: If7ab63eb213dc482205f3847f0b32e246ca76d51
CRs-Fixed: 3585860
In the case of STA mode, will be marking bss peer as part of
peer map events during the creation.
Due to this create event will be triggered during the peer creation
as bss flag is not set and there won't be any peer delete event
to bss peer resulting stale entries in mld hash.
Hence will be avoiding creation and deletion events.
Change-Id: I15a78ad0b8a90b34505880af94522abbe1de8fb5
CRs-Fixed: 3581548
monitor peer is not allocated for MLO MLD peer this lead to drop in
broadcast and multicast frame in legacy tx monitor path. Added support
to enable monitor peer for all peer.
Change-Id: I786554a918bae966a929e4c9188c1b0f324b5846
CRs-Fixed: 3544695
As the bss peer is closely tied with the vdev creation
and deletion, listeners might be uninitialized and result
race conditions. send an event only to the connected peers.
Change-Id: Ia0ae063c92bba38d2fb67fe4eae84f5562991fa2
CRs-Fixed: 3574176