All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <ordex@autistici.org>
To: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>,
	Sujith Manoharan <c_manoha@qca.qualcomm.com>
Cc: ath9k-devel@lists.ath9k.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/2] ath9k_htc: advertise allowed VIFs combination
Date: Sun, 26 Aug 2012 22:17:01 +0200	[thread overview]
Message-ID: <20120826201701.GL7642@ritirata.org> (raw)
In-Reply-To: <1345968773-17166-2-git-send-email-ordex@autistici.org>

[-- 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 --]

  reply	other threads:[~2012-08-26 20:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2012-08-26 20:06 ` [PATCH 1/2] ath9k_htc: allow coexistence of IBSS with other modes Antonio Quartulli

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=20120826201701.GL7642@ritirata.org \
    --to=ordex@autistici.org \
    --cc=ath9k-devel@lists.ath9k.org \
    --cc=c_manoha@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mcgrof@qca.qualcomm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.