Commit Graph

33 Commits

Author SHA1 Message Date
Divyajyothi Goparaju
a266f3af83 qcacmn: move wlan_cfg80211_mc_cp_stats.h file from cmn to qcacld
Currently wlan_cfg80211_mc_cp_stats.h file is present at
qca-wifi-host-cmn/cmn/os_if/linux/cp_stats/inc.
With this change, move file to  qcacld-3.0/os_if/cp_stats/inc
as this file contain MCC specific code.

Change-Id: I6017e1f2b136da3a1de2965a37c56c9477941d79
CRs-Fixed: 3108258
2022-02-01 23:35:59 -08:00
Min Liu
44150359c9 qcacmn: Move get_peer_info into cp_stats component
Move WMI_REQUEST_PEER_STATS_INFO_CMDID related statistics into
cp_stats component.

Change-Id: Ie57f64e4ee195de30271260887c48ecf76f4a2ff
CRs-Fixed: 2680626
2020-08-14 04:12:25 -07:00
gaurank kathpalia
dcc847a925 qcacmn: MCL specific movement from cmn to cld of stats
Move the MCL specific files related to cp stats from
the cmn to cld folder.

Change-Id: I62076512b1b407342338d4612087edd3ba2296df
CRs-Fixed: 2552452
2020-04-17 07:37:08 -07:00
Liangwei Dong
4f2b0feab6 qcacmn: Fix memory leak in get_station_stats_cb
There is memory leak in get_station_stats_cb:
priv->vdev_summary_stats, priv->vdev_chain_rssi,
priv->peer_adv_stats. But the “request” is not leaked,
that means the “.dealloc” should be called.
The suspect is the get_station_stats_cb was called two
times with same cookie (request) before the "request"
was freed, that caused the priv->vdev_summary_stats
and the others two member of "priv" were overwritten,
and then memory leaks.

From the cp stats components there are multiple places
to call ucfg_mc_cp_stats_reset_pending_req to reset the
unused pending.req(has a cookie) to zero.  The zero
cookie may be used in again.

Change the ucfg_mc_cp_stats_reset_pending_req API to do
atomic operation of "reset" and "get" last pending
request.

Change-Id: I5efb7efec4da1edc0aab33b940dc126012a3f12e
CRs-Fixed: 2622444
2020-02-25 21:58:50 -08:00
Sourav Mohapatra
9fae7f7537 qcacmn: Clean up logs in STATS path
Clean up logs in STATS request and response path.

Change-Id: I45135233eb4c10793dc9c62f28d91c49183a0a09
CRs-Fixed: 2618310
2020-02-19 04:58:56 -08:00
Shwetha G K
6d85a9e8da qcacmn: Track netlink allocations
Track netlink allocations when mem debug is enabled.

Change-Id: Icba58f93cf0364678d730f32bd56645efab934e1
CRs-Fixed: 2588037
2020-01-09 04:51:33 -08:00
Hangtian Zhu
7788a89ccd qcacmn: Fix compile issues when some features are disabled
Fix compile issues when some features are disabled, the features are:
BUILD_DEBUG_VERSION
CONFIG_CP_STATS
CONFIG_HOST_OPCLASS
CONFIG_FEATURE_ROAM_DEBUG
There are some other features depends on each other, so enabled features to
qcs40x.snoc.perf_defconfig, the features are:
CONFIG_WLAN_FEATURE_FILS
CONFIG_WMI_ROAM_SUPPORT
CONFIG_WMI_STA_SUPPORT
CONFIG_REG_CLIENT
CONFIG_WLAN_FEATURE_DP_BUS_BANDWIDTH
CONFIG_WMI_CONCURRENCY_SUPPORT
CONFIG_LL_DP_SUPPORT

Change-Id: I6fa1eacb79576a955e593dbb9ac52083742275e3
CRs-Fixed: 2584839
2019-12-18 23:55:00 -08:00
tinlin
21f7286344 qcacmn: Add MIB statistics
Add new stats_id WMI_REQUEST_MIB_STATS &
WMI_REQUEST_MIB_EXTD_STATS in WMI_REQUEST_STATS_CMDID
to retrieve MIB statistics from fw.

Change-Id: I17bccc2673d1a2ce035db04d8426bab49db80790
CRs-Fixed: 2548165
2019-12-01 17:42:21 -08:00
Ashish Kumar Dhanotiya
cd4d6c1d0b qcacmn: Add debug logs to the stats request
Currently there are no debug logs for station stats
request because of which it is difficult to debug
stats related issues.

