diff options
author | Eliad Peller <eliad@wizery.com> | 2011-12-19 05:00:03 -0500 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-12-20 15:30:14 -0500 |
commit | c0fad1b76e5bf631ae27d34e94b8f44a0f731036 (patch) | |
tree | b4f2d2b587ef7d0eda50c8c963006ce06d0e987d | |
parent | 27bf88829f50cf1af2b052ecee2f6f0dbe4a5141 (diff) |
wl12xx: implement change_interface
Implement the change_interface callback by simply removing the
current vif and adding a new one after updating the vif type.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index c3058419e227..82fc318b6428 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -2269,6 +2269,17 @@ out: | |||
2269 | cancel_work_sync(&wl->recovery_work); | 2269 | cancel_work_sync(&wl->recovery_work); |
2270 | } | 2270 | } |
2271 | 2271 | ||
2272 | static int wl12xx_op_change_interface(struct ieee80211_hw *hw, | ||
2273 | struct ieee80211_vif *vif, | ||
2274 | enum nl80211_iftype new_type, bool p2p) | ||
2275 | { | ||
2276 | wl1271_op_remove_interface(hw, vif); | ||
2277 | |||
2278 | vif->type = ieee80211_iftype_p2p(new_type, p2p); | ||
2279 | vif->p2p = p2p; | ||
2280 | return wl1271_op_add_interface(hw, vif); | ||
2281 | } | ||
2282 | |||
2272 | static int wl1271_join(struct wl1271 *wl, struct wl12xx_vif *wlvif, | 2283 | static int wl1271_join(struct wl1271 *wl, struct wl12xx_vif *wlvif, |
2273 | bool set_assoc) | 2284 | bool set_assoc) |
2274 | { | 2285 | { |
@@ -4629,6 +4640,7 @@ static const struct ieee80211_ops wl1271_ops = { | |||
4629 | .stop = wl1271_op_stop, | 4640 | .stop = wl1271_op_stop, |
4630 | .add_interface = wl1271_op_add_interface, | 4641 | .add_interface = wl1271_op_add_interface, |
4631 | .remove_interface = wl1271_op_remove_interface, | 4642 | .remove_interface = wl1271_op_remove_interface, |
4643 | .change_interface = wl12xx_op_change_interface, | ||
4632 | #ifdef CONFIG_PM | 4644 | #ifdef CONFIG_PM |
4633 | .suspend = wl1271_op_suspend, | 4645 | .suspend = wl1271_op_suspend, |
4634 | .resume = wl1271_op_resume, | 4646 | .resume = wl1271_op_resume, |