diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-08-27 06:35:58 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-27 13:53:31 -0400 |
commit | 34d4bc4d41d282a66dafe1b01a7d46bad468cefb (patch) | |
tree | ac0936b00f1ebd037be32fd0e5f304f26366e6c0 /include/net/mac80211.h | |
parent | 87490f6db38999fee7f6d3dbecc5b94730c7e010 (diff) |
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 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 8f97548b6d80..f91fc331369b 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1537,6 +1537,12 @@ enum ieee80211_ampdu_mlme_action { | |||
1537 | * negative error code (which will be seen in userspace.) | 1537 | * negative error code (which will be seen in userspace.) |
1538 | * Must be implemented and can sleep. | 1538 | * Must be implemented and can sleep. |
1539 | * | 1539 | * |
1540 | * @change_interface: Called when a netdevice changes type. This callback | ||
1541 | * is optional, but only if it is supported can interface types be | ||
1542 | * switched while the interface is UP. The callback may sleep. | ||
1543 | * Note that while an interface is being switched, it will not be | ||
1544 | * found by the interface iteration callbacks. | ||
1545 | * | ||
1540 | * @remove_interface: Notifies a driver that an interface is going down. | 1546 | * @remove_interface: Notifies a driver that an interface is going down. |
1541 | * The @stop callback is called after this if it is the last interface | 1547 | * The @stop callback is called after this if it is the last interface |
1542 | * and no monitor interfaces are present. | 1548 | * and no monitor interfaces are present. |
@@ -1693,6 +1699,9 @@ struct ieee80211_ops { | |||
1693 | void (*stop)(struct ieee80211_hw *hw); | 1699 | void (*stop)(struct ieee80211_hw *hw); |
1694 | int (*add_interface)(struct ieee80211_hw *hw, | 1700 | int (*add_interface)(struct ieee80211_hw *hw, |
1695 | struct ieee80211_vif *vif); | 1701 | struct ieee80211_vif *vif); |
1702 | int (*change_interface)(struct ieee80211_hw *hw, | ||
1703 | struct ieee80211_vif *vif, | ||
1704 | enum nl80211_iftype new_type); | ||
1696 | void (*remove_interface)(struct ieee80211_hw *hw, | 1705 | void (*remove_interface)(struct ieee80211_hw *hw, |
1697 | struct ieee80211_vif *vif); | 1706 | struct ieee80211_vif *vif); |
1698 | int (*config)(struct ieee80211_hw *hw, u32 changed); | 1707 | int (*config)(struct ieee80211_hw *hw, u32 changed); |