linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, Johannes Berg <johannes.berg@intel.com>
Subject: [PATCH 6/6] mac80211_hwsim: support runtime iftype changes
Date: Fri, 27 Aug 2010 12:35:59 +0200	[thread overview]
Message-ID: <20100827103659.106822399@sipsolutions.net> (raw)
In-Reply-To: 20100827103553.559128239@sipsolutions.net

From: Johannes Berg <johannes.berg@intel.com>

Add the trivial support for runtime interface
type changes to mac80211_hwsim for testing.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 drivers/net/wireless/mac80211_hwsim.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

--- wireless-testing.orig/drivers/net/wireless/mac80211_hwsim.c	2010-08-27 12:27:07.000000000 +0200
+++ wireless-testing/drivers/net/wireless/mac80211_hwsim.c	2010-08-27 12:27:09.000000000 +0200
@@ -601,6 +601,18 @@ static int mac80211_hwsim_add_interface(
 }
 
 
+static int mac80211_hwsim_change_interface(struct ieee80211_hw *hw,
+					   struct ieee80211_vif *vif,
+					   enum nl80211_iftype newtype)
+{
+	wiphy_debug(hw->wiphy,
+		    "%s (old type=%d, new type=%d, mac_addr=%pM)\n",
+		    __func__, vif->type, newtype, vif->addr);
+	hwsim_check_magic(vif);
+
+	return 0;
+}
+
 static void mac80211_hwsim_remove_interface(
 	struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 {
@@ -1027,6 +1039,7 @@ static struct ieee80211_ops mac80211_hws
 	.start = mac80211_hwsim_start,
 	.stop = mac80211_hwsim_stop,
 	.add_interface = mac80211_hwsim_add_interface,
+	.change_interface = mac80211_hwsim_change_interface,
 	.remove_interface = mac80211_hwsim_remove_interface,
 	.config = mac80211_hwsim_config,
 	.configure_filter = mac80211_hwsim_configure_filter,



      parent reply	other threads:[~2010-08-27 10:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-27 10:35 [PATCH 0/6] interface type switching while up Johannes Berg
2010-08-27 10:35 ` [PATCH 1/6] mac80211: clean up ifdown/cleanup paths Johannes Berg
2010-08-27 10:35 ` [PATCH 2/6] mac80211: switch to ieee80211_sdata_running Johannes Berg
2010-08-27 10:35 ` [PATCH 3/6] mac80211: simplify zero address checks Johannes Berg
2010-08-27 18:36   ` Gábor Stefanik
2010-08-27 19:24     ` Johannes Berg
2010-08-27 10:35 ` [PATCH 4/6] mac80211: split out concurrent vif checks Johannes Berg
2010-08-27 10:35 ` [PATCH 5/6] mac80211: support runtime interface type changes Johannes Berg
2010-08-27 10:35 ` Johannes Berg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100827103659.106822399@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=johannes.berg@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).