summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2017-03-24 14:10:06 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-03-24 14:10:06 -0700
commit563b2704c7f2daed539afa4c0c7f3ccd842d3c77 (patch)
tree332a7d4da89400e52c32822addd1778734a3d7c6
parent78b04f4ff292e16f64f8a3e02835f50b380c5cbf (diff)
parentd68fd729dd6d39fee7dc2329585037f89df2dc23 (diff)
Merge "qcacld-3.0: Send Nss 1x1 for HT-STAs if hw is DBS capable"
-rw-r--r--core/hdd/src/wlan_hdd_main.c22
-rw-r--r--core/mac/inc/ani_global.h3
-rw-r--r--core/mac/src/pe/lim/lim_send_management_frames.c4
-rw-r--r--core/sme/inc/sme_api.h1
-rw-r--r--core/sme/src/common/sme_api.c15
5 files changed, 45 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 15c7cfbb243a..0d4e5c27c8e7 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -832,6 +832,26 @@ static void hdd_update_vdev_nss(hdd_context_t *hdd_ctx)
cfg_ini->vdev_type_nss_5g, eCSR_BAND_5G);
}
+/**
+ * hdd_update_hw_dbs_capable() - sets the dbs capability of the device
+ * @hdd_ctx: HDD context
+ *
+ * Sets the DBS capability as per INI and firmware capability
+ *
+ * Return: None
+ */
+static void hdd_update_hw_dbs_capable(hdd_context_t *hdd_ctx)
+{
+ struct hdd_config *cfg_ini = hdd_ctx->config;
+ uint8_t hw_dbs_capable = 0;
+
+ if ((!cfg_ini->dual_mac_feature_disable)
+ && wma_is_hw_dbs_capable())
+ hw_dbs_capable = 1;
+
+ sme_update_hw_dbs_capable(hdd_ctx->hHal, hw_dbs_capable);
+}
+
static void hdd_update_tgt_ht_cap(hdd_context_t *hdd_ctx,
struct wma_tgt_ht_cap *cfg)
{
@@ -1442,6 +1462,8 @@ void hdd_update_tgt_cfg(void *context, void *param)
hdd_update_vdev_nss(hdd_ctx);
+ hdd_update_hw_dbs_capable(hdd_ctx);
+
hdd_ctx->config->fine_time_meas_cap &= cfg->fine_time_measurement_cap;
hdd_ctx->fine_time_meas_cap_target = cfg->fine_time_measurement_cap;
hdd_debug("fine_time_meas_cap: 0x%x",
diff --git a/core/mac/inc/ani_global.h b/core/mac/inc/ani_global.h
index 6e28e95fc9d1..2342965c3aa6 100644
--- a/core/mac/inc/ani_global.h
+++ b/core/mac/inc/ani_global.h
@@ -956,6 +956,9 @@ typedef struct sAniSirGlobal {
/* 802.11p enable */
bool enable_dot11p;
+ /* DBS capability based on INI and FW capability */
+ uint8_t hw_dbs_capable;
+ /* Based on INI parameter */
uint32_t dual_mac_feature_disable;
sir_mgmt_frame_ind_callback mgmt_frame_ind_cb;
sir_p2p_ack_ind_callback p2p_ack_ind_cb;
diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c
index a36da0d1aa41..07c92db36178 100644
--- a/core/mac/src/pe/lim/lim_send_management_frames.c
+++ b/core/mac/src/pe/lim/lim_send_management_frames.c
@@ -1258,6 +1258,10 @@ lim_send_assoc_rsp_mgmt_frame(tpAniSirGlobal mac_ctx,
populate_dot11f_vht_operation(mac_ctx, pe_session,
&frm.VHTOperation);
is_vht = true;
+ } else {
+ /* Advertise 1x1 if either is HT-STA */
+ if (frm.HTCaps.present && mac_ctx->hw_dbs_capable)
+ frm.HTCaps.supportedMCSSet[1] = 0;
}
if (pe_session->vhtCapability &&
pe_session->vendor_vht_sap &&
diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h
index 0fa7d2b9ffeb..0f55c4734d9b 100644
--- a/core/sme/inc/sme_api.h
+++ b/core/sme/inc/sme_api.h
@@ -1298,6 +1298,7 @@ void sme_set_pdev_ht_vht_ies(tHalHandle hHal, bool enable2x2);
void sme_update_vdev_type_nss(tHalHandle hal, uint8_t max_supp_nss,
uint32_t vdev_type_nss, eCsrBand band);
+void sme_update_hw_dbs_capable(tHalHandle hal, uint8_t hw_dbs_capable);
void sme_register_p2p_lo_event(tHalHandle hHal, void *context,
p2p_lo_callback callback);
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index 09f4feab65e4..a835e68b9ace 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -16645,6 +16645,21 @@ void sme_update_vdev_type_nss(tHalHandle hal, uint8_t max_supp_nss,
}
/**
+ * sme_update_hw_dbs_capable() - sets the HW DBS capability
+ * @hal: Pointer to HAL
+ * @hw_dbs_capable: HW DBS capability
+ *
+ * Sets HW DBS capability based on INI and fw capability.
+ *
+ * Return: None
+ */
+void sme_update_hw_dbs_capable(tHalHandle hal, uint8_t hw_dbs_capable)
+{
+ tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
+ mac_ctx->hw_dbs_capable = hw_dbs_capable;
+}
+
+/**
* sme_register_p2p_lo_event() - Register for the p2p lo event
* @hHal: reference to the HAL
* @context: the context of the call