|
@@ -4238,6 +4238,8 @@ static void hdd_set_fw_log_params(struct hdd_context *hdd_ctx,
|
|
|
static int hdd_configure_chain_mask(struct hdd_adapter *adapter)
|
|
|
{
|
|
|
int ret_val;
|
|
|
+ QDF_STATUS status;
|
|
|
+ struct wma_caps_per_phy non_dbs_phy_cap;
|
|
|
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
|
|
|
|
|
hdd_debug("enable2x2: %d, lte_coex: %d, ChainMask1x1: tx: %d rx: %d",
|
|
@@ -4254,6 +4256,22 @@ static int hdd_configure_chain_mask(struct hdd_adapter *adapter)
|
|
|
hdd_debug("enable_bt_chain_separation %d",
|
|
|
hdd_ctx->config->enable_bt_chain_separation);
|
|
|
|
|
|
+ status = wma_get_caps_for_phyidx_hwmode(&non_dbs_phy_cap,
|
|
|
+ HW_MODE_DBS_NONE,
|
|
|
+ CDS_BAND_ALL);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ hdd_err("couldn't get phy caps. skip chain mask programming");
|
|
|
+ return qdf_status_to_os_return(status);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (non_dbs_phy_cap.tx_chain_mask_2G < 3 ||
|
|
|
+ non_dbs_phy_cap.rx_chain_mask_2G < 3 ||
|
|
|
+ non_dbs_phy_cap.tx_chain_mask_5G < 3 ||
|
|
|
+ non_dbs_phy_cap.rx_chain_mask_5G < 3) {
|
|
|
+ hdd_info("firmware not capable. skip chain mask programming");
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
if (hdd_ctx->config->enable2x2 &&
|
|
|
!hdd_ctx->config->enable_bt_chain_separation) {
|
|
|
hdd_info("2x2 enabled. skip chain mask programming");
|