* [RFC] rt2x00: advertise interface combinations
@ 2011-05-13 9:09 Johannes Berg
2011-05-15 15:24 ` Ivo Van Doorn
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2011-05-13 9:09 UTC (permalink / raw)
To: linux-wireless
From: Johannes Berg <johannes.berg@intel.com>
Make rt2x00 advertise that it potentially supports
more than one AP interface.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
I don't have any rt2x00 HW so this is completely untested. It compiles
though ;-)
drivers/net/wireless/rt2x00/rt2x00.h | 6 ++++++
drivers/net/wireless/rt2x00/rt2x00dev.c | 19 +++++++++++++++++++
2 files changed, 25 insertions(+)
--- a/drivers/net/wireless/rt2x00/rt2x00.h 2011-05-13 11:02:38.000000000 +0200
+++ b/drivers/net/wireless/rt2x00/rt2x00.h 2011-05-13 11:03:28.000000000 +0200
@@ -960,6 +960,12 @@ struct rt2x00_dev {
* Protect the interrupt mask register.
*/
spinlock_t irqmask_lock;
+
+ /*
+ * Interface combinations
+ */
+ struct ieee80211_iface_limit ap_limit;
+ struct ieee80211_iface_combination ap_combination;
};
/*
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c 2011-05-13 11:00:28.000000000 +0200
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c 2011-05-13 11:08:04.000000000 +0200
@@ -942,6 +942,25 @@ static int rt2x00lib_probe_hw(struct rt2
#undef RT2X00_TASKLET_INIT
/*
+ * Initialise supported virtual interface combinations
+ *
+ * Since currently, max_sta_intf is always 1, ignore it.
+ */
+ WARN_ON(rt2x00dev->ops->max_sta_intf != 1);
+ if (rt2x00dev->ops->max_ap_intf > 1) {
+ rt2x00dev->ap_limit.max = rt2x00dev->ops->max_ap_intf;
+ rt2x00dev->ap_limit.types = BIT(NL80211_IFTYPE_AP);
+ rt2x00dev->ap_combination.num_different_channels = 1;
+ rt2x00dev->ap_combination.max_interfaces =
+ rt2x00dev->ops->max_ap_intf;
+ rt2x00dev->ap_combination.limits = &rt2x00dev->ap_limit;
+ rt2x00dev->ap_combination.n_limits = 1;
+ rt2x00dev->hw->wiphy->iface_combinations =
+ &rt2x00dev->ap_combination;
+ rt2x00dev->hw->wiphy->n_iface_combinations = 1;
+ }
+
+ /*
* Register HW.
*/
status = ieee80211_register_hw(rt2x00dev->hw);
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [RFC] rt2x00: advertise interface combinations
2011-05-13 9:09 [RFC] rt2x00: advertise interface combinations Johannes Berg
@ 2011-05-15 15:24 ` Ivo Van Doorn
0 siblings, 0 replies; 2+ messages in thread
From: Ivo Van Doorn @ 2011-05-15 15:24 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
Hi,
On Fri, May 13, 2011 at 11:09 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> Make rt2x00 advertise that it potentially supports
> more than one AP interface.
>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
> I don't have any rt2x00 HW so this is completely untested. It compiles
> though ;-)
>
> drivers/net/wireless/rt2x00/rt2x00.h | 6 ++++++
> drivers/net/wireless/rt2x00/rt2x00dev.c | 19 +++++++++++++++++++
> 2 files changed, 25 insertions(+)
>
> --- a/drivers/net/wireless/rt2x00/rt2x00.h 2011-05-13 11:02:38.000000000 +0200
> +++ b/drivers/net/wireless/rt2x00/rt2x00.h 2011-05-13 11:03:28.000000000 +0200
> @@ -960,6 +960,12 @@ struct rt2x00_dev {
> * Protect the interrupt mask register.
> */
> spinlock_t irqmask_lock;
> +
> + /*
> + * Interface combinations
> + */
> + struct ieee80211_iface_limit ap_limit;
> + struct ieee80211_iface_combination ap_combination;
> };
>
> /*
> --- a/drivers/net/wireless/rt2x00/rt2x00dev.c 2011-05-13 11:00:28.000000000 +0200
> +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c 2011-05-13 11:08:04.000000000 +0200
> @@ -942,6 +942,25 @@ static int rt2x00lib_probe_hw(struct rt2
> #undef RT2X00_TASKLET_INIT
>
> /*
> + * Initialise supported virtual interface combinations
> + *
> + * Since currently, max_sta_intf is always 1, ignore it.
> + */
> + WARN_ON(rt2x00dev->ops->max_sta_intf != 1);
I don't think this WARN_ON will be needed, but with this entire patch,
I think that our own code for checking the interface limitations are no
longer needed. But I will clean that up later in a separate patch.
So for now:
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-15 15:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-13 9:09 [RFC] rt2x00: advertise interface combinations Johannes Berg
2011-05-15 15:24 ` Ivo Van Doorn
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).