* [PATCH 1/2] ath10k: split the if_limits and if_comb
@ 2013-12-10 15:20 Bartosz Markowski
2013-12-10 15:20 ` [PATCH 2/2] ath10k: introduce NO_P2P fw feature flag Bartosz Markowski
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Bartosz Markowski @ 2013-12-10 15:20 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Bartosz Markowski
Split the interface limits and inteface combination,
to reflect the 10.X capabilites (no P2P, no STA and 8 VAP).
Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
drivers/net/wireless/ath/ath10k/mac.c | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index ce9ef349..35952a4 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3464,14 +3464,12 @@ static const struct ieee80211_iface_limit ath10k_if_limits[] = {
},
};
-#ifdef CONFIG_ATH10K_DFS_CERTIFIED
-static const struct ieee80211_iface_limit ath10k_if_dfs_limits[] = {
+static const struct ieee80211_iface_limit ath10k_10x_if_limits[] = {
{
.max = 8,
.types = BIT(NL80211_IFTYPE_AP)
},
};
-#endif
static const struct ieee80211_iface_combination ath10k_if_comb[] = {
{
@@ -3481,19 +3479,22 @@ static const struct ieee80211_iface_combination ath10k_if_comb[] = {
.num_different_channels = 1,
.beacon_int_infra_match = true,
},
-#ifdef CONFIG_ATH10K_DFS_CERTIFIED
+};
+
+static const struct ieee80211_iface_combination ath10k_10x_if_comb[] = {
{
- .limits = ath10k_if_dfs_limits,
- .n_limits = ARRAY_SIZE(ath10k_if_dfs_limits),
+ .limits = ath10k_10x_if_limits,
+ .n_limits = ARRAY_SIZE(ath10k_10x_if_limits),
.max_interfaces = 8,
.num_different_channels = 1,
.beacon_int_infra_match = true,
+#ifdef CONFIG_ATH10K_DFS_CERTIFIED
.radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
BIT(NL80211_CHAN_WIDTH_20) |
BIT(NL80211_CHAN_WIDTH_40) |
BIT(NL80211_CHAN_WIDTH_80),
- }
#endif
+ },
};
static struct ieee80211_sta_vht_cap ath10k_create_vht_cap(struct ath10k *ar)
@@ -3717,8 +3718,15 @@ int ath10k_mac_register(struct ath10k *ar)
*/
ar->hw->queues = 4;
- ar->hw->wiphy->iface_combinations = ath10k_if_comb;
- ar->hw->wiphy->n_iface_combinations = ARRAY_SIZE(ath10k_if_comb);
+ if (!test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features)) {
+
+ ar->hw->wiphy->iface_combinations = ath10k_if_comb;
+ ar->hw->wiphy->n_iface_combinations = ARRAY_SIZE(ath10k_if_comb);
+
+ } else {
+ ar->hw->wiphy->iface_combinations = ath10k_10x_if_comb;
+ ar->hw->wiphy->n_iface_combinations = ARRAY_SIZE(ath10k_10x_if_comb);
+ }
ar->hw->netdev_features = NETIF_F_HW_CSUM;
--
1.7.10
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] ath10k: introduce NO_P2P fw feature flag
2013-12-10 15:20 [PATCH 1/2] ath10k: split the if_limits and if_comb Bartosz Markowski
@ 2013-12-10 15:20 ` Bartosz Markowski
2013-12-10 15:35 ` [PATCH 1/2] ath10k: split the if_limits and if_comb Ben Greear
2013-12-16 14:13 ` Kalle Valo
2 siblings, 0 replies; 5+ messages in thread
From: Bartosz Markowski @ 2013-12-10 15:20 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Bartosz Markowski
Not each ath10k FW track supports P2P (10.X for instance does not)
This new firmware feature flag allows to turn off P2P interface type.
Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
drivers/net/wireless/ath/ath10k/core.h | 3 +++
drivers/net/wireless/ath/ath10k/mac.c | 9 ++++++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 79726e0..035cbf6 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -306,6 +306,9 @@ enum ath10k_fw_features {
/* firmware support tx frame management over WMI, otherwise it's HTT */
ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX = 2,
+ /* Firmware does not support P2P */
+ ATH10K_FW_FEATURE_NO_P2P = 3,
+
/* keep last */
ATH10K_FW_FEATURE_COUNT,
};
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 35952a4..cdc24d8 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3673,9 +3673,12 @@ int ath10k_mac_register(struct ath10k *ar)
ar->hw->wiphy->interface_modes =
BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_ADHOC) |
- BIT(NL80211_IFTYPE_AP) |
- BIT(NL80211_IFTYPE_P2P_CLIENT) |
- BIT(NL80211_IFTYPE_P2P_GO);
+ BIT(NL80211_IFTYPE_AP);
+
+ if (!test_bit(ATH10K_FW_FEATURE_NO_P2P, ar->fw_features))
+ ar->hw->wiphy->interface_modes |=
+ BIT(NL80211_IFTYPE_P2P_CLIENT) |
+ BIT(NL80211_IFTYPE_P2P_GO);
ar->hw->flags = IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_SUPPORTS_PS |
--
1.7.10
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] ath10k: split the if_limits and if_comb
2013-12-10 15:20 [PATCH 1/2] ath10k: split the if_limits and if_comb Bartosz Markowski
2013-12-10 15:20 ` [PATCH 2/2] ath10k: introduce NO_P2P fw feature flag Bartosz Markowski
@ 2013-12-10 15:35 ` Ben Greear
2013-12-16 13:55 ` Kalle Valo
2013-12-16 14:13 ` Kalle Valo
2 siblings, 1 reply; 5+ messages in thread
From: Ben Greear @ 2013-12-10 15:35 UTC (permalink / raw)
To: Bartosz Markowski; +Cc: ath10k, linux-wireless
On 12/10/2013 07:20 AM, Bartosz Markowski wrote:
> Split the interface limits and inteface combination,
> to reflect the 10.X capabilites (no P2P, no STA and 8 VAP).
My 10.X firmware works just fine with stations..I just tested up
to 32 of them.
Maybe add firmware IEs to explicitly advertise how many it can
support instead of setting one flag and making assumptions?
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] ath10k: split the if_limits and if_comb
2013-12-10 15:35 ` [PATCH 1/2] ath10k: split the if_limits and if_comb Ben Greear
@ 2013-12-16 13:55 ` Kalle Valo
0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2013-12-16 13:55 UTC (permalink / raw)
To: Ben Greear; +Cc: Bartosz Markowski, linux-wireless, ath10k
Ben Greear <greearb@candelatech.com> writes:
> On 12/10/2013 07:20 AM, Bartosz Markowski wrote:
>> Split the interface limits and inteface combination,
>> to reflect the 10.X capabilites (no P2P, no STA and 8 VAP).
>
> My 10.X firmware works just fine with stations..I just tested up
> to 32 of them.
>
> Maybe add firmware IEs to explicitly advertise how many it can
> support instead of setting one flag and making assumptions?
That can be done in a separate patch.
--
Kalle Valo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] ath10k: split the if_limits and if_comb
2013-12-10 15:20 [PATCH 1/2] ath10k: split the if_limits and if_comb Bartosz Markowski
2013-12-10 15:20 ` [PATCH 2/2] ath10k: introduce NO_P2P fw feature flag Bartosz Markowski
2013-12-10 15:35 ` [PATCH 1/2] ath10k: split the if_limits and if_comb Ben Greear
@ 2013-12-16 14:13 ` Kalle Valo
2 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2013-12-16 14:13 UTC (permalink / raw)
To: Bartosz Markowski; +Cc: ath10k, linux-wireless
Bartosz Markowski <bartosz.markowski@tieto.com> writes:
> Split the interface limits and inteface combination,
> to reflect the 10.X capabilites (no P2P, no STA and 8 VAP).
>
> Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Both patches applied. I did minor changes in patch 1, please double
check:
> @@ -3717,8 +3718,15 @@ int ath10k_mac_register(struct ath10k *ar)
> */
> ar->hw->queues = 4;
>
> - ar->hw->wiphy->iface_combinations = ath10k_if_comb;
> - ar->hw->wiphy->n_iface_combinations = ARRAY_SIZE(ath10k_if_comb);
> + if (!test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features)) {
> +
> + ar->hw->wiphy->iface_combinations = ath10k_if_comb;
> + ar->hw->wiphy->n_iface_combinations = ARRAY_SIZE(ath10k_if_comb);
> +
> + } else {
> + ar->hw->wiphy->iface_combinations = ath10k_10x_if_comb;
> + ar->hw->wiphy->n_iface_combinations = ARRAY_SIZE(ath10k_10x_if_comb);
> + }
I fixed checkpatch warnings here and reversed the test to get rid
unnecessary negation operator.
--
Kalle Valo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-12-16 14:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-10 15:20 [PATCH 1/2] ath10k: split the if_limits and if_comb Bartosz Markowski
2013-12-10 15:20 ` [PATCH 2/2] ath10k: introduce NO_P2P fw feature flag Bartosz Markowski
2013-12-10 15:35 ` [PATCH 1/2] ath10k: split the if_limits and if_comb Ben Greear
2013-12-16 13:55 ` Kalle Valo
2013-12-16 14:13 ` Kalle Valo
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).