Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade WLAN Prima driver to v3.0.10.085 / 1.5.1.2 / CNSS-PR-1-4-1-c5… #5

Draft
wants to merge 1 commit into
base: ubp-5.1-caf
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
52 changes: 52 additions & 0 deletions drivers/net/wireless/wcnss/wcnss_vreg.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ static int auto_detect;
#define WCN3620A 0x5112
#define WCN3610 0x9101

#define WCN3660 0x0200
#define WCN3660A 0x0300
#define WCN3660B 0x0400
#define WCN3620 0x5111
#define WCN3620A 0x5112
#define WCN3610 0x9101
#define WCN3610V1 0x9110

#define WCNSS_PMU_CFG_IRIS_XO_CFG BIT(3)
#define WCNSS_PMU_CFG_IRIS_XO_EN BIT(4)
#define WCNSS_PMU_CFG_IRIS_XO_CFG_STS BIT(6) /* 1: in progress, 0: done */
Expand Down Expand Up @@ -182,6 +190,50 @@ void wcnss_iris_reset(u32 reg, void __iomem *pmu_conf_reg)
writel_relaxed(reg, pmu_conf_reg);
}

int wcnss_get_iris_name(char *iris_name)
{
struct wcnss_wlan_config *cfg = NULL;
int iris_id;

cfg = wcnss_get_wlan_config();

if (cfg) {
iris_id = cfg->iris_id;
iris_id = iris_id >> 16;
} else {
return 1;
}

switch (iris_id) {
case WCN3660:
memcpy(iris_name, "WCN3660", sizeof("WCN3660"));
break;
case WCN3660A:
memcpy(iris_name, "WCN3660A", sizeof("WCN3660A"));
break;
case WCN3660B:
memcpy(iris_name, "WCN3660B", sizeof("WCN3660B"));
break;
case WCN3620:
memcpy(iris_name, "WCN3620", sizeof("WCN3620"));
break;
case WCN3620A:
memcpy(iris_name, "WCN3620A", sizeof("WCN3620A"));
break;
case WCN3610:
memcpy(iris_name, "WCN3610", sizeof("WCN3610"));
break;
case WCN3610V1:
memcpy(iris_name, "WCN3610V1", sizeof("WCN3610V1"));
break;
default:
return 1;
}

return 0;
}
EXPORT_SYMBOL(wcnss_get_iris_name);

static int configure_iris_xo(struct device *dev, bool use_48mhz_xo, int on,
int *iris_xo_set)
{
Expand Down
30 changes: 30 additions & 0 deletions drivers/net/wireless/wcnss/wcnss_wlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,25 @@ void wcnss_reset_intr(void)
}
EXPORT_SYMBOL(wcnss_reset_intr);

void wcnss_reset_fiq(bool clk_chk_en)
{
if (wcnss_hardware_type() == WCNSS_PRONTO_HW) {
if (clk_chk_en) {
wcnss_log_debug_regs_on_bite();
} else {
wcnss_pronto_log_debug_regs();
if (wcnss_get_mux_control())
wcnss_log_iris_regs();
}
/* Insert memory barrier before writing fiq register */
wmb();
__raw_writel(1 << 16, penv->fiq_reg);
} else {
wcnss_riva_log_debug_regs();
}
}
EXPORT_SYMBOL(wcnss_reset_fiq);

static int wcnss_create_sysfs(struct device *dev)
{
int ret;
Expand Down Expand Up @@ -2931,6 +2950,17 @@ static void __exit wcnss_wlan_exit(void)
platform_driver_unregister(&wcnss_wlan_driver);
}

/* wlan prop driver cannot invoke show_stack
* function directly, so to invoke this function it
* call wcnss_dump_stack function
*/
void wcnss_dump_stack(struct task_struct *task)
{
show_stack(task, NULL);
}
EXPORT_SYMBOL(wcnss_dump_stack);


module_init(wcnss_wlan_init);
module_exit(wcnss_wlan_exit);

Expand Down
5 changes: 3 additions & 2 deletions drivers/staging/prima/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ WLAN_CHIPSET := prima
WLAN_SELECT := CONFIG_PRIMA_WLAN=m
endif

# Build/Package options for 8916, 8974, 8226, 8610, 8909 targets
ifneq (,$(filter msm8916 msm8974 msm8226 msm8610 msm8909,$(TARGET_BOARD_PLATFORM)))
# Build/Package options for 8916, 8974, 8226, 8610, 8909, 8952 targets
ifneq (,$(filter msm8916 msm8974 msm8226 msm8610 msm8909 msm8952,$(TARGET_BOARD_PLATFORM)))

WLAN_CHIPSET := pronto
WLAN_SELECT := CONFIG_PRONTO_WLAN=m
endif
Expand Down
2 changes: 0 additions & 2 deletions drivers/staging/prima/CORE/BAP/inc/bapApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ DESCRIPTION
module.


