aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Pedersen <c_tpeder@qca.qualcomm.com>2012-04-06 16:35:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-11 16:23:59 -0400
commit5314526b1743e8e8614293db7d86e480b4fe9824 (patch)
treec493979d2d417b9a146ac6ef5e1b5562a5fda6df /include
parent14dc7852099535d17807e348dd127433413b7e0a (diff)
cfg80211: add channel switch notify event
The firmware may decide to switch channels while already beaconing, e.g. in response to a cfg80211 connect request on a different vif. Add this event to notify userspace when an AP or GO interface has successfully migrated to a new channel, so it can update its configuration accordingly. Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nl80211.h7
-rw-r--r--include/net/cfg80211.h11
2 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index c6d26328a166..1335084b1c69 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -548,6 +548,11 @@
548 * @NL80211_CMD_SET_NOACK_MAP: sets a bitmap for the individual TIDs whether 548 * @NL80211_CMD_SET_NOACK_MAP: sets a bitmap for the individual TIDs whether
549 * No Acknowledgement Policy should be applied. 549 * No Acknowledgement Policy should be applied.
550 * 550 *
551 * @NL80211_CMD_CH_SWITCH_NOTIFY: An AP or GO may decide to switch channels
552 * independently of the userspace SME, send this event indicating
553 * %NL80211_ATTR_IFINDEX is now on %NL80211_ATTR_WIPHY_FREQ with
554 * %NL80211_ATTR_WIPHY_CHANNEL_TYPE.
555 *
551 * @NL80211_CMD_MAX: highest used command number 556 * @NL80211_CMD_MAX: highest used command number
552 * @__NL80211_CMD_AFTER_LAST: internal use 557 * @__NL80211_CMD_AFTER_LAST: internal use
553 */ 558 */
@@ -689,6 +694,8 @@ enum nl80211_commands {
689 694
690 NL80211_CMD_SET_NOACK_MAP, 695 NL80211_CMD_SET_NOACK_MAP,
691 696
697 NL80211_CMD_CH_SWITCH_NOTIFY,
698
692 /* add new commands above here */ 699 /* add new commands above here */
693 700
694 /* used to define NL80211_CMD_MAX below */ 701 /* used to define NL80211_CMD_MAX below */
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 1fd1c4acfc8e..a587867375b2 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -3355,6 +3355,17 @@ int cfg80211_can_beacon_sec_chan(struct wiphy *wiphy,
3355 enum nl80211_channel_type channel_type); 3355 enum nl80211_channel_type channel_type);
3356 3356
3357/* 3357/*
3358 * cfg80211_ch_switch_notify - update wdev channel and notify userspace
3359 * @dev: the device which switched channels
3360 * @freq: new channel frequency (in MHz)
3361 * @type: channel type
3362 *
3363 * Acquires wdev_lock, so must only be called from sleepable driver context!
3364 */
3365void cfg80211_ch_switch_notify(struct net_device *dev, int freq,
3366 enum nl80211_channel_type type);
3367
3368/*
3358 * cfg80211_calculate_bitrate - calculate actual bitrate (in 100Kbps units) 3369 * cfg80211_calculate_bitrate - calculate actual bitrate (in 100Kbps units)
3359 * @rate: given rate_info to calculate bitrate from 3370 * @rate: given rate_info to calculate bitrate from
3360 * 3371 *