summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnjaneedevi Kapparapu <akappa@codeaurora.org>2015-02-19 16:02:53 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2015-02-19 16:04:16 +0530
commit76aa08f9ee4e029908e689665480ccd56d53cb24 (patch)
tree22dba92f6ff89e6f8a2ce7366a9c2764315e6488
parent058903d6269d09b57cf718fff63833dc7be8a6f1 (diff)
parent8ca3c1da3966f4d8be060650636fa121a8e9b184 (diff)
Release 4.0.10.38 QCACLD WLAN Driver
Merge remote-tracking branch 'origin/caf/caf-wlan/master' * origin/caf/caf-wlan/master: Cafstaging Release 4.0.10.38 qcacld: IPA uC: Fix regression for Intra-BSS forward offload qcacld: Fix errors reported by static analysis tool Change-Id: I5301f4d125a167445c190b1b9944b965b2061c12
-rw-r--r--CORE/CLD_TXRX/TLSHIM/tl_shim.c22
-rw-r--r--CORE/HDD/src/wlan_hdd_ipa.c54
-rw-r--r--CORE/MAC/inc/qwlan_version.h4
-rw-r--r--CORE/SAP/src/sapFsm.c32
-rw-r--r--CORE/SERVICES/COMMON/adf/adf_os_mem.h14
-rw-r--r--CORE/SERVICES/COMMON/adf/linux/adf_os_mem_pvt.h15
-rw-r--r--CORE/SERVICES/WMA/wma.c16
-rw-r--r--CORE/TL/inc/wlan_qct_tl.h18
8 files changed, 110 insertions, 65 deletions
diff --git a/CORE/CLD_TXRX/TLSHIM/tl_shim.c b/CORE/CLD_TXRX/TLSHIM/tl_shim.c
index 08987524e9aa..90bdbd599a7e 100644
--- a/CORE/CLD_TXRX/TLSHIM/tl_shim.c
+++ b/CORE/CLD_TXRX/TLSHIM/tl_shim.c
@@ -2430,6 +2430,27 @@ void WLANTL_RegisterOPCbFnc(void *vos_ctx,
wdi_in_ipa_uc_register_op_cb(((pVosContextType)vos_ctx)->pdev_txrx_ctx,
func, usr_ctxt);
}
+
+/*=============================================================================
+ FUNCTION WLANTL_disable_intrabss_fwd
+
+ DESCRIPTION
+ Function to return if Intra-BSS FWD is disabled or not
+
+ PARAMETERS
+ IN
+ vdev : vdev handle
+
+ RETURN VALUE
+ bool : TRUE if Intra-BSS FWD is disabled, FALSE if not
+
+ SIDE EFFECTS
+
+==============================================================================*/
+bool WLANTL_disable_intrabss_fwd(void *vdev)
+{
+ return ((ol_txrx_vdev_handle)vdev)->disable_intrabss_fwd;
+}
#endif /* IPA_UC_OFFLOAD */
/*=============================================================================
@@ -2479,4 +2500,3 @@ VOS_STATUS WLANTL_RegisterOCBPeer(void *vos_ctx, uint8_t *mac_addr,
return VOS_STATUS_SUCCESS;
}
-
diff --git a/CORE/HDD/src/wlan_hdd_ipa.c b/CORE/HDD/src/wlan_hdd_ipa.c
index 89f0e3f8104d..641858b5d073 100644
--- a/CORE/HDD/src/wlan_hdd_ipa.c
+++ b/CORE/HDD/src/wlan_hdd_ipa.c
@@ -2213,30 +2213,44 @@ static void hdd_ipa_w2i_cb(void *priv, enum ipa_dp_evt_type evt,
iface_context->stats.num_rx_ipa_excep++;
#if defined(IPA_UC_OFFLOAD) && defined(INTRA_BSS_FWD_OFFLOAD)
- eth = (struct ethhdr *)skb->data;
-
- /*
- * When INTRA_BSS_FWD_OFFLOAD is enabled, FW will send all Rx
- * packets to IPA uC, which need to be forwarded to other
- * interface.
- * And, since only IP packets are forwarded through IPA Ethernet
- * Bridging, non-IP exception packets should be forwarded to Tx
- * here.
+ /* Disable to forward Intra-BSS Rx packets when
+ * ap_isolate=1 in hostapd.conf
*/
- if (eth->h_proto != be16_to_cpu(ETH_P_IP)) {
- copy = adf_nbuf_copy(skb);
- if (copy) {
- ret = hdd_softap_hard_start_xmit(
- (struct sk_buff *)copy, adapter->dev);
- if (ret) {
- HDD_IPA_LOG(VOS_TRACE_LEVEL_DEBUG,
- "Forward packet tx fail");
- hdd_ipa->stats.num_tx_bcmc_err++;
- } else {
- hdd_ipa->stats.num_tx_bcmc++;
+ if (!WLANTL_disable_intrabss_fwd(iface_context->tl_context))
+ {
+ /*
+ * When INTRA_BSS_FWD_OFFLOAD is enabled, FW will send
+ * all Rx packets to IPA uC, which need to be forwarded
+ * to other interface.
+ * And, since only IP packets are forwarded through IPA
+ * Ethernet Bridging, non-IP exception packets should be
+ * forwarded to Tx here.
+ */
+ eth = (struct ethhdr *)skb->data;
+ if (eth->h_proto != be16_to_cpu(ETH_P_IP)) {
+ copy = adf_nbuf_copy(skb);
+ if (copy) {
+ ret = hdd_softap_hard_start_xmit(
+ (struct sk_buff *)copy,
+ adapter->dev);
+ if (ret) {
+ HDD_IPA_LOG(
+ VOS_TRACE_LEVEL_DEBUG,
+ "Forward packet Tx fail"
+ );
+ hdd_ipa->stats.
+ num_tx_bcmc_err++;
+ } else {
+ hdd_ipa->stats.num_tx_bcmc++;
+ }
}
}
}
+ else
+ {
+ HDD_IPA_LOG(VOS_TRACE_LEVEL_INFO_HIGH,
+ "Intra-BSS FWD is disabled-skip forward to Tx");
+ }
#endif
hdd_ipa_send_skb_to_network(skb, adapter);
diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h
index 89363e82a16a..48fd5a14e2ca 100644
--- a/CORE/MAC/inc/qwlan_version.h
+++ b/CORE/MAC/inc/qwlan_version.h
@@ -42,9 +42,9 @@ BRIEF DESCRIPTION:
#define QWLAN_VERSION_MINOR 0
#define QWLAN_VERSION_PATCH 10
#define QWLAN_VERSION_EXTRA ""
-#define QWLAN_VERSION_BUILD 37
+#define QWLAN_VERSION_BUILD 38
-#define QWLAN_VERSIONSTR "4.0.10.37"
+#define QWLAN_VERSIONSTR "4.0.10.38"
#define AR6320_REV1_VERSION 0x5000000
diff --git a/CORE/SAP/src/sapFsm.c b/CORE/SAP/src/sapFsm.c
index 9b17a4439bd6..d833e302967b 100644
--- a/CORE/SAP/src/sapFsm.c
+++ b/CORE/SAP/src/sapFsm.c
@@ -4042,11 +4042,9 @@ sapSortMacList(v_MACADDR_t *macList, v_U8_t size)
v_MACADDR_t temp;
v_SINT_t nRes = -1;
- if ((NULL == macList) || (size >= MAX_ACL_MAC_ADDRESS))
- {
- VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH,
- "In %s, either buffer is NULL or size = %d is more."
- , __func__, size);
+ if ((NULL == macList) || (size > MAX_ACL_MAC_ADDRESS)) {
+ VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH,
+ FL("either buffer is NULL or size = %d is more."), size);
return;
}
@@ -4072,6 +4070,13 @@ sapSearchMacList(v_MACADDR_t *macList, v_U8_t num_mac, v_U8_t *peerMac, v_U8_t *
v_S7_t nStart = 0, nEnd, nMiddle;
nEnd = num_mac - 1;
+ if ((NULL == macList) || (num_mac > MAX_ACL_MAC_ADDRESS)) {
+ VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH,
+ FL("either buffer is NULL or size = %d is more."),
+ num_mac);
+ return eSAP_FALSE;
+ }
+
while (nStart <= nEnd)
{
nMiddle = (nStart + nEnd) / 2;
@@ -4107,6 +4112,14 @@ sapAddMacToACL(v_MACADDR_t *macList, v_U8_t *size, v_U8_t *peerMac)
{
v_SINT_t nRes = -1;
int i;
+
+ if (NULL == macList || *size == 0 || *size > MAX_ACL_MAC_ADDRESS) {
+ VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH,
+ FL("either buffer is NULL or size = %d is incorrect."),
+ *size);
+ return;
+ }
+
VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH,"add acl entered");
for (i=((*size)-1); i>=0; i--)
{
@@ -4136,11 +4149,10 @@ sapRemoveMacFromACL(v_MACADDR_t *macList, v_U8_t *size, v_U8_t index)
/* return if the list passed is empty. Ideally this should never happen since this funcn is always
called after sapSearchMacList to get the index of the mac addr to be removed and this will
only get called if the search is successful. Still no harm in having the check */
- if ((NULL == macList) || (*size == 0) || (*size > MAX_ACL_MAC_ADDRESS))
- {
- VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH,
- "In %s, either buffer is NULL or size %d is incorrect.",
- __func__, *size);
+ if ((NULL == macList) || (*size == 0) || (*size > MAX_ACL_MAC_ADDRESS)) {
+ VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH,
+ FL("either buffer is NULL or size = %d is incorrect"),
+ *size);
return;
}
diff --git a/CORE/SERVICES/COMMON/adf/adf_os_mem.h b/CORE/SERVICES/COMMON/adf/adf_os_mem.h
index 672036240303..5bd278be4a99 100644
--- a/CORE/SERVICES/COMMON/adf/adf_os_mem.h
+++ b/CORE/SERVICES/COMMON/adf/adf_os_mem.h
@@ -199,20 +199,6 @@ adf_os_str_cmp(const char *str1, const char *str2)
{
return __adf_os_str_cmp(str1, str2);
}
-/**
- * @brief Copy from one string to another
- *
- * @param[in] dest destination string
- * @param[in] src source string
- * @param[in] bytes limit of num bytes to copy
- *
- * @return 0 returns the initial value of dest
- */
-static inline char *
-adf_os_str_ncopy(char *dest, const char *src, a_uint32_t bytes)
-{
- return __adf_os_str_ncopy(dest, src, bytes);
-}
/**
* @brief Returns the length of a string
diff --git a/CORE/SERVICES/COMMON/adf/linux/adf_os_mem_pvt.h b/CORE/SERVICES/COMMON/adf/linux/adf_os_mem_pvt.h
index 86e917bbe7fb..19b9b80eec6b 100644
--- a/CORE/SERVICES/COMMON/adf/linux/adf_os_mem_pvt.h
+++ b/CORE/SERVICES/COMMON/adf/linux/adf_os_mem_pvt.h
@@ -177,21 +177,6 @@ __adf_os_str_cmp(const char *str1, const char *str2)
}
/**
- * @brief Copy from one string to another
- *
- * @param[in] dest destination string
- * @param[in] src source string
- * @param[in] bytes limit of num bytes to copy
- *
- * @retval 0 returns the initial value of dest
- */
-static inline char *
-__adf_os_str_ncopy(char *dest, const char *src, a_uint32_t bytes)
-{
- return strncpy(dest, src, bytes);
-}
-
-/**
* @brief Returns the length of a string
*
* @param[in] str input string
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 001f75ce7c2d..985fea0596d0 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -22450,10 +22450,12 @@ VOS_STATUS wma_ipa_offload_enable_disable(tp_wma_handle wma,
{
wmi_ipa_offload_enable_disable_cmd_fixed_param *cmd;
wmi_buf_t wmi_buf;
- uint32_t len;
+ uint32_t len;
u_int8_t *buf_ptr;
#ifdef INTRA_BSS_FWD_OFFLOAD
ol_txrx_vdev_handle vdev;
+ struct txrx_pdev_cfg_t *cfg;
+ int32_t intra_bss_fwd = 0;
#endif
if (!wma || !wma->wmi_handle) {
@@ -22507,17 +22509,25 @@ VOS_STATUS wma_ipa_offload_enable_disable(tp_wma_handle wma,
}
#ifdef INTRA_BSS_FWD_OFFLOAD
- /* Check if VDEV is already deleted. If deleted dont
+ /* Check if VDEV is already deleted. If deleted, don't
* send INTRA BSS FWD WMI command
*/
vdev = wma_find_vdev_by_id(wma, ipa_offload->vdev_id);
if (!vdev)
return VOS_STATUS_SUCCESS;
+ /* Disable Intra-BSS FWD offload when gDisableIntraBssFwd=1 in INI */
+ cfg = (struct txrx_pdev_cfg_t *)vdev->pdev->ctrl_pdev;
+ if (!ipa_offload->enable || cfg->rx_fwd_disabled) {
+ WMA_LOGE("%s: ipa_offload->enable=%d, rx_fwd_disabled=%d",
+ __func__, ipa_offload->enable, cfg->rx_fwd_disabled);
+ intra_bss_fwd = 1;
+ }
+
/* Disable/enable WMI_VDEV_PARAM_INTRA_BSS_FWD */
if (wmi_unified_vdev_set_param_send(wma->wmi_handle,
ipa_offload->vdev_id, WMI_VDEV_PARAM_INTRA_BSS_FWD,
- ipa_offload->enable ? 0 : 1)) {
+ intra_bss_fwd)) {
WMA_LOGE("Failed to disable WMI_VDEV_PARAM_INTRA_BSS_FWD");
return VOS_STATUS_E_FAILURE;
}
diff --git a/CORE/TL/inc/wlan_qct_tl.h b/CORE/TL/inc/wlan_qct_tl.h
index ef533516ad23..1cf7d8694c59 100644
--- a/CORE/TL/inc/wlan_qct_tl.h
+++ b/CORE/TL/inc/wlan_qct_tl.h
@@ -2936,6 +2936,24 @@ void WLANTL_SetUcActive(void *vos_ctx,
==============================================================================*/
void WLANTL_RegisterOPCbFnc(void *vos_ctx,
void (*func)(v_U8_t *op_msg, void *usr_ctxt), void *usr_ctxt);
+
+/*=============================================================================
+ FUNCTION WLANTL_disable_intrabss_fwd
+
+ DESCRIPTION
+ Function to return if Intra-BSS FWD is disabled or not
+
+ PARAMETERS
+ IN
+ vdev : vdev handle
+
+ RETURN VALUE
+ bool : TRUE if Intra-BSS FWD is disabled, FALSE if not
+
+ SIDE EFFECTS
+
+==============================================================================*/
+bool WLANTL_disable_intrabss_fwd(void *vdev);
#endif /* IPA_UC_OFFLOAD */
/*=============================================================================