2013-10-18 10:08:07

by Bartosz Markowski

[permalink] [raw]
Subject: [PATCH 1/2] ath10k: remove P2P from supported interface modes for 10.X FW

FW 10.X does not support P2P, stop advertising it to mac80211.

Signed-off-by: Bartosz Markowski <[email protected]>
---
drivers/net/wireless/ath/ath10k/mac.c | 44 +++++++++++++++++++++++++++------
1 file changed, 37 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 0b1cc51..af046c4 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3249,6 +3249,17 @@ static const struct ieee80211_iface_limit ath10k_if_limits[] = {
},
};

+static const struct ieee80211_iface_limit ath10k_10x_if_limits[] = {
+ {
+ .max = 8,
+ .types = BIT(NL80211_IFTYPE_STATION)
+ },
+ {
+ .max = 7,
+ .types = BIT(NL80211_IFTYPE_AP)
+ },
+};
+
static const struct ieee80211_iface_combination ath10k_if_comb = {
.limits = ath10k_if_limits,
.n_limits = ARRAY_SIZE(ath10k_if_limits),
@@ -3257,6 +3268,14 @@ static const struct ieee80211_iface_combination ath10k_if_comb = {
.beacon_int_infra_match = true,
};

+static const struct ieee80211_iface_combination ath10k_10x_if_comb = {
+ .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,
+};
+
static struct ieee80211_sta_vht_cap ath10k_create_vht_cap(struct ath10k *ar)
{
struct ieee80211_sta_vht_cap vht_cap = {0};
@@ -3430,12 +3449,19 @@ int ath10k_mac_register(struct ath10k *ar)
ar->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = band;
}

- 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);
+ /* 10.x firmware does not support P2P */
+ if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features))
+ ar->hw->wiphy->interface_modes =
+ BIT(NL80211_IFTYPE_STATION) |
+ BIT(NL80211_IFTYPE_ADHOC) |
+ BIT(NL80211_IFTYPE_AP);
+ else
+ 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);

ar->hw->flags = IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_SUPPORTS_PS |
@@ -3478,7 +3504,11 @@ int ath10k_mac_register(struct ath10k *ar)
*/
ar->hw->queues = 4;

- ar->hw->wiphy->iface_combinations = &ath10k_if_comb;
+ if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features))
+ ar->hw->wiphy->iface_combinations = &ath10k_10x_if_comb;
+ else
+ ar->hw->wiphy->iface_combinations = &ath10k_if_comb;
+
ar->hw->wiphy->n_iface_combinations = 1;

ar->hw->netdev_features = NETIF_F_HW_CSUM;
--
1.7.10



2013-10-21 06:30:12

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 1/2] ath10k: remove P2P from supported interface modes for 10.X FW

Bartosz Markowski <[email protected]> writes:

> FW 10.X does not support P2P, stop advertising it to mac80211.
>
> Signed-off-by: Bartosz Markowski <[email protected]>

[...]

> @@ -3478,7 +3504,11 @@ int ath10k_mac_register(struct ath10k *ar)
> */
> ar->hw->queues = 4;
>
> - ar->hw->wiphy->iface_combinations = &ath10k_if_comb;
> + if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features))
> + ar->hw->wiphy->iface_combinations = &ath10k_10x_if_comb;
> + else
> + ar->hw->wiphy->iface_combinations = &ath10k_if_comb;

I think it would be better to have a separate feature flag for this,
like NO_P2P or something like that. Just in case we want to disable P2P
in other firmware branches.

--
Kalle Valo

2013-10-21 06:51:49

by Bartosz Markowski

[permalink] [raw]
Subject: Re: [PATCH 2/2] ath10k: extend number of AP interfaces for 10.X firmware

On 21 October 2013 08:31, Kalle Valo <[email protected]> wrote:
> Bartosz Markowski <[email protected]> writes:
>
>> This firmware can support up to 8 AP interfaces.
>>
>> Signed-off-by: Bartosz Markowski <[email protected]>
>> ---
>> drivers/net/wireless/ath/ath10k/mac.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
>> index af046c4..dc65dcd 100644
>> --- a/drivers/net/wireless/ath/ath10k/mac.c
>> +++ b/drivers/net/wireless/ath/ath10k/mac.c
>> @@ -3255,7 +3255,7 @@ static const struct ieee80211_iface_limit ath10k_10x_if_limits[] = {
>> .types = BIT(NL80211_IFTYPE_STATION)
>> },
>> {
>> - .max = 7,
>> + .max = 8,
>> .types = BIT(NL80211_IFTYPE_AP)
>> },
>> };
>
> Why only with 10.x firmware branch? Doesn't the main branch support 8
> interfaces?

With .636 there's a firmware crash when we try to create interface 8 (ap mode).

--
Bartosz

2013-10-18 10:08:09

by Bartosz Markowski

[permalink] [raw]
Subject: [PATCH 2/2] ath10k: extend number of AP interfaces for 10.X firmware

This firmware can support up to 8 AP interfaces.

Signed-off-by: Bartosz Markowski <[email protected]>
---
drivers/net/wireless/ath/ath10k/mac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index af046c4..dc65dcd 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3255,7 +3255,7 @@ static const struct ieee80211_iface_limit ath10k_10x_if_limits[] = {
.types = BIT(NL80211_IFTYPE_STATION)
},
{
- .max = 7,
+ .max = 8,
.types = BIT(NL80211_IFTYPE_AP)
},
};
--
1.7.10


2013-10-21 06:31:16

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 2/2] ath10k: extend number of AP interfaces for 10.X firmware

Bartosz Markowski <[email protected]> writes:

> This firmware can support up to 8 AP interfaces.
>
> Signed-off-by: Bartosz Markowski <[email protected]>
> ---
> drivers/net/wireless/ath/ath10k/mac.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
> index af046c4..dc65dcd 100644
> --- a/drivers/net/wireless/ath/ath10k/mac.c
> +++ b/drivers/net/wireless/ath/ath10k/mac.c
> @@ -3255,7 +3255,7 @@ static const struct ieee80211_iface_limit ath10k_10x_if_limits[] = {
> .types = BIT(NL80211_IFTYPE_STATION)
> },
> {
> - .max = 7,
> + .max = 8,
> .types = BIT(NL80211_IFTYPE_AP)
> },
> };

Why only with 10.x firmware branch? Doesn't the main branch support 8
interfaces?

--
Kalle Valo

2013-10-21 06:52:55

by Bartosz Markowski

[permalink] [raw]
Subject: Re: [PATCH 1/2] ath10k: remove P2P from supported interface modes for 10.X FW

On 21 October 2013 08:30, Kalle Valo <[email protected]> wrote:
> Bartosz Markowski <[email protected]> writes:
>
>> FW 10.X does not support P2P, stop advertising it to mac80211.
>>
>> Signed-off-by: Bartosz Markowski <[email protected]>
>
> [...]
>
>> @@ -3478,7 +3504,11 @@ int ath10k_mac_register(struct ath10k *ar)
>> */
>> ar->hw->queues = 4;
>>
>> - ar->hw->wiphy->iface_combinations = &ath10k_if_comb;
>> + if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features))
>> + ar->hw->wiphy->iface_combinations = &ath10k_10x_if_comb;
>> + else
>> + ar->hw->wiphy->iface_combinations = &ath10k_if_comb;
>
> I think it would be better to have a separate feature flag for this,
> like NO_P2P or something like that. Just in case we want to disable P2P
> in other firmware branches.

Make sense. I will change this.


--
Bartosz