* [PATCH 1/2] ath9k_htc: allow coexistence of IBSS with other modes
@ 2012-08-26 8:12 Antonio Quartulli
2012-08-26 8:12 ` [PATCH 2/2] ath9k_htc: advertise allowed VIFs combination Antonio Quartulli
2012-08-26 20:06 ` [PATCH 1/2] ath9k_htc: allow coexistence of IBSS with other modes Antonio Quartulli
0 siblings, 2 replies; 4+ messages in thread
From: Antonio Quartulli @ 2012-08-26 8:12 UTC (permalink / raw)
To: Luis R. Rodriguez, Sujith Manoharan
Cc: ath9k-devel, linux-wireless, Antonio Quartulli
Practical tests shown that ath9k_htc devices allow an IBSS VIF to coexist with
VIF set up on other modes. This patch removes the check which block the creation
of any other VIF whenever an IBSS one is already present.
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index c32f6e3..c41d85f 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1045,9 +1045,9 @@ static int ath9k_htc_add_interface(struct ieee80211_hw *hw,
return -ENOBUFS;
}
- if (priv->num_ibss_vif ||
- (priv->nvifs && vif->type == NL80211_IFTYPE_ADHOC)) {
- ath_err(common, "IBSS coexistence with other modes is not allowed\n");
+ if (priv->num_ibss_vif && vif->type == NL80211_IFTYPE_ADHOC) {
+ ath_err(common,
+ "IBSS coexistence with another IBSS is not allowed\n");
mutex_unlock(&priv->mutex);
return -ENOBUFS;
}
--
1.7.12
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] ath9k_htc: advertise allowed VIFs combination
2012-08-26 8:12 [PATCH 1/2] ath9k_htc: allow coexistence of IBSS with other modes Antonio Quartulli
@ 2012-08-26 8:12 ` Antonio Quartulli
2012-08-26 20:17 ` Antonio Quartulli
2012-08-26 20:06 ` [PATCH 1/2] ath9k_htc: allow coexistence of IBSS with other modes Antonio Quartulli
1 sibling, 1 reply; 4+ messages in thread
From: Antonio Quartulli @ 2012-08-26 8:12 UTC (permalink / raw)
To: Luis R. Rodriguez, Sujith Manoharan
Cc: ath9k-devel, linux-wireless, Antonio Quartulli
This driver now advertises its allowed VIFs combination to the mac80211
sublayer.
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
drivers/net/wireless/ath/ath9k/htc_drv_init.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index a035a38..59965e2 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -689,6 +689,19 @@ err_hw:
return ret;
}
+static const struct ieee80211_iface_limit if_limits[] = {
+ { .max = ATH9K_HTC_MAX_VIF, .types = BIT(NL80211_IFTYPE_STATION) },
+ { .max = ATH9K_HTC_MAX_BCN_VIF, .types = BIT(NL80211_IFTYPE_AP) },
+ { .max = 1, .types = BIT(NL80211_IFTYPE_ADHOC) },
+};
+
+static const struct ieee80211_iface_combination if_comb = {
+ .limits = if_limits,
+ .n_limits = ARRAY_SIZE(if_limits),
+ .max_interfaces = ATH9K_HTC_MAX_VIF,
+ .num_different_channels = 1,
+};
+
static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv,
struct ieee80211_hw *hw)
{
@@ -711,6 +724,9 @@ static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv,
BIT(NL80211_IFTYPE_P2P_GO) |
BIT(NL80211_IFTYPE_P2P_CLIENT);
+ hw->wiphy->iface_combinations = &if_comb;
+ hw->wiphy->n_iface_combinations = 1;
+
hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN |
--
1.7.12
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] ath9k_htc: allow coexistence of IBSS with other modes
2012-08-26 8:12 [PATCH 1/2] ath9k_htc: allow coexistence of IBSS with other modes Antonio Quartulli
2012-08-26 8:12 ` [PATCH 2/2] ath9k_htc: advertise allowed VIFs combination Antonio Quartulli
@ 2012-08-26 20:06 ` Antonio Quartulli
1 sibling, 0 replies; 4+ messages in thread
From: Antonio Quartulli @ 2012-08-26 20:06 UTC (permalink / raw)
To: Luis R. Rodriguez, Sujith Manoharan; +Cc: ath9k-devel, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 606 bytes --]
On Sun, Aug 26, 2012 at 10:12:52AM +0200, Antonio Quartulli wrote:
> Practical tests shown that ath9k_htc devices allow an IBSS VIF to coexist with
> VIF set up on other modes. This patch removes the check which block the creation
> of any other VIF whenever an IBSS one is already present.
>
> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Johannes, please drop this patch. I'll send Patch 1/2 again because I'll also
remove all the driver-specific checks for interface combinations.
Cheers,
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] ath9k_htc: advertise allowed VIFs combination
2012-08-26 8:12 ` [PATCH 2/2] ath9k_htc: advertise allowed VIFs combination Antonio Quartulli
@ 2012-08-26 20:17 ` Antonio Quartulli
0 siblings, 0 replies; 4+ messages in thread
From: Antonio Quartulli @ 2012-08-26 20:17 UTC (permalink / raw)
To: Luis R. Rodriguez, Sujith Manoharan; +Cc: ath9k-devel, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 2142 bytes --]
On Sun, Aug 26, 2012 at 10:12:53AM +0200, Antonio Quartulli wrote:
> This driver now advertises its allowed VIFs combination to the mac80211
> sublayer.
>
> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
John I'll send v2 of this too because we also want to avoid that:
num_IBSS + num_AP <= ATH9K_HTC_MAX_BCN_VIF
and this is not the case with the current interface limitation I provided.
Cheers,
> ---
> drivers/net/wireless/ath/ath9k/htc_drv_init.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
> index a035a38..59965e2 100644
> --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
> +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
> @@ -689,6 +689,19 @@ err_hw:
> return ret;
> }
>
> +static const struct ieee80211_iface_limit if_limits[] = {
> + { .max = ATH9K_HTC_MAX_VIF, .types = BIT(NL80211_IFTYPE_STATION) },
> + { .max = ATH9K_HTC_MAX_BCN_VIF, .types = BIT(NL80211_IFTYPE_AP) },
> + { .max = 1, .types = BIT(NL80211_IFTYPE_ADHOC) },
> +};
> +
> +static const struct ieee80211_iface_combination if_comb = {
> + .limits = if_limits,
> + .n_limits = ARRAY_SIZE(if_limits),
> + .max_interfaces = ATH9K_HTC_MAX_VIF,
> + .num_different_channels = 1,
> +};
> +
> static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv,
> struct ieee80211_hw *hw)
> {
> @@ -711,6 +724,9 @@ static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv,
> BIT(NL80211_IFTYPE_P2P_GO) |
> BIT(NL80211_IFTYPE_P2P_CLIENT);
>
> + hw->wiphy->iface_combinations = &if_comb;
> + hw->wiphy->n_iface_combinations = 1;
> +
> hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
>
> hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN |
> --
> 1.7.12
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-08-26 20:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-26 8:12 [PATCH 1/2] ath9k_htc: allow coexistence of IBSS with other modes Antonio Quartulli
2012-08-26 8:12 ` [PATCH 2/2] ath9k_htc: advertise allowed VIFs combination Antonio Quartulli
2012-08-26 20:17 ` Antonio Quartulli
2012-08-26 20:06 ` [PATCH 1/2] ath9k_htc: allow coexistence of IBSS with other modes Antonio Quartulli
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).