diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-08-21 14:51:05 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-28 14:40:31 -0400 |
commit | 3d54d25515838543e56889aa7e48f40d00719368 (patch) | |
tree | ac8e7ab50b5fa9e9be64885f86c99a0b6c71892c /net/wireless/core.h | |
parent | f7969969f416e593bcc7dc24abf3f9fd6c27136d (diff) |
cfg80211: clean up properly on interface type change
When the interface type changes while connected, and the
driver does not require the interface to be down for a
type change, it is currently possible to get very strange
results unless the driver takes special care, which it
shouldn't have to.
To fix this, take care to disconnect/leave IBSS when
changing the interface type -- even if the driver may fail
the call. Also process all events that may be pending to
avoid running into a situation where an event is reported
but only processed after the type has already changed,
which would lead to missing events and warnings.
A side effect of this is that you will have disconnected
or left the IBSS even if the mode change ultimately fails,
but since the intention was to change it and thus leave or
disconnect, this is not a problem.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/core.h')
-rw-r--r-- | net/wireless/core.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h index d262d42cbd5e..2a33d8bc886b 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h @@ -372,6 +372,10 @@ void cfg80211_sme_disassoc(struct net_device *dev, int idx); void __cfg80211_scan_done(struct work_struct *wk); void ___cfg80211_scan_done(struct cfg80211_registered_device *rdev, bool leak); void cfg80211_upload_connect_keys(struct wireless_dev *wdev); +int cfg80211_change_iface(struct cfg80211_registered_device *rdev, + struct net_device *dev, enum nl80211_iftype ntype, + u32 *flags, struct vif_params *params); +void cfg80211_process_rdev_events(struct cfg80211_registered_device *rdev); struct ieee80211_channel * rdev_fixed_channel(struct cfg80211_registered_device *rdev, |