Copyright (c) 2008 QUALCOMM Incorporated. All Rights Reserved.
Qualcomm Confidential and Proprietary
===========================================================================*/


Expand Down
10 changes: 4 additions & 6 deletions drivers/staging/prima/CORE/BAP/src/bapApiData.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2013 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2015, 2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
Expand Down Expand Up @@ -42,9 +42,6 @@
Are listed for each API below.


Copyright (c) 2008 QUALCOMM Incorporated.
All Rights Reserved.
Qualcomm Confidential and Proprietary
===========================================================================*/

/*===========================================================================
Expand Down Expand Up @@ -403,6 +400,7 @@ WLANBAP_XlateTxDataPkt
// Now copy the AC values from the Logical Link context
*pucAC = pLogLinkContext->btampAC;
// Now copy the values from the Logical Link context to the MetaInfo
tlMetaInfo->ac = *pucAC;
tlMetaInfo->ucTID = pLogLinkContext->ucTID;
tlMetaInfo->ucUP = pLogLinkContext->ucUP;
tlMetaInfo->ucIsEapol = VOS_FALSE;
Expand Down Expand Up @@ -1015,7 +1013,7 @@ WLANBAP_TxCompCB
#ifdef BAP_DEBUG
/* Trace the bapContext referenced. */
VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH,
"WLAN BAP Context Monitor: bapContext value = %p in %s:%d. vosDataBuff=%p", bapContext, __func__, __LINE__, vosDataBuff );
"WLAN BAP Context Monitor: bapContext value = %pK in %s:%d. vosDataBuff=%pK", bapContext, __func__, __LINE__, vosDataBuff );
#endif //BAP_DEBUG

// Sanity check the log_link_handle value
Expand Down Expand Up @@ -1166,7 +1164,7 @@ WLANBAP_STAPktPending
#ifdef BAP_DEBUG
/* Trace the tBtampCtx being passed in. */
VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH,
"WLAN BAP Context Monitor: pBtampCtx value = %p in %s:%d", pBtampCtx, __func__, __LINE__ );
"WLAN BAP Context Monitor: pBtampCtx value = %pK in %s:%d", pBtampCtx, __func__, __LINE__ );
#endif //BAP_DEBUG

/*------------------------------------------------------------------------
Expand Down
3 changes: 0 additions & 3 deletions drivers/staging/prima/CORE/BAP/src/bapApiDebug.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@
Are listed for each API below.


Copyright (c) 2008 QUALCOMM Incorporated.
All Rights Reserved.
Qualcomm Confidential and Proprietary
===========================================================================*/

/*===========================================================================
Expand Down
3 changes: 0 additions & 3 deletions drivers/staging/prima/CORE/BAP/src/bapApiExt.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@
Are listed for each API below.


Copyright (c) 2008 QUALCOMM Incorporated.
All Rights Reserved.
Qualcomm Confidential and Proprietary
===========================================================================*/

/*===========================================================================
Expand Down
2 changes: 0 additions & 2 deletions drivers/staging/prima/CORE/BAP/src/bapApiExt.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ DESCRIPTION
module.


Copyright (c) 2008 QUALCOMM Incorporated. All Rights Reserved.
Qualcomm Confidential and Proprietary
===========================================================================*/


Expand Down
37 changes: 17 additions & 20 deletions drivers/staging/prima/CORE/BAP/src/bapApiHCBB.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2013 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2013, 2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
Expand Down Expand Up @@ -42,9 +42,6 @@
Are listed for each API below.


Copyright (c) 2008 QUALCOMM Incorporated.
All Rights Reserved.
Qualcomm Confidential and Proprietary
===========================================================================*/

/*===========================================================================
Expand Down Expand Up @@ -147,7 +144,7 @@ WLAN_BAPReset
tHalHandle hHal = NULL;
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/

VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %p", __func__, btampHandle);
VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %pK", __func__, btampHandle);

/* Validate params */
if (btampHandle == NULL)
Expand Down Expand Up @@ -294,7 +291,7 @@ WLAN_BAPFlush
ptBtampContext btampContext = (ptBtampContext) btampHandle;
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/

VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %p", __func__, btampHandle);
VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %pK", __func__, btampHandle);

/* Validate params */
if (btampHandle == NULL) {
Expand Down Expand Up @@ -367,7 +364,7 @@ WLAN_EnhancedBAPFlush
ptBtampContext btampContext;
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/

VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %p", __func__, btampHandle);
VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %pK", __func__, btampHandle);

/* Validate params */
/* Validate params */
Expand Down Expand Up @@ -447,7 +444,7 @@ WLAN_BAPReadConnectionAcceptTimeout
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/

VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH,
"%s: btampHandle value: %p", __func__, btampHandle);
"%s: btampHandle value: %pK", __func__, btampHandle);

