From 865c83d06f0a18d913bdaeb4bf47bbe80333d69d Mon Sep 17 00:00:00 2001 From: Manikandan Mohan Date: Wed, 29 Oct 2014 11:03:11 -0700 Subject: qcacld SAP: Ignore DFS ch from ACS if DFS disabled DFS Master capability can be disabled using gEnableDFSMasterCap ini parameters. So when this parameter is disabled ACS algorithm still considered DFS channels. Fixed this bug. Change-Id: I124febf34b21846b091d00003362185cc23dc37a CRs-fixed: 747720 --- CORE/SAP/src/sapChSelect.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/CORE/SAP/src/sapChSelect.c b/CORE/SAP/src/sapChSelect.c index 7ab4756b1f80..021b709e4d79 100644 --- a/CORE/SAP/src/sapChSelect.c +++ b/CORE/SAP/src/sapChSelect.c @@ -609,6 +609,8 @@ v_BOOL_t sapChanSelInit(tHalHandle halHandle, #ifdef FEATURE_WLAN_CH_AVOID v_U16_t i; #endif + v_U32_t dfs_master_cap_enabled; + v_BOOL_t include_dfs_ch = VOS_TRUE; VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH, "In %s", __func__); @@ -629,6 +631,14 @@ v_BOOL_t sapChanSelInit(tHalHandle halHandle, pSpectInfoParams->pSpectCh = pSpectCh; pChans = pMac->scan.base20MHzChannels.channelList; +#if defined(FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE) || defined(WLAN_FEATURE_MBSSID) + if (pSapCtx->dfs_ch_disable == VOS_TRUE) + include_dfs_ch = VOS_FALSE; +#endif + ccmCfgGetInt(halHandle, WNI_CFG_DFS_MASTER_ENABLED, + &dfs_master_cap_enabled); + if (dfs_master_cap_enabled == 0) + include_dfs_ch = VOS_FALSE; // Fill the channel number in the spectrum in the operating freq band for (channelnum = 0; @@ -646,8 +656,7 @@ v_BOOL_t sapChanSelInit(tHalHandle halHandle, continue; } -#if defined(FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE) || defined(WLAN_FEATURE_MBSSID) - if (pSapCtx->dfs_ch_disable == VOS_TRUE) { + if (include_dfs_ch == VOS_FALSE) { if (VOS_IS_DFS_CH(*pChans)) { chSafe = VOS_FALSE; VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH, @@ -656,7 +665,7 @@ v_BOOL_t sapChanSelInit(tHalHandle halHandle, continue; } } -#endif + #ifdef FEATURE_WLAN_CH_AVOID for(i = 0; i < NUM_20MHZ_RF_CHANNELS; i++) { if((safeChannels[i].channelNumber == *pChans) && -- cgit v1.2.3 From 34b85207bdb1075f58b787a01d9a89d95c7550bc Mon Sep 17 00:00:00 2001 From: Randy Chiu Date: Tue, 7 Oct 2014 11:21:41 +0800 Subject: qcacld: Update default DSCP to UP mapping The current default DSCP to UP mapping table does not map some DSCP values in a manner that is expected by certain applications. Change the default mapping to always use the precedence bits as the user priority since this mapping is aligned with those applications. Change-Id: Ida4ef4df69095a5b04a90b4c298a8ad79ca665d3 CRs-Fixed: 734866 --- CORE/HDD/src/wlan_hdd_wmm.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/CORE/HDD/src/wlan_hdd_wmm.c b/CORE/HDD/src/wlan_hdd_wmm.c index 3db29261a70f..a43b3a30d7b7 100644 --- a/CORE/HDD/src/wlan_hdd_wmm.c +++ b/CORE/HDD/src/wlan_hdd_wmm.c @@ -1468,18 +1468,13 @@ VOS_STATUS hdd_wmm_init ( hdd_adapter_t *pAdapter ) VOS_TRACE(VOS_MODULE_ID_HDD, WMM_TRACE_LEVEL_INFO_LOW, "%s: Entered", __func__); - // DSCP to User Priority Lookup Table - for (dscp = 0; dscp <= WLAN_HDD_MAX_DSCP; dscp++) - { - hddWmmDscpToUpMap[dscp] = SME_QOS_WMM_UP_BE; + /* + * DSCP to User Priority Lookup Table + * By default use the 3 Precedence bits of DSCP as the User Priority + */ + for (dscp = 0; dscp <= WLAN_HDD_MAX_DSCP; dscp++) { + hddWmmDscpToUpMap[dscp] = dscp >> 3; } - hddWmmDscpToUpMap[8] = SME_QOS_WMM_UP_BK; - hddWmmDscpToUpMap[16] = SME_QOS_WMM_UP_RESV; - hddWmmDscpToUpMap[24] = SME_QOS_WMM_UP_EE; - hddWmmDscpToUpMap[32] = SME_QOS_WMM_UP_CL; - hddWmmDscpToUpMap[40] = SME_QOS_WMM_UP_VI; - hddWmmDscpToUpMap[48] = SME_QOS_WMM_UP_VO; - hddWmmDscpToUpMap[56] = SME_QOS_WMM_UP_NC; return VOS_STATUS_SUCCESS; } -- cgit v1.2.3 From f73c47b3a8efef5300955f5b579842dd57683d67 Mon Sep 17 00:00:00 2001 From: Dhanashri Atre Date: Tue, 4 Nov 2014 13:29:21 -0800 Subject: wlan: qca-cld: MIC Error Fix Fix to handle the MIC error indication from the firmware. Change-Id: Iadeb9c42d926cbf73ca970464699ef6de37ad293 CRs-Fixed: 749983 --- CORE/CLD_TXRX/HTT/htt_rx.c | 50 +++++++++++++++++++++++++++++++++++- CORE/CLD_TXRX/TXRX/ol_rx.c | 32 +++++++++++++++++++++++ CORE/CLD_TXRX/TXRX/ol_rx.h | 8 ++++++ CORE/SERVICES/COMMON/ol_htt_rx_api.h | 1 - CORE/SERVICES/COMMON/wal_rx_desc.h | 4 +-- 5 files changed, 91 insertions(+), 4 deletions(-) diff --git a/CORE/CLD_TXRX/HTT/htt_rx.c b/CORE/CLD_TXRX/HTT/htt_rx.c index ab8af1642749..4443d8321693 100644 --- a/CORE/CLD_TXRX/HTT/htt_rx.c +++ b/CORE/CLD_TXRX/HTT/htt_rx.c @@ -1294,7 +1294,7 @@ htt_rx_amsdu_rx_in_order_pop_ll( adf_nbuf_t *head_msdu, adf_nbuf_t *tail_msdu) { - adf_nbuf_t msdu, next; + adf_nbuf_t msdu, next, prev = NULL; u_int8_t *rx_ind_data; u_int32_t *msg_word; unsigned int msdu_count = 0; @@ -1316,6 +1316,7 @@ htt_rx_amsdu_rx_in_order_pop_ll( if (offload_ind) { ol_rx_offload_paddr_deliver_ind_handler(pdev, msdu_count, msg_word); + *head_msdu = *tail_msdu = NULL; return 0; } @@ -1325,6 +1326,7 @@ htt_rx_amsdu_rx_in_order_pop_ll( if (adf_os_unlikely(NULL == msdu)) { adf_os_print("%s: netbuf pop failed!\n", __FUNCTION__); + *tail_msdu = NULL; return 0; } @@ -1359,6 +1361,50 @@ htt_rx_amsdu_rx_in_order_pop_ll( msdu_count--; + if (adf_os_unlikely((*((u_int8_t *) &rx_desc->fw_desc.u.val)) & + FW_RX_DESC_MIC_ERR_M)) { + u_int8_t tid = + HTT_RX_IN_ORD_PADDR_IND_EXT_TID_GET(*(u_int32_t *)rx_ind_data); + u_int16_t peer_id = + HTT_RX_IN_ORD_PADDR_IND_PEER_ID_GET(*(u_int32_t *)rx_ind_data); + ol_rx_mic_error_handler(pdev->txrx_pdev, tid, peer_id, rx_desc, msdu); + + htt_rx_desc_frame_free(pdev, msdu); + + /* if this is the last msdu */ + if (!msdu_count) { + /* if this is the only msdu */ + if (!prev) { + *head_msdu = *tail_msdu = NULL; + return 0; + } else { + *tail_msdu = prev; + adf_nbuf_set_next(prev, NULL); + return 1; + } + } else { /* if this is not the last msdu */ + /* get the next msdu */ + msg_word += HTT_RX_IN_ORD_PADDR_IND_MSDU_DWORDS; + next = htt_rx_in_order_netbuf_pop(pdev, + HTT_RX_IN_ORD_PADDR_IND_PADDR_GET(*msg_word)); + if (adf_os_unlikely(NULL == next)) { + adf_os_print("%s: netbuf pop failed!\n", __FUNCTION__); + *tail_msdu = NULL; + return 0; + } + + /* if this is not the first msdu, update the next pointer of the + preceding msdu */ + if (prev) { + adf_nbuf_set_next(prev, next); + } else {/* if this is the first msdu, update the head pointer */ + *head_msdu = next; + } + msdu = next; + continue; + } + } + /* check if this is the last msdu */ if (msdu_count) { msg_word += HTT_RX_IN_ORD_PADDR_IND_MSDU_DWORDS; @@ -1366,9 +1412,11 @@ htt_rx_amsdu_rx_in_order_pop_ll( HTT_RX_IN_ORD_PADDR_IND_PADDR_GET(*msg_word)); if (adf_os_unlikely(NULL == next)) { adf_os_print("%s: netbuf pop failed!\n", __FUNCTION__); + *tail_msdu = NULL; return 0; } adf_nbuf_set_next(msdu, next); + prev = msdu; msdu = next; } else { diff --git a/CORE/CLD_TXRX/TXRX/ol_rx.c b/CORE/CLD_TXRX/TXRX/ol_rx.c index a88985056521..fe1fe504dccf 100644 --- a/CORE/CLD_TXRX/TXRX/ol_rx.c +++ b/CORE/CLD_TXRX/TXRX/ol_rx.c @@ -1166,6 +1166,38 @@ ol_rx_offload_paddr_deliver_ind_handler( } htt_rx_msdu_buff_replenish(htt_pdev); } + +void +ol_rx_mic_error_handler( + ol_txrx_pdev_handle pdev, + u_int8_t tid, + u_int16_t peer_id, + void * msdu_desc, + adf_nbuf_t msdu ) +{ + union htt_rx_pn_t pn = {0}; + u_int8_t key_id = 0; + + struct ol_txrx_peer_t *peer = NULL; + struct ol_txrx_vdev_t *vdev = NULL; + + if (pdev) { + peer = ol_txrx_peer_find_by_id(pdev, peer_id); + if (peer) { + vdev = peer->vdev; + if (vdev) { + htt_rx_mpdu_desc_pn(vdev->pdev->htt_pdev, msdu_desc, &pn, 48); + + if (htt_rx_msdu_desc_key_id(vdev->pdev->htt_pdev, msdu_desc, &key_id) + == A_TRUE) { + ol_rx_err(vdev->pdev->ctrl_pdev, vdev->vdev_id, + peer->mac_addr.raw, tid, 0, + OL_RX_ERR_TKIP_MIC, msdu, &pn.pn48, key_id); + } + } + } + } +} #if 0 /** * @brief populates vow ext stats in given network buffer. diff --git a/CORE/CLD_TXRX/TXRX/ol_rx.h b/CORE/CLD_TXRX/TXRX/ol_rx.h index bed29eb0c56e..db4a0fabf3f3 100644 --- a/CORE/CLD_TXRX/TXRX/ol_rx.h +++ b/CORE/CLD_TXRX/TXRX/ol_rx.h @@ -69,4 +69,12 @@ ol_rx_offload_paddr_deliver_ind_handler( u_int32_t msdu_count, u_int32_t * msg_word ); +void +ol_rx_mic_error_handler( + ol_txrx_pdev_handle pdev, + u_int8_t tid, + u_int16_t peer_id, + void * msdu_desc, + adf_nbuf_t msdu ); + #endif /* _OL_RX__H_ */ diff --git a/CORE/SERVICES/COMMON/ol_htt_rx_api.h b/CORE/SERVICES/COMMON/ol_htt_rx_api.h index f0983c277ad0..f9a325a9cc7c 100644 --- a/CORE/SERVICES/COMMON/ol_htt_rx_api.h +++ b/CORE/SERVICES/COMMON/ol_htt_rx_api.h @@ -506,7 +506,6 @@ htt_rx_msdu_forward(htt_pdev_handle pdev, void *msdu_desc); int htt_rx_msdu_inspect(htt_pdev_handle pdev, void *msdu_desc); - /** * @brief Provide all action specifications for a rx MSDU * @details diff --git a/CORE/SERVICES/COMMON/wal_rx_desc.h b/CORE/SERVICES/COMMON/wal_rx_desc.h index ecdca1181828..d35120c7da69 100644 --- a/CORE/SERVICES/COMMON/wal_rx_desc.h +++ b/CORE/SERVICES/COMMON/wal_rx_desc.h @@ -90,8 +90,8 @@ struct fw_rx_desc_base { #define FW_RX_DESC_DISCARD_S 0 #define FW_RX_DESC_FORWARD_M 0x2 #define FW_RX_DESC_FORWARD_S 1 -#define FW_RX_DESC_ANY_ERR_M 0x4 -#define FW_RX_DESC_ANY_ERR_S 2 +#define FW_RX_DESC_MIC_ERR_M 0x4 +#define FW_RX_DESC_MIC_ERR_S 2 #define FW_RX_DESC_DUP_ERR_M 0x8 #define FW_RX_DESC_DUP_ERR_S 3 #define FW_RX_DESC_INSPECT_M 0x20 -- cgit v1.2.3 From 7246fede1c8365bfa57e9511c79568258c7de476 Mon Sep 17 00:00:00 2001 From: AnjaneeDevi Kapparapu Date: Wed, 5 Nov 2014 14:44:00 +0530 Subject: wlan: handle the MIRACAST command in GO mode. In the current implementation MIRACAST command is not handled in the hdd_hostapd_ioctl. So the changes for optimizing the dwell time during miracast session are not taking affect in GO mode. Changes to handle the MIRACAST command in GO mode. Change-Id: I1fe97d33d8b586d8ed053f1e0250f30cd3d77750 CRs-Fixed: 746067 --- CORE/HDD/inc/wlan_hdd_main.h | 1 + CORE/HDD/src/wlan_hdd_hostapd.c | 6 +++- CORE/HDD/src/wlan_hdd_main.c | 69 ++++++++++++++++++++++++----------------- 3 files changed, 47 insertions(+), 29 deletions(-) diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h index 9a26862b1543..2af68af189f7 100644 --- a/CORE/HDD/inc/wlan_hdd_main.h +++ b/CORE/HDD/inc/wlan_hdd_main.h @@ -1715,4 +1715,5 @@ void hdd_update_macaddr(hdd_config_t *cfg_ini, v_MACADDR_t hw_macaddr); void wlan_hdd_disable_roaming(hdd_adapter_t *pAdapter); void wlan_hdd_enable_roaming(hdd_adapter_t *pAdapter); #endif +int hdd_set_miracast_mode(hdd_adapter_t *pAdapter, tANI_U8 *command); #endif // end #if !defined( WLAN_HDD_MAIN_H ) diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c index 9d7bd519c2a5..f4aaf180dbfa 100644 --- a/CORE/HDD/src/wlan_hdd_hostapd.c +++ b/CORE/HDD/src/wlan_hdd_hostapd.c @@ -410,7 +410,11 @@ static int hdd_hostapd_driver_command(hdd_adapter_t *pAdapter, ret = sapSetPreferredChannel(command); #endif } - + else if (strncmp(command, "MIRACAST", 8) == 0) + { + hddLog(VOS_TRACE_LEVEL_INFO, "%s: Received MIRACAST command", __func__); + ret = hdd_set_miracast_mode(pAdapter, command); + } exit: if (command) { diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index 1172b2b75748..959b3607d638 100755 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -3932,6 +3932,44 @@ static void hdd_wma_send_fastreassoc_cmd(int sessionId, tSirMacAddr bssid, } #endif +/** + * hdd_set_miracast_mode() - function used to set the miracast mode value + * @pAdapter: pointer to the adapter of the interface. + * @command: pointer to the command buffer "MIRACAST ". + * Return: 0 on success -EINVAL on failure. + */ +int hdd_set_miracast_mode(hdd_adapter_t *pAdapter, tANI_U8 *command) +{ + tHalHandle hHal = WLAN_HDD_GET_CTX(pAdapter)->hHal; + tpAniSirGlobal pMac = PMAC_STRUCT(hHal); + tANI_U8 filterType = 0; + tANI_U8 *value; + int ret; + + value = command + 9; + + /* Convert the value from ascii to integer */ + ret = kstrtou8(value, 10, &filterType); + if (ret < 0) { + /* If the input value is greater than max value of datatype, + * then also kstrtou8 fails + */ + hddLog(VOS_TRACE_LEVEL_ERROR, "%s: kstrtou8 failed range", __func__); + return -EINVAL; + } + + /* Filtertype value should be either 0-Disabled, 1-Source, 2-sink */ + if ((filterType < WLAN_HDD_DRIVER_MIRACAST_CFG_MIN_VAL ) || + (filterType > WLAN_HDD_DRIVER_MIRACAST_CFG_MAX_VAL)) { + hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Accepted Values are 0 to 2." + "0-Disabled, 1-Source, 2-Sink", __func__); + return -EINVAL; + } + hddLog(VOS_TRACE_LEVEL_INFO, "%s: miracast mode %hu", __func__, filterType); + pMac->fMiracastSessionPresent = filterType; + return 0; +} + static int hdd_driver_command(hdd_adapter_t *pAdapter, hdd_priv_data_t *ppriv_data) { @@ -5528,35 +5566,10 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter, } else if ( strncasecmp(command, "MIRACAST", 8) == 0 ) { - tHalHandle hHal = WLAN_HDD_GET_CTX(pAdapter)->hHal; - tpAniSirGlobal pMac = PMAC_STRUCT(hHal); - tANI_U8 filterType = 0; - tANI_U8 *value; - value = command + 9; + VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, + "%s: Received MIRACAST command", __func__); - /* Convert the value from ascii to integer */ - ret = kstrtou8(value, 10, &filterType); - if (ret < 0) - { - /* If the input value is greater than max value of datatype, - * then also kstrtou8 fails - */ - VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, - "%s: kstrtou8 failed range ", __func__); - ret = -EINVAL; - goto exit; - } - if ((filterType < WLAN_HDD_DRIVER_MIRACAST_CFG_MIN_VAL ) || - (filterType > WLAN_HDD_DRIVER_MIRACAST_CFG_MAX_VAL)) - { - VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, - "%s: Accepted Values are 0 to 2. 0-Disabled, 1-Source," - " 2-Sink ", __func__); - ret = -EINVAL; - goto exit; - } - //Filtertype value should be either 0-Disabled, 1-Source, 2-sink - pMac->fMiracastSessionPresent = filterType; + ret = hdd_set_miracast_mode(pAdapter, command); } else if (strncmp(command, "SETRMCTXRATE", 12) == 0) { -- cgit v1.2.3 From 5235cf97475998d44721d05113cf174dfc4859ec Mon Sep 17 00:00:00 2001 From: AnjaneeDevi Kapparapu Date: Wed, 5 Nov 2014 14:45:07 +0530 Subject: Cafstaging Release 1.0.0.227 Cafstaging Release 1.0.0.227 Change-Id: I7395f53d61015ddb9b65edc71eafebb87f2c2cc8 CRs-Fixed: 688141 --- CORE/MAC/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h index a999058cbb8f..604ff745a8c6 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 0 #define QWLAN_VERSION_EXTRA "" -#define QWLAN_VERSION_BUILD 226 +#define QWLAN_VERSION_BUILD 227 -#define QWLAN_VERSIONSTR "1.0.0.226" +#define QWLAN_VERSIONSTR "1.0.0.227" #define AR6320_REV1_VERSION 0x5000000 -- cgit v1.2.3