aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-12-23 07:15:41 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-12-28 16:55:02 -0500
commit9588bbd5529461a3dacd435bf239c84c3508f569 (patch)
treedd00011714bdefdef1f818ac7caf53682253a515 /include/net/cfg80211.h
parentb203ffc3a447eb8d9e6120b783ddee081b143061 (diff)
cfg80211: add remain-on-channel command
Add new commands for requesting the driver to remain awake on a specified channel for the specified amount of time (and another command to cancel such an operation). This can be used to implement userspace-controlled off-channel operations, like Public Action frame exchange on another channel than the operation channel. The off-channel operation should behave similarly to scan, i.e. the local station (if associated) moves into power save mode to request the AP to buffer frames for it and then moves to the other channel to allow the off-channel operation to be completed. The duration parameter can be used to request enough time to receive a response from the target station. 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 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 542a477a94da..b66beb052054 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -988,6 +988,15 @@ struct cfg80211_pmksa {
988 * 988 *
989 * @dump_survey: get site survey information. 989 * @dump_survey: get site survey information.
990 * 990 *
991 * @remain_on_channel: Request the driver to remain awake on the specified
992 * channel for the specified duration to complete an off-channel
993 * operation (e.g., public action frame exchange). When the driver is
994 * ready on the requested channel, it must indicate this with an event
995 * notification by calling cfg80211_ready_on_channel().
996 * @cancel_remain_on_channel: Cancel an on-going remain-on-channel operation.
997 * This allows the operation to be terminated prior to timeout based on
998 * the duration value.
999 *
991 * @testmode_cmd: run a test mode command 1000 * @testmode_cmd: run a test mode command
992 * 1001 *
993 * @set_pmksa: Cache a PMKID for a BSSID. This is mostly useful for fullmac 1002 * @set_pmksa: Cache a PMKID for a BSSID. This is mostly useful for fullmac
@@ -1123,6 +1132,16 @@ struct cfg80211_ops {
1123 struct cfg80211_pmksa *pmksa); 1132 struct cfg80211_pmksa *pmksa);
1124 int (*flush_pmksa)(struct wiphy *wiphy, struct net_device *netdev); 1133 int (*flush_pmksa)(struct wiphy *wiphy, struct net_device *netdev);
1125 1134
1135 int (*remain_on_channel)(struct wiphy *wiphy,
1136 struct net_device *dev,
1137 struct ieee80211_channel *chan,
1138 enum nl80211_channel_type channel_type,
1139 unsigned int duration,
1140 u64 *cookie);
1141 int (*cancel_remain_on_channel)(struct wiphy *wiphy,
1142 struct net_device *dev,
1143 u64 cookie);
1144
1126 /* some temporary stuff to finish wext */ 1145 /* some temporary stuff to finish wext */
1127 int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev, 1146 int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev,
1128 bool enabled, int timeout); 1147 bool enabled, int timeout);
@@ -2147,5 +2166,33 @@ void cfg80211_roamed(struct net_device *dev, const u8 *bssid,
2147void cfg80211_disconnected(struct net_device *dev, u16 reason, 2166void cfg80211_disconnected(struct net_device *dev, u16 reason,
2148 u8 *ie, size_t ie_len, gfp_t gfp); 2167 u8 *ie, size_t ie_len, gfp_t gfp);
2149 2168
2169/**
2170 * cfg80211_ready_on_channel - notification of remain_on_channel start
2171 * @dev: network device
2172 * @cookie: the request cookie
2173 * @chan: The current channel (from remain_on_channel request)
2174 * @channel_type: Channel type
2175 * @duration: Duration in milliseconds that the driver intents to remain on the
2176 * channel
2177 * @gfp: allocation flags
2178 */
2179void cfg80211_ready_on_channel(struct net_device *dev, u64 cookie,
2180 struct ieee80211_channel *chan,
2181 enum nl80211_channel_type channel_type,
2182 unsigned int duration, gfp_t gfp);
2183
2184/**
2185 * cfg80211_remain_on_channel_expired - remain_on_channel duration expired
2186 * @dev: network device
2187 * @cookie: the request cookie
2188 * @chan: The current channel (from remain_on_channel request)
2189 * @channel_type: Channel type
2190 * @gfp: allocation flags
2191 */
2192void cfg80211_remain_on_channel_expired(struct net_device *dev,
2193 u64 cookie,
2194 struct ieee80211_channel *chan,
2195 enum nl80211_channel_type channel_type,
2196 gfp_t gfp);
2150 2197
2151#endif /* __NET_CFG80211_H */ 2198#endif /* __NET_CFG80211_H */