The current implementaion check for peer, vdev and pdev leaks on
psoc in order and if any leak is found for peer then QDF_DEBUG_PANIC
is called and vdev and pdev leaks are not checked. Similar is the case
if vdev leak is found, pdev leaks are not checked
Adding a wrapper API to check all the leaks and then do panic if any
leak is found
Change-Id: Icf6622760f3646b82f893beb7415b95307e2ccd7
CRs-Fixed: 2599228
Structure memory is being optimized by aligning field with
bus address length using pokeahole tool.
This patch optimizes structure linked in obj_mgr and scheduler
modules.
Structure Bytes saved (64bit) Bytes saved (32bit)
scheduler_ctx 8 bytes 4 bytes
wlan_channel 8 bytes 8 bytes
Change-Id: I298946b55328d8d9b564c140e0a59e0b8702fab0
CRs-Fixed: 2587842
6Ghz SAP needs to send either a probe response or fils
discovery at every 20ms.
Add a new feature to configure the probe response or
fils discovery frame.
Change-Id: I3b9842021db94515ae4dccbcdc573a4cd84caa56
CRs-Fixed: 2591147
Allocate node for new entry and add it to existing list of function or line
If function or line already present in list then increment count
Change-Id: I3d737dcd33862f133b52c6d694c89f6d6b1517a5
Add function name and line number while taking/releasing
references for vdev to trace Object Manager references
Change-Id: Ie8a7d77db2f3c7b58536ab267c665299cb67152e
Add function name and line number while taking/releasing
references for peer to trace object manager references
Change-Id: I93c30d62ecaa979f8c2680eec68f723d2d3c4292
In wlan_objmgr_get_vdev_by_macaddr_from_pdev driver checks the
first vdev matching the mac address and try to get ref and return
NULL if it fails.
In case if a vdev is logically deleted but not physically deleted
(some ref are pending) and a new vdev is added with same mac address
at the tail of the vdev list, the
wlan_objmgr_get_vdev_by_macaddr_from_pdev always return NULL cheking
for the logically deleted vdev, even when a valid vdev is present
after the logically deleted vdev.
Thus continue to next vdev if try get ref fails for the vdev.
Change-Id: Icd67ce8830460fca7bb4c19e81b2e9f764fb5dba
CRs-Fixed: 2580697
Restricted 80+80 MHz capability is reported by FW in service bitmap.
Based on this support set soc's extcap feature bit.
Please note, wmi_service_bw_165mhz_support will be renamed as
wmi_service_restricted_80p80_support once the FW changes are available.
Change-Id: I88f89eecd916c40ea8669c792dde3a335e4bac56
CRs-Fixed: 2579543
Define framework to notify registered callbacks on peer freed.
Interested modules can register their callbacks with object manager.
Change-Id: I9ab0e45f7841b1609b9ada3b50335299b462b630
CRs-Fixed: 2578099
Move the vdev response timer from the vdev object manager structure
to the psoc mlme structure.
Change-Id: Ieb87ac6549aa23e0beb61441fea459d3db78c2f3
CRs-Fixed: 2563410
There is use-after-free of vdev object in wlan_objmgr_vdev_obj_create
wherein vdevid is being accessed to log the create failure after the
vdev is freed.
To resolve the issue, Log the error with vdev_id before freeing the
vdev
Change-Id: Ia509f90cd2219f657ecdecbfb26d397daa3beda6
CRs-Fixed: 2559556
Currently, the timeout value LOG_DEL_OBJ_DESTROY_ASSERT_DURATION_SEC is
set at 24 seconds. This is not sufficient for various cases where the
delay caused are genuine (FW and HW delays), thus leading to unwarranted
device assert.
Increase the timeout to 32 seconds to mitigate this.
Change-Id: I799b45b0d5f25a9fcf68f88d385994e31c56e939
CRs-Fixed: 2546641
Add debug code to print the vdev, pdev and psoc info before getting
destroyed. This will help in cases where we dont get crash dumps
for panics and we need to look up few important data, which
can be done by enable object manager debug.
Change-Id: Iab1895d348ccf225ee6390abef26b76936fbe560
CRs-Fixed: 2528290
During vdev reference release if double free is attempted for, then
the vdev references are printed. But the vdev id and the reference id
for which the reference release was attempted is not printed.
Add change to print this log, which will help in debugging vdev
reference release related issues.
Change-Id: I8c1942dc770a1dce2e25cda8c3c6aa8c056afb8e
CRs-Fixed: 2531227
Currently, FW has TTL of 5 sec for management frames, if a frame
is queued just before logical deletion, it takes max 5 sec to complete,
by considering other latencies, increaseing it to 8 sec.
Change-Id: I6861d9557489bcf10e60ff32d06e88be23535d48
CRs-Fixed: 2526239
Change log level to debug level since any console logging
under the spin lock has side effects due to slow UART
Change-Id: I21dca8f4eb9ba563d2ce96274d32405d1817d13e
CRs-Fixed: 2521056
wlan_pdev_vdev_list_peek_active_head can't be used out of object
manager, because object manager structures can't be referenced
outside object manager.
Add wlan_pdev_peek_active_first_vdev which can be used out of
object manager, because it only needs pdev parameters.
Change-Id: I1d32ec2b5342dbdcbbb817d80623f802011892b0
CRs-Fixed: 2507969
WIN and MCL both uses common targer_if code for vdev manager.
So legacy code and "CMN_VDEV_MGR_TGT_IF_ENABLE" macro is removed.
Change-Id: I2984ae44f3a7cfa01b8f1455353d09deb4db5759
CRs-Fixed: 2503804
This feature enables a user to change HW mode dynamically
from DBS to DBS_SBS mode and vice-versa. Currently, HW
mode configuration is only possible through INI setting
requiring a subsequent reboot.
Primary target_if changes are:
1. Add structure definition wlan_psoc_host_hal_reg_cap_ext
to parse and store the new extended regulatory capability
info in WMI_MAC_PHY_CAPABILITIES tlv sent in EXT service
ready WMI event
2. Add API target_psoc_get_num_radios_for_mode to retrieve
the number of radios corresponding to a hw-mode
3. Add API target_psoc_get_mac_phy_cap_for_mode to retrieve
the pointer to the mac_phy_cap info of the first radio
corresponding to the input hw-mode.
Change-Id: Ia10f0fd5e50c0ce0cbe99f9281147266aedce4e9
CRs-fixed: 2490212
A new firmware capability advertising support for flow search engine
in HW has been added. Process the new service for flow tagging.
CRs-Fixed: 2475913
Change-Id: Ie69cfd5733b6d6c02792da59dee4f823a72fb431
NS offload is not working for NaN mode because BSS peer is not set.
Hence, set the BSS peer for NaN mode as it is done for SAP/P2P GO.
Change-Id: I4c8fbd502cb1d90dd235ae35d0a85a9981e68773
CRs-Fixed: 2494515
Replace void * tgt_if_handle of objmgr psoc/pdev with
abstract type handles provided by target interface
Change-Id: I9e0ae991776daa0c25c4ad7b4e4dc022441318a3
CRs-Fixed: 2482708
Currently, driver sets BSS peer and self peer to NULL
only in case of PEER AP/GO. It nither set BSS peer nor self peer
to NULL for GO/AP while de-attaching peers. This results in bss peer
use after free issue while stopping soft AP.
In order to fix this issue, the driver should set bss peer and self
peer to NULL for GO/AP as well.
Fix is to set bss peer and self peer to NULL for both PEER and AP
cases.
Change-Id: I055573c062c5a4e71fef2a699131e10fb6d97d71
CRs-Fixed: 2488371
Add WMI support for vdev delete all
peer request which will replace individual peer
delete of peers under a vdev during vdev down.
Change-Id: Ia41ae5fbf96a75d2a3e608564742d2a43e0ed2cc
CRs-Fixed: 2456858
The driver uses a timer to check if there is a potential ref leak by
inducing assert if a given module does not release ref even when the
object is in L-state. But in case there is SSR/PDR, it might take more
time to clean up/release the refs. In this case, no assert should be
triggered.
Add a check in wlan_objmgr_iterate_log_del_obj_handler before calling
the assert API.
Change-Id: Ifb7568e11bff2b9fc610633af730461e33dc5539
CRs-Fixed: 2468301
In the normal execution osif priv is freed when the object manager
is freed. Whenever there is a error w.r.t to creation of vdev,
osifpriv is deleted as part of vdev destroy. When this error
propagated to caller. Caller tries to again free the osif_priv
in the error path.
Hence set osif priv to NULL in error case to prevent any double
free by caller.
Change-Id: Iaa074ad39aa473e99ab2fd7b14194422f19c168d
CRs-Fixed: 2467327
Implement the interface to transfer the info between
host driver and firmware about the ap which has interop
issues with the DUT. It is detected by firmware and
forwarded to user sapce for persistent storage. User
space configs these APs to firmware when the DUT
starts up next time.
CRs-Fixed: 2425197
Change-Id: I3857d2a605baa2673af333a7a0412f1690b59769
Legacy code for VDEV_SM is no more used, thus clean up flags
CMN_VDEV_MLME_SM_ENABLE and CMN_VDEV_MLME_CMPT_ENABLE.
Change-Id: I4f7b1099d4929f6250b1868c53b73d7c235a9c22
CRs-Fixed: 2457270
wlan_vdev_get_bsspeer() return bss peer without taking the ref count
of the peer and thus if peer is deleted after wlan_vdev_get_bsspeer()
returns a valid peer, the caller will have stale entry of the peer.
Stale entry of peer can lead to Assert.
Use wlan_objmgr_vdev_try_get_bsspeer API for stats to get the BSS
peer which increment the refcount if peer is valid. With this the
peer won't be deleted till the caller release the ref count of the
peer.
Change-Id: I3690f1309cbc7643ed55d8e903814b06f9d8755f
CRs-Fixed: 2454080
osif priv is allocated as part of the vdev object and freed as part of
the logical vdev deletion. There is a race condition where in a
component
holding the reference to the vdev is trying to do an operation using
the osif priv. But in the other thread osif priv can be freed.
This can lead to null pointer exception.
Hence, move the osif priv deletion to the vdev physical destroy.
Change-Id: Iea3fd87cb272a51c5691ee2e39a590861c1b1637
CRs-Fixed: 2449996
Add API to fetch the logically deleted peer list for a given vdev
and also add change to move peer delete request and response
related stats from pdev to vdev layer
Change-Id: Ibaac286a1e6ca86988b223055c15a6b9ba6cf4b9
CRs-Fixed: 2448111
The release ref APIs for an object first checks,
if the caller is holding a ref, and if yes, it decrements
the count.
If not, there is an error print and an assert, and if the assert is
disabled, the total ref count is decremented in the code, which could
lead to the object getting destoyed, even when it is being used or
some other component holding its ref.
So, if release ref API for an object is called by a component, which
is not holding the ref, we should return, so its handled correctly
even when assert is disabled.
Change-Id: I90de5c1b2e485e80c4b3138fc0fd99f5509d06a2
CRs-Fixed: 2417616
wlan_vdev_get_bsspeer() return bss peer without taking the ref count
of the peer and thus if peer is deleted after wlan_vdev_get_bsspeer()
returns a valid peer, the caller will have stale entry of the peer.
Thus add an API to get the BSS peer and increment the refcount if
peer is valid. With this the peer won't be deleted till the caller
release the ref count of the peer.
Change-Id: Ifb3b4de54f3aace359a35a821265c80119df1f50
CRs-Fixed: 2444996
With this feature, using appropriate commands, link layer, network layer,
transport layer and some of the application protocols can be tagged with
the user provided tag values for easier identification of protocols. The
supported protocols today are as follows.
ARP, DHCPv4, DHCPv6, DNS over TCP (v4), DNS over TCP (v6), DNS over UDP
(v4), DNS over UDP (v6), ICMPv4, ICMPv6, TCPv4, TCPv6, UDPv4,
UDPv6, IPv4, IPv6, EAP.
Receive packets are tagged by hardware. Tags are applied after the first
matching rule. Hence it is recommended that the rules are
programmed in such a way that tags are configured from application layer
to data link layer to get expected results.
Change-Id: Ibdc2bd2b78234f482074955e89fb93f05988eaca
Any obj ref can be taken by modules. In the case the obj is logically
deleted but not deleted physically due to some pending reference not
released, it leads to memory curruption issues in unexpected places.
Debugging these issues becomes difficult as there is no indication where
the ref leak has happened. Especially when the curruption occurs before
stop_modules is called (where there is check for ref leaks)
To ease the process of debugging such issues, add a print to show the
modules holding the refs after logical deletion. Also, assert in
case any objs are in logically deleted state for longer than 10 secs.
Change-Id: I8fa55693c89f146d859cc9ec3355f5eb1e2c3853
CRs-Fixed: 2419733
Add change to cleanup duplicate fields of
of vdev_mlme, which are also in mlme_channel_param
and their dependencies while updating
vdev_start_param. Cleanup unused mlme_cfg_ids.
Change-Id: Ie32971283a337f04692c0c0bc7f41fff75c090c3
CRs-Fixed: 2407953
Move get macaddr from peer API at appropriate place instead of fetching
it everytime and not using it.
Change-Id: I01349a672215395795cd08cd65d98ad8a08b95b0
CRs-Fixed: 2431163
Currently, the vdev connection status is checked by getting
the bss peer of that vdev, and if the bss peer is in associated
state then vdev connected status is sent as true. It can happen
vdev is present and bss peer is deleted after getting the bss peer
from vdev pointer. Then bss peer can not be dereferenced to get the
its status.
Instead remove all the duplicate api's tdls_is_vdev_connected,
pmo_core_is_vdev_connected, and wlan_vdev_is_connected with
wlan_vdev_is_up. wlan_vdev_is_up gives success status
if associated.
Change-Id: I863c3c0689f329870bd08c813813c16956135209
CRs-Fixed: 2426092
If MLME gets RADAR detected event while waiting for RESTART response from
FW(RESTART_PROGRESS substate), it sets PDEV RADAR detect deferred flag.
Once VDEV SM moves from START to other state, it invokes MLME SM callback,
which checks whether “RADAR detect defer” is set.
If it is set, SM callback posts message to scheduler to notify all VDEVs on
RADAR detection.(from here, flow goes as regular radar detected event)
Change-Id: Icaa2aee900be60c12c5b38b1d199bb01ba31f722
CRs-Fixed: 2390019
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within umac obj_mgr replace any such comparisons with
logical operations performed on the pointer itself.
Change-Id: I0f556e8baa9126511420a8d4c1b1a5e4ee220bab
CRs-Fixed: 2420149
Add object manager to iterate through all the psoc in
the system and call the provided callback with relevant
arguments
Change-Id: I92f4c1248447ce14413b666076e515c0569385a0
CRs-Fixed: 2413775