aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2012-06-13 13:29:16 -0400
committerLuciano Coelho <coelho@ti.com>2012-06-13 14:57:10 -0400
commitbcab320ba20edf166d82d42928401a0afe61e0c5 (patch)
tree288973a03782bdafeabcb521084bc39762142c92
parentb0b09e312ad36993a9ae51993b73448c1e38fc14 (diff)
wlcore: declare interface combinations
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> Signed-off-by: Luciano Coelho <coelho@ti.com>
-rw-r--r--drivers/net/wireless/ti/wlcore/main.c28
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 21e05476cd35..8eefcd7505e2 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -4977,6 +4977,29 @@ static void wl1271_unregister_hw(struct wl1271 *wl)
4977 4977
4978} 4978}
4979 4979
4980static const struct ieee80211_iface_limit wlcore_iface_limits[] = {
4981 {
4982 .max = 2,
4983 .types = BIT(NL80211_IFTYPE_STATION),
4984 },
4985 {
4986 .max = 1,
4987 .types = BIT(NL80211_IFTYPE_AP) |
4988 BIT(NL80211_IFTYPE_P2P_GO) |
4989 BIT(NL80211_IFTYPE_P2P_CLIENT),
4990 },
4991};
4992
4993static const struct ieee80211_iface_combination
4994wlcore_iface_combinations[] = {
4995 {
4996 .num_different_channels = 1,
4997 .max_interfaces = 2,
4998 .limits = wlcore_iface_limits,
4999 .n_limits = ARRAY_SIZE(wlcore_iface_limits),
5000 },
5001};
5002
4980static int wl1271_init_ieee80211(struct wl1271 *wl) 5003static int wl1271_init_ieee80211(struct wl1271 *wl)
4981{ 5004{
4982 static const u32 cipher_suites[] = { 5005 static const u32 cipher_suites[] = {
@@ -5070,6 +5093,11 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
5070 NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 | 5093 NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 |
5071 NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P; 5094 NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P;
5072 5095
5096 /* allowed interface combinations */
5097 wl->hw->wiphy->iface_combinations = wlcore_iface_combinations;
5098 wl->hw->wiphy->n_iface_combinations =
5099 ARRAY_SIZE(wlcore_iface_combinations);
5100
5073 SET_IEEE80211_DEV(wl->hw, wl->dev); 5101 SET_IEEE80211_DEV(wl->hw, wl->dev);
5074 5102
5075 wl->hw->sta_data_size = sizeof(struct wl1271_station); 5103 wl->hw->sta_data_size = sizeof(struct wl1271_station);