summaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-08-27 12:35:58 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-08-27 13:53:31 -0400
commit34d4bc4d41d282a66dafe1b01a7d46bad468cefb (patch)
treeac0936b00f1ebd037be32fd0e5f304f26366e6c0 /net/mac80211/ieee80211_i.h
parent87490f6db38999fee7f6d3dbecc5b94730c7e010 (diff)
downloadblackbird-obmc-linux-34d4bc4d41d282a66dafe1b01a7d46bad468cefb.tar.gz
blackbird-obmc-linux-34d4bc4d41d282a66dafe1b01a7d46bad468cefb.zip
mac80211: support runtime interface type changes
Add support to mac80211 for changing the interface type even when the interface is UP, if the driver supports it. To achieve this * add a new driver callback for switching, * split some of the interface up/down code out into new functions (do_open/do_stop), and * maintain an own __SDATA_RUNNING bit that will not be set during interface type, so that any other code doesn't use the interface. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index f64837788681..d529bd5eab47 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -472,6 +472,16 @@ enum ieee80211_sub_if_data_flags {
IEEE80211_SDATA_DONT_BRIDGE_PACKETS = BIT(3),
};
+/**
+ * enum ieee80211_sdata_state_bits - virtual interface state bits
+ * @SDATA_STATE_RUNNING: virtual interface is up & running; this
+ * mirrors netif_running() but is separate for interface type
+ * change handling while the interface is up
+ */
+enum ieee80211_sdata_state_bits {
+ SDATA_STATE_RUNNING,
+};
+
struct ieee80211_sub_if_data {
struct list_head list;
@@ -485,6 +495,8 @@ struct ieee80211_sub_if_data {
unsigned int flags;
+ unsigned long state;
+
int drop_unencrypted;
char name[IFNAMSIZ];
@@ -1087,7 +1099,7 @@ void ieee80211_recalc_idle(struct ieee80211_local *local);
static inline bool ieee80211_sdata_running(struct ieee80211_sub_if_data *sdata)
{
- return netif_running(sdata->dev);
+ return test_bit(SDATA_STATE_RUNNING, &sdata->state);
}
/* tx handling */
OpenPOWER on IntegriCloud