diff options
| author | Paul Zhang <paulz@codeaurora.org> | 2017-05-12 19:20:37 +0800 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2017-05-15 18:21:19 -0700 |
| commit | 9f1a8bf6081ee8e6f91bc70304dcda8d0eebc89c (patch) | |
| tree | eda911e8b3a0d9227a7c6779460ccd6a3c5f35c5 | |
| parent | 5d212598ed991b6804d632f756c027019e4bb926 (diff) | |
qcacld-3.0: Associate in 1x1 when connected to a certain Vendor AP
When connected to a certain Vendor AP that cannot handle SMPS frame, only
connect in 1x1.
Change-Id: Ieae25191df8340a582e81dc716b9a1aee6a71921
CRs-Fixed: 2047347
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 4 | ||||
| -rw-r--r-- | core/mac/inc/sir_mac_prot_def.h | 2 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_prop_exts_utils.c | 45 | ||||
| -rw-r--r-- | core/wma/src/wma_dev_if.c | 6 |
4 files changed, 54 insertions, 3 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 5bc02447c94e..82c54cf5750c 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9305,6 +9305,10 @@ int hdd_wlan_startup(struct device *dev) set_value, PDEV_CMD); } + if (hdd_ctx->config->is_force_1x1) + wma_cli_set_command(0, (int)WMI_PDEV_PARAM_SET_IOT_PATTERN, + 1, PDEV_CMD); + qdf_mc_timer_start(&hdd_ctx->iface_change_timer, hdd_ctx->config->iface_change_wait_time); diff --git a/core/mac/inc/sir_mac_prot_def.h b/core/mac/inc/sir_mac_prot_def.h index 5bdda968b41f..15675dcd3c15 100644 --- a/core/mac/inc/sir_mac_prot_def.h +++ b/core/mac/inc/sir_mac_prot_def.h @@ -611,6 +611,8 @@ #define BA_INITIATOR 2 #define BA_BOTH_DIRECTIONS 3 +#define SIR_MAC_VENDOR_AP_1_OUI "\x00\x0C\x43" +#define SIR_MAC_VENDOR_AP_1_OUI_LEN 3 /* / Status Code (present in Management response frames) enum */ typedef enum eSirMacStatusCodes { diff --git a/core/mac/src/pe/lim/lim_prop_exts_utils.c b/core/mac/src/pe/lim/lim_prop_exts_utils.c index d7501b9d9d92..79b1a7d700e5 100644 --- a/core/mac/src/pe/lim/lim_prop_exts_utils.c +++ b/core/mac/src/pe/lim/lim_prop_exts_utils.c @@ -110,6 +110,39 @@ static inline void get_ese_version_ie_probe_response(tpAniSirGlobal mac_ctx, #endif /** + * lim_get_nss_supported_by_beacon() - finds out nss from beacom + * @bcn: beacon structure pointer + * @session: pointer to pe session + * + * Return: number of nss advertised by beacon + */ +static uint8_t lim_get_nss_supported_by_beacon(tpSchBeaconStruct bcn, + tpPESession session) +{ + if (session->vhtCapability && bcn->VHTCaps.present) { + if ((bcn->VHTCaps.rxMCSMap & 0xC0) != 0xC0) + return 4; + + if ((bcn->VHTCaps.rxMCSMap & 0x30) != 0x30) + return 3; + + if ((bcn->VHTCaps.rxMCSMap & 0x0C) != 0x0C) + return 2; + } else if (session->htCapability && bcn->HTCaps.present) { + if (bcn->HTCaps.supportedMCSSet[3]) + return 4; + + if (bcn->HTCaps.supportedMCSSet[2]) + return 3; + + if (bcn->HTCaps.supportedMCSSet[1]) + return 2; + } + + return 1; +} + +/** * lim_extract_ap_capability() - extract AP's HCF/WME/WSM capability * @mac_ctx: Pointer to Global MAC structure * @p_ie: Pointer to starting IE in Beacon/Probe Response @@ -159,6 +192,18 @@ lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie, qdf_mem_free(beacon_struct); return; } + + if (mac_ctx->roam.configParam.is_force_1x1 && + cfg_get_vendor_ie_ptr_from_oui(mac_ctx, SIR_MAC_VENDOR_AP_1_OUI, + SIR_MAC_VENDOR_AP_1_OUI_LEN, p_ie, ie_len) && + lim_get_nss_supported_by_beacon(beacon_struct, session) == 2) { + session->supported_nss_1x1 = true; + session->vdev_nss = 1; + session->nss = 1; + pe_debug("For special ap, NSS: %d", session->nss); + } + + if (beacon_struct->wmeInfoPresent || beacon_struct->wmeEdcaPresent || beacon_struct->HTCaps.present) diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index e8e72dd0439a..2017292c1426 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -3325,7 +3325,7 @@ static void wma_add_bss_ap_mode(tp_wma_handle wma, tpAddBssParams add_bss) if (!QDF_IS_STATUS_SUCCESS(status)) WMA_LOGE("wma_get_current_hw_mode failed"); - if ((add_bss->nss == 2) && !hw_mode.dbs_cap) { + if (add_bss->nss == 2) { req.preferred_rx_streams = 2; req.preferred_tx_streams = 2; } else { @@ -3470,7 +3470,7 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, tpAddBssParams add_bss) if (!QDF_IS_STATUS_SUCCESS(status)) WMA_LOGE("wma_get_current_hw_mode failed"); - if ((add_bss->nss == 2) && !hw_mode.dbs_cap) { + if (add_bss->nss == 2) { req.preferred_rx_streams = 2; req.preferred_tx_streams = 2; } else { @@ -3650,7 +3650,7 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss) if (!QDF_IS_STATUS_SUCCESS(status)) WMA_LOGE("wma_get_current_hw_mode failed"); - if ((add_bss->nss == 2) && !hw_mode.dbs_cap) { + if (add_bss->nss == 2) { req.preferred_rx_streams = 2; req.preferred_tx_streams = 2; } else { |
