mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
qcacmn: Add API to set/get number of monitor vdev counts in pdev
Add API to set/get monitor vdev count in pdev object. Also update the max peer count in pdev and psoc when FW allocated peer count is different than host requested. Number of vdevs and beacon tx offload max vdevs in wlan_res_cfg are updated in target_if_update_pdev_tgt_info(). Also, add radio related parameters to get number of vdevs and peers per psoc and pdev. Change-Id: I0165f3bd4638280b45ad54391319806fba62e2fe CRs-Fixed: 2600984
This commit is contained in:
parent
70ea6afc3f
commit
8533bb54fe
3 changed files with 62 additions and 8 deletions
|
|
@ -1986,6 +1986,16 @@ enum _ol_ath_param_t {
|
|||
OL_ATH_PARAM_HW_MODE_SWITCH_OMN_ENABLE = 430,
|
||||
/* set primary interface for hw-mode switch */
|
||||
OL_ATH_PARAM_HW_MODE_SWITCH_PRIMARY_IF = 431,
|
||||
/* Number of vdevs configured per PSOC */
|
||||
OL_ATH_PARAM_GET_PSOC_NUM_VDEVS = 432,
|
||||
/* Number of peers configured per PSOC */
|
||||
OL_ATH_PARAM_GET_PSOC_NUM_PEERS = 433,
|
||||
/* Number of vdevs configured per PDEV */
|
||||
OL_ATH_PARAM_GET_PDEV_NUM_VDEVS = 434,
|
||||
/* Number of peers configured per PDEV */
|
||||
OL_ATH_PARAM_GET_PDEV_NUM_PEERS = 435,
|
||||
/* Number of monitor vdevs configured per PDEV */
|
||||
OL_ATH_PARAM_GET_PDEV_NUM_MONITOR_VDEVS = 436,
|
||||
};
|
||||
#endif
|
||||
/* Bitmasks for stats that can block */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -353,11 +353,6 @@ static int init_deinit_service_ext_ready_event_handler(ol_scn_t scn_handle,
|
|||
|
||||
target_if_set_twt_ap_pdev_count(info, tgt_hdl);
|
||||
|
||||
info->wlan_res_cfg.num_vdevs = (target_psoc_get_num_radios(tgt_hdl) *
|
||||
info->wlan_res_cfg.num_vdevs);
|
||||
info->wlan_res_cfg.beacon_tx_offload_max_vdev =
|
||||
(target_psoc_get_num_radios(tgt_hdl) *
|
||||
info->wlan_res_cfg.beacon_tx_offload_max_vdev);
|
||||
info->wlan_res_cfg.max_bssid_indicator =
|
||||
info->service_ext_param.max_bssid_indicator;
|
||||
|
||||
|
|
@ -471,8 +466,11 @@ static int init_deinit_ready_event_handler(ol_scn_t scn_handle,
|
|||
else
|
||||
info->wlan_res_cfg.agile_capability = ready_ev.agile_capability;
|
||||
|
||||
num_radios = target_psoc_get_num_radios(tgt_hdl);
|
||||
|
||||
if ((ready_ev.num_total_peer != 0) &&
|
||||
(info->wlan_res_cfg.num_peers != ready_ev.num_total_peer)) {
|
||||
uint16_t num_peers = 0;
|
||||
/* FW allocated number of peers is different than host
|
||||
* requested. Update host max with FW reported value.
|
||||
*/
|
||||
|
|
@ -480,6 +478,22 @@ static int init_deinit_ready_event_handler(ol_scn_t scn_handle,
|
|||
info->wlan_res_cfg.num_peers,
|
||||
ready_ev.num_total_peer);
|
||||
info->wlan_res_cfg.num_peers = ready_ev.num_total_peer;
|
||||
num_peers = info->wlan_res_cfg.num_peers / num_radios;
|
||||
|
||||
for (i = 0; i < num_radios; i++) {
|
||||
pdev = wlan_objmgr_get_pdev_by_id(psoc, i,
|
||||
WLAN_INIT_DEINIT_ID);
|
||||
if (!pdev) {
|
||||
target_if_err(" PDEV %d is NULL", i);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
wlan_pdev_set_max_peer_count(pdev, num_peers);
|
||||
wlan_objmgr_pdev_release_ref(pdev, WLAN_INIT_DEINIT_ID);
|
||||
}
|
||||
|
||||
wlan_psoc_set_max_peer_count(psoc,
|
||||
info->wlan_res_cfg.num_peers);
|
||||
}
|
||||
|
||||
/* for non legacy num_total_peer will be non zero
|
||||
|
|
@ -514,8 +528,6 @@ static int init_deinit_ready_event_handler(ol_scn_t scn_handle,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
num_radios = target_psoc_get_num_radios(tgt_hdl);
|
||||
|
||||
if (ready_ev.pktlog_defs_checksum) {
|
||||
for (i = 0; i < num_radios; i++) {
|
||||
pdev = wlan_objmgr_get_pdev_by_id(psoc, i,
|
||||
|
|
|
|||
|
|
@ -165,6 +165,7 @@ struct wlan_objmgr_pdev_mlme {
|
|||
* @wlan_peer_count: Peer count
|
||||
* @max_peer_count: Max Peer count
|
||||
* @temp_peer_count: Temporary peer count
|
||||
* @max_monitor_vdev_count: Max monitor vdev count
|
||||
* @wlan_psoc: back pointer to PSOC, its attached to
|
||||
* @ref_cnt: Ref count
|
||||
* @ref_id_dbg: Array to track Ref count
|
||||
|
|
@ -178,6 +179,7 @@ struct wlan_objmgr_pdev_objmgr {
|
|||
uint16_t wlan_peer_count;
|
||||
uint16_t max_peer_count;
|
||||
uint16_t temp_peer_count;
|
||||
uint8_t max_monitor_vdev_count;
|
||||
struct wlan_objmgr_psoc *wlan_psoc;
|
||||
qdf_atomic_t ref_cnt;
|
||||
qdf_atomic_t ref_id_dbg[WLAN_REF_ID_MAX];
|
||||
|
|
@ -946,6 +948,36 @@ static inline uint16_t wlan_pdev_get_max_peer_count(
|
|||
return pdev->pdev_objmgr.max_peer_count;
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_pdev_set_max_monitor_vdev_count() - set max monitor vdev count
|
||||
* @pdev: PDEV object
|
||||
* @count: Max monitor vdev count
|
||||
*
|
||||
* API to set max monitor vdev count of PDEV
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static inline void wlan_pdev_set_max_monitor_vdev_count(
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t count)
|
||||
{
|
||||
pdev->pdev_objmgr.max_monitor_vdev_count = count;
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_pdev_get_max_monitor_vdev_count() - get max monitor vdev count
|
||||
* @pdev: PDEV object
|
||||
*
|
||||
* API to get max monitor vdev count of PDEV
|
||||
*
|
||||
* Return: max monitor vdev count
|
||||
*/
|
||||
static inline uint16_t wlan_pdev_get_max_monitor_vdev_count(
|
||||
struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
return pdev->pdev_objmgr.max_monitor_vdev_count;
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_pdev_get_peer_count() - get pdev peer count
|
||||
* @pdev: PDEV object
|
||||
|
|
|
|||
Loading…
Reference in a new issue