* [PATCH] wlcore: declare interface combinations
@ 2012-06-13 17:29 Yoni Divinsky
2012-06-13 19:06 ` Luciano Coelho
0 siblings, 1 reply; 2+ messages in thread
From: Yoni Divinsky @ 2012-06-13 17:29 UTC (permalink / raw)
To: linux-wireless; +Cc: coelho, Eliad Peller, Yoni Divinsky
From: Eliad Peller <eliad@wizery.com>
Advertise to the stack that the wlcore driver
supports multiple interfaces for a single device.
This is required in order to be able to run
multirole with mac80211.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
---
drivers/net/wireless/ti/wlcore/main.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 5886da5..cac5f46 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -5019,6 +5019,29 @@ static void wl1271_unregister_hw(struct wl1271 *wl)
}
+static const struct ieee80211_iface_limit wlcore_iface_limits[] = {
+ {
+ .max = 2,
+ .types = BIT(NL80211_IFTYPE_STATION),
+ },
+ {
+ .max = 1,
+ .types = BIT(NL80211_IFTYPE_AP) |
+ BIT(NL80211_IFTYPE_P2P_GO) |
+ BIT(NL80211_IFTYPE_P2P_CLIENT),
+ },
+};
+
+static const struct ieee80211_iface_combination
+wlcore_iface_combinations[] = {
+ {
+ .num_different_channels = 1,
+ .max_interfaces = 2,
+ .limits = wlcore_iface_limits,
+ .n_limits = ARRAY_SIZE(wlcore_iface_limits),
+ },
+};
+
static int wl1271_init_ieee80211(struct wl1271 *wl)
{
static const u32 cipher_suites[] = {
@@ -5113,6 +5136,11 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 |
NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P;
+ /* allowed interface combinations */
+ wl->hw->wiphy->iface_combinations = wlcore_iface_combinations;
+ wl->hw->wiphy->n_iface_combinations =
+ ARRAY_SIZE(wlcore_iface_combinations);
+
SET_IEEE80211_DEV(wl->hw, wl->dev);
wl->hw->sta_data_size = sizeof(struct wl1271_station);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] wlcore: declare interface combinations
2012-06-13 17:29 [PATCH] wlcore: declare interface combinations Yoni Divinsky
@ 2012-06-13 19:06 ` Luciano Coelho
0 siblings, 0 replies; 2+ messages in thread
From: Luciano Coelho @ 2012-06-13 19:06 UTC (permalink / raw)
To: Yoni Divinsky; +Cc: linux-wireless, Eliad Peller
On Wed, 2012-06-13 at 20:29 +0300, Yoni Divinsky wrote:
> From: Eliad Peller <eliad@wizery.com>
>
> Advertise to the stack that the wlcore driver
> supports multiple interfaces for a single device.
> This is required in order to be able to run
> multirole with mac80211.
>
> Signed-off-by: Eliad Peller <eliad@wizery.com>
> Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
> ---
Applied and pushed, thanks guys!
--
Luca.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-13 19:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-13 17:29 [PATCH] wlcore: declare interface combinations Yoni Divinsky
2012-06-13 19:06 ` Luciano Coelho
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.