linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath5k: add possible wiphy interface combinations
@ 2012-04-16 15:28 Felix Fietkau
  2012-04-16 16:02 ` Ben Greear
  0 siblings, 1 reply; 4+ messages in thread
From: Felix Fietkau @ 2012-04-16 15:28 UTC (permalink / raw)
  To: linux-wireless; +Cc: linville, ath5k-devel

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
 drivers/net/wireless/ath/ath5k/base.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 3007bba..2e385f5 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -2415,6 +2415,19 @@ ath5k_tx_complete_poll_work(struct work_struct *work)
 * Initialization routines *
 \*************************/
 
+static const struct ieee80211_iface_limit if_limits[] = {
+	{ .max = 256,	.types = BIT(NL80211_IFTYPE_STATION) },
+	{ .max = 4,	.types = BIT(NL80211_IFTYPE_AP) |
+				 BIT(NL80211_IFTYPE_MESH_POINT) },
+};
+
+static const struct ieee80211_iface_combination if_comb = {
+	.limits = if_limits,
+	.n_limits = ARRAY_SIZE(if_limits),
+	.max_interfaces = 256,
+	.num_different_channels = 1,
+};
+
 int __devinit
 ath5k_init_ah(struct ath5k_hw *ah, const struct ath_bus_ops *bus_ops)
 {
@@ -2436,6 +2449,9 @@ ath5k_init_ah(struct ath5k_hw *ah, const struct ath_bus_ops *bus_ops)
 		BIT(NL80211_IFTYPE_ADHOC) |
 		BIT(NL80211_IFTYPE_MESH_POINT);
 
+	hw->wiphy->iface_combinations = &if_comb;
+	hw->wiphy->n_iface_combinations = 1;
+
 	/* SW support for IBSS_RSN is provided by mac80211 */
 	hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
 
-- 
1.7.3.2


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

* Re: [PATCH] ath5k: add possible wiphy interface combinations
  2012-04-16 15:28 [PATCH] ath5k: add possible wiphy interface combinations Felix Fietkau
@ 2012-04-16 16:02 ` Ben Greear
  2012-04-16 16:07   ` Felix Fietkau
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Greear @ 2012-04-16 16:02 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless, linville, ath5k-devel

On 04/16/2012 08:28 AM, Felix Fietkau wrote:
> Signed-off-by: Felix Fietkau<nbd@openwrt.org>
> ---
>   drivers/net/wireless/ath/ath5k/base.c |   16 ++++++++++++++++
>   1 files changed, 16 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> index 3007bba..2e385f5 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -2415,6 +2415,19 @@ ath5k_tx_complete_poll_work(struct work_struct *work)
>   * Initialization routines *
>   \*************************/
>
> +static const struct ieee80211_iface_limit if_limits[] = {
> +	{ .max = 256,	.types = BIT(NL80211_IFTYPE_STATION) },
> +	{ .max = 4,	.types = BIT(NL80211_IFTYPE_AP) |
> +				 BIT(NL80211_IFTYPE_MESH_POINT) },
> +};

The station max is just an arbitrary number or is 256 really
the max it can handle?  At least on ath9k, more are supported,
but I haven't tested ath5k lately....

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


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

* Re: [PATCH] ath5k: add possible wiphy interface combinations
  2012-04-16 16:02 ` Ben Greear
@ 2012-04-16 16:07   ` Felix Fietkau
  2012-04-16 16:11     ` Ben Greear
  0 siblings, 1 reply; 4+ messages in thread
From: Felix Fietkau @ 2012-04-16 16:07 UTC (permalink / raw)
  To: Ben Greear; +Cc: linux-wireless, linville, ath5k-devel

On 2012-04-16 6:02 PM, Ben Greear wrote:
> On 04/16/2012 08:28 AM, Felix Fietkau wrote:
>> Signed-off-by: Felix Fietkau<nbd@openwrt.org>
>> ---
>>   drivers/net/wireless/ath/ath5k/base.c |   16 ++++++++++++++++
>>   1 files changed, 16 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
>> index 3007bba..2e385f5 100644
>> --- a/drivers/net/wireless/ath/ath5k/base.c
>> +++ b/drivers/net/wireless/ath/ath5k/base.c
>> @@ -2415,6 +2415,19 @@ ath5k_tx_complete_poll_work(struct work_struct *work)
>>   * Initialization routines *
>>   \*************************/
>>
>> +static const struct ieee80211_iface_limit if_limits[] = {
>> +	{ .max = 256,	.types = BIT(NL80211_IFTYPE_STATION) },
>> +	{ .max = 4,	.types = BIT(NL80211_IFTYPE_AP) |
>> +				 BIT(NL80211_IFTYPE_MESH_POINT) },
>> +};
> 
> The station max is just an arbitrary number or is 256 really
> the max it can handle?  At least on ath9k, more are supported,
> but I haven't tested ath5k lately....
It is an arbitrary number.

- Felix

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

* Re: [PATCH] ath5k: add possible wiphy interface combinations
  2012-04-16 16:07   ` Felix Fietkau
@ 2012-04-16 16:11     ` Ben Greear
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Greear @ 2012-04-16 16:11 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless, linville, ath5k-devel

On 04/16/2012 09:07 AM, Felix Fietkau wrote:
> On 2012-04-16 6:02 PM, Ben Greear wrote:
>> On 04/16/2012 08:28 AM, Felix Fietkau wrote:
>>> Signed-off-by: Felix Fietkau<nbd@openwrt.org>
>>> ---
>>>    drivers/net/wireless/ath/ath5k/base.c |   16 ++++++++++++++++
>>>    1 files changed, 16 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
>>> index 3007bba..2e385f5 100644
>>> --- a/drivers/net/wireless/ath/ath5k/base.c
>>> +++ b/drivers/net/wireless/ath/ath5k/base.c
>>> @@ -2415,6 +2415,19 @@ ath5k_tx_complete_poll_work(struct work_struct *work)
>>>    * Initialization routines *
>>>    \*************************/
>>>
>>> +static const struct ieee80211_iface_limit if_limits[] = {
>>> +	{ .max = 256,	.types = BIT(NL80211_IFTYPE_STATION) },
>>> +	{ .max = 4,	.types = BIT(NL80211_IFTYPE_AP) |
>>> +				 BIT(NL80211_IFTYPE_MESH_POINT) },
>>> +};
>>
>> The station max is just an arbitrary number or is 256 really
>> the max it can handle?  At least on ath9k, more are supported,
>> but I haven't tested ath5k lately....
> It is an arbitrary number.

I think the actual max for a channel (AP?) is somewhere around 2000, so maybe
make it 2048 just to make sure we are not adding artificial limitations?

Same with ath9k.

Thanks,
Ben

>
> - Felix


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


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

end of thread, other threads:[~2012-04-16 16:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-16 15:28 [PATCH] ath5k: add possible wiphy interface combinations Felix Fietkau
2012-04-16 16:02 ` Ben Greear
2012-04-16 16:07   ` Felix Fietkau
2012-04-16 16:11     ` Ben Greear

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