Add debug logs in stats request and response callbacks.

Change-Id: I4071628ee988ef2e88624740d7e2113610464033
CRs-Fixed: 2541225
2019-10-15 22:58:28 -07:00
Jeff Johnson
23e26381c0 qcacmn: Rename OSIF logging macros
The current OSIF logging macros use a "cfg80211" prefix. This is
confusing because that prefix should only be used by the Linux
cfg80211 module. To avoid confusion rename the macros to use an
"osif" prefix.

Change-Id: Id3273498f623d04beec879aa9d77c1d33986357a
CRs-Fixed: 2469485
2019-06-17 13:00:54 -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
Srinivas Girigowda
2751b6d2b3 qcacmn: Consolidate multiple MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
Consolidate multiple (redundant) MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
CDP_MAC_ADDR_LEN
OL_TXRX_MAC_ADDR_LEN
DP_MAC_ADDR_LEN
HTT_MAC_ADDR_LEN
IEEE80211_ADDR_LEN
DEFRAG_IEEE80211_ADDR_LEN
ETHER_ADDR_LEN
HAL_MAC_ADDR_LEN
WLAN_MACADDR_LEN

CRs-Fixed: 2406591
Change-Id: I4a87f8ff556920c7b341bdbba99ec43c97b873f4
2019-03-28 16:50:32 -07:00
Sourav Mohapatra
d768fd9e1e qcacmn: Extract and populate peer_extd2 stats from fw
Presently, the driver doesnot extract the peer extended2 stats
(rx_bytes, rx_count, fcs_err) that are received from firmware.

Provide the support to extract and populate the peer extended stats2 at
the driver level.

Change-Id: If1f1bb1ef2d1202581744dd509d0da1da718d8c1
CRs-Fixed: 2397638
2019-03-18 09:53:02 -07:00
Madhvapathi Sriram
409d19924e qcacmn: Remove error log for qdf_mem_malloc in os_if files
qdf layer already has the error trace

Change-Id: I4ff1fa2a7e261aecd715fd2c8ae68e6e843f1118
CRs-Fixed: 2376427
2019-02-11 02:29:59 -08:00
Sourav Mohapatra
040e9df4a8 qcacmn: Fix rx_rate population in upper layers
Presently the rx rate is not being populated in the upper layer.

Populate the rx rate in the upper layer via the callback function
get_station_stats_cb

Change-Id: I4729bebd56d550152b0af41017a8c9bd5fb5f187
CRs-Fixed: 2359955
2018-12-05 19:01:45 -08:00
Arif Hussain
ba57f10c4a qcacmn: Do not free stats resource in get_peer_rssi_cb()
Do not free stats resource in callback handler,
Let caller free the resource.

Change-Id: I0d77e95d81b8bb995492eb0aebaa3ebf0282718e
CRs-Fixed: 2296924
2018-08-15 16:58:15 -07:00
Arif Hussain
35d89071c2 qcacmn: Refactor cp status callback handlers
Duplicate stats buffer in the callback so that all
allocations get freed by its owner, this will avoid
memory leak issue because of race condition between
umac and upper layer.

Change-Id: Id18d75eb9adc46a6147634eb5b1e0babe32c7c37
CRs-Fixed: 2289355
2018-08-09 14:34:22 -07:00
Paul Zhang
d82819b457 qcacmn: Use peer mac to get station stats
Currently, it uses the dev mac as peer mac addr for parameter and
the function wlan_obj_psoc_peerlist_get_peer_by_pdev_id returns
NULL because the mac addr does not match. Then the callback will
be ignored for WMI_UPDATE_STATS_EVENTID.

Change-Id: I6e257d3103315bbacb66b3f5db660cfa883966b5
CRs-Fixed: 2272056
2018-07-13 02:58:43 -07:00
Naveen Rawat
2e7637575d qcacmn: Free memory for stats event to os_if in timeout
In case os_if request times out, free the corresponding
memory allocated for stats event to os_if.

Change-Id: I23bd65f2b79c71070d65b5e4045eaf4e17113354
CRs-Fixed: 2262653
2018-06-20 07:59:40 -07:00
Naga
54a68b5752 qcacmn: Add os_if implementation of dcs chan stats
Add change to support get API for dcs chan stats from
within cp stats component

Change-Id: I55af5d83389f34c6c7ff9a7f2a7826eb3a9f4a4c
CRs-Fixed: 2247228
2018-06-11 03:03:41 -07:00
Naga
8703c9c98f qcacmn: Add os_if implementation of atf peer cp stats
Add change to support get API for ATF peer cp stats from
within cp stats component

Change-Id: I1f7ed2e2d1c071df28f34f08d137be1302f61c36
CRs-Fixed: 2247228
2018-06-11 03:03:39 -07:00
Naga
06ef93b2c1 qcacmn: Add os_if implementation of pdev cp stats
Add change to support get API for pdev cp stats from
within cp stats component

Change-Id: Ib791a32a912b7f7e8b7c3b5ebcb3f4e64cdf1f6f
CRs-Fixed: 2247228
2018-06-11 03:03:37 -07:00
Naga
9eeb35db5f qcacmn: Add os_if implementation of vdev cp stats
Add change to support get API for vdev cp stats from
within cp stats component

Change-Id: Ice1c9d6858cbf7241791a6901db7934217bb6076
CRs-Fixed: 2247228
2018-06-11 03:03:35 -07:00
Naga
c5e9342021 qcacmn: Add os_if implementation of peer cp stats
Add change to support get API for peer cp stats from
within cp stats component

Change-Id: I81276cee57a8c28e52e82c0cbc7f58be7dbfa33e
CRs-Fixed: 2247228
2018-06-11 03:03:32 -07:00
Naga
670e851c19 qcacmn: Add implementation of WIN cp stats
Add change to alloc memory for WIN specific cp stats
structures, provide get/set API in cp stats component
for other umac component, reorganize files according
to usage inclusion in other header files

Change-Id: I8b4e4435f60cc0587917ad09ac99659f83f2cb10
CRs-Fixed: 2236328
2018-05-24 07:52:05 -07:00
Jeff Johnson
3d70ae460b qcacmn: os_if: Remove legacy markings
Per current guidance remove legacy markings.

Change-Id: I0d9c1ff59217a115770baea9edd17c57a10a3bc2
CRs-Fixed: 2230684
2018-05-18 02:17:33 -07:00
Naveen Rawat
c223147287 qcacmn: Add osif implementation of get_stations_stats
Add changes to support get station stats from within the cp stats
component.

Change-Id: I17235bf66931b2221a5ddd24aa5f761d5db7eab7
CRs-Fixed: 2210313
2018-05-16 23:20:14 -07:00
Naveen Rawat
1a9ee7dc49 qcacmn: Define ucfg api to free stats_event
Define ucfg api to free stats_event, since it will be called from
osif and hdd.

Change-Id: Ifeea3e970ddca1ed508960c39a2a39f0ed755bd9
CRs-Fixed: 2231150
2018-05-02 04:35:12 -07:00
Naveen Rawat
581787f9af qcacmn: Add osif implementation of getting peer rssi
Add changes to support get peer rssi from within cp_stats
component.

Change-Id: Ic5e9d85e24b1f272df1fa7b6482a797af2aca66a
CRs-Fixed: 2222777
2018-05-02 04:35:09 -07:00
Naveen Rawat
b7ffd12530 qcacmn: Add osif implementation of get_tx_power
Add changes to support get tx power from within cp_stats component.

Change-Id: Ifafee77033b8db75e6c9ad201a26ba8bbe72efd4
CRs-Fixed: 2210311
2018-04-19 22:06:57 -07:00
Naveen Rawat
0b83e8489c qcacmn: Add osif implementation of get_wake_lock stats
Add changes to support get wake lock stats from within cp_stats component.

Change-Id: I1bee578a773c6c2b4cac69c907422a4cb30084d3
CRs-Fixed: 2210309
2018-04-17 13:17:56 -07:00
Naveen Rawat
70fd32e41b qcacmn: Add new files for cp_stats mobile connectivity component
Add file for mobile connectivity to use control path stats component.

Change-Id: I11ba1103745371ebf740ee2ec06dd04912afa7c9
CRs-Fixed: 2210307
2018-04-11 10:52:45 -07:00
Naga
f325f1fe60 qcacmn: Add support for cp stats in os_if
Add framework for cp stats cfg80211 command handlers

CRs-Fixed: 2192386
Change-Id: Ief2a9f3f7d1f26722f9db09fcab674270d1859a1
2018-04-06 17:49:52 -07:00