aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2014-03-20 11:53:20 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-03-20 11:53:20 -0400
commit7eb2450a51ea7606fa69ae4bb2113e0f228223cc (patch)
tree6cd273487574edd2da40ce14b1981e14a5171caa /include
parent474a41e94dfc85167e1761bfbb8bf180f90633b2 (diff)
parent73fb08e24ae840bc518facc2c605dd6bb3751fec (diff)
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Diffstat (limited to 'include')
-rw-r--r--include/linux/ieee80211.h4
-rw-r--r--include/net/cfg80211.h23
-rw-r--r--include/net/mac80211.h6
-rw-r--r--include/net/regulatory.h21
-rw-r--r--include/uapi/linux/nl80211.h6
5 files changed, 41 insertions, 19 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 06299048c4f4..f194ccb8539c 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -154,6 +154,10 @@ static inline u16 ieee80211_sn_sub(u16 sn1, u16 sn2)
154 802.11e clarifies the figure in section 7.1.2. The frame body is 154 802.11e clarifies the figure in section 7.1.2. The frame body is
155 up to 2304 octets long (maximum MSDU size) plus any crypt overhead. */ 155 up to 2304 octets long (maximum MSDU size) plus any crypt overhead. */
156#define IEEE80211_MAX_DATA_LEN 2304 156#define IEEE80211_MAX_DATA_LEN 2304
157/* 802.11ad extends maximum MSDU size for DMG (freq > 40Ghz) networks
158 * to 7920 bytes, see 8.2.3 General frame format
159 */
160#define IEEE80211_MAX_DATA_LEN_DMG 7920
157/* 30 byte 4 addr hdr, 2 byte QoS, 2304 byte MSDU, 12 byte crypt, 4 byte FCS */ 161/* 30 byte 4 addr hdr, 2 byte QoS, 2304 byte MSDU, 12 byte crypt, 4 byte FCS */
158#define IEEE80211_MAX_FRAME_LEN 2352 162#define IEEE80211_MAX_FRAME_LEN 2352
159 163
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 8c9ba44fb7cf..f3539a15c411 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -151,6 +151,7 @@ enum ieee80211_channel_flags {
151 * @dfs_state: current state of this channel. Only relevant if radar is required 151 * @dfs_state: current state of this channel. Only relevant if radar is required
152 * on this channel. 152 * on this channel.
153 * @dfs_state_entered: timestamp (jiffies) when the dfs state was entered. 153 * @dfs_state_entered: timestamp (jiffies) when the dfs state was entered.
154 * @dfs_cac_ms: DFS CAC time in milliseconds, this is valid for DFS channels.
154 */ 155 */
155struct ieee80211_channel { 156struct ieee80211_channel {
156 enum ieee80211_band band; 157 enum ieee80211_band band;
@@ -165,6 +166,7 @@ struct ieee80211_channel {
165 int orig_mag, orig_mpwr; 166 int orig_mag, orig_mpwr;
166 enum nl80211_dfs_state dfs_state; 167 enum nl80211_dfs_state dfs_state;
167 unsigned long dfs_state_entered; 168 unsigned long dfs_state_entered;
169 unsigned int dfs_cac_ms;
168}; 170};
169 171
170/** 172/**
@@ -2503,7 +2505,8 @@ struct cfg80211_ops {
2503 2505
2504 int (*start_radar_detection)(struct wiphy *wiphy, 2506 int (*start_radar_detection)(struct wiphy *wiphy,
2505 struct net_device *dev, 2507 struct net_device *dev,
2506 struct cfg80211_chan_def *chandef); 2508 struct cfg80211_chan_def *chandef,
2509 u32 cac_time_ms);
2507 int (*update_ft_ies)(struct wiphy *wiphy, struct net_device *dev, 2510 int (*update_ft_ies)(struct wiphy *wiphy, struct net_device *dev,
2508 struct cfg80211_update_ft_ies_params *ftie); 2511 struct cfg80211_update_ft_ies_params *ftie);
2509 int (*crit_proto_start)(struct wiphy *wiphy, 2512 int (*crit_proto_start)(struct wiphy *wiphy,
@@ -3180,6 +3183,7 @@ struct cfg80211_cached_keys;
3180 * @p2p_started: true if this is a P2P Device that has been started 3183 * @p2p_started: true if this is a P2P Device that has been started
3181 * @cac_started: true if DFS channel availability check has been started 3184 * @cac_started: true if DFS channel availability check has been started
3182 * @cac_start_time: timestamp (jiffies) when the dfs state was entered. 3185 * @cac_start_time: timestamp (jiffies) when the dfs state was entered.
3186 * @cac_time_ms: CAC time in ms
3183 * @ps: powersave mode is enabled 3187 * @ps: powersave mode is enabled
3184 * @ps_timeout: dynamic powersave timeout 3188 * @ps_timeout: dynamic powersave timeout
3185 * @ap_unexpected_nlportid: (private) netlink port ID of application 3189 * @ap_unexpected_nlportid: (private) netlink port ID of application
@@ -3235,6 +3239,7 @@ struct wireless_dev {
3235 3239
3236 bool cac_started; 3240 bool cac_started;
3237 unsigned long cac_start_time; 3241 unsigned long cac_start_time;
3242 unsigned int cac_time_ms;
3238 3243
3239#ifdef CONFIG_CFG80211_WEXT 3244#ifdef CONFIG_CFG80211_WEXT
3240 /* wext data */ 3245 /* wext data */
@@ -3667,7 +3672,7 @@ void cfg80211_sched_scan_stopped(struct wiphy *wiphy);
3667 * cfg80211_inform_bss_width_frame - inform cfg80211 of a received BSS frame 3672 * cfg80211_inform_bss_width_frame - inform cfg80211 of a received BSS frame
3668 * 3673 *
3669 * @wiphy: the wiphy reporting the BSS 3674 * @wiphy: the wiphy reporting the BSS
3670 * @channel: The channel the frame was received on 3675 * @rx_channel: The channel the frame was received on
3671 * @scan_width: width of the control channel 3676 * @scan_width: width of the control channel
3672 * @mgmt: the management frame (probe response or beacon) 3677 * @mgmt: the management frame (probe response or beacon)
3673 * @len: length of the management frame 3678 * @len: length of the management frame
@@ -3682,18 +3687,18 @@ void cfg80211_sched_scan_stopped(struct wiphy *wiphy);
3682 */ 3687 */
3683struct cfg80211_bss * __must_check 3688struct cfg80211_bss * __must_check
3684cfg80211_inform_bss_width_frame(struct wiphy *wiphy, 3689cfg80211_inform_bss_width_frame(struct wiphy *wiphy,
3685 struct ieee80211_channel *channel, 3690 struct ieee80211_channel *rx_channel,
3686 enum nl80211_bss_scan_width scan_width, 3691 enum nl80211_bss_scan_width scan_width,
3687 struct ieee80211_mgmt *mgmt, size_t len, 3692 struct ieee80211_mgmt *mgmt, size_t len,
3688 s32 signal, gfp_t gfp); 3693 s32 signal, gfp_t gfp);
3689 3694
3690static inline struct cfg80211_bss * __must_check 3695static inline struct cfg80211_bss * __must_check
3691cfg80211_inform_bss_frame(struct wiphy *wiphy, 3696cfg80211_inform_bss_frame(struct wiphy *wiphy,
3692 struct ieee80211_channel *channel, 3697 struct ieee80211_channel *rx_channel,
3693 struct ieee80211_mgmt *mgmt, size_t len, 3698 struct ieee80211_mgmt *mgmt, size_t len,
3694 s32 signal, gfp_t gfp) 3699 s32 signal, gfp_t gfp)
3695{ 3700{
3696 return cfg80211_inform_bss_width_frame(wiphy, channel, 3701 return cfg80211_inform_bss_width_frame(wiphy, rx_channel,
3697 NL80211_BSS_CHAN_WIDTH_20, 3702 NL80211_BSS_CHAN_WIDTH_20,
3698 mgmt, len, signal, gfp); 3703 mgmt, len, signal, gfp);
3699} 3704}
@@ -3702,7 +3707,7 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy,
3702 * cfg80211_inform_bss - inform cfg80211 of a new BSS 3707 * cfg80211_inform_bss - inform cfg80211 of a new BSS
3703 * 3708 *
3704 * @wiphy: the wiphy reporting the BSS 3709 * @wiphy: the wiphy reporting the BSS
3705 * @channel: The channel the frame was received on 3710 * @rx_channel: The channel the frame was received on
3706 * @scan_width: width of the control channel 3711 * @scan_width: width of the control channel
3707 * @bssid: the BSSID of the BSS 3712 * @bssid: the BSSID of the BSS
3708 * @tsf: the TSF sent by the peer in the beacon/probe response (or 0) 3713 * @tsf: the TSF sent by the peer in the beacon/probe response (or 0)
@@ -3721,7 +3726,7 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy,
3721 */ 3726 */
3722struct cfg80211_bss * __must_check 3727struct cfg80211_bss * __must_check
3723cfg80211_inform_bss_width(struct wiphy *wiphy, 3728cfg80211_inform_bss_width(struct wiphy *wiphy,
3724 struct ieee80211_channel *channel, 3729 struct ieee80211_channel *rx_channel,
3725 enum nl80211_bss_scan_width scan_width, 3730 enum nl80211_bss_scan_width scan_width,
3726 const u8 *bssid, u64 tsf, u16 capability, 3731 const u8 *bssid, u64 tsf, u16 capability,
3727 u16 beacon_interval, const u8 *ie, size_t ielen, 3732 u16 beacon_interval, const u8 *ie, size_t ielen,
@@ -3729,12 +3734,12 @@ cfg80211_inform_bss_width(struct wiphy *wiphy,
3729 3734
3730static inline struct cfg80211_bss * __must_check 3735static inline struct cfg80211_bss * __must_check
3731cfg80211_inform_bss(struct wiphy *wiphy, 3736cfg80211_inform_bss(struct wiphy *wiphy,
3732 struct ieee80211_channel *channel, 3737 struct ieee80211_channel *rx_channel,
3733 const u8 *bssid, u64 tsf, u16 capability, 3738 const u8 *bssid, u64 tsf, u16 capability,
3734 u16 beacon_interval, const u8 *ie, size_t ielen, 3739 u16 beacon_interval, const u8 *ie, size_t ielen,
3735 s32 signal, gfp_t gfp) 3740 s32 signal, gfp_t gfp)
3736{ 3741{
3737 return cfg80211_inform_bss_width(wiphy, channel, 3742 return cfg80211_inform_bss_width(wiphy, rx_channel,
3738 NL80211_BSS_CHAN_WIDTH_20, 3743 NL80211_BSS_CHAN_WIDTH_20,
3739 bssid, tsf, capability, 3744 bssid, tsf, capability,
3740 beacon_interval, ie, ielen, signal, 3745 beacon_interval, ie, ielen, signal,
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 86faa413b37d..2de7ff42ff3a 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -697,11 +697,11 @@ struct ieee80211_tx_info {
697 } control; 697 } control;
698 struct { 698 struct {
699 struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES]; 699 struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES];
700 int ack_signal; 700 s32 ack_signal;
701 u8 ampdu_ack_len; 701 u8 ampdu_ack_len;
702 u8 ampdu_len; 702 u8 ampdu_len;
703 u8 antenna; 703 u8 antenna;
704 /* 21 bytes free */ 704 void *status_driver_data[21 / sizeof(void *)];
705 } status; 705 } status;
706 struct { 706 struct {
707 struct ieee80211_tx_rate driver_rates[ 707 struct ieee80211_tx_rate driver_rates[
@@ -877,11 +877,13 @@ enum mac80211_rx_flags {
877 * @RX_VHT_FLAG_80MHZ: 80 MHz was used 877 * @RX_VHT_FLAG_80MHZ: 80 MHz was used
878 * @RX_VHT_FLAG_80P80MHZ: 80+80 MHz was used 878 * @RX_VHT_FLAG_80P80MHZ: 80+80 MHz was used
879 * @RX_VHT_FLAG_160MHZ: 160 MHz was used 879 * @RX_VHT_FLAG_160MHZ: 160 MHz was used
880 * @RX_VHT_FLAG_BF: packet was beamformed
880 */ 881 */
881enum mac80211_rx_vht_flags { 882enum mac80211_rx_vht_flags {
882 RX_VHT_FLAG_80MHZ = BIT(0), 883 RX_VHT_FLAG_80MHZ = BIT(0),
883 RX_VHT_FLAG_80P80MHZ = BIT(1), 884 RX_VHT_FLAG_80P80MHZ = BIT(1),
884 RX_VHT_FLAG_160MHZ = BIT(2), 885 RX_VHT_FLAG_160MHZ = BIT(2),
886 RX_VHT_FLAG_BF = BIT(3),
885}; 887};
886 888
887/** 889/**
diff --git a/include/net/regulatory.h b/include/net/regulatory.h
index b07cdc9fa454..75fc1f5a948d 100644
--- a/include/net/regulatory.h
+++ b/include/net/regulatory.h
@@ -155,6 +155,7 @@ struct ieee80211_reg_rule {
155 struct ieee80211_freq_range freq_range; 155 struct ieee80211_freq_range freq_range;
156 struct ieee80211_power_rule power_rule; 156 struct ieee80211_power_rule power_rule;
157 u32 flags; 157 u32 flags;
158 u32 dfs_cac_ms;
158}; 159};
159 160
160struct ieee80211_regdomain { 161struct ieee80211_regdomain {
@@ -172,14 +173,18 @@ struct ieee80211_regdomain {
172#define DBM_TO_MBM(gain) ((gain) * 100) 173#define DBM_TO_MBM(gain) ((gain) * 100)
173#define MBM_TO_DBM(gain) ((gain) / 100) 174#define MBM_TO_DBM(gain) ((gain) / 100)
174 175
175#define REG_RULE(start, end, bw, gain, eirp, reg_flags) \ 176#define REG_RULE_EXT(start, end, bw, gain, eirp, dfs_cac, reg_flags) \
176{ \ 177{ \
177 .freq_range.start_freq_khz = MHZ_TO_KHZ(start), \ 178 .freq_range.start_freq_khz = MHZ_TO_KHZ(start), \
178 .freq_range.end_freq_khz = MHZ_TO_KHZ(end), \ 179 .freq_range.end_freq_khz = MHZ_TO_KHZ(end), \
179 .freq_range.max_bandwidth_khz = MHZ_TO_KHZ(bw), \ 180 .freq_range.max_bandwidth_khz = MHZ_TO_KHZ(bw), \
180 .power_rule.max_antenna_gain = DBI_TO_MBI(gain),\ 181 .power_rule.max_antenna_gain = DBI_TO_MBI(gain), \
181 .power_rule.max_eirp = DBM_TO_MBM(eirp), \ 182 .power_rule.max_eirp = DBM_TO_MBM(eirp), \
182 .flags = reg_flags, \ 183 .flags = reg_flags, \
184 .dfs_cac_ms = dfs_cac, \
183} 185}
184 186
187#define REG_RULE(start, end, bw, gain, eirp, reg_flags) \
188 REG_RULE_EXT(start, end, bw, gain, eirp, 0, reg_flags)
189
185#endif 190#endif
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index ff72cab3cd3a..1ba9d626aa83 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -2335,6 +2335,7 @@ enum nl80211_band_attr {
2335 * @NL80211_FREQUENCY_ATTR_NO_160MHZ: any 160 MHz (but not 80+80) channel 2335 * @NL80211_FREQUENCY_ATTR_NO_160MHZ: any 160 MHz (but not 80+80) channel
2336 * using this channel as the primary or any of the secondary channels 2336 * using this channel as the primary or any of the secondary channels
2337 * isn't possible 2337 * isn't possible
2338 * @NL80211_FREQUENCY_ATTR_DFS_CAC_TIME: DFS CAC time in milliseconds.
2338 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number 2339 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
2339 * currently defined 2340 * currently defined
2340 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use 2341 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
@@ -2353,6 +2354,7 @@ enum nl80211_frequency_attr {
2353 NL80211_FREQUENCY_ATTR_NO_HT40_PLUS, 2354 NL80211_FREQUENCY_ATTR_NO_HT40_PLUS,
2354 NL80211_FREQUENCY_ATTR_NO_80MHZ, 2355 NL80211_FREQUENCY_ATTR_NO_80MHZ,
2355 NL80211_FREQUENCY_ATTR_NO_160MHZ, 2356 NL80211_FREQUENCY_ATTR_NO_160MHZ,
2357 NL80211_FREQUENCY_ATTR_DFS_CAC_TIME,
2356 2358
2357 /* keep last */ 2359 /* keep last */
2358 __NL80211_FREQUENCY_ATTR_AFTER_LAST, 2360 __NL80211_FREQUENCY_ATTR_AFTER_LAST,
@@ -2449,6 +2451,8 @@ enum nl80211_reg_type {
2449 * If you don't have one then don't send this. 2451 * If you don't have one then don't send this.
2450 * @NL80211_ATTR_POWER_RULE_MAX_EIRP: the maximum allowed EIRP for 2452 * @NL80211_ATTR_POWER_RULE_MAX_EIRP: the maximum allowed EIRP for
2451 * a given frequency range. The value is in mBm (100 * dBm). 2453 * a given frequency range. The value is in mBm (100 * dBm).
2454 * @NL80211_ATTR_DFS_CAC_TIME: DFS CAC time in milliseconds.
2455 * If not present or 0 default CAC time will be used.
2452 * @NL80211_REG_RULE_ATTR_MAX: highest regulatory rule attribute number 2456 * @NL80211_REG_RULE_ATTR_MAX: highest regulatory rule attribute number
2453 * currently defined 2457 * currently defined
2454 * @__NL80211_REG_RULE_ATTR_AFTER_LAST: internal use 2458 * @__NL80211_REG_RULE_ATTR_AFTER_LAST: internal use
@@ -2464,6 +2468,8 @@ enum nl80211_reg_rule_attr {
2464 NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN, 2468 NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN,
2465 NL80211_ATTR_POWER_RULE_MAX_EIRP, 2469 NL80211_ATTR_POWER_RULE_MAX_EIRP,
2466 2470
2471 NL80211_ATTR_DFS_CAC_TIME,
2472
2467 /* keep last */ 2473 /* keep last */
2468 __NL80211_REG_RULE_ATTR_AFTER_LAST, 2474 __NL80211_REG_RULE_ATTR_AFTER_LAST,
2469 NL80211_REG_RULE_ATTR_MAX = __NL80211_REG_RULE_ATTR_AFTER_LAST - 1 2475 NL80211_REG_RULE_ATTR_MAX = __NL80211_REG_RULE_ATTR_AFTER_LAST - 1