/* Validate params */
if ((NULL == btampHandle) || (NULL == pBapHCIEvent))
Expand Down Expand Up @@ -516,7 +513,7 @@ WLAN_BAPWriteConnectionAcceptTimeout
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/

VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH,
"%s: btampHandle value: %p", __func__, btampHandle);
"%s: btampHandle value: %pK", __func__, btampHandle);

/* Validate params */
if ((NULL == btampHandle) || (NULL == pBapHCIWriteConnectionAcceptTimeout)
Expand Down Expand Up @@ -607,7 +604,7 @@ WLAN_BAPReadLinkSupervisionTimeout
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/

VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH,
"%s: btampHandle value: %p", __func__, btampHandle);
"%s: btampHandle value: %pK", __func__, btampHandle);

/* Validate params */
if ((NULL == btampHandle) || (NULL == pBapHCIReadLinkSupervisionTimeout) ||
Expand Down Expand Up @@ -699,7 +696,7 @@ WLAN_BAPWriteLinkSupervisionTimeout
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/

VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH,
"%s: btampHandle value: %p", __func__, btampHandle);
"%s: btampHandle value: %pK", __func__, btampHandle);

/* Validate params */
if ((NULL == btampHandle) || (NULL == pBapHCIWriteLinkSupervisionTimeout) ||
Expand Down Expand Up @@ -791,7 +788,7 @@ WLAN_BAPReadLogicalLinkAcceptTimeout
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/

VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH,
"%s: btampHandle value: %p", __func__, btampHandle);
"%s: btampHandle value: %pK", __func__, btampHandle);

/* Validate params */
if ((NULL == btampHandle) || (NULL == pBapHCIEvent))
Expand Down Expand Up @@ -860,7 +857,7 @@ WLAN_BAPWriteLogicalLinkAcceptTimeout
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/

VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH,
"%s: btampHandle value: %p", __func__, btampHandle);
"%s: btampHandle value: %pK", __func__, btampHandle);

/* Validate params */
if ((NULL == btampHandle) || (NULL == pBapHCIWriteLogicalLinkAcceptTimeout)
Expand Down Expand Up @@ -948,7 +945,7 @@ WLAN_BAPSetEventMaskPage2
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/

VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH,
"%s: btampHandle value: %p", __func__, btampHandle);
"%s: btampHandle value: %pK", __func__, btampHandle);

/* Validate params */
if ((NULL == btampHandle) || (NULL == pBapHCISetEventMaskPage2)
Expand Down Expand Up @@ -1023,7 +1020,7 @@ WLAN_BAPReadLocationData
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/

VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH,
"%s: btampHandle value: %p", __func__, btampHandle);
"%s: btampHandle value: %pK", __func__, btampHandle);

/* Validate params */
if ((NULL == btampHandle) || (NULL == pBapHCIEvent))
Expand Down Expand Up @@ -1105,7 +1102,7 @@ WLAN_BAPWriteLocationData
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/

VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH,
"%s: btampHandle value: %p", __func__, btampHandle);
"%s: btampHandle value: %pK", __func__, btampHandle);

/* Validate params */
if ((NULL == btampHandle) || (NULL == pBapHCIWriteLocationData)
Expand Down Expand Up @@ -1186,7 +1183,7 @@ WLAN_BAPReadFlowControlMode
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/

VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH,
"%s: btampHandle value: %p", __func__, btampHandle);
"%s: btampHandle value: %pK", __func__, btampHandle);

/* Validate params */
if ((NULL == btampHandle) || (NULL == pBapHCIEvent))
Expand Down Expand Up @@ -1391,7 +1388,7 @@ WLAN_BAPSetShortRangeMode
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/

VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH,
"%s: btampHandle value: %p", __func__, btampHandle);
"%s: btampHandle value: %pK", __func__, btampHandle);

/* Validate params */
if ((NULL == btampHandle) || (NULL == pBapHCIEvent))
Expand Down Expand Up @@ -1532,7 +1529,7 @@ WLAN_BAPVendorSpecificCmd0
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/

VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH,
"%s: btampHandle value: %p", __func__, btampHandle);
"%s: btampHandle value: %pK", __func__, btampHandle);

/* Validate params */
if ((NULL == btampHandle) || (NULL == pBapHCIEvent))
Expand Down Expand Up @@ -1632,7 +1629,7 @@ WLAN_BAPVendorSpecificCmd1
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/

VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH,
"%s: btampHandle value: %p", __func__, btampHandle);
"%s: btampHandle value: %pK", __func__, btampHandle);

/* Validate params */
if ((NULL == btampHandle) || (NULL == pBapHCIEvent))
Expand Down
Loading