aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2010-05-11 10:20:57 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-05-12 16:39:05 -0400
commit5ce6e438d5d9ed8ed775cd1e94f92002c8da2bad (patch)
tree9b6ce4bc8e7600e30124c8b0f1cbc2ae06499722 /include/net/mac80211.h
parentb29e7eb4b8b3e5f4ff8066af648e9fe2fc707b16 (diff)
mac80211: add offload channel switch support
This adds support for offloading the channel switch operation to devices that support such, typically by having specific firmware API for it. The reasons for this could be that the firmware provides better timing or that regulatory enforcement done by the device requires special handling of CSAs. In order to allow drivers to specify the timing to the device, the new channel_switch callback will pass through the received frame's mactime, where available. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 9448a5b1bb15..389e86a54fc4 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -712,6 +712,28 @@ struct ieee80211_conf {
712}; 712};
713 713
714/** 714/**
715 * struct ieee80211_channel_switch - holds the channel switch data
716 *
717 * The information provided in this structure is required for channel switch
718 * operation.
719 *
720 * @timestamp: value in microseconds of the 64-bit Time Synchronization
721 * Function (TSF) timer when the frame containing the channel switch
722 * announcement was received. This is simply the rx.mactime parameter
723 * the driver passed into mac80211.
724 * @block_tx: Indicates whether transmission must be blocked before the
725 * scheduled channel switch, as indicated by the AP.
726 * @channel: the new channel to switch to
727 * @count: the number of TBTT's until the channel switch event
728 */
729struct ieee80211_channel_switch {
730 u64 timestamp;
731 bool block_tx;
732 struct ieee80211_channel *channel;
733 u8 count;
734};
735
736/**
715 * struct ieee80211_vif - per-interface data 737 * struct ieee80211_vif - per-interface data
716 * 738 *
717 * Data in this structure is continually present for driver 739 * Data in this structure is continually present for driver
@@ -1631,6 +1653,11 @@ enum ieee80211_ampdu_mlme_action {
1631 * @flush: Flush all pending frames from the hardware queue, making sure 1653 * @flush: Flush all pending frames from the hardware queue, making sure
1632 * that the hardware queues are empty. If the parameter @drop is set 1654 * that the hardware queues are empty. If the parameter @drop is set
1633 * to %true, pending frames may be dropped. The callback can sleep. 1655 * to %true, pending frames may be dropped. The callback can sleep.
1656 *
1657 * @channel_switch: Drivers that need (or want) to offload the channel
1658 * switch operation for CSAs received from the AP may implement this
1659 * callback. They must then call ieee80211_chswitch_done() to indicate
1660 * completion of the channel switch.
1634 */ 1661 */
1635struct ieee80211_ops { 1662struct ieee80211_ops {
1636 int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); 1663 int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
@@ -1694,6 +1721,8 @@ struct ieee80211_ops {
1694 int (*testmode_cmd)(struct ieee80211_hw *hw, void *data, int len); 1721 int (*testmode_cmd)(struct ieee80211_hw *hw, void *data, int len);
1695#endif 1722#endif
1696 void (*flush)(struct ieee80211_hw *hw, bool drop); 1723 void (*flush)(struct ieee80211_hw *hw, bool drop);
1724 void (*channel_switch)(struct ieee80211_hw *hw,
1725 struct ieee80211_channel_switch *ch_switch);
1697}; 1726};
1698 1727
1699/** 1728/**
@@ -2444,6 +2473,16 @@ void ieee80211_cqm_rssi_notify(struct ieee80211_vif *vif,
2444 enum nl80211_cqm_rssi_threshold_event rssi_event, 2473 enum nl80211_cqm_rssi_threshold_event rssi_event,
2445 gfp_t gfp); 2474 gfp_t gfp);
2446 2475
2476/**
2477 * ieee80211_chswitch_done - Complete channel switch process
2478 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
2479 * @success: make the channel switch successful or not
2480 *
2481 * Complete the channel switch post-process: set the new operational channel
2482 * and wake up the suspended queues.
2483 */
2484void ieee80211_chswitch_done(struct ieee80211_vif *vif, bool success);
2485
2447/* Rate control API */ 2486/* Rate control API */
2448 2487
2449/** 2488/**