mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
qcacld-3.0: Use ucfg API to get spectral version
Since there is common API to get spectral version, so use ucfg API to get spectral version directly and remove unused codes. Change-Id: Icfd4c68a035166dcaa32478128107249df2c4c95 CRs-Fixed: 2575839
This commit is contained in:
parent
e85067da20
commit
6a576f4039
2 changed files with 2 additions and 57 deletions
|
|
@ -28,12 +28,6 @@
|
|||
|
||||
#ifdef WLAN_CONV_SPECTRAL_ENABLE
|
||||
|
||||
#define SPECTRAL_VERSION_1 1
|
||||
#define SPECTRAL_VERSION_2 2
|
||||
#define SPECTRAL_VERSION_3 3
|
||||
#define SPECTRAL_SUB_VERSION_0 0
|
||||
#define SPECTRAL_SUB_VERSION_1 1
|
||||
|
||||
/*
|
||||
* enum spectral_scan_msg_type - spectral scan registration
|
||||
* @SPECTRAL_SCAN_REGISTER_REQ: spectral scan app register request
|
||||
|
|
|
|||
|
|
@ -480,49 +480,6 @@ void hdd_spectral_register_to_dbr(struct hdd_context *hdd_ctx)
|
|||
}
|
||||
|
||||
#if defined(CNSS_GENL) && defined(WLAN_CONV_SPECTRAL_ENABLE)
|
||||
static void spectral_get_version(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t *version,
|
||||
uint32_t *sub_version)
|
||||
{
|
||||
struct spectral_cp_request sscan_req;
|
||||
QDF_STATUS status;
|
||||
|
||||
if (!pdev || !version || !sub_version) {
|
||||
hdd_err("invalid param");
|
||||
return;
|
||||
}
|
||||
|
||||
sscan_req.ss_mode = SPECTRAL_SCAN_MODE_NORMAL;
|
||||
sscan_req.req_id = SPECTRAL_GET_CAPABILITY_INFO;
|
||||
status = ucfg_spectral_control(pdev, &sscan_req);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
*version = SPECTRAL_VERSION_2;
|
||||
*sub_version = SPECTRAL_SUB_VERSION_0;
|
||||
hdd_err("get spectral cap fail");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (sscan_req.caps_req.sscan_caps.hw_gen) {
|
||||
case 0:
|
||||
*version = SPECTRAL_VERSION_1;
|
||||
*sub_version = SPECTRAL_SUB_VERSION_0;
|
||||
break;
|
||||
case 1:
|
||||
*version = SPECTRAL_VERSION_2;
|
||||
*sub_version = SPECTRAL_SUB_VERSION_1;
|
||||
break;
|
||||
case 2:
|
||||
*version = SPECTRAL_VERSION_3;
|
||||
*sub_version = SPECTRAL_SUB_VERSION_0;
|
||||
break;
|
||||
default:
|
||||
*version = SPECTRAL_VERSION_2;
|
||||
*sub_version = SPECTRAL_SUB_VERSION_0;
|
||||
hdd_err("invalid hw gen");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void send_spectral_scan_reg_rsp_msg(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
|
|
@ -546,8 +503,8 @@ static void send_spectral_scan_reg_rsp_msg(struct hdd_context *hdd_ctx)
|
|||
rsp_msg = NLMSG_DATA(nlh);
|
||||
rsp_msg->msg_type = SPECTRAL_SCAN_REGISTER_RSP;
|
||||
rsp_msg->pid = hdd_ctx->sscan_pid;
|
||||
spectral_get_version(hdd_ctx->pdev, &rsp_msg->version,
|
||||
&rsp_msg->sub_version);
|
||||
ucfg_spectral_get_version(hdd_ctx->pdev, &rsp_msg->version,
|
||||
&rsp_msg->sub_version);
|
||||
|
||||
nlh->nlmsg_len = NLMSG_LENGTH(sizeof(struct spectral_scan_msg_v));
|
||||
skb_put(skb, NLMSG_SPACE(sizeof(struct spectral_scan_msg_v)));
|
||||
|
|
@ -656,8 +613,6 @@ void spectral_scan_deactivate_service(void)
|
|||
|
||||
QDF_STATUS wlan_spectral_update_rx_chainmask(struct hdd_adapter *adapter)
|
||||
{
|
||||
uint32_t version;
|
||||
uint32_t sub_version;
|
||||
uint32_t chainmask_2g = 0;
|
||||
uint32_t chainmask_5g = 0;
|
||||
uint32_t chainmask;
|
||||
|
|
@ -665,10 +620,6 @@ QDF_STATUS wlan_spectral_update_rx_chainmask(struct hdd_adapter *adapter)
|
|||
uint8_t pdev_id;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
|
||||
spectral_get_version(adapter->hdd_ctx->pdev, &version, &sub_version);
|
||||
if (version != SPECTRAL_VERSION_3)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
home_chan = hdd_get_adapter_home_channel(adapter);
|
||||
pdev_id = wlan_objmgr_pdev_get_pdev_id(adapter->hdd_ctx->pdev);
|
||||
wma_get_rx_chainmask(pdev_id, &chainmask_2g, &chainmask_5g);
|
||||
|
|
|
|||
Loading…
Reference in a new issue