Commit Graph

184 Commits

Author SHA1 Message Date
Himanshu Batra
8fcc17ccf9 qcacmn: Create wrapper API to check all leaks at psoc
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
2020-01-16 08:08:33 -08:00
Neha Bisht
503663c6da qcacmn: Structure optimized through poke-a-hole tool
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
2020-01-11 16:18:50 -08:00
Sandeep Puligilla
904e527aa7 qcacmn: Add new feature to control fils discovery on 6Ghz Sap
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
2020-01-07 00:41:39 -08:00
aloksing
18f309c7f4 qcacmn: Add debug support for vdev/peer reference and release
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
2020-01-02 05:18:15 -08:00
Surya Prakash Raajen
a3baeee819 qcacmn: Memory optmization of Node/peer structure variables
Remove unused variables and reduce the memory by
the structure padding.

Change-Id: Ic49829ab463d75af6d7fc1ac36df16cabdf447e2
CRs-Fixed: 2587049
2019-12-27 01:40:40 -08:00
Alok Singh
192bbaa088 qcacmn: Add debug support for vdev reference and release
Add function name and line number while taking/releasing
references for vdev to trace Object Manager references

Change-Id: Ie8a7d77db2f3c7b58536ab267c665299cb67152e
2019-12-24 20:34:09 -08:00
Alok Singh
c5394665b2 qcacmn: Add debug support for peer reference and release
Add function name and line number while taking/releasing
references for peer to trace object manager references

Change-Id: I93c30d62ecaa979f8c2680eec68f723d2d3c4292
2019-12-24 20:33:55 -08:00
Shashikala Prabhu
1e7bd262fd qcacmn: Add restricted 80+80 MHz bit in soc caps
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
2019-12-10 00:51:42 -08:00
Srinivas Pitla
8e869fff23 qcacmn: Define Peer free notification framework
Define framework to notify registered callbacks on peer freed.
Interested modules can register their callbacks with object manager.

Change-Id: I9ab0e45f7841b1609b9ada3b50335299b462b630
CRs-Fixed: 2578099
2019-12-09 17:29:02 -08:00
Arun Kumar Khandavalli
614d1e4476 qcacmn: create the vdev response timers in psoc_mlme
Move the vdev response timer from the vdev object manager structure
to the psoc mlme structure.

Change-Id: Ieb87ac6549aa23e0beb61441fea459d3db78c2f3
CRs-Fixed: 2563410
2019-12-05 10:45:08 +05:30
Pavankumar Nandeshwar
5f29f5f5c2 qcacmn: Update obj_mgr debug ids for ol_if_ops changes
Remove WLAN_TGT_IF_DP_PEER_REF_ID and add WLAN_PDEV_TARGET_IF_ID

Change-Id: I316d108c3e5bd27f6abc00b8d162a45284fffec6
2019-12-04 07:44:33 -08:00
Pavankumar Nandeshwar
0336eb937e qcacmn: Add an API to get peer using mac from vdev
Add an API that iterates through the peer_list of a vdev
and gets peer using peer mac address.

Change-Id: I9b7edd3816a51ee89d68be4cc876155fa1a79049
2019-10-24 21:42:07 -07:00
Vivek
4ad877f928 qcacmn: Print vdev, pdev and psoc info before being destroyed
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
2019-10-14 20:39:24 -07:00
Min Liu
2c14fae3d5 qcacmn: Add interface to get / set eLNA bypass
Add interface to get / set eLNA bypass from / to firmware via WMI.

Change-Id: I2ed78aece6703c18999fdfbfdfa159a2abd477a6
CRs-Fixed: 2498526
2019-09-21 02:47:10 -07:00
bings
b2e00f901f qcacmn: Add new obj mgr api wlan_pdev_peek_active_first_vdev
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
2019-08-15 23:31:24 -07:00
Abhishek Ambure
c76db37021 qcacmn: Clean up CMN_VDEV_MGR_TGT_IF_ENABLE
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
2019-08-11 10:38:20 -07:00
Gyanranjan Hazarika
8e0ae99446 qcacmn: Add target_if changes for dynamic hw-mode config
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
2019-08-09 11:18:45 -07:00
Sumeet Rao
eda56478de qcacmn: Process RX FSE Support service advertised by firmware
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
2019-08-07 04:58:13 -07:00
Himanshu Batra
556930bba9 qcacmn: Replace void * tgt_if_handle with abstract type
Replace void * tgt_if_handle of objmgr psoc/pdev with
abstract type handles provided by target interface

