aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2014-11-09 11:50:20 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-11-19 12:45:26 -0500
commit8a4d32f30d11d6d8cc29594c7a36b9be6b0edbb5 (patch)
tree54d51263b8b4f0e05cc17071f7117e557400965d /include/net/mac80211.h
parenta7a6bdd0670feb8bfc26d41cda32b6064dbca50e (diff)
mac80211: add TDLS channel-switch Rx flow
When receiving a TDLS channel switch request or response, parse the frame and call a new tdls_recv_channel_switch op in the low level driver with the parsed data. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h37
1 files changed, 36 insertions, 1 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index fdedceb7adcb..56b7e2114728 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1827,6 +1827,31 @@ struct ieee80211_scan_request {
1827}; 1827};
1828 1828
1829/** 1829/**
1830 * struct ieee80211_tdls_ch_sw_params - TDLS channel switch parameters
1831 *
1832 * @sta: peer this TDLS channel-switch request/response came from
1833 * @chandef: channel referenced in a TDLS channel-switch request
1834 * @action_code: see &enum ieee80211_tdls_actioncode
1835 * @status: channel-switch response status
1836 * @timestamp: time at which the frame was received
1837 * @switch_time: switch-timing parameter received in the frame
1838 * @switch_timeout: switch-timing parameter received in the frame
1839 * @tmpl_skb: TDLS switch-channel response template
1840 * @ch_sw_tm_ie: offset of the channel-switch timing IE inside @tmpl_skb
1841 */
1842struct ieee80211_tdls_ch_sw_params {
1843 struct ieee80211_sta *sta;
1844 struct cfg80211_chan_def *chandef;
1845 u8 action_code;
1846 u32 status;
1847 u32 timestamp;
1848 u16 switch_time;
1849 u16 switch_timeout;
1850 struct sk_buff *tmpl_skb;
1851 u32 ch_sw_tm_ie;
1852};
1853
1854/**
1830 * wiphy_to_ieee80211_hw - return a mac80211 driver hw struct from a wiphy 1855 * wiphy_to_ieee80211_hw - return a mac80211 driver hw struct from a wiphy
1831 * 1856 *
1832 * @wiphy: the &struct wiphy which we want to query 1857 * @wiphy: the &struct wiphy which we want to query
@@ -2925,6 +2950,13 @@ enum ieee80211_reconfig_type {
2925 * optionally copy the skb for further re-use. 2950 * optionally copy the skb for further re-use.
2926 * @tdls_cancel_channel_switch: Stop channel-switching with a TDLS peer. Both 2951 * @tdls_cancel_channel_switch: Stop channel-switching with a TDLS peer. Both
2927 * peers must be on the base channel when the call completes. 2952 * peers must be on the base channel when the call completes.
2953 * @tdls_recv_channel_switch: a TDLS channel-switch related frame (request or
2954 * response) has been received from a remote peer. The driver gets
2955 * parameters parsed from the incoming frame and may use them to continue
2956 * an ongoing channel-switch operation. In addition, a channel-switch
2957 * response template is provided, together with the location of the
2958 * switch-timing IE within the template. The skb can only be used within
2959 * the function call.
2928 */ 2960 */
2929struct ieee80211_ops { 2961struct ieee80211_ops {
2930 void (*tx)(struct ieee80211_hw *hw, 2962 void (*tx)(struct ieee80211_hw *hw,
@@ -3141,10 +3173,13 @@ struct ieee80211_ops {
3141 struct ieee80211_vif *vif, 3173 struct ieee80211_vif *vif,
3142 struct ieee80211_sta *sta, u8 oper_class, 3174 struct ieee80211_sta *sta, u8 oper_class,
3143 struct cfg80211_chan_def *chandef, 3175 struct cfg80211_chan_def *chandef,
3144 struct sk_buff *skb, u32 ch_sw_tm_ie); 3176 struct sk_buff *tmpl_skb, u32 ch_sw_tm_ie);
3145 void (*tdls_cancel_channel_switch)(struct ieee80211_hw *hw, 3177 void (*tdls_cancel_channel_switch)(struct ieee80211_hw *hw,
3146 struct ieee80211_vif *vif, 3178 struct ieee80211_vif *vif,
3147 struct ieee80211_sta *sta); 3179 struct ieee80211_sta *sta);
3180 void (*tdls_recv_channel_switch)(struct ieee80211_hw *hw,
3181 struct ieee80211_vif *vif,
3182 struct ieee80211_tdls_ch_sw_params *params);
3148}; 3183};
3149 3184
3150/** 3185/**