wlan: Handle HID connect/disconnect indication
Add handling of the HID connect/disconnect indication and
enable/disable snoc high freq voting when the corresponding
indication is received.
Change-Id: Ia9741fc8c410a620d5781cffa39416b67670db7c
CRs-Fixed: 1101258
diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c
index be479f9..fe97e74 100644
--- a/CORE/VOSS/src/vos_api.c
+++ b/CORE/VOSS/src/vos_api.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -441,6 +441,8 @@
VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH,
"%s: VOSS successfully Opened", __func__);
+ gpVosContext->snoc_high_freq_voting = false;
+ spin_lock_init(&gpVosContext->freq_voting_lock);
*pVosContext = gpVosContext;
return VOS_STATUS_SUCCESS;
@@ -3663,3 +3665,43 @@
return pHddCtx->cfg_ini->sap_probe_resp_offload;
}
+
+
+/**
+ * vos_set_snoc_high_freq_voting() - enable/disable high freq voting
+ * @enable: true if need to be enabled
+ *
+ * enable/disable high freq voting
+ *
+ * Return: Void
+ */
+#ifdef HAVE_WCNSS_SNOC_HIGH_FREQ_VOTING
+void vos_set_snoc_high_freq_voting(bool enable)
+{
+ VosContextType *vos_ctx = NULL;
+
+ /* Get the Global VOSS Context */
+ vos_ctx = vos_get_global_context(VOS_MODULE_ID_SYS, NULL);
+
+ if (!vos_ctx) {
+ VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
+ "%s: vos context is NULL", __func__);
+ return;
+ }
+
+ spin_lock(&vos_ctx->freq_voting_lock);
+ if (vos_ctx->snoc_high_freq_voting != enable)
+ {
+ vos_ctx->snoc_high_freq_voting = enable;
+ spin_unlock(&vos_ctx->freq_voting_lock);
+ wcnss_snoc_vote(enable);
+ return;
+ }
+ spin_unlock(&vos_ctx->freq_voting_lock);
+}
+#else
+void vos_set_snoc_high_freq_voting(bool enable)
+{
+ return;
+}
+#endif