Change-Id: I9e0ae991776daa0c25c4ad7b4e4dc022441318a3
CRs-Fixed: 2482708
2019-07-19 02:48:20 -07:00
Naga
8e5172276f qcacmn: Add WMI support for vdev delete all peer
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
2019-07-05 10:26:44 -07:00
Balaganapathy Palanisamy
ac6e852e8c qcacmn: Add new DEBUG IDs for objmgr
Add new DEBUG IDs for more granularity in object manager

Change-Id: Iffedabde1e3ca8d3d5e8b4e5f7f77c2019c2c6bb
2019-07-03 07:26:03 -07:00
Paul Zhang
5ea0a91a89 qcacmn: Implement api for interop issues ap
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
2019-05-24 16:01:00 -07:00
Abhishek Singh
3b2666f1a5 qcacmn: Cleanup VDEV SM related flags and unused code
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
2019-05-24 06:42:20 -07:00
sheenam monga
d74e1fdc5f qcacmn: Fix bss peer use after free in stats
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
2019-05-23 09:31:06 -07:00
Santosh Anbu
261451a46c qcacmn: Add API to fetch logically deleted peer list of a vdev
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
2019-05-13 03:31:44 -07:00
Abhishek Singh
7528ff39ce qcacmn: Add API to get and increment ref count of valid bss peer
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
2019-05-01 12:27:09 -07:00
Karunakar Dasineni
142f9baf47 qcacmn: Add new feature to support protocol tags
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
2019-04-26 15:31:10 -07:00
Naga
9dad9767b1 qcacmn: Cleanup duplicate fields in vdev_mlme
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
2019-04-11 01:14:21 -07:00
Akshay Kosigi
09b50e625d qcacmn: Add psoc id value to debug prints vdev mlme timer APIs
Add psoc id value for the debug prints of, error handling vdev mlme timer
APIs

Change-Id: I7d225114e91ff4b6f898450ca3ef7d2e21be631a
CRs-Fixed: 2427905
2019-04-05 18:45:44 -07:00
Bala Venkatesh
f96d9cf159 qcacmn: Replace duplicate api's of vdev_connected
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
2019-04-05 08:37:35 -07:00
Akshay Kosigi
2f7256aa8b qcacmn: Move vdev mlme related code to right file
Move vdev mlme related code from vdev objmgr to vdev mlme files

Change-Id: I4aafdd09376f5cf2ae5c2ad7f0276c9a67ef1d19
CRs-Fixed: 2423319
2019-04-04 08:51:34 -07:00
Santosh Anbu
6ca41ef58f qcacmn: Update ref cnt debug id doc
Add change to update the reference count module id doc.

Change-Id: I4636a4b87f04b8ae608b18c77f9bd18e7fb3ee71
CRs-Fixed: 2426772
2019-04-04 01:52:36 -07:00
Srinivas Pitla
d9ad48d3ff qcacmn: Handle RADAR detect in RESTART state
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
2019-03-28 01:25:24 -07:00
Jeff Johnson
dcb2769793 qcacmn: obj_mgr: 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 umac obj_mgr replace any such comparisons with
logical operations performed on the pointer itself.

Change-Id: I0f556e8baa9126511420a8d4c1b1a5e4ee220bab
CRs-Fixed: 2420149
2019-03-24 19:27:05 -07:00
Santosh Anbu
e0f17e57bb qcacmn: Add object manager API to iterate psoc list
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
2019-03-24 14:55:04 -07:00
Manoj Ekbote
6db1ddac13 qcacmn: Add pdev level feature flag for MBSS IE
A service bit is used to indicate support for MBSS IE.
This is set as capability in host at psoc level.
In host, we also maintain a flag for user to configure
MBSS support at pdev level. It could be used in future.

Change-Id: I31a27a755fb027de93bfe6c9639fdbda9693bace
CRs-Fixed: 2403030
2019-03-08 12:06:04 -08:00
Bala Venkatesh
fbf6d922d6 qcacmn: Skip DFS channels in p2p scan
Add support for the INI gSkipDfsChannelInP2pSearch
to remove the DFS channels from the given scan list in
p2p scan.

Change-Id: I44a6208ab5f3ee062073550143e23e5800342376
CRs-Fixed: 2405191
2019-02-28 18:35:49 -08:00
Naga
7dd88340fe qcacmn: Enhance and update target_if/mlme/vdev_mgr
Enhance target_if/mlme/vdev_mgr by addressing
review comments and update response handling
APIs to handler timers and response bit maps
as expected

Change-Id: I8a5bf3f2931f0c36a367dfebfc898ed2621f3516
CRs-Fixed: 2397184
2019-02-24 20:04:45 -08:00
Akshay Kosigi
1726ae21c5 qcacmn: Add API to update cmn vdev mlme structures
Add API to update cmn vdev mlme structures,
with the addition of new members to the new mlme
vdev structure,new api's are required to update
those members which will be subsequently used the
new mlme target if layer to send commands to the firmware

Change-Id: I9618613c0ad00f78003cd32951b30b631934ba71
2019-02-24 20:04:41 -08:00
Abhiram Jogadenu
b692339f5a qcacmn: Add umac support for CFR
Add UMAC support for CFR module.

CRs-Fixed: 2372061
Change-Id: Idf5991d2cb43e8165ae4eed12d675f1039f4bc77
2019-02-22 02:50:17 -08:00
Srinivas Pitla
6d0331de8f qcacmn: Add flag for Multi VDEV restart synchronization
In current code, channel number is checked to enable multivdev restart
synchronization, this assumption is not valid as channel width change
can also be requested.

To fix this, used a flag to enable multivdev restart synchronization.

Change-Id: I2633ee42ae7d8c127d8369f36f14e861431a21cc
CRs-Fixed: 2400987
2019-02-21 04:53:04 -08:00
Aditya Sathish
73d452f3d2 qcacmn: Add support for UL_RU26 WMI service
Add support for UL_RU26 WMI service which will notify the host if
the target has allowed UL_RU26

Change-Id: I639c0872f541cf30776c9f76b87c4b950c1e17f4
CRs-Fixed: 2390350
2019-02-12 11:24:37 -08:00
Bala Venkatesh
246005bcb2 qcacmn: Remove dual mac disable feature from objmgr psoc
Dual mac disable feature is moved to policy manager. Hence remove
this variable from object manager.

Change-Id: I5d83ce0efa9130cc37734f3d7e982def4fe59ac2
CRs-Fixed: 2388459
2019-01-30 18:54:22 -08:00
Srinivas Pitla
39a9222d27 qcacmn: VDEV MLME SM changes
1) Fixes to enable VDEV MLME SM with legacy code
2) Define/Enable PDEV MLME component object.

Change-Id: Ieb87e5b7b70d6bb593ba0950297894a81c6a4feb
CRs-Fixed: 2384173
2019-01-26 19:58:58 -08:00
Srinivas Pitla
1ff074ce30 qcacmn: Add support for scan and MLME synchronization
Reject scan request, if any VDEV is in START/DFS_CAC/SUSPEND states.

Change-Id: I1047ba510df5ae5debd1e3d5c8a064a57af65fbf
CRs-Fixed: 2384163
2019-01-24 09:59:14 -08:00
Nandha Kishore Easwaran
ea9c2de208 qcacmn: Componentize qwrap
Remove dependency of qwrap on VAP layer and radio(ic) layer data
structure. Added flags to detect qwrap specific features in vdev
structure.

Change-Id: I5bb951ce8c813928b9ab189a77bf4da2ac6258d6
2019-01-19 01:10:28 -08:00
Pavankumar Nandeshwar
2702aeeb0a qcacmn: keep objmgr_peer alive until txrx peer is freed
Make sure the objmgr_peer is not deleted before
dp peer is deleted, which will avoid the access
of already freed objmgr_peer for connected sta peers.

Change-Id: Ib931dcd0c5650fea5284e9dd53dae9e41f662c56
CRs-Fixed: 2359645
2019-01-18 21:28:50 -08:00
Shashikala Prabhu
7eb2d08e3b qcacmn: Add INI support to disable spectral feature
Add INI support to disable spectral feature and do not process the spectral
user commands if spectral feature is  disabled.

Change-Id: Id353131675454652d59fd5d5f8fd3d732a07b777
Acked-by: Shashikala Prabhu <pshashik@codeaurora.org>
CRs-Fixed: 2343947
2018-12-27 13:28:00 -08:00
Yeshwanth Sriram Guntuka
c4a14ea149 qcacmn: Add host support for db2dbm RSSI changes
Add host support for db2dbm RSSI changes. Firmware
indicates this capability when underlying hardware
has RSSI reporting feature. Based on this capability
host will know if firmware sends SNR or RSSI. If no
capablity is present then host will convert SNR to
rssi using a fixed offset of -96. If capability is
present host will directly use the rssi as it is.

Change-Id: I9058f16c6280d466feb96cf88a8a0d8cd7b02032
CRs-Fixed: 2364025
2018-12-24 03:33:04 -08:00
bings
747b176c98 qcacmn: Replace wlan_phy_ch_width with phy_ch_width
Delete enum wlan_phy_ch_width. Move phy_ch_width definition
from reg_services_public_struct.h to wlan_cmn.h.

Change-Id: I9f2b3ade1b023b9728274ce4edd3b90f562ae02e
CRs-Fixed: 2318356
2018-09-24 17:16:16 -07:00