linux-wireless.vger.kernel.org archive mirror
 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

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