mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
qcacld-3.0: Enable Support for dbs stats
Add an extra parameter for txrx_stats to print stats based on provided mac_id Change-Id: I613ef657571f8ce6222434067117ac313fc98d60 CRs-Fixed: 2237472
This commit is contained in:
parent
2fc8b6eb81
commit
c004fa0614
2 changed files with 44 additions and 42 deletions
|
|
@ -3021,6 +3021,10 @@ static int __iw_softap_set_two_ints_getnone(struct net_device *dev,
|
|||
int *value = (int *)extra;
|
||||
int sub_cmd = value[0];
|
||||
struct hdd_context *hdd_ctx;
|
||||
struct cdp_vdev *vdev = NULL;
|
||||
struct cdp_pdev *pdev = NULL;
|
||||
void *soc = NULL;
|
||||
struct cdp_txrx_stats_req req = {0};
|
||||
|
||||
hdd_enter_dev(dev);
|
||||
|
||||
|
|
@ -3034,6 +3038,23 @@ static int __iw_softap_set_two_ints_getnone(struct net_device *dev,
|
|||
return ret;
|
||||
|
||||
switch (sub_cmd) {
|
||||
case QCSAP_PARAM_SET_TXRX_STATS:
|
||||
{
|
||||
ret = cds_get_datapath_handles(&soc, &pdev, &vdev,
|
||||
adapter->session_id);
|
||||
if (ret != 0) {
|
||||
hdd_err("Invalid Handles");
|
||||
break;
|
||||
}
|
||||
req.stats = value[1];
|
||||
req.mac_id = value[2];
|
||||
hdd_info("QCSAP_PARAM_SET_TXRX_STATS stats_id: %d mac_id: %d",
|
||||
req.stats, req.mac_id);
|
||||
ret = cdp_txrx_stats_request(soc, vdev, &req);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Firmware debug log */
|
||||
case QCSAP_IOCTL_SET_FW_CRASH_INJECT:
|
||||
ret = hdd_crash_inject(adapter, value[1], value[2]);
|
||||
break;
|
||||
|
|
@ -3244,10 +3265,6 @@ static __iw_softap_setparam(struct net_device *dev,
|
|||
QDF_STATUS status;
|
||||
int ret = 0;
|
||||
struct hdd_context *hdd_ctx;
|
||||
struct cdp_vdev *vdev = NULL;
|
||||
struct cdp_pdev *pdev = NULL;
|
||||
void *soc = NULL;
|
||||
struct cdp_txrx_stats_req req;
|
||||
|
||||
hdd_enter_dev(dev);
|
||||
|
||||
|
|
@ -3390,21 +3407,6 @@ static __iw_softap_setparam(struct net_device *dev,
|
|||
break;
|
||||
}
|
||||
|
||||
case QCSAP_PARAM_SET_TXRX_STATS:
|
||||
{
|
||||
ret = cds_get_datapath_handles(&soc, &pdev, &vdev,
|
||||
adapter->session_id);
|
||||
if (ret != 0) {
|
||||
hdd_err("Invalid Handles");
|
||||
break;
|
||||
}
|
||||
req.stats = set_value;
|
||||
req.channel = adapter->session.ap.operating_channel;
|
||||
hdd_info("QCSAP_PARAM_SET_TXRX_STATS val %d", set_value);
|
||||
ret = cdp_txrx_stats_request(soc, vdev, &req);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Firmware debug log */
|
||||
case QCSAP_DBGLOG_LOG_LEVEL:
|
||||
{
|
||||
|
|
@ -5487,7 +5489,7 @@ static const struct iw_priv_args hostapd_private_args[] = {
|
|||
"txrx_fw_stats"
|
||||
}, {
|
||||
QCSAP_PARAM_SET_TXRX_STATS,
|
||||
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0,
|
||||
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2, 0,
|
||||
"txrx_stats"
|
||||
}, {
|
||||
QCSAP_PARAM_SET_MCC_CHANNEL_LATENCY,
|
||||
|
|
|
|||
|
|
@ -4262,10 +4262,6 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
int set_value = value[1];
|
||||
int ret;
|
||||
QDF_STATUS status;
|
||||
void *soc = NULL;
|
||||
struct cdp_pdev *pdev = NULL;
|
||||
struct cdp_vdev *vdev = NULL;
|
||||
struct cdp_txrx_stats_req req;
|
||||
|
||||
hdd_enter_dev(dev);
|
||||
|
||||
|
|
@ -4956,23 +4952,6 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
break;
|
||||
}
|
||||
|
||||
case WE_SET_TXRX_STATS:
|
||||
{
|
||||
hdd_debug("WE_SET_TXRX_STATS val %d", set_value);
|
||||
ret = cds_get_datapath_handles(&soc, &pdev, &vdev,
|
||||
adapter->session_id);
|
||||
|
||||
if (ret != 0) {
|
||||
hdd_err("Invalid handles");
|
||||
break;
|
||||
}
|
||||
|
||||
req.stats = set_value;
|
||||
req.channel = adapter->session.station.conn_info.operationChannel;
|
||||
ret = cdp_txrx_stats_request(soc, vdev, &req);
|
||||
break;
|
||||
}
|
||||
|
||||
case WE_TXRX_FWSTATS_RESET:
|
||||
{
|
||||
hdd_debug("WE_TXRX_FWSTATS_RESET val %d", set_value);
|
||||
|
|
@ -9006,6 +8985,10 @@ static int __iw_set_two_ints_getnone(struct net_device *dev,
|
|||
int sub_cmd = value[0];
|
||||
int ret;
|
||||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
void *soc = NULL;
|
||||
struct cdp_pdev *pdev = NULL;
|
||||
struct cdp_vdev *vdev = NULL;
|
||||
struct cdp_txrx_stats_req req = {0};
|
||||
|
||||
hdd_enter_dev(dev);
|
||||
|
||||
|
|
@ -9018,6 +9001,23 @@ static int __iw_set_two_ints_getnone(struct net_device *dev,
|
|||
return ret;
|
||||
|
||||
switch (sub_cmd) {
|
||||
case WE_SET_TXRX_STATS:
|
||||
{
|
||||
ret = cds_get_datapath_handles(&soc, &pdev, &vdev,
|
||||
adapter->session_id);
|
||||
|
||||
if (ret != 0) {
|
||||
hdd_err("Invalid handles");
|
||||
break;
|
||||
}
|
||||
|
||||
req.stats = value[1];
|
||||
req.mac_id = value[2];
|
||||
hdd_debug("WE_SET_TXRX_STATS stats cmd: %d mac_id: %d",
|
||||
req.stats, req.mac_id);
|
||||
ret = cdp_txrx_stats_request(soc, vdev, &req);
|
||||
break;
|
||||
}
|
||||
case WE_SET_SMPS_PARAM:
|
||||
hdd_debug("WE_SET_SMPS_PARAM val %d %d", value[1], value[2]);
|
||||
ret = wma_cli_set_command(adapter->session_id,
|
||||
|
|
@ -9453,7 +9453,7 @@ static const struct iw_priv_args we_private_args[] = {
|
|||
"txrx_fw_stats"},
|
||||
|
||||
{WE_SET_TXRX_STATS,
|
||||
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
|
||||
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2,
|
||||
0,
|
||||
"txrx_stats"},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue