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>
This commit is contained in:
committed by
John W. Linville
parent
87490f6db3
commit
34d4bc4d41
@@ -1537,6 +1537,12 @@ enum ieee80211_ampdu_mlme_action {
|
||||
* negative error code (which will be seen in userspace.)
|
||||
* Must be implemented and can sleep.
|
||||
*
|
||||
* @change_interface: Called when a netdevice changes type. This callback
|
||||
* is optional, but only if it is supported can interface types be
|
||||
* switched while the interface is UP. The callback may sleep.
|
||||
* Note that while an interface is being switched, it will not be
|
||||
* found by the interface iteration callbacks.
|
||||
*
|
||||
* @remove_interface: Notifies a driver that an interface is going down.
|
||||
* The @stop callback is called after this if it is the last interface
|
||||
* and no monitor interfaces are present.
|
||||
@@ -1693,6 +1699,9 @@ struct ieee80211_ops {
|
||||
void (*stop)(struct ieee80211_hw *hw);
|
||||
int (*add_interface)(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif);
|
||||
int (*change_interface)(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
enum nl80211_iftype new_type);
|
||||
void (*remove_interface)(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif);
|
||||
int (*config)(struct ieee80211_hw *hw, u32 changed);
|
||||
|
||||
Reference in New Issue
Block a user