From: Michal Kazior <michal.kazior@tieto.com>
To: ath10k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org, Michal Kazior <michal.kazior@tieto.com>
Subject: [PATCH 7/7] ath10k: enable multi-channel on supported devices
Date: Fri, 30 Jan 2015 09:41:27 +0100 [thread overview]
Message-ID: <1422607287-12289-8-git-send-email-michal.kazior@tieto.com> (raw)
In-Reply-To: <1422607287-12289-1-git-send-email-michal.kazior@tieto.com>
This effectively enables multi-channel operation
on qca6174 WLAN.RM.2.0-00073 (and possibly any
newer firmware release for qca6174).
This adds appopriate interface combinations and
initializes firmware channel scheduler.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
drivers/net/wireless/ath/ath10k/mac.c | 81 ++++++++++++++++++++++++++++++++++-
1 file changed, 80 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index eea6b95..55b73bd 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -2953,6 +2953,15 @@ static int ath10k_start(struct ieee80211_hw *hw)
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)
__ath10k_set_antenna(ar, ar->cfg_tx_chainmask,
ar->cfg_rx_chainmask);
@@ -5608,6 +5617,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 = 2,
+ .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 = 2,
+ .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)
{
struct ieee80211_sta_vht_cap vht_cap = {0};
@@ -5858,12 +5925,24 @@ int ath10k_mac_register(struct ath10k *ar)
switch (ar->wmi.op_version) {
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->n_iface_combinations =
ARRAY_SIZE(ath10k_if_comb);
ar->hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_ADHOC);
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_2:
case ATH10K_FW_WMI_OP_VERSION_10_2_4:
--
1.8.5.3
next prev parent reply other threads:[~2015-01-30 8:42 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-30 8:41 [PATCH 0/7] ath10k: add multi-channel support Michal Kazior
2015-01-30 8:41 ` [PATCH 1/7] ath10k: allow empty ssid vdev config Michal Kazior
2015-01-30 8:41 ` [PATCH 2/7] ath10k: implement chanctx API Michal Kazior
2015-01-30 10:44 ` Michal Kazior
2015-01-30 8:41 ` [PATCH 3/7] ath10k: implement adaptive qcs command Michal Kazior
2015-01-30 8:41 ` [PATCH 4/7] ath10k: protect ar->arvifs linking with data_lock Michal Kazior
2015-01-30 8:41 ` [PATCH 5/7] ath10k: rework tx queue locking Michal Kazior
2015-01-30 8:41 ` [PATCH 6/7] ath10k: implement tx pause wmi event Michal Kazior
2015-01-30 8:41 ` Michal Kazior [this message]
2015-01-30 12:31 ` [PATCH v2 0/7] ath10k: add multi-channel support Michal Kazior
2015-01-30 12:31 ` [PATCH v2 1/7] ath10k: allow empty ssid vdev config Michal Kazior
2015-01-30 12:31 ` [PATCH v2 2/7] ath10k: implement chanctx API Michal Kazior
2015-01-30 12:45 ` Johannes Berg
2015-01-30 13:02 ` Michal Kazior
2015-01-30 13:04 ` Johannes Berg
2015-01-30 13:22 ` Michal Kazior
2015-01-30 13:31 ` Johannes Berg
2015-01-30 13:47 ` Michal Kazior
2015-01-30 14:06 ` Johannes Berg
2015-01-30 12:58 ` Johannes Berg
2015-01-30 13:06 ` Michal Kazior
2015-01-30 13:10 ` Johannes Berg
2015-01-30 14:01 ` Michal Kazior
2015-01-30 14:10 ` Johannes Berg
2015-01-30 12:31 ` [PATCH v2 3/7] ath10k: implement adaptive qcs command Michal Kazior
2015-01-30 12:31 ` [PATCH v2 4/7] ath10k: protect ar->arvifs linking with data_lock Michal Kazior
2015-01-30 12:31 ` [PATCH v2 5/7] ath10k: rework tx queue locking Michal Kazior
2015-01-30 12:31 ` [PATCH v2 6/7] ath10k: implement tx pause wmi event Michal Kazior
2015-01-30 12:31 ` [PATCH v2 7/7] ath10k: enable multi-channel on supported devices Michal Kazior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1422607287-12289-8-git-send-email-michal.kazior@tieto.com \
--to=michal.kazior@tieto.com \
--cc=ath10k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).