qcacld-3.0: Add ini support to enable/disable ring buffer
Currently, There is no support to disable ring buffer. Each Ring buffers is using 2MB and overall 10MB is consumed by 5 ring buffers. Fix is to add ini support to enable/disable ring buffer. Boolean ini CFG_ENABLE_RING_BUFFER is added. Default value of gEnableRingBuffer is 1 which indicates that ring buffers are enabled by default. CRs-Fixed: 2592476 Change-Id: I30f95668de6df96e5c388e92e202f8c236132dc2
This commit is contained in:
@@ -356,6 +356,7 @@ static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
cfg_get(psoc, CFG_DISABLE_4WAY_HS_OFFLOAD);
|
||||
gen->mgmt_retry_max = cfg_get(psoc, CFG_MGMT_RETRY_MAX);
|
||||
gen->bmiss_skip_full_scan = cfg_get(psoc, CFG_BMISS_SKIP_FULL_SCAN);
|
||||
gen->enable_ring_buffer = cfg_get(psoc, CFG_ENABLE_RING_BUFFER);
|
||||
}
|
||||
|
||||
static void mlme_init_edca_ani_cfg(struct wlan_mlme_edca_params *edca_params)
|
||||
|
@@ -665,6 +665,28 @@
|
||||
0, \
|
||||
"To decide partial/partial scan followed by full scan")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* gEnableRingBuffer - Enable Ring Buffer for Bug Report
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 1
|
||||
*
|
||||
* This ini is used to enable Ring Buffer
|
||||
*
|
||||
* Related: None
|
||||
*
|
||||
* Supported Feature: STA/SAP
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_ENABLE_RING_BUFFER CFG_INI_BOOL( \
|
||||
"gEnableRingBuffer", \
|
||||
1, \
|
||||
"To Enable Ring Buffer")
|
||||
|
||||
#define CFG_GENERIC_ALL \
|
||||
CFG(CFG_ENABLE_DEBUG_PACKET_LOG) \
|
||||
CFG(CFG_PMF_SA_QUERY_MAX_RETRIES) \
|
||||
@@ -693,5 +715,6 @@
|
||||
CFG(CFG_ENABLE_BEACON_RECEPTION_STATS) \
|
||||
CFG(CFG_REMOVE_TIME_STAMP_SYNC_CMD) \
|
||||
CFG(CFG_MGMT_RETRY_MAX) \
|
||||
CFG(CFG_BMISS_SKIP_FULL_SCAN)
|
||||
CFG(CFG_BMISS_SKIP_FULL_SCAN) \
|
||||
CFG(CFG_ENABLE_RING_BUFFER)
|
||||
#endif /* __CFG_MLME_GENERIC_H */
|
||||
|
@@ -2319,4 +2319,17 @@ char *mlme_get_sub_reason_str(uint32_t sub_reason);
|
||||
QDF_STATUS
|
||||
wlan_mlme_get_mgmt_max_retry(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *max_retry);
|
||||
|
||||
/**
|
||||
* wlan_mlme_get_status_ring_buffer() - Get the
|
||||
* status of ring buffer
|
||||
* @psoc: pointer to psoc object
|
||||
* @enable_ring_buffer: output pointer to point the configured value of
|
||||
* ring buffer
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
wlan_mlme_get_status_ring_buffer(struct wlan_objmgr_psoc *psoc,
|
||||
bool *enable_ring_buffer);
|
||||
#endif /* _WLAN_MLME_API_H_ */
|
||||
|
@@ -1123,6 +1123,7 @@ struct wlan_mlme_chainmask {
|
||||
* @mgmt_retry_max: maximum retries for management frame
|
||||
* @bmiss_skip_full_scan: Decide if full scan can be skipped in firmware if no
|
||||
* candidate is found in partial scan based on channel map
|
||||
* @enable_ring_buffer: Decide to enable/disable ring buffer for bug report
|
||||
*/
|
||||
struct wlan_mlme_generic {
|
||||
enum band_info band_capability;
|
||||
@@ -1156,6 +1157,7 @@ struct wlan_mlme_generic {
|
||||
bool as_enabled;
|
||||
uint8_t mgmt_retry_max;
|
||||
bool bmiss_skip_full_scan;
|
||||
bool enable_ring_buffer;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@@ -3680,3 +3680,20 @@ wlan_mlme_get_mgmt_max_retry(struct wlan_objmgr_psoc *psoc,
|
||||
*max_retry = mlme_obj->cfg.gen.mgmt_retry_max;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wlan_mlme_get_status_ring_buffer(struct wlan_objmgr_psoc *psoc,
|
||||
bool *enable_ring_buffer)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
|
||||
if (!mlme_obj) {
|
||||
*enable_ring_buffer = cfg_default(CFG_ENABLE_RING_BUFFER);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
*enable_ring_buffer = mlme_obj->cfg.gen.enable_ring_buffer;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
@@ -5976,6 +5976,7 @@ __wlan_hdd_cfg80211_get_logger_supp_feature(struct wiphy *wiphy,
|
||||
int status;
|
||||
uint32_t features;
|
||||
struct sk_buff *reply_skb = NULL;
|
||||
bool enable_ring_buffer;
|
||||
|
||||
hdd_enter_dev(wdev->netdev);
|
||||
|
||||
@@ -5989,12 +5990,17 @@ __wlan_hdd_cfg80211_get_logger_supp_feature(struct wiphy *wiphy,
|
||||
return status;
|
||||
|
||||
features = 0;
|
||||
|
||||
wlan_mlme_get_status_ring_buffer(hdd_ctx->psoc, &enable_ring_buffer);
|
||||
if (enable_ring_buffer) {
|
||||
features |= WIFI_LOGGER_PER_PACKET_TX_RX_STATUS_SUPPORTED;
|
||||
features |= WIFI_LOGGER_CONNECT_EVENT_SUPPORTED;
|
||||
features |= WIFI_LOGGER_WAKE_LOCK_SUPPORTED;
|
||||
features |= WIFI_LOGGER_DRIVER_DUMP_SUPPORTED;
|
||||
features |= WIFI_LOGGER_PACKET_FATE_SUPPORTED;
|
||||
hdd_debug("Supported logger features: 0x%0x", features);
|
||||
} else {
|
||||
hdd_info("Ring buffer disable");
|
||||
}
|
||||
|
||||
reply_skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy,
|
||||
sizeof(uint32_t) + NLA_HDRLEN + NLMSG_HDRLEN);
|
||||
@@ -6003,7 +6009,6 @@ __wlan_hdd_cfg80211_get_logger_supp_feature(struct wiphy *wiphy,
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
hdd_debug("Supported logger features: 0x%0x", features);
|
||||
if (nla_put_u32(reply_skb, QCA_WLAN_VENDOR_ATTR_LOGGER_SUPPORTED,
|
||||
features)) {
|
||||
hdd_err("nla put fail");
|
||||
|
Reference in New Issue
Block a user