linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 2/3] ath9k_htc: Advertise interface combinations supported
@ 2012-08-13 15:22 Mohammed Shafi Shajakhan
  2012-08-13 15:37 ` Sujith Manoharan
  0 siblings, 1 reply; 3+ messages in thread
From: Mohammed Shafi Shajakhan @ 2012-08-13 15:22 UTC (permalink / raw)
  To: John W. Linville
  Cc: linux-wireless, Rodriguez Luis, ath9k-devel,
	Mohammed Shafi Shajakhan

From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>

This will allow us to create the multivif the driver supports.
Also this ensures the multivif support and limitation advertized
by the driver is taken care in cfg80211 itself.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/htc_drv_init.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index a035a38..5022141 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -689,6 +689,21 @@ err_hw:
 	return ret;
 }
 
+static const struct ieee80211_iface_limit if_limits[] = {
+	{ .max = 2,	.types = BIT(NL80211_IFTYPE_STATION) |
+				 BIT(NL80211_IFTYPE_P2P_CLIENT) },
+	{ .max = 2,	.types =
+			BIT(NL80211_IFTYPE_AP) |
+			BIT(NL80211_IFTYPE_P2P_GO) },
+};
+
+static const struct ieee80211_iface_combination if_comb = {
+	.limits = if_limits,
+	.n_limits = ARRAY_SIZE(if_limits),
+	.max_interfaces = 2,
+	.num_different_channels = 1,
+};
+
 static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv,
 			       struct ieee80211_hw *hw)
 {
@@ -711,6 +726,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.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [RFC 2/3] ath9k_htc: Advertise interface combinations supported
  2012-08-13 15:22 [RFC 2/3] ath9k_htc: Advertise interface combinations supported Mohammed Shafi Shajakhan
@ 2012-08-13 15:37 ` Sujith Manoharan
  2012-08-14  5:02   ` Mohammed Shafi Shajakhan
  0 siblings, 1 reply; 3+ messages in thread
From: Sujith Manoharan @ 2012-08-13 15:37 UTC (permalink / raw)
  To: Mohammed Shafi Shajakhan
  Cc: John W. Linville, linux-wireless, Rodriguez Luis, ath9k-devel

Mohammed Shafi Shajakhan wrote:
> +static const struct ieee80211_iface_limit if_limits[] = {
> +	{ .max = 2,	.types = BIT(NL80211_IFTYPE_STATION) |
> +				 BIT(NL80211_IFTYPE_P2P_CLIENT) },
> +	{ .max = 2,	.types =
> +			BIT(NL80211_IFTYPE_AP) |
> +			BIT(NL80211_IFTYPE_P2P_GO) },
> +};

Well, P2P-GO/AP modes etc. are just broken in ath9k_htc.. but the patch could
go in, I guess. If you can fix the weird indentation. :)

Sujith

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC 2/3] ath9k_htc: Advertise interface combinations supported
  2012-08-13 15:37 ` Sujith Manoharan
@ 2012-08-14  5:02   ` Mohammed Shafi Shajakhan
  0 siblings, 0 replies; 3+ messages in thread
From: Mohammed Shafi Shajakhan @ 2012-08-14  5:02 UTC (permalink / raw)
  To: Sujith Manoharan
  Cc: John W. Linville, linux-wireless, Rodriguez Luis, ath9k-devel

Hi Sujith,

On Monday 13 August 2012 09:07 PM, Sujith Manoharan wrote:
> Mohammed Shafi Shajakhan wrote:
>> +static const struct ieee80211_iface_limit if_limits[] = {
>> +	{ .max = 2,	.types = BIT(NL80211_IFTYPE_STATION) |
>> +				 BIT(NL80211_IFTYPE_P2P_CLIENT) },
>> +	{ .max = 2,	.types =
>> +			BIT(NL80211_IFTYPE_AP) |
>> +			BIT(NL80211_IFTYPE_P2P_GO) },
>> +};
>
> Well, P2P-GO/AP modes etc. are just broken in ath9k_htc.. but the patch could
> go in, I guess. If you can fix the weird indentation. :)
>

thanks for the review, i will fix that. The weird indentation may be 
because i copied the code from init.c in ath9k :)
may be we could later fix P2P-GO/AP mode, concurrency in ath9k_htc!

-- 
thanks,
shafi



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-14  5:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-13 15:22 [RFC 2/3] ath9k_htc: Advertise interface combinations supported Mohammed Shafi Shajakhan
2012-08-13 15:37 ` Sujith Manoharan
2012-08-14  5:02   ` Mohammed Shafi Shajakhan

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).