diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-12-23 07:15:42 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-28 16:55:03 -0500 |
commit | b8bc4b0aa9bfba755c64b11b8f60e6cfab25dc9d (patch) | |
tree | 7f95b0c7d4f847e3c624b67899c7a62f6b73ce26 /net/mac80211/cfg.c | |
parent | 9588bbd5529461a3dacd435bf239c84c3508f569 (diff) |
mac80211: support remain-on-channel command
This implements the new remain-on-channel cfg80211
command in mac80211, extending the work interface.
Also change the work purge code to be able to clean
up events properly (pretending they timed out.)
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index ea862dfc08ed..2e5e841e9b7b 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1441,6 +1441,28 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy, | |||
1441 | return -EINVAL; | 1441 | return -EINVAL; |
1442 | } | 1442 | } |
1443 | 1443 | ||
1444 | static int ieee80211_remain_on_channel(struct wiphy *wiphy, | ||
1445 | struct net_device *dev, | ||
1446 | struct ieee80211_channel *chan, | ||
1447 | enum nl80211_channel_type channel_type, | ||
1448 | unsigned int duration, | ||
1449 | u64 *cookie) | ||
1450 | { | ||
1451 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | ||
1452 | |||
1453 | return ieee80211_wk_remain_on_channel(sdata, chan, channel_type, | ||
1454 | duration, cookie); | ||
1455 | } | ||
1456 | |||
1457 | static int ieee80211_cancel_remain_on_channel(struct wiphy *wiphy, | ||
1458 | struct net_device *dev, | ||
1459 | u64 cookie) | ||
1460 | { | ||
1461 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | ||
1462 | |||
1463 | return ieee80211_wk_cancel_remain_on_channel(sdata, cookie); | ||
1464 | } | ||
1465 | |||
1444 | struct cfg80211_ops mac80211_config_ops = { | 1466 | struct cfg80211_ops mac80211_config_ops = { |
1445 | .add_virtual_intf = ieee80211_add_iface, | 1467 | .add_virtual_intf = ieee80211_add_iface, |
1446 | .del_virtual_intf = ieee80211_del_iface, | 1468 | .del_virtual_intf = ieee80211_del_iface, |
@@ -1487,4 +1509,6 @@ struct cfg80211_ops mac80211_config_ops = { | |||
1487 | CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd) | 1509 | CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd) |
1488 | .set_power_mgmt = ieee80211_set_power_mgmt, | 1510 | .set_power_mgmt = ieee80211_set_power_mgmt, |
1489 | .set_bitrate_mask = ieee80211_set_bitrate_mask, | 1511 | .set_bitrate_mask = ieee80211_set_bitrate_mask, |
1512 | .remain_on_channel = ieee80211_remain_on_channel, | ||
1513 | .cancel_remain_on_channel = ieee80211_cancel_remain_on_channel, | ||
1490 | }; | 1514 | }; |