|
@@ -843,6 +843,28 @@ static void wma_set_dtim_period(tp_wma_handle wma,
|
|
|
|
|
|
}
|
|
|
|
|
|
+static inline bool wma_is_tx_chainmask_valid(int value,
|
|
|
+ struct target_psoc_info *tgt_hdl)
|
|
|
+{
|
|
|
+ struct wlan_psoc_host_mac_phy_caps *mac_phy_cap;
|
|
|
+ uint8_t total_mac_phy_cnt, i;
|
|
|
+
|
|
|
+ mac_phy_cap = target_psoc_get_mac_phy_cap(tgt_hdl);
|
|
|
+ if (!mac_phy_cap) {
|
|
|
+ wma_err("Invalid MAC PHY capabilities handle");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ total_mac_phy_cnt = target_psoc_get_total_mac_phy_cnt(tgt_hdl);
|
|
|
+ for (i = 0; i < total_mac_phy_cnt; i++) {
|
|
|
+ if (((mac_phy_cap[i].tx_chain_mask_5G) & (value))) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* wma_process_cli_set_cmd() - set parameters to fw
|
|
|
* @wma: wma handle
|
|
@@ -914,6 +936,14 @@ static void wma_process_cli_set_cmd(tp_wma_handle wma,
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if (privcmd->param_id == WMI_PDEV_PARAM_TX_CHAIN_MASK) {
|
|
|
+ if (!wma_is_tx_chainmask_valid(privcmd->param_value,
|
|
|
+ tgt_hdl)) {
|
|
|
+ wma_debug("Chainmask value is invalid");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
pdev_param.param_id = privcmd->param_id;
|
|
|
pdev_param.param_value = privcmd->param_value;
|
|
|
ret = wmi_unified_pdev_param_send(wma->wmi_handle,
|