All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211_hwsim: enabling WDS
@ 2017-09-19 11:56 Ramon Fontes
  2017-09-19 15:58 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Ramon Fontes @ 2017-09-19 11:56 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless

Hi,

I'm developing an wireless emulator
(https://github.com/intrig-unicamp/mininet-wifi) which relies on
mac80211_hwsim for loading virtual wireless interfaces. In order to
get access points wirelessly connected I was think to enable WDS (in
addition to the well known mesh mode).

Then, I went through mac80211_hwsim and I noticed that I could make it
work with BIT(NL80211_IFTYPE_WDS) in mac80211_hwsim. That said, I
thought to submit this patch.

ps. I'm not an expert in Linux Kernel and I don't know if something
else have to be done. It just worked applying this patch.

---
 drivers/net/wireless/mac80211_hwsim.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/mac80211_hwsim.c
b/drivers/net/wireless/mac80211_hwsim.c
index 6467ffac9811e..1f8229e545190 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -453,6 +453,7 @@ static const struct ieee80211_iface_limit
hwsim_if_limits[] = {
                                 BIT(NL80211_IFTYPE_MESH_POINT) |
 #endif
                                 BIT(NL80211_IFTYPE_AP) |
+                                BIT(NL80211_IFTYPE_WDS) |
                                 BIT(NL80211_IFTYPE_P2P_GO) },
        /* must be last, see hwsim_if_comb */
        { .max = 1, .types = BIT(NL80211_IFTYPE_P2P_DEVICE) }
@@ -2562,6 +2563,7 @@ static int mac80211_hwsim_new_radio(struct
genl_info *info,
        hw->offchannel_tx_hw_queue = 4;
        hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
                                     BIT(NL80211_IFTYPE_AP) |
+                                    BIT(NL80211_IFTYPE_WDS) |
                                     BIT(NL80211_IFTYPE_P2P_CLIENT) |
                                     BIT(NL80211_IFTYPE_P2P_GO) |
                                     BIT(NL80211_IFTYPE_ADHOC) |

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

* Re: [PATCH] mac80211_hwsim: enabling WDS
  2017-09-19 11:56 [PATCH] mac80211_hwsim: enabling WDS Ramon Fontes
@ 2017-09-19 15:58 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2017-09-19 15:58 UTC (permalink / raw)
  To: Ramon Fontes; +Cc: linux-wireless

Hi,

> I'm developing an wireless emulator
> (https://github.com/intrig-unicamp/mininet-wifi) which relies on
> mac80211_hwsim for loading virtual wireless interfaces. In order to
> get access points wirelessly connected I was think to enable WDS (in
> addition to the well known mesh mode).

Why would you want to have WDS? IMHO if you really want to do it over
wifi it makes more sense to use 4-addr AP/client. That at least gives
you a reasonable configuration one might use in the real world - WDS
can't negotiate HT/VHT for example, making it pretty much useless these
days.

> Then, I went through mac80211_hwsim and I noticed that I could make
> it work with BIT(NL80211_IFTYPE_WDS) in mac80211_hwsim. That said, I
> thought to submit this patch.
> 
> ps. I'm not an expert in Linux Kernel and I don't know if something
> else have to be done. It just worked applying this patch.

It may work in hwsim, but I don't really want to encourage such usage.

I'd even argue that we should just remove support for this from the
kernel entirely, but that will probably not happen.

johannes

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

end of thread, other threads:[~2017-09-19 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-19 11:56 [PATCH] mac80211_hwsim: enabling WDS Ramon Fontes
2017-09-19 15:58 ` Johannes Berg

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.