|
@@ -3735,6 +3735,15 @@ static int ath10k_start(struct ieee80211_hw *hw)
|
|
goto err_core_stop;
|
|
goto err_core_stop;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (test_bit(WMI_SERVICE_ADAPTIVE_OCS, ar->wmi.svc_map)) {
|
|
|
|
+ ret = ath10k_wmi_adaptive_qcs(ar, true);
|
|
|
|
+ if (ret) {
|
|
|
|
+ ath10k_warn(ar, "failed to enable adaptive qcs: %d\n",
|
|
|
|
+ ret);
|
|
|
|
+ goto err_core_stop;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
if (ar->cfg_tx_chainmask)
|
|
if (ar->cfg_tx_chainmask)
|
|
__ath10k_set_antenna(ar, ar->cfg_tx_chainmask,
|
|
__ath10k_set_antenna(ar, ar->cfg_tx_chainmask,
|
|
ar->cfg_rx_chainmask);
|
|
ar->cfg_rx_chainmask);
|
|
@@ -6487,6 +6496,64 @@ static const struct ieee80211_iface_combination ath10k_10x_if_comb[] = {
|
|
},
|
|
},
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+static const struct ieee80211_iface_limit ath10k_tlv_if_limit[] = {
|
|
|
|
+ {
|
|
|
|
+ .max = 2,
|
|
|
|
+ .types = BIT(NL80211_IFTYPE_STATION) |
|
|
|
|
+ BIT(NL80211_IFTYPE_AP) |
|
|
|
|
+ BIT(NL80211_IFTYPE_P2P_CLIENT) |
|
|
|
|
+ BIT(NL80211_IFTYPE_P2P_GO),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .max = 1,
|
|
|
|
+ .types = BIT(NL80211_IFTYPE_P2P_DEVICE),
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static const struct ieee80211_iface_limit ath10k_tlv_if_limit_ibss[] = {
|
|
|
|
+ {
|
|
|
|
+ .max = 1,
|
|
|
|
+ .types = BIT(NL80211_IFTYPE_STATION),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .max = 1,
|
|
|
|
+ .types = BIT(NL80211_IFTYPE_ADHOC),
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/* FIXME: This is not thouroughly tested. These combinations may over- or
|
|
|
|
+ * underestimate hw/fw capabilities.
|
|
|
|
+ */
|
|
|
|
+static struct ieee80211_iface_combination ath10k_tlv_if_comb[] = {
|
|
|
|
+ {
|
|
|
|
+ .limits = ath10k_tlv_if_limit,
|
|
|
|
+ .num_different_channels = 1,
|
|
|
|
+ .max_interfaces = 3,
|
|
|
|
+ .n_limits = ARRAY_SIZE(ath10k_tlv_if_limit),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .limits = ath10k_tlv_if_limit_ibss,
|
|
|
|
+ .num_different_channels = 1,
|
|
|
|
+ .max_interfaces = 2,
|
|
|
|
+ .n_limits = ARRAY_SIZE(ath10k_tlv_if_limit_ibss),
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct ieee80211_iface_combination ath10k_tlv_qcs_if_comb[] = {
|
|
|
|
+ {
|
|
|
|
+ .limits = ath10k_tlv_if_limit,
|
|
|
|
+ .num_different_channels = 2,
|
|
|
|
+ .max_interfaces = 3,
|
|
|
|
+ .n_limits = ARRAY_SIZE(ath10k_tlv_if_limit),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .limits = ath10k_tlv_if_limit_ibss,
|
|
|
|
+ .num_different_channels = 1,
|
|
|
|
+ .max_interfaces = 2,
|
|
|
|
+ .n_limits = ARRAY_SIZE(ath10k_tlv_if_limit_ibss),
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
static struct ieee80211_sta_vht_cap ath10k_create_vht_cap(struct ath10k *ar)
|
|
static struct ieee80211_sta_vht_cap ath10k_create_vht_cap(struct ath10k *ar)
|
|
{
|
|
{
|
|
struct ieee80211_sta_vht_cap vht_cap = {0};
|
|
struct ieee80211_sta_vht_cap vht_cap = {0};
|
|
@@ -6781,12 +6848,24 @@ int ath10k_mac_register(struct ath10k *ar)
|
|
|
|
|
|
switch (ar->wmi.op_version) {
|
|
switch (ar->wmi.op_version) {
|
|
case ATH10K_FW_WMI_OP_VERSION_MAIN:
|
|
case ATH10K_FW_WMI_OP_VERSION_MAIN:
|
|
- case ATH10K_FW_WMI_OP_VERSION_TLV:
|
|
|
|
ar->hw->wiphy->iface_combinations = ath10k_if_comb;
|
|
ar->hw->wiphy->iface_combinations = ath10k_if_comb;
|
|
ar->hw->wiphy->n_iface_combinations =
|
|
ar->hw->wiphy->n_iface_combinations =
|
|
ARRAY_SIZE(ath10k_if_comb);
|
|
ARRAY_SIZE(ath10k_if_comb);
|
|
ar->hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_ADHOC);
|
|
ar->hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_ADHOC);
|
|
break;
|
|
break;
|
|
|
|
+ case ATH10K_FW_WMI_OP_VERSION_TLV:
|
|
|
|
+ if (test_bit(WMI_SERVICE_ADAPTIVE_OCS, ar->wmi.svc_map)) {
|
|
|
|
+ ar->hw->wiphy->iface_combinations =
|
|
|
|
+ ath10k_tlv_qcs_if_comb;
|
|
|
|
+ ar->hw->wiphy->n_iface_combinations =
|
|
|
|
+ ARRAY_SIZE(ath10k_tlv_qcs_if_comb);
|
|
|
|
+ } else {
|
|
|
|
+ ar->hw->wiphy->iface_combinations = ath10k_tlv_if_comb;
|
|
|
|
+ ar->hw->wiphy->n_iface_combinations =
|
|
|
|
+ ARRAY_SIZE(ath10k_tlv_if_comb);
|
|
|
|
+ }
|
|
|
|
+ ar->hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_ADHOC);
|
|
|
|
+ break;
|
|
case ATH10K_FW_WMI_OP_VERSION_10_1:
|
|
case ATH10K_FW_WMI_OP_VERSION_10_1:
|
|
case ATH10K_FW_WMI_OP_VERSION_10_2:
|
|
case ATH10K_FW_WMI_OP_VERSION_10_2:
|
|
case ATH10K_FW_WMI_OP_VERSION_10_2_4:
|
|
case ATH10K_FW_WMI_OP_VERSION_10_2_4:
|