diff options
| author | Vignesh Viswanathan <viswanat@codeaurora.org> | 2018-06-18 18:11:18 +0530 |
|---|---|---|
| committer | nshrivas <nshrivas@codeaurora.org> | 2018-07-23 07:45:45 -0700 |
| commit | 68694049bae7178e20be8ded2cc2385e97e4f23e (patch) | |
| tree | b04c66b846b4ad7544573cbfe90727e9c3d8bc9c | |
| parent | df1f79560b4403bd1222a71490a821941e103de9 (diff) | |
qcacld-3.0: Add support for 1x1 connect with 1 Tx/Rx Chain action OUI
Add support for new 1x1 connect with 1 Tx/Rx Chain action OUI to be
parsed and sent to the FW. From host during connection, the behaviour
is same as existing connect 1x1 action OUI where nss is sent to 1 to
the FW, but the FW takes the decision to use only one Tx/Rx chain
based on the OUIs defined in the new action ID.
Change-Id: Ia464209043dc73bcc71577c43b28fbe13e780c23
CRs-Fixed: 2264326
| -rw-r--r-- | core/hdd/inc/wlan_hdd_cfg.h | 45 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg.c | 53 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_api_roam.c | 48 |
3 files changed, 131 insertions, 15 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 1cc4dbc5c898..dd1feea24a02 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -12570,6 +12570,50 @@ enum hw_filter_mode { #define CFG_ACTION_OUI_SWITCH_TO_11N_MODE_NAME "gActionOUISwitchTo11nMode" #define CFG_ACTION_OUI_SWITCH_TO_11N_MODE_DEFAULT "00904C 03 FFFFBF 20 21 40" +/* + * <ini> + * gActionOUIConnect1x1with1TxRxChain - Used to specify action OUIs for + * 1x1 connection with one Tx/Rx Chain + * @Default: + * Note: User should strictly add new action OUIs at the end of this + * default value. + * + * Default OUIs: (All values in Hex) + * OUI 1 : 001018 + * OUI data Len : 06 + * OUI Data : 02FFF0040000 + * OUI data Mask: BC - 10111100 + * Info Mask : 21 - Check for Band + * Capabilities: 40 - Band == 2G + * + * OUI 2 : 001018 + * OUI data Len : 06 + * OUI Data : 02FFF0050000 + * OUI data Mask: BC - 10111100 + * Info Mask : 21 - Check for Band + * Capabilities: 40 - Band == 2G + * + * OUI 3 : 001018 + * OUI data Len : 06 + * OUI Data : 02FFF4050000 + * OUI data Mask: BC - 10111100 + * Info Mask : 21 - Check for Band + * Capabilities: 40 - Band == 2G + * + * This ini is used to specify the AP OUIs with which only 1x1 connection + * with one Tx/Rx Chain is allowed. + * + * Related: gEnableActionOUI + * + * Supported Feature: Action OUIs + * + * Usage: External + * + * </ini> + */ +#define CFG_ACTION_OUI_CONNECT_1X1_WITH_1_CHAIN_NAME "gActionOUIConnect1x1with1TxRxChain" +#define CFG_ACTION_OUI_CONNECT_1X1_WITH_1_CHAIN_DEFAULT "001018 06 02FFF0040000 BC 21 40 001018 06 02FFF0050000 BC 21 40 001018 06 02FFF4050000 BC 21 40" + /* End of action oui inis */ /* @@ -15761,6 +15805,7 @@ struct hdd_config { uint8_t action_oui_cckm_1x1[MAX_ACTION_OUI_STRING_LEN]; uint8_t action_oui_ito_alternate[MAX_ACTION_OUI_STRING_LEN]; uint8_t action_oui_switch_to_11n[MAX_ACTION_OUI_STRING_LEN]; + uint8_t action_oui_connect_1x1_with_1_chain[MAX_ACTION_OUI_STRING_LEN]; uint8_t rssi_weightage; uint8_t ht_caps_weightage; uint8_t vht_caps_weightage; diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 10063d20c45c..1ecf923053fc 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -5073,6 +5073,12 @@ struct reg_table_entry g_registry_table[] = { VAR_FLAGS_OPTIONAL, (void *)CFG_ACTION_OUI_SWITCH_TO_11N_MODE_DEFAULT), + REG_VARIABLE_STRING(CFG_ACTION_OUI_CONNECT_1X1_WITH_1_CHAIN_NAME, + WLAN_PARAM_String, + struct hdd_config, action_oui_connect_1x1_with_1_chain, + VAR_FLAGS_OPTIONAL, + (void *)CFG_ACTION_OUI_CONNECT_1X1_WITH_1_CHAIN_DEFAULT), + REG_VARIABLE(CFG_DTIM_1CHRX_ENABLE_NAME, WLAN_PARAM_Integer, struct hdd_config, enable_dtim_1chrx, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -6606,6 +6612,46 @@ static void hdd_cfg_print_mws_coex(hdd_context_t *hdd_ctx) #endif /** + * hdd_cfg_print_action_oui() - print the action OUI configurations + * @hdd_ctx: pointer to the HDD context + * + * Return: None + */ +static void hdd_cfg_print_action_oui(hdd_context_t *hdd_ctx) +{ + struct hdd_config *config = hdd_ctx->config; + + hdd_debug("Name = [%s] value = [%u]", + CFG_ENABLE_ACTION_OUI, + config->enable_action_oui); + + hdd_debug("Name = [%s] value = [%s]", + CFG_ACTION_OUI_CONNECT_1X1_NAME, + config->action_oui_connect_1x1); + + hdd_debug("Name = [%s] value = [%s]", + CFG_ACTION_OUI_ITO_EXTENSION_NAME, + config->action_oui_ito_extension); + + hdd_debug("Name = [%s] value = [%s]", + CFG_ACTION_OUI_CCKM_1X1_NAME, + config->action_oui_cckm_1x1); + + hdd_debug("Name = [%s] value = [%s]", + CFG_ACTION_OUI_ITO_ALTERNATE_NAME, + config->action_oui_ito_alternate); + + hdd_debug("Name = [%s] value = [%s]", + CFG_ACTION_OUI_SWITCH_TO_11N_MODE_NAME, + config->action_oui_switch_to_11n); + + hdd_debug("Name = [%s] value = [%s]", + CFG_ACTION_OUI_CONNECT_1X1_WITH_1_CHAIN_NAME, + config->action_oui_connect_1x1_with_1_chain); + +} + +/** * hdd_cfg_print() - print the hdd configuration * @iniTable: pointer to hdd context * @@ -7571,6 +7617,8 @@ void hdd_cfg_print(hdd_context_t *pHddCtx) CFG_ROAM_FORCE_RSSI_TRIGGER_NAME, pHddCtx->config->roam_force_rssi_trigger); hdd_cfg_print_mws_coex(pHddCtx); + + hdd_cfg_print_action_oui(pHddCtx); } /** @@ -9576,6 +9624,11 @@ void hdd_set_all_sme_action_ouis(hdd_context_t *hdd_ctx) hdd_set_sme_action_oui(hdd_ctx, ini_string, WMI_ACTION_OUI_SWITCH_TO_11N_MODE); + ini_string = config->action_oui_connect_1x1_with_1_chain; + ini_string[MAX_ACTION_OUI_STRING_LEN - 1] = '\0'; + hdd_set_sme_action_oui(hdd_ctx, ini_string, + WMI_ACTION_OUI_CONNECT_1x1_WITH_1_CHAIN); + } /* End of action oui functions */ diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index ba4cb0919db9..b8cdc3fe0f8d 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -15569,7 +15569,7 @@ void csr_dump_vendor_ies(uint8_t *ie, uint16_t ie_len) return; } if (elem_id == SIR_MAC_EID_VENDOR) { - pe_debug("Dumping Vendor IE of len %d", elem_len); + sme_debug("Dumping Vendor IE of len %d", elem_len); QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG, &ptr[2], elem_len); @@ -15613,18 +15613,20 @@ csr_check_vendor_ap_present(tpAniSirGlobal mac_ctx, uint8_t *ie_fields = (uint8_t *)bss_desc->ieFields; if (action_id >= WMI_ACTION_OUI_MAXIMUM_ID) { - pe_debug("Invalid OUI action ID"); + sme_debug("Invalid OUI action ID"); return false; } + sme_debug("Action ID : %d", action_id); + if (!mac_ctx->oui_info) { - pe_debug("action oui support is disabled or oui info is empty"); + sme_debug("action oui support is disabled or oui info is empty"); return false; } sme_action = mac_ctx->oui_info->action_oui[action_id]; if (!sme_action) { - pe_debug("action oui for id %d is empty", action_id); + sme_debug("action oui for id %d is empty", action_id); return false; } @@ -15633,12 +15635,10 @@ csr_check_vendor_ap_present(tpAniSirGlobal mac_ctx, qdf_mutex_acquire(&sme_action->oui_ext_list_lock); if (qdf_list_empty(oui_ext_list)) { qdf_mutex_release(&sme_action->oui_ext_list_lock); - pe_debug("OUI List Empty"); + sme_debug("OUI List Empty"); return false; } - csr_dump_vendor_ies((uint8_t *)ie_fields, ie_len); - qdf_list_peek_front(oui_ext_list, &node); while (node) { sme_ext = qdf_container_of(node, @@ -15656,7 +15656,7 @@ csr_check_vendor_ap_present(tpAniSirGlobal mac_ctx, (uint8_t *)ie_fields, ie_len); if (!oui_ptr) { - pe_debug("No matching IE found for OUI"); + sme_debug("No matching IE found for OUI"); QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG, extension->oui, @@ -15664,7 +15664,7 @@ csr_check_vendor_ap_present(tpAniSirGlobal mac_ctx, goto next; } - pe_debug("IE found for OUI"); + sme_debug("IE found for OUI"); QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG, extension->oui, @@ -15672,24 +15672,24 @@ csr_check_vendor_ap_present(tpAniSirGlobal mac_ctx, if (extension->data_length && !csr_check_for_vendor_oui_data(extension, oui_ptr)) { - pe_debug("Vendor IE Data mismatch"); + sme_debug("Vendor IE Data mismatch"); goto next; } if ((extension->info_mask & WMI_ACTION_OUI_INFO_MAC_ADDRESS) && !csr_check_for_vendor_ap_mac(extension, bss_desc->bssId)) { - pe_debug("Vendor IE MAC Mismatch"); + sme_debug("Vendor IE MAC Mismatch"); goto next; } if (!csr_check_for_vendor_ap_capabilities(extension, ie, bss_desc, dot11_mode)) { - pe_debug("Vendor IE capabilties mismatch"); + sme_debug("Vendor IE capabilties mismatch"); goto next; } - pe_debug("Vendor AP found for OUI"); + sme_debug("Vendor AP found for OUI"); QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG, extension->oui, extension->oui_length); qdf_mutex_release(&sme_action->oui_ext_list_lock); @@ -15731,7 +15731,7 @@ csr_check_vendor_ap_3_present(tpAniSirGlobal mac_ctx, uint8_t *ie, SIR_MAC_VENDOR_AP_3_OUI_LEN, ie, ie_len)) && (cfg_get_vendor_ie_ptr_from_oui(mac_ctx, SIR_MAC_VENDOR_AP_4_OUI, SIR_MAC_VENDOR_AP_4_OUI_LEN, ie, ie_len))) { - pe_debug("Vendor OUI 3 and Vendor OUI 4 found"); + sme_debug("Vendor OUI 3 and Vendor OUI 4 found"); ret = false; } @@ -15899,6 +15899,9 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, pSession->supported_nss_1x1 = true; ieLen = csr_get_ielen_from_bss_description(pBssDescription); + csr_dump_vendor_ies((uint8_t *)pBssDescription->ieFields, + ieLen); + is_vendor_ap_present = csr_check_vendor_ap_present( pMac, pBssDescription, ucDot11Mode, pIes, ieLen, @@ -15909,6 +15912,21 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, pMac, (uint8_t *)pIes, ieLen); } + /* + * For WMI_ACTION_OUI_CONNECT_1x1_WITH_1_CHAIN, the host + * sends the NSS as 1 to the FW and the FW then decides + * after receiving the first beacon after connection to + * switch to 1 Tx/Rx Chain. + */ + if (!is_vendor_ap_present) { + is_vendor_ap_present = csr_check_vendor_ap_present( + pMac, pBssDescription, + ucDot11Mode, pIes, ieLen, + WMI_ACTION_OUI_CONNECT_1x1_WITH_1_CHAIN); + if (is_vendor_ap_present) + sme_debug("1x1 with 1 Chain AP"); + } + if (pMac->roam.configParam.is_force_1x1 && pMac->lteCoexAntShare && is_vendor_ap_present) { @@ -15928,7 +15946,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, ucDot11Mode, pIes, ieLen, WMI_ACTION_OUI_CCKM_1X1); if (is_vendor_ap_present) { - pe_debug("vdev: %d WMI_VDEV_PARAM_ABG_MODE_TX_CHAIN_NUM 1", + sme_debug("vdev: %d WMI_VDEV_PARAM_ABG_MODE_TX_CHAIN_NUM 1", pSession->sessionId); wma_cli_set_command( pSession->sessionId, |
