diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-11-26 14:46:41 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-11-26 14:46:41 -0500 |
commit | 62c8003ecb973986958e9dade4a7e598349caf48 (patch) | |
tree | 0e831639cd6449c2955234cfc37ef46481c788d1 /include | |
parent | e4cb3ff9311e0817e65cda7bc53898348aab7527 (diff) | |
parent | ec816087e8978b74c1bd5fae0e335dd97d964e9f (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.h | 38 | ||||
-rw-r--r-- | include/net/cfg80211.h | 170 | ||||
-rw-r--r-- | include/net/mac80211.h | 66 | ||||
-rw-r--r-- | include/uapi/linux/nl80211.h | 96 |
4 files changed, 289 insertions, 81 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index d68790903b9e..f9c5a787d350 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -668,6 +668,21 @@ struct ieee80211_meshconf_ie { | |||
668 | } __attribute__ ((packed)); | 668 | } __attribute__ ((packed)); |
669 | 669 | ||
670 | /** | 670 | /** |
671 | * enum mesh_config_capab_flags - Mesh Configuration IE capability field flags | ||
672 | * | ||
673 | * @IEEE80211_MESHCONF_CAPAB_ACCEPT_PLINKS: STA is willing to establish | ||
674 | * additional mesh peerings with other mesh STAs | ||
675 | * @IEEE80211_MESHCONF_CAPAB_FORWARDING: the STA forwards MSDUs | ||
676 | * @IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING: TBTT adjustment procedure | ||
677 | * is ongoing | ||
678 | */ | ||
679 | enum mesh_config_capab_flags { | ||
680 | IEEE80211_MESHCONF_CAPAB_ACCEPT_PLINKS = 0x01, | ||
681 | IEEE80211_MESHCONF_CAPAB_FORWARDING = 0x08, | ||
682 | IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING = 0x20, | ||
683 | }; | ||
684 | |||
685 | /** | ||
671 | * struct ieee80211_rann_ie | 686 | * struct ieee80211_rann_ie |
672 | * | 687 | * |
673 | * This structure refers to "Root Announcement information element" | 688 | * This structure refers to "Root Announcement information element" |
@@ -1148,11 +1163,13 @@ struct ieee80211_ht_operation { | |||
1148 | * STA can receive. Rate expressed in units of 1 Mbps. | 1163 | * STA can receive. Rate expressed in units of 1 Mbps. |
1149 | * If this field is 0 this value should not be used to | 1164 | * If this field is 0 this value should not be used to |
1150 | * consider the highest RX data rate supported. | 1165 | * consider the highest RX data rate supported. |
1166 | * The top 3 bits of this field are reserved. | ||
1151 | * @tx_mcs_map: TX MCS map 2 bits for each stream, total 8 streams | 1167 | * @tx_mcs_map: TX MCS map 2 bits for each stream, total 8 streams |
1152 | * @tx_highest: Indicates highest long GI VHT PPDU data rate | 1168 | * @tx_highest: Indicates highest long GI VHT PPDU data rate |
1153 | * STA can transmit. Rate expressed in units of 1 Mbps. | 1169 | * STA can transmit. Rate expressed in units of 1 Mbps. |
1154 | * If this field is 0 this value should not be used to | 1170 | * If this field is 0 this value should not be used to |
1155 | * consider the highest TX data rate supported. | 1171 | * consider the highest TX data rate supported. |
1172 | * The top 3 bits of this field are reserved. | ||
1156 | */ | 1173 | */ |
1157 | struct ieee80211_vht_mcs_info { | 1174 | struct ieee80211_vht_mcs_info { |
1158 | __le16 rx_mcs_map; | 1175 | __le16 rx_mcs_map; |
@@ -1162,6 +1179,27 @@ struct ieee80211_vht_mcs_info { | |||
1162 | } __packed; | 1179 | } __packed; |
1163 | 1180 | ||
1164 | /** | 1181 | /** |
1182 | * enum ieee80211_vht_mcs_support - VHT MCS support definitions | ||
1183 | * @IEEE80211_VHT_MCS_SUPPORT_0_7: MCSes 0-7 are supported for the | ||
1184 | * number of streams | ||
1185 | * @IEEE80211_VHT_MCS_SUPPORT_0_8: MCSes 0-8 are supported | ||
1186 | * @IEEE80211_VHT_MCS_SUPPORT_0_9: MCSes 0-9 are supported | ||
1187 | * @IEEE80211_VHT_MCS_NOT_SUPPORTED: This number of streams isn't supported | ||
1188 | * | ||
1189 | * These definitions are used in each 2-bit subfield of the @rx_mcs_map | ||
1190 | * and @tx_mcs_map fields of &struct ieee80211_vht_mcs_info, which are | ||
1191 | * both split into 8 subfields by number of streams. These values indicate | ||
1192 | * which MCSes are supported for the number of streams the value appears | ||
1193 | * for. | ||
1194 | */ | ||
1195 | enum ieee80211_vht_mcs_support { | ||
1196 | IEEE80211_VHT_MCS_SUPPORT_0_7 = 0, | ||
1197 | IEEE80211_VHT_MCS_SUPPORT_0_8 = 1, | ||
1198 | IEEE80211_VHT_MCS_SUPPORT_0_9 = 2, | ||
1199 | IEEE80211_VHT_MCS_NOT_SUPPORTED = 3, | ||
1200 | }; | ||
1201 | |||
1202 | /** | ||
1165 | * struct ieee80211_vht_cap - VHT capabilities | 1203 | * struct ieee80211_vht_cap - VHT capabilities |
1166 | * | 1204 | * |
1167 | * This structure is the "VHT capabilities element" as | 1205 | * This structure is the "VHT capabilities element" as |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 8a1aec54e68f..e78db2cf3d1b 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -306,6 +306,88 @@ struct key_params { | |||
306 | }; | 306 | }; |
307 | 307 | ||
308 | /** | 308 | /** |
309 | * struct cfg80211_chan_def - channel definition | ||
310 | * @chan: the (control) channel | ||
311 | * @width: channel width | ||
312 | * @center_freq1: center frequency of first segment | ||
313 | * @center_freq2: center frequency of second segment | ||
314 | * (only with 80+80 MHz) | ||
315 | */ | ||
316 | struct cfg80211_chan_def { | ||
317 | struct ieee80211_channel *chan; | ||
318 | enum nl80211_chan_width width; | ||
319 | u32 center_freq1; | ||
320 | u32 center_freq2; | ||
321 | }; | ||
322 | |||
323 | /** | ||
324 | * cfg80211_get_chandef_type - return old channel type from chandef | ||
325 | * @chandef: the channel definition | ||
326 | * | ||
327 | * Returns the old channel type (NOHT, HT20, HT40+/-) from a given | ||
328 | * chandef, which must have a bandwidth allowing this conversion. | ||
329 | */ | ||
330 | static inline enum nl80211_channel_type | ||
331 | cfg80211_get_chandef_type(const struct cfg80211_chan_def *chandef) | ||
332 | { | ||
333 | switch (chandef->width) { | ||
334 | case NL80211_CHAN_WIDTH_20_NOHT: | ||
335 | return NL80211_CHAN_NO_HT; | ||
336 | case NL80211_CHAN_WIDTH_20: | ||
337 | return NL80211_CHAN_HT20; | ||
338 | case NL80211_CHAN_WIDTH_40: | ||
339 | if (chandef->center_freq1 > chandef->chan->center_freq) | ||
340 | return NL80211_CHAN_HT40PLUS; | ||
341 | return NL80211_CHAN_HT40MINUS; | ||
342 | default: | ||
343 | WARN_ON(1); | ||
344 | return NL80211_CHAN_NO_HT; | ||
345 | } | ||
346 | } | ||
347 | |||
348 | /** | ||
349 | * cfg80211_chandef_create - create channel definition using channel type | ||
350 | * @chandef: the channel definition struct to fill | ||
351 | * @channel: the control channel | ||
352 | * @chantype: the channel type | ||
353 | * | ||
354 | * Given a channel type, create a channel definition. | ||
355 | */ | ||
356 | void cfg80211_chandef_create(struct cfg80211_chan_def *chandef, | ||
357 | struct ieee80211_channel *channel, | ||
358 | enum nl80211_channel_type chantype); | ||
359 | |||
360 | /** | ||
361 | * cfg80211_chandef_identical - check if two channel definitions are identical | ||
362 | * @chandef1: first channel definition | ||
363 | * @chandef2: second channel definition | ||
364 | * | ||
365 | * Returns %true if the channels defined by the channel definitions are | ||
366 | * identical, %false otherwise. | ||
367 | */ | ||
368 | static inline bool | ||
369 | cfg80211_chandef_identical(const struct cfg80211_chan_def *chandef1, | ||
370 | const struct cfg80211_chan_def *chandef2) | ||
371 | { | ||
372 | return (chandef1->chan == chandef2->chan && | ||
373 | chandef1->width == chandef2->width && | ||
374 | chandef1->center_freq1 == chandef2->center_freq1 && | ||
375 | chandef1->center_freq2 == chandef2->center_freq2); | ||
376 | } | ||
377 | |||
378 | /** | ||
379 | * cfg80211_chandef_compatible - check if two channel definitions are compatible | ||
380 | * @chandef1: first channel definition | ||
381 | * @chandef2: second channel definition | ||
382 | * | ||
383 | * Returns %NULL if the given channel definitions are incompatible, | ||
384 | * chandef1 or chandef2 otherwise. | ||
385 | */ | ||
386 | const struct cfg80211_chan_def * | ||
387 | cfg80211_chandef_compatible(const struct cfg80211_chan_def *chandef1, | ||
388 | const struct cfg80211_chan_def *chandef2); | ||
389 | |||
390 | /** | ||
309 | * enum survey_info_flags - survey information flags | 391 | * enum survey_info_flags - survey information flags |
310 | * | 392 | * |
311 | * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in | 393 | * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in |
@@ -426,8 +508,7 @@ struct cfg80211_beacon_data { | |||
426 | * | 508 | * |
427 | * Used to configure an AP interface. | 509 | * Used to configure an AP interface. |
428 | * | 510 | * |
429 | * @channel: the channel to start the AP on | 511 | * @chandef: defines the channel to use |
430 | * @channel_type: the channel type to use | ||
431 | * @beacon: beacon data | 512 | * @beacon: beacon data |
432 | * @beacon_interval: beacon interval | 513 | * @beacon_interval: beacon interval |
433 | * @dtim_period: DTIM period | 514 | * @dtim_period: DTIM period |
@@ -441,8 +522,7 @@ struct cfg80211_beacon_data { | |||
441 | * @inactivity_timeout: time in seconds to determine station's inactivity. | 522 | * @inactivity_timeout: time in seconds to determine station's inactivity. |
442 | */ | 523 | */ |
443 | struct cfg80211_ap_settings { | 524 | struct cfg80211_ap_settings { |
444 | struct ieee80211_channel *channel; | 525 | struct cfg80211_chan_def chandef; |
445 | enum nl80211_channel_type channel_type; | ||
446 | 526 | ||
447 | struct cfg80211_beacon_data beacon; | 527 | struct cfg80211_beacon_data beacon; |
448 | 528 | ||
@@ -582,16 +662,24 @@ enum station_info_flags { | |||
582 | * Used by the driver to indicate the specific rate transmission | 662 | * Used by the driver to indicate the specific rate transmission |
583 | * type for 802.11n transmissions. | 663 | * type for 802.11n transmissions. |
584 | * | 664 | * |
585 | * @RATE_INFO_FLAGS_MCS: @tx_bitrate_mcs filled | 665 | * @RATE_INFO_FLAGS_MCS: mcs field filled with HT MCS |
586 | * @RATE_INFO_FLAGS_40_MHZ_WIDTH: 40 Mhz width transmission | 666 | * @RATE_INFO_FLAGS_VHT_MCS: mcs field filled with VHT MCS |
667 | * @RATE_INFO_FLAGS_40_MHZ_WIDTH: 40 MHz width transmission | ||
668 | * @RATE_INFO_FLAGS_80_MHZ_WIDTH: 80 MHz width transmission | ||
669 | * @RATE_INFO_FLAGS_80P80_MHZ_WIDTH: 80+80 MHz width transmission | ||
670 | * @RATE_INFO_FLAGS_160_MHZ_WIDTH: 160 MHz width transmission | ||
587 | * @RATE_INFO_FLAGS_SHORT_GI: 400ns guard interval | 671 | * @RATE_INFO_FLAGS_SHORT_GI: 400ns guard interval |
588 | * @RATE_INFO_FLAGS_60G: 60gHz MCS | 672 | * @RATE_INFO_FLAGS_60G: 60GHz MCS |
589 | */ | 673 | */ |
590 | enum rate_info_flags { | 674 | enum rate_info_flags { |
591 | RATE_INFO_FLAGS_MCS = 1<<0, | 675 | RATE_INFO_FLAGS_MCS = BIT(0), |
592 | RATE_INFO_FLAGS_40_MHZ_WIDTH = 1<<1, | 676 | RATE_INFO_FLAGS_VHT_MCS = BIT(1), |
593 | RATE_INFO_FLAGS_SHORT_GI = 1<<2, | 677 | RATE_INFO_FLAGS_40_MHZ_WIDTH = BIT(2), |
594 | RATE_INFO_FLAGS_60G = 1<<3, | 678 | RATE_INFO_FLAGS_80_MHZ_WIDTH = BIT(3), |
679 | RATE_INFO_FLAGS_80P80_MHZ_WIDTH = BIT(4), | ||
680 | RATE_INFO_FLAGS_160_MHZ_WIDTH = BIT(5), | ||
681 | RATE_INFO_FLAGS_SHORT_GI = BIT(6), | ||
682 | RATE_INFO_FLAGS_60G = BIT(7), | ||
595 | }; | 683 | }; |
596 | 684 | ||
597 | /** | 685 | /** |
@@ -602,11 +690,13 @@ enum rate_info_flags { | |||
602 | * @flags: bitflag of flags from &enum rate_info_flags | 690 | * @flags: bitflag of flags from &enum rate_info_flags |
603 | * @mcs: mcs index if struct describes a 802.11n bitrate | 691 | * @mcs: mcs index if struct describes a 802.11n bitrate |
604 | * @legacy: bitrate in 100kbit/s for 802.11abg | 692 | * @legacy: bitrate in 100kbit/s for 802.11abg |
693 | * @nss: number of streams (VHT only) | ||
605 | */ | 694 | */ |
606 | struct rate_info { | 695 | struct rate_info { |
607 | u8 flags; | 696 | u8 flags; |
608 | u8 mcs; | 697 | u8 mcs; |
609 | u16 legacy; | 698 | u16 legacy; |
699 | u8 nss; | ||
610 | }; | 700 | }; |
611 | 701 | ||
612 | /** | 702 | /** |
@@ -909,8 +999,7 @@ struct mesh_config { | |||
909 | 999 | ||
910 | /** | 1000 | /** |
911 | * struct mesh_setup - 802.11s mesh setup configuration | 1001 | * struct mesh_setup - 802.11s mesh setup configuration |
912 | * @channel: the channel to start the mesh network on | 1002 | * @chandef: defines the channel to use |
913 | * @channel_type: the channel type to use | ||
914 | * @mesh_id: the mesh ID | 1003 | * @mesh_id: the mesh ID |
915 | * @mesh_id_len: length of the mesh ID, at least 1 and at most 32 bytes | 1004 | * @mesh_id_len: length of the mesh ID, at least 1 and at most 32 bytes |
916 | * @sync_method: which synchronization method to use | 1005 | * @sync_method: which synchronization method to use |
@@ -925,8 +1014,7 @@ struct mesh_config { | |||
925 | * These parameters are fixed when the mesh is created. | 1014 | * These parameters are fixed when the mesh is created. |
926 | */ | 1015 | */ |
927 | struct mesh_setup { | 1016 | struct mesh_setup { |
928 | struct ieee80211_channel *channel; | 1017 | struct cfg80211_chan_def chandef; |
929 | enum nl80211_channel_type channel_type; | ||
930 | const u8 *mesh_id; | 1018 | const u8 *mesh_id; |
931 | u8 mesh_id_len; | 1019 | u8 mesh_id_len; |
932 | u8 sync_method; | 1020 | u8 sync_method; |
@@ -1266,8 +1354,7 @@ struct cfg80211_disassoc_request { | |||
1266 | * @ssid_len: The length of the SSID, will always be non-zero. | 1354 | * @ssid_len: The length of the SSID, will always be non-zero. |
1267 | * @bssid: Fixed BSSID requested, maybe be %NULL, if set do not | 1355 | * @bssid: Fixed BSSID requested, maybe be %NULL, if set do not |
1268 | * search for IBSSs with a different BSSID. | 1356 | * search for IBSSs with a different BSSID. |
1269 | * @channel: The channel to use if no IBSS can be found to join. | 1357 | * @chandef: defines the channel to use if no other IBSS to join can be found |
1270 | * @channel_type: channel type (HT mode) | ||
1271 | * @channel_fixed: The channel should be fixed -- do not search for | 1358 | * @channel_fixed: The channel should be fixed -- do not search for |
1272 | * IBSSs to join on other channels. | 1359 | * IBSSs to join on other channels. |
1273 | * @ie: information element(s) to include in the beacon | 1360 | * @ie: information element(s) to include in the beacon |
@@ -1285,8 +1372,7 @@ struct cfg80211_disassoc_request { | |||
1285 | struct cfg80211_ibss_params { | 1372 | struct cfg80211_ibss_params { |
1286 | u8 *ssid; | 1373 | u8 *ssid; |
1287 | u8 *bssid; | 1374 | u8 *bssid; |
1288 | struct ieee80211_channel *channel; | 1375 | struct cfg80211_chan_def chandef; |
1289 | enum nl80211_channel_type channel_type; | ||
1290 | u8 *ie; | 1376 | u8 *ie; |
1291 | u8 ssid_len, ie_len; | 1377 | u8 ssid_len, ie_len; |
1292 | u16 beacon_interval; | 1378 | u16 beacon_interval; |
@@ -1728,8 +1814,7 @@ struct cfg80211_ops { | |||
1728 | struct ieee80211_channel *chan); | 1814 | struct ieee80211_channel *chan); |
1729 | 1815 | ||
1730 | int (*set_monitor_channel)(struct wiphy *wiphy, | 1816 | int (*set_monitor_channel)(struct wiphy *wiphy, |
1731 | struct ieee80211_channel *chan, | 1817 | struct cfg80211_chan_def *chandef); |
1732 | enum nl80211_channel_type channel_type); | ||
1733 | 1818 | ||
1734 | int (*scan)(struct wiphy *wiphy, | 1819 | int (*scan)(struct wiphy *wiphy, |
1735 | struct cfg80211_scan_request *request); | 1820 | struct cfg80211_scan_request *request); |
@@ -1791,7 +1876,6 @@ struct cfg80211_ops { | |||
1791 | int (*remain_on_channel)(struct wiphy *wiphy, | 1876 | int (*remain_on_channel)(struct wiphy *wiphy, |
1792 | struct wireless_dev *wdev, | 1877 | struct wireless_dev *wdev, |
1793 | struct ieee80211_channel *chan, | 1878 | struct ieee80211_channel *chan, |
1794 | enum nl80211_channel_type channel_type, | ||
1795 | unsigned int duration, | 1879 | unsigned int duration, |
1796 | u64 *cookie); | 1880 | u64 *cookie); |
1797 | int (*cancel_remain_on_channel)(struct wiphy *wiphy, | 1881 | int (*cancel_remain_on_channel)(struct wiphy *wiphy, |
@@ -1800,10 +1884,8 @@ struct cfg80211_ops { | |||
1800 | 1884 | ||
1801 | int (*mgmt_tx)(struct wiphy *wiphy, struct wireless_dev *wdev, | 1885 | int (*mgmt_tx)(struct wiphy *wiphy, struct wireless_dev *wdev, |
1802 | struct ieee80211_channel *chan, bool offchan, | 1886 | struct ieee80211_channel *chan, bool offchan, |
1803 | enum nl80211_channel_type channel_type, | 1887 | unsigned int wait, const u8 *buf, size_t len, |
1804 | bool channel_type_valid, unsigned int wait, | 1888 | bool no_cck, bool dont_wait_for_ack, u64 *cookie); |
1805 | const u8 *buf, size_t len, bool no_cck, | ||
1806 | bool dont_wait_for_ack, u64 *cookie); | ||
1807 | int (*mgmt_tx_cancel_wait)(struct wiphy *wiphy, | 1889 | int (*mgmt_tx_cancel_wait)(struct wiphy *wiphy, |
1808 | struct wireless_dev *wdev, | 1890 | struct wireless_dev *wdev, |
1809 | u64 cookie); | 1891 | u64 cookie); |
@@ -1858,10 +1940,9 @@ struct cfg80211_ops { | |||
1858 | void (*get_et_strings)(struct wiphy *wiphy, struct net_device *dev, | 1940 | void (*get_et_strings)(struct wiphy *wiphy, struct net_device *dev, |
1859 | u32 sset, u8 *data); | 1941 | u32 sset, u8 *data); |
1860 | 1942 | ||
1861 | struct ieee80211_channel * | 1943 | int (*get_channel)(struct wiphy *wiphy, |
1862 | (*get_channel)(struct wiphy *wiphy, | ||
1863 | struct wireless_dev *wdev, | 1944 | struct wireless_dev *wdev, |
1864 | enum nl80211_channel_type *type); | 1945 | struct cfg80211_chan_def *chandef); |
1865 | 1946 | ||
1866 | int (*start_p2p_device)(struct wiphy *wiphy, | 1947 | int (*start_p2p_device)(struct wiphy *wiphy, |
1867 | struct wireless_dev *wdev); | 1948 | struct wireless_dev *wdev); |
@@ -2469,8 +2550,7 @@ struct wireless_dev { | |||
2469 | spinlock_t event_lock; | 2550 | spinlock_t event_lock; |
2470 | 2551 | ||
2471 | struct cfg80211_internal_bss *current_bss; /* associated / joined */ | 2552 | struct cfg80211_internal_bss *current_bss; /* associated / joined */ |
2472 | struct ieee80211_channel *preset_chan; | 2553 | struct cfg80211_chan_def preset_chandef; |
2473 | enum nl80211_channel_type preset_chantype; | ||
2474 | 2554 | ||
2475 | /* for AP and mesh channel tracking */ | 2555 | /* for AP and mesh channel tracking */ |
2476 | struct ieee80211_channel *channel; | 2556 | struct ieee80211_channel *channel; |
@@ -3350,14 +3430,12 @@ void cfg80211_disconnected(struct net_device *dev, u16 reason, | |||
3350 | * @wdev: wireless device | 3430 | * @wdev: wireless device |
3351 | * @cookie: the request cookie | 3431 | * @cookie: the request cookie |
3352 | * @chan: The current channel (from remain_on_channel request) | 3432 | * @chan: The current channel (from remain_on_channel request) |
3353 | * @channel_type: Channel type | ||
3354 | * @duration: Duration in milliseconds that the driver intents to remain on the | 3433 | * @duration: Duration in milliseconds that the driver intents to remain on the |
3355 | * channel | 3434 | * channel |
3356 | * @gfp: allocation flags | 3435 | * @gfp: allocation flags |
3357 | */ | 3436 | */ |
3358 | void cfg80211_ready_on_channel(struct wireless_dev *wdev, u64 cookie, | 3437 | void cfg80211_ready_on_channel(struct wireless_dev *wdev, u64 cookie, |
3359 | struct ieee80211_channel *chan, | 3438 | struct ieee80211_channel *chan, |
3360 | enum nl80211_channel_type channel_type, | ||
3361 | unsigned int duration, gfp_t gfp); | 3439 | unsigned int duration, gfp_t gfp); |
3362 | 3440 | ||
3363 | /** | 3441 | /** |
@@ -3365,12 +3443,10 @@ void cfg80211_ready_on_channel(struct wireless_dev *wdev, u64 cookie, | |||
3365 | * @wdev: wireless device | 3443 | * @wdev: wireless device |
3366 | * @cookie: the request cookie | 3444 | * @cookie: the request cookie |
3367 | * @chan: The current channel (from remain_on_channel request) | 3445 | * @chan: The current channel (from remain_on_channel request) |
3368 | * @channel_type: Channel type | ||
3369 | * @gfp: allocation flags | 3446 | * @gfp: allocation flags |
3370 | */ | 3447 | */ |
3371 | void cfg80211_remain_on_channel_expired(struct wireless_dev *wdev, u64 cookie, | 3448 | void cfg80211_remain_on_channel_expired(struct wireless_dev *wdev, u64 cookie, |
3372 | struct ieee80211_channel *chan, | 3449 | struct ieee80211_channel *chan, |
3373 | enum nl80211_channel_type channel_type, | ||
3374 | gfp_t gfp); | 3450 | gfp_t gfp); |
3375 | 3451 | ||
3376 | 3452 | ||
@@ -3570,28 +3646,25 @@ void cfg80211_report_obss_beacon(struct wiphy *wiphy, | |||
3570 | int freq, int sig_dbm); | 3646 | int freq, int sig_dbm); |
3571 | 3647 | ||
3572 | /** | 3648 | /** |
3573 | * cfg80211_can_beacon_sec_chan - test if ht40 on extension channel can be used | 3649 | * cfg80211_reg_can_beacon - check if beaconing is allowed |
3574 | * @wiphy: the wiphy | 3650 | * @wiphy: the wiphy |
3575 | * @chan: main channel | 3651 | * @chandef: the channel definition |
3576 | * @channel_type: HT mode | ||
3577 | * | 3652 | * |
3578 | * This function returns true if there is no secondary channel or the secondary | 3653 | * This function returns true if there is no secondary channel or the secondary |
3579 | * channel can be used for beaconing (i.e. is not a radar channel etc.) | 3654 | * channel(s) can be used for beaconing (i.e. is not a radar channel etc.) |
3580 | */ | 3655 | */ |
3581 | bool cfg80211_can_beacon_sec_chan(struct wiphy *wiphy, | 3656 | bool cfg80211_reg_can_beacon(struct wiphy *wiphy, |
3582 | struct ieee80211_channel *chan, | 3657 | struct cfg80211_chan_def *chandef); |
3583 | enum nl80211_channel_type channel_type); | ||
3584 | 3658 | ||
3585 | /* | 3659 | /* |
3586 | * cfg80211_ch_switch_notify - update wdev channel and notify userspace | 3660 | * cfg80211_ch_switch_notify - update wdev channel and notify userspace |
3587 | * @dev: the device which switched channels | 3661 | * @dev: the device which switched channels |
3588 | * @freq: new channel frequency (in MHz) | 3662 | * @chandef: the new channel definition |
3589 | * @type: channel type | ||
3590 | * | 3663 | * |
3591 | * Acquires wdev_lock, so must only be called from sleepable driver context! | 3664 | * Acquires wdev_lock, so must only be called from sleepable driver context! |
3592 | */ | 3665 | */ |
3593 | void cfg80211_ch_switch_notify(struct net_device *dev, int freq, | 3666 | void cfg80211_ch_switch_notify(struct net_device *dev, |
3594 | enum nl80211_channel_type type); | 3667 | struct cfg80211_chan_def *chandef); |
3595 | 3668 | ||
3596 | /* | 3669 | /* |
3597 | * cfg80211_tdls_oper_request - request userspace to perform TDLS operation | 3670 | * cfg80211_tdls_oper_request - request userspace to perform TDLS operation |
@@ -3652,8 +3725,9 @@ void cfg80211_unregister_wdev(struct wireless_dev *wdev); | |||
3652 | * the data is malformed or the attribute can't be found (respectively), | 3725 | * the data is malformed or the attribute can't be found (respectively), |
3653 | * or the length of the found attribute (which can be zero). | 3726 | * or the length of the found attribute (which can be zero). |
3654 | */ | 3727 | */ |
3655 | unsigned int cfg80211_get_p2p_attr(const u8 *ies, unsigned int len, | 3728 | int cfg80211_get_p2p_attr(const u8 *ies, unsigned int len, |
3656 | u8 attr, u8 *buf, unsigned int bufsize); | 3729 | enum ieee80211_p2p_attr_id attr, |
3730 | u8 *buf, unsigned int bufsize); | ||
3657 | 3731 | ||
3658 | /* Logging, debugging and troubleshooting/diagnostic helpers. */ | 3732 | /* Logging, debugging and troubleshooting/diagnostic helpers. */ |
3659 | 3733 | ||
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index e1293c7e4d2c..db7680acd0da 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -145,11 +145,11 @@ struct ieee80211_low_level_stats { | |||
145 | 145 | ||
146 | /** | 146 | /** |
147 | * enum ieee80211_chanctx_change - change flag for channel context | 147 | * enum ieee80211_chanctx_change - change flag for channel context |
148 | * @IEEE80211_CHANCTX_CHANGE_CHANNEL_TYPE: The channel type was changed | 148 | * @IEEE80211_CHANCTX_CHANGE_WIDTH: The channel width changed |
149 | * @IEEE80211_CHANCTX_CHANGE_RX_CHAINS: The number of RX chains changed | 149 | * @IEEE80211_CHANCTX_CHANGE_RX_CHAINS: The number of RX chains changed |
150 | */ | 150 | */ |
151 | enum ieee80211_chanctx_change { | 151 | enum ieee80211_chanctx_change { |
152 | IEEE80211_CHANCTX_CHANGE_CHANNEL_TYPE = BIT(0), | 152 | IEEE80211_CHANCTX_CHANGE_WIDTH = BIT(0), |
153 | IEEE80211_CHANCTX_CHANGE_RX_CHAINS = BIT(1), | 153 | IEEE80211_CHANCTX_CHANGE_RX_CHAINS = BIT(1), |
154 | }; | 154 | }; |
155 | 155 | ||
@@ -159,8 +159,7 @@ enum ieee80211_chanctx_change { | |||
159 | * This is the driver-visible part. The ieee80211_chanctx | 159 | * This is the driver-visible part. The ieee80211_chanctx |
160 | * that contains it is visible in mac80211 only. | 160 | * that contains it is visible in mac80211 only. |
161 | * | 161 | * |
162 | * @channel: the channel to tune to | 162 | * @def: the channel definition |
163 | * @channel_type: the channel (HT) type | ||
164 | * @rx_chains_static: The number of RX chains that must always be | 163 | * @rx_chains_static: The number of RX chains that must always be |
165 | * active on the channel to receive MIMO transmissions | 164 | * active on the channel to receive MIMO transmissions |
166 | * @rx_chains_dynamic: The number of RX chains that must be enabled | 165 | * @rx_chains_dynamic: The number of RX chains that must be enabled |
@@ -170,8 +169,7 @@ enum ieee80211_chanctx_change { | |||
170 | * sizeof(void *), size is determined in hw information. | 169 | * sizeof(void *), size is determined in hw information. |
171 | */ | 170 | */ |
172 | struct ieee80211_chanctx_conf { | 171 | struct ieee80211_chanctx_conf { |
173 | struct ieee80211_channel *channel; | 172 | struct cfg80211_chan_def def; |
174 | enum nl80211_channel_type channel_type; | ||
175 | 173 | ||
176 | u8 rx_chains_static, rx_chains_dynamic; | 174 | u8 rx_chains_static, rx_chains_dynamic; |
177 | 175 | ||
@@ -288,9 +286,8 @@ enum ieee80211_rssi_event { | |||
288 | * @mcast_rate: per-band multicast rate index + 1 (0: disabled) | 286 | * @mcast_rate: per-band multicast rate index + 1 (0: disabled) |
289 | * @bssid: The BSSID for this BSS | 287 | * @bssid: The BSSID for this BSS |
290 | * @enable_beacon: whether beaconing should be enabled or not | 288 | * @enable_beacon: whether beaconing should be enabled or not |
291 | * @channel_type: Channel type for this BSS -- the hardware might be | 289 | * @chandef: Channel definition for this BSS -- the hardware might be |
292 | * configured for HT40+ while this BSS only uses no-HT, for | 290 | * configured a higher bandwidth than this BSS uses, for example. |
293 | * example. | ||
294 | * @ht_operation_mode: HT operation mode like in &struct ieee80211_ht_operation. | 291 | * @ht_operation_mode: HT operation mode like in &struct ieee80211_ht_operation. |
295 | * This field is only valid when the channel type is one of the HT types. | 292 | * This field is only valid when the channel type is one of the HT types. |
296 | * @cqm_rssi_thold: Connection quality monitor RSSI threshold, a zero value | 293 | * @cqm_rssi_thold: Connection quality monitor RSSI threshold, a zero value |
@@ -339,7 +336,7 @@ struct ieee80211_bss_conf { | |||
339 | u16 ht_operation_mode; | 336 | u16 ht_operation_mode; |
340 | s32 cqm_rssi_thold; | 337 | s32 cqm_rssi_thold; |
341 | u32 cqm_rssi_hyst; | 338 | u32 cqm_rssi_hyst; |
342 | enum nl80211_channel_type channel_type; | 339 | struct cfg80211_chan_def chandef; |
343 | __be32 arp_addr_list[IEEE80211_BSS_ARP_ADDR_LIST_LEN]; | 340 | __be32 arp_addr_list[IEEE80211_BSS_ARP_ADDR_LIST_LEN]; |
344 | u8 arp_addr_cnt; | 341 | u8 arp_addr_cnt; |
345 | bool arp_filter_enabled; | 342 | bool arp_filter_enabled; |
@@ -502,9 +499,14 @@ enum mac80211_tx_control_flags { | |||
502 | * This is set if the current BSS requires ERP protection. | 499 | * This is set if the current BSS requires ERP protection. |
503 | * @IEEE80211_TX_RC_USE_SHORT_PREAMBLE: Use short preamble. | 500 | * @IEEE80211_TX_RC_USE_SHORT_PREAMBLE: Use short preamble. |
504 | * @IEEE80211_TX_RC_MCS: HT rate. | 501 | * @IEEE80211_TX_RC_MCS: HT rate. |
502 | * @IEEE80211_TX_RC_VHT_MCS: VHT MCS rate, in this case the idx field is split | ||
503 | * into a higher 4 bits (Nss) and lower 4 bits (MCS number) | ||
505 | * @IEEE80211_TX_RC_GREEN_FIELD: Indicates whether this rate should be used in | 504 | * @IEEE80211_TX_RC_GREEN_FIELD: Indicates whether this rate should be used in |
506 | * Greenfield mode. | 505 | * Greenfield mode. |
507 | * @IEEE80211_TX_RC_40_MHZ_WIDTH: Indicates if the Channel Width should be 40 MHz. | 506 | * @IEEE80211_TX_RC_40_MHZ_WIDTH: Indicates if the Channel Width should be 40 MHz. |
507 | * @IEEE80211_TX_RC_80_MHZ_WIDTH: Indicates 80 MHz transmission | ||
508 | * @IEEE80211_TX_RC_160_MHZ_WIDTH: Indicates 160 MHz transmission | ||
509 | * (80+80 isn't supported yet) | ||
508 | * @IEEE80211_TX_RC_DUP_DATA: The frame should be transmitted on both of the | 510 | * @IEEE80211_TX_RC_DUP_DATA: The frame should be transmitted on both of the |
509 | * adjacent 20 MHz channels, if the current channel type is | 511 | * adjacent 20 MHz channels, if the current channel type is |
510 | * NL80211_CHAN_HT40MINUS or NL80211_CHAN_HT40PLUS. | 512 | * NL80211_CHAN_HT40MINUS or NL80211_CHAN_HT40PLUS. |
@@ -515,12 +517,15 @@ enum mac80211_rate_control_flags { | |||
515 | IEEE80211_TX_RC_USE_CTS_PROTECT = BIT(1), | 517 | IEEE80211_TX_RC_USE_CTS_PROTECT = BIT(1), |
516 | IEEE80211_TX_RC_USE_SHORT_PREAMBLE = BIT(2), | 518 | IEEE80211_TX_RC_USE_SHORT_PREAMBLE = BIT(2), |
517 | 519 | ||
518 | /* rate index is an MCS rate number instead of an index */ | 520 | /* rate index is an HT/VHT MCS instead of an index */ |
519 | IEEE80211_TX_RC_MCS = BIT(3), | 521 | IEEE80211_TX_RC_MCS = BIT(3), |
520 | IEEE80211_TX_RC_GREEN_FIELD = BIT(4), | 522 | IEEE80211_TX_RC_GREEN_FIELD = BIT(4), |
521 | IEEE80211_TX_RC_40_MHZ_WIDTH = BIT(5), | 523 | IEEE80211_TX_RC_40_MHZ_WIDTH = BIT(5), |
522 | IEEE80211_TX_RC_DUP_DATA = BIT(6), | 524 | IEEE80211_TX_RC_DUP_DATA = BIT(6), |
523 | IEEE80211_TX_RC_SHORT_GI = BIT(7), | 525 | IEEE80211_TX_RC_SHORT_GI = BIT(7), |
526 | IEEE80211_TX_RC_VHT_MCS = BIT(8), | ||
527 | IEEE80211_TX_RC_80_MHZ_WIDTH = BIT(9), | ||
528 | IEEE80211_TX_RC_160_MHZ_WIDTH = BIT(10), | ||
524 | }; | 529 | }; |
525 | 530 | ||
526 | 531 | ||
@@ -563,10 +568,32 @@ enum mac80211_rate_control_flags { | |||
563 | */ | 568 | */ |
564 | struct ieee80211_tx_rate { | 569 | struct ieee80211_tx_rate { |
565 | s8 idx; | 570 | s8 idx; |
566 | u8 count; | 571 | u16 count:5, |
567 | u8 flags; | 572 | flags:11; |
568 | } __packed; | 573 | } __packed; |
569 | 574 | ||
575 | #define IEEE80211_MAX_TX_RETRY 31 | ||
576 | |||
577 | static inline void ieee80211_rate_set_vht(struct ieee80211_tx_rate *rate, | ||
578 | u8 mcs, u8 nss) | ||
579 | { | ||
580 | WARN_ON(mcs & ~0xF); | ||
581 | WARN_ON(nss & ~0x7); | ||
582 | rate->idx = (nss << 4) | mcs; | ||
583 | } | ||
584 | |||
585 | static inline u8 | ||
586 | ieee80211_rate_get_vht_mcs(const struct ieee80211_tx_rate *rate) | ||
587 | { | ||
588 | return rate->idx & 0xF; | ||
589 | } | ||
590 | |||
591 | static inline u8 | ||
592 | ieee80211_rate_get_vht_nss(const struct ieee80211_tx_rate *rate) | ||
593 | { | ||
594 | return rate->idx >> 4; | ||
595 | } | ||
596 | |||
570 | /** | 597 | /** |
571 | * struct ieee80211_tx_info - skb transmit information | 598 | * struct ieee80211_tx_info - skb transmit information |
572 | * | 599 | * |
@@ -720,7 +747,11 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) | |||
720 | * (including FCS) was received. | 747 | * (including FCS) was received. |
721 | * @RX_FLAG_SHORTPRE: Short preamble was used for this frame | 748 | * @RX_FLAG_SHORTPRE: Short preamble was used for this frame |
722 | * @RX_FLAG_HT: HT MCS was used and rate_idx is MCS index | 749 | * @RX_FLAG_HT: HT MCS was used and rate_idx is MCS index |
750 | * @RX_FLAG_VHT: VHT MCS was used and rate_index is MCS index | ||
723 | * @RX_FLAG_40MHZ: HT40 (40 MHz) was used | 751 | * @RX_FLAG_40MHZ: HT40 (40 MHz) was used |
752 | * @RX_FLAG_80MHZ: 80 MHz was used | ||
753 | * @RX_FLAG_80P80MHZ: 80+80 MHz was used | ||
754 | * @RX_FLAG_160MHZ: 160 MHz was used | ||
724 | * @RX_FLAG_SHORT_GI: Short guard interval was used | 755 | * @RX_FLAG_SHORT_GI: Short guard interval was used |
725 | * @RX_FLAG_NO_SIGNAL_VAL: The signal strength value is not present. | 756 | * @RX_FLAG_NO_SIGNAL_VAL: The signal strength value is not present. |
726 | * Valid only for data frames (mainly A-MPDU) | 757 | * Valid only for data frames (mainly A-MPDU) |
@@ -763,6 +794,10 @@ enum mac80211_rx_flags { | |||
763 | RX_FLAG_AMPDU_DELIM_CRC_ERROR = BIT(19), | 794 | RX_FLAG_AMPDU_DELIM_CRC_ERROR = BIT(19), |
764 | RX_FLAG_AMPDU_DELIM_CRC_KNOWN = BIT(20), | 795 | RX_FLAG_AMPDU_DELIM_CRC_KNOWN = BIT(20), |
765 | RX_FLAG_MACTIME_END = BIT(21), | 796 | RX_FLAG_MACTIME_END = BIT(21), |
797 | RX_FLAG_VHT = BIT(22), | ||
798 | RX_FLAG_80MHZ = BIT(23), | ||
799 | RX_FLAG_80P80MHZ = BIT(24), | ||
800 | RX_FLAG_160MHZ = BIT(25), | ||
766 | }; | 801 | }; |
767 | 802 | ||
768 | /** | 803 | /** |
@@ -783,7 +818,8 @@ enum mac80211_rx_flags { | |||
783 | * @IEEE80211_HW_SIGNAL_* | 818 | * @IEEE80211_HW_SIGNAL_* |
784 | * @antenna: antenna used | 819 | * @antenna: antenna used |
785 | * @rate_idx: index of data rate into band's supported rates or MCS index if | 820 | * @rate_idx: index of data rate into band's supported rates or MCS index if |
786 | * HT rates are use (RX_FLAG_HT) | 821 | * HT or VHT is used (%RX_FLAG_HT/%RX_FLAG_VHT) |
822 | * @vht_nss: number of streams (VHT only) | ||
787 | * @flag: %RX_FLAG_* | 823 | * @flag: %RX_FLAG_* |
788 | * @rx_flags: internal RX flags for mac80211 | 824 | * @rx_flags: internal RX flags for mac80211 |
789 | * @ampdu_reference: A-MPDU reference number, must be a different value for | 825 | * @ampdu_reference: A-MPDU reference number, must be a different value for |
@@ -806,6 +842,7 @@ struct ieee80211_rx_status { | |||
806 | u16 vendor_radiotap_len; | 842 | u16 vendor_radiotap_len; |
807 | u16 freq; | 843 | u16 freq; |
808 | u8 rate_idx; | 844 | u8 rate_idx; |
845 | u8 vht_nss; | ||
809 | u8 rx_flags; | 846 | u8 rx_flags; |
810 | u8 band; | 847 | u8 band; |
811 | u8 antenna; | 848 | u8 antenna; |
@@ -2550,7 +2587,6 @@ struct ieee80211_ops { | |||
2550 | int (*remain_on_channel)(struct ieee80211_hw *hw, | 2587 | int (*remain_on_channel)(struct ieee80211_hw *hw, |
2551 | struct ieee80211_vif *vif, | 2588 | struct ieee80211_vif *vif, |
2552 | struct ieee80211_channel *chan, | 2589 | struct ieee80211_channel *chan, |
2553 | enum nl80211_channel_type channel_type, | ||
2554 | int duration); | 2590 | int duration); |
2555 | int (*cancel_remain_on_channel)(struct ieee80211_hw *hw); | 2591 | int (*cancel_remain_on_channel)(struct ieee80211_hw *hw); |
2556 | int (*set_ringparam)(struct ieee80211_hw *hw, u32 tx, u32 rx); | 2592 | int (*set_ringparam)(struct ieee80211_hw *hw, u32 tx, u32 rx); |
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 1a9a819cfab0..33a417481ad8 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h | |||
@@ -118,8 +118,9 @@ | |||
118 | * to get a list of all present wiphys. | 118 | * to get a list of all present wiphys. |
119 | * @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or | 119 | * @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or |
120 | * %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME, | 120 | * %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME, |
121 | * %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ, | 121 | * %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ (and the |
122 | * %NL80211_ATTR_WIPHY_CHANNEL_TYPE, %NL80211_ATTR_WIPHY_RETRY_SHORT, | 122 | * attributes determining the channel width; this is used for setting |
123 | * monitor mode channel), %NL80211_ATTR_WIPHY_RETRY_SHORT, | ||
123 | * %NL80211_ATTR_WIPHY_RETRY_LONG, %NL80211_ATTR_WIPHY_FRAG_THRESHOLD, | 124 | * %NL80211_ATTR_WIPHY_RETRY_LONG, %NL80211_ATTR_WIPHY_FRAG_THRESHOLD, |
124 | * and/or %NL80211_ATTR_WIPHY_RTS_THRESHOLD. | 125 | * and/or %NL80211_ATTR_WIPHY_RTS_THRESHOLD. |
125 | * However, for setting the channel, see %NL80211_CMD_SET_CHANNEL | 126 | * However, for setting the channel, see %NL80211_CMD_SET_CHANNEL |
@@ -171,7 +172,7 @@ | |||
171 | * %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY, | 172 | * %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY, |
172 | * %NL80211_ATTR_AUTH_TYPE and %NL80211_ATTR_INACTIVITY_TIMEOUT. | 173 | * %NL80211_ATTR_AUTH_TYPE and %NL80211_ATTR_INACTIVITY_TIMEOUT. |
173 | * The channel to use can be set on the interface or be given using the | 174 | * The channel to use can be set on the interface or be given using the |
174 | * %NL80211_ATTR_WIPHY_FREQ and %NL80211_ATTR_WIPHY_CHANNEL_TYPE attrs. | 175 | * %NL80211_ATTR_WIPHY_FREQ and the attributes determining channel width. |
175 | * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP | 176 | * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP |
176 | * @NL80211_CMD_STOP_AP: Stop AP operation on the given interface | 177 | * @NL80211_CMD_STOP_AP: Stop AP operation on the given interface |
177 | * @NL80211_CMD_DEL_BEACON: old alias for %NL80211_CMD_STOP_AP | 178 | * @NL80211_CMD_DEL_BEACON: old alias for %NL80211_CMD_STOP_AP |
@@ -401,8 +402,7 @@ | |||
401 | * a response while being associated to an AP on another channel. | 402 | * a response while being associated to an AP on another channel. |
402 | * %NL80211_ATTR_IFINDEX is used to specify which interface (and thus | 403 | * %NL80211_ATTR_IFINDEX is used to specify which interface (and thus |
403 | * radio) is used. %NL80211_ATTR_WIPHY_FREQ is used to specify the | 404 | * radio) is used. %NL80211_ATTR_WIPHY_FREQ is used to specify the |
404 | * frequency for the operation and %NL80211_ATTR_WIPHY_CHANNEL_TYPE may be | 405 | * frequency for the operation. |
405 | * optionally used to specify additional channel parameters. | ||
406 | * %NL80211_ATTR_DURATION is used to specify the duration in milliseconds | 406 | * %NL80211_ATTR_DURATION is used to specify the duration in milliseconds |
407 | * to remain on the channel. This command is also used as an event to | 407 | * to remain on the channel. This command is also used as an event to |
408 | * notify when the requested duration starts (it may take a while for the | 408 | * notify when the requested duration starts (it may take a while for the |
@@ -440,12 +440,11 @@ | |||
440 | * as an event indicating reception of a frame that was not processed in | 440 | * as an event indicating reception of a frame that was not processed in |
441 | * kernel code, but is for us (i.e., which may need to be processed in a | 441 | * kernel code, but is for us (i.e., which may need to be processed in a |
442 | * user space application). %NL80211_ATTR_FRAME is used to specify the | 442 | * user space application). %NL80211_ATTR_FRAME is used to specify the |
443 | * frame contents (including header). %NL80211_ATTR_WIPHY_FREQ (and | 443 | * frame contents (including header). %NL80211_ATTR_WIPHY_FREQ is used |
444 | * optionally %NL80211_ATTR_WIPHY_CHANNEL_TYPE) is used to indicate on | 444 | * to indicate on which channel the frame is to be transmitted or was |
445 | * which channel the frame is to be transmitted or was received. If this | 445 | * received. If this channel is not the current channel (remain-on-channel |
446 | * channel is not the current channel (remain-on-channel or the | 446 | * or the operational channel) the device will switch to the given channel |
447 | * operational channel) the device will switch to the given channel and | 447 | * and transmit the frame, optionally waiting for a response for the time |
448 | * transmit the frame, optionally waiting for a response for the time | ||
449 | * specified using %NL80211_ATTR_DURATION. When called, this operation | 448 | * specified using %NL80211_ATTR_DURATION. When called, this operation |
450 | * returns a cookie (%NL80211_ATTR_COOKIE) that will be included with the | 449 | * returns a cookie (%NL80211_ATTR_COOKIE) that will be included with the |
451 | * TX status event pertaining to the TX request. | 450 | * TX status event pertaining to the TX request. |
@@ -473,8 +472,8 @@ | |||
473 | * command is used as an event to indicate the that a trigger level was | 472 | * command is used as an event to indicate the that a trigger level was |
474 | * reached. | 473 | * reached. |
475 | * @NL80211_CMD_SET_CHANNEL: Set the channel (using %NL80211_ATTR_WIPHY_FREQ | 474 | * @NL80211_CMD_SET_CHANNEL: Set the channel (using %NL80211_ATTR_WIPHY_FREQ |
476 | * and %NL80211_ATTR_WIPHY_CHANNEL_TYPE) the given interface (identifed | 475 | * and the attributes determining channel width) the given interface |
477 | * by %NL80211_ATTR_IFINDEX) shall operate on. | 476 | * (identifed by %NL80211_ATTR_IFINDEX) shall operate on. |
478 | * In case multiple channels are supported by the device, the mechanism | 477 | * In case multiple channels are supported by the device, the mechanism |
479 | * with which it switches channels is implementation-defined. | 478 | * with which it switches channels is implementation-defined. |
480 | * When a monitor interface is given, it can only switch channel while | 479 | * When a monitor interface is given, it can only switch channel while |
@@ -568,8 +567,8 @@ | |||
568 | * | 567 | * |
569 | * @NL80211_CMD_CH_SWITCH_NOTIFY: An AP or GO may decide to switch channels | 568 | * @NL80211_CMD_CH_SWITCH_NOTIFY: An AP or GO may decide to switch channels |
570 | * independently of the userspace SME, send this event indicating | 569 | * independently of the userspace SME, send this event indicating |
571 | * %NL80211_ATTR_IFINDEX is now on %NL80211_ATTR_WIPHY_FREQ with | 570 | * %NL80211_ATTR_IFINDEX is now on %NL80211_ATTR_WIPHY_FREQ and the |
572 | * %NL80211_ATTR_WIPHY_CHANNEL_TYPE. | 571 | * attributes determining channel width. |
573 | * | 572 | * |
574 | * @NL80211_CMD_START_P2P_DEVICE: Start the given P2P Device, identified by | 573 | * @NL80211_CMD_START_P2P_DEVICE: Start the given P2P Device, identified by |
575 | * its %NL80211_ATTR_WDEV identifier. It must have been created with | 574 | * its %NL80211_ATTR_WDEV identifier. It must have been created with |
@@ -773,14 +772,26 @@ enum nl80211_commands { | |||
773 | * /sys/class/ieee80211/<phyname>/index | 772 | * /sys/class/ieee80211/<phyname>/index |
774 | * @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming) | 773 | * @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming) |
775 | * @NL80211_ATTR_WIPHY_TXQ_PARAMS: a nested array of TX queue parameters | 774 | * @NL80211_ATTR_WIPHY_TXQ_PARAMS: a nested array of TX queue parameters |
776 | * @NL80211_ATTR_WIPHY_FREQ: frequency of the selected channel in MHz | 775 | * @NL80211_ATTR_WIPHY_FREQ: frequency of the selected channel in MHz, |
776 | * defines the channel together with the (deprecated) | ||
777 | * %NL80211_ATTR_WIPHY_CHANNEL_TYPE attribute or the attributes | ||
778 | * %NL80211_ATTR_CHANNEL_WIDTH and if needed %NL80211_ATTR_CENTER_FREQ1 | ||
779 | * and %NL80211_ATTR_CENTER_FREQ2 | ||
780 | * @NL80211_ATTR_CHANNEL_WIDTH: u32 attribute containing one of the values | ||
781 | * of &enum nl80211_chan_width, describing the channel width. See the | ||
782 | * documentation of the enum for more information. | ||
783 | * @NL80211_ATTR_CENTER_FREQ1: Center frequency of the first part of the | ||
784 | * channel, used for anything but 20 MHz bandwidth | ||
785 | * @NL80211_ATTR_CENTER_FREQ2: Center frequency of the second part of the | ||
786 | * channel, used only for 80+80 MHz bandwidth | ||
777 | * @NL80211_ATTR_WIPHY_CHANNEL_TYPE: included with NL80211_ATTR_WIPHY_FREQ | 787 | * @NL80211_ATTR_WIPHY_CHANNEL_TYPE: included with NL80211_ATTR_WIPHY_FREQ |
778 | * if HT20 or HT40 are allowed (i.e., 802.11n disabled if not included): | 788 | * if HT20 or HT40 are to be used (i.e., HT disabled if not included): |
779 | * NL80211_CHAN_NO_HT = HT not allowed (i.e., same as not including | 789 | * NL80211_CHAN_NO_HT = HT not allowed (i.e., same as not including |
780 | * this attribute) | 790 | * this attribute) |
781 | * NL80211_CHAN_HT20 = HT20 only | 791 | * NL80211_CHAN_HT20 = HT20 only |
782 | * NL80211_CHAN_HT40MINUS = secondary channel is below the primary channel | 792 | * NL80211_CHAN_HT40MINUS = secondary channel is below the primary channel |
783 | * NL80211_CHAN_HT40PLUS = secondary channel is above the primary channel | 793 | * NL80211_CHAN_HT40PLUS = secondary channel is above the primary channel |
794 | * This attribute is now deprecated. | ||
784 | * @NL80211_ATTR_WIPHY_RETRY_SHORT: TX retry limit for frames whose length is | 795 | * @NL80211_ATTR_WIPHY_RETRY_SHORT: TX retry limit for frames whose length is |
785 | * less than or equal to the RTS threshold; allowed range: 1..255; | 796 | * less than or equal to the RTS threshold; allowed range: 1..255; |
786 | * dot11ShortRetryLimit; u8 | 797 | * dot11ShortRetryLimit; u8 |
@@ -1555,6 +1566,10 @@ enum nl80211_attrs { | |||
1555 | 1566 | ||
1556 | NL80211_ATTR_SCAN_FLAGS, | 1567 | NL80211_ATTR_SCAN_FLAGS, |
1557 | 1568 | ||
1569 | NL80211_ATTR_CHANNEL_WIDTH, | ||
1570 | NL80211_ATTR_CENTER_FREQ1, | ||
1571 | NL80211_ATTR_CENTER_FREQ2, | ||
1572 | |||
1558 | /* add attributes here, update the policy in nl80211.c */ | 1573 | /* add attributes here, update the policy in nl80211.c */ |
1559 | 1574 | ||
1560 | __NL80211_ATTR_AFTER_LAST, | 1575 | __NL80211_ATTR_AFTER_LAST, |
@@ -1719,10 +1734,15 @@ struct nl80211_sta_flag_update { | |||
1719 | * @__NL80211_RATE_INFO_INVALID: attribute number 0 is reserved | 1734 | * @__NL80211_RATE_INFO_INVALID: attribute number 0 is reserved |
1720 | * @NL80211_RATE_INFO_BITRATE: total bitrate (u16, 100kbit/s) | 1735 | * @NL80211_RATE_INFO_BITRATE: total bitrate (u16, 100kbit/s) |
1721 | * @NL80211_RATE_INFO_MCS: mcs index for 802.11n (u8) | 1736 | * @NL80211_RATE_INFO_MCS: mcs index for 802.11n (u8) |
1722 | * @NL80211_RATE_INFO_40_MHZ_WIDTH: 40 Mhz dualchannel bitrate | 1737 | * @NL80211_RATE_INFO_40_MHZ_WIDTH: 40 MHz dualchannel bitrate |
1723 | * @NL80211_RATE_INFO_SHORT_GI: 400ns guard interval | 1738 | * @NL80211_RATE_INFO_SHORT_GI: 400ns guard interval |
1724 | * @NL80211_RATE_INFO_BITRATE32: total bitrate (u32, 100kbit/s) | 1739 | * @NL80211_RATE_INFO_BITRATE32: total bitrate (u32, 100kbit/s) |
1725 | * @NL80211_RATE_INFO_MAX: highest rate_info number currently defined | 1740 | * @NL80211_RATE_INFO_MAX: highest rate_info number currently defined |
1741 | * @NL80211_RATE_INFO_VHT_MCS: MCS index for VHT (u8) | ||
1742 | * @NL80211_RATE_INFO_VHT_NSS: number of streams in VHT (u8) | ||
1743 | * @NL80211_RATE_INFO_80_MHZ_WIDTH: 80 MHz VHT rate | ||
1744 | * @NL80211_RATE_INFO_80P80_MHZ_WIDTH: 80+80 MHz VHT rate | ||
1745 | * @NL80211_RATE_INFO_160_MHZ_WIDTH: 160 MHz VHT rate | ||
1726 | * @__NL80211_RATE_INFO_AFTER_LAST: internal use | 1746 | * @__NL80211_RATE_INFO_AFTER_LAST: internal use |
1727 | */ | 1747 | */ |
1728 | enum nl80211_rate_info { | 1748 | enum nl80211_rate_info { |
@@ -1732,6 +1752,11 @@ enum nl80211_rate_info { | |||
1732 | NL80211_RATE_INFO_40_MHZ_WIDTH, | 1752 | NL80211_RATE_INFO_40_MHZ_WIDTH, |
1733 | NL80211_RATE_INFO_SHORT_GI, | 1753 | NL80211_RATE_INFO_SHORT_GI, |
1734 | NL80211_RATE_INFO_BITRATE32, | 1754 | NL80211_RATE_INFO_BITRATE32, |
1755 | NL80211_RATE_INFO_VHT_MCS, | ||
1756 | NL80211_RATE_INFO_VHT_NSS, | ||
1757 | NL80211_RATE_INFO_80_MHZ_WIDTH, | ||
1758 | NL80211_RATE_INFO_80P80_MHZ_WIDTH, | ||
1759 | NL80211_RATE_INFO_160_MHZ_WIDTH, | ||
1735 | 1760 | ||
1736 | /* keep last */ | 1761 | /* keep last */ |
1737 | __NL80211_RATE_INFO_AFTER_LAST, | 1762 | __NL80211_RATE_INFO_AFTER_LAST, |
@@ -2440,6 +2465,15 @@ enum nl80211_ac { | |||
2440 | #define NL80211_TXQ_Q_BE NL80211_AC_BE | 2465 | #define NL80211_TXQ_Q_BE NL80211_AC_BE |
2441 | #define NL80211_TXQ_Q_BK NL80211_AC_BK | 2466 | #define NL80211_TXQ_Q_BK NL80211_AC_BK |
2442 | 2467 | ||
2468 | /** | ||
2469 | * enum nl80211_channel_type - channel type | ||
2470 | * @NL80211_CHAN_NO_HT: 20 MHz, non-HT channel | ||
2471 | * @NL80211_CHAN_HT20: 20 MHz HT channel | ||
2472 | * @NL80211_CHAN_HT40MINUS: HT40 channel, secondary channel | ||
2473 | * below the control channel | ||
2474 | * @NL80211_CHAN_HT40PLUS: HT40 channel, secondary channel | ||
2475 | * above the control channel | ||
2476 | */ | ||
2443 | enum nl80211_channel_type { | 2477 | enum nl80211_channel_type { |
2444 | NL80211_CHAN_NO_HT, | 2478 | NL80211_CHAN_NO_HT, |
2445 | NL80211_CHAN_HT20, | 2479 | NL80211_CHAN_HT20, |
@@ -2448,6 +2482,32 @@ enum nl80211_channel_type { | |||
2448 | }; | 2482 | }; |
2449 | 2483 | ||
2450 | /** | 2484 | /** |
2485 | * enum nl80211_chan_width - channel width definitions | ||
2486 | * | ||
2487 | * These values are used with the %NL80211_ATTR_CHANNEL_WIDTH | ||
2488 | * attribute. | ||
2489 | * | ||
2490 | * @NL80211_CHAN_WIDTH_20_NOHT: 20 MHz, non-HT channel | ||
2491 | * @NL80211_CHAN_WIDTH_20: 20 MHz HT channel | ||
2492 | * @NL80211_CHAN_WIDTH_40: 40 MHz channel, the %NL80211_ATTR_CENTER_FREQ1 | ||
2493 | * attribute must be provided as well | ||
2494 | * @NL80211_CHAN_WIDTH_80: 80 MHz channel, the %NL80211_ATTR_CENTER_FREQ1 | ||
2495 | * attribute must be provided as well | ||
2496 | * @NL80211_CHAN_WIDTH_80P80: 80+80 MHz channel, the %NL80211_ATTR_CENTER_FREQ1 | ||
2497 | * and %NL80211_ATTR_CENTER_FREQ2 attributes must be provided as well | ||
2498 | * @NL80211_CHAN_WIDTH_160: 160 MHz channel, the %NL80211_ATTR_CENTER_FREQ1 | ||
2499 | * attribute must be provided as well | ||
2500 | */ | ||
2501 | enum nl80211_chan_width { | ||
2502 | NL80211_CHAN_WIDTH_20_NOHT, | ||
2503 | NL80211_CHAN_WIDTH_20, | ||
2504 | NL80211_CHAN_WIDTH_40, | ||
2505 | NL80211_CHAN_WIDTH_80, | ||
2506 | NL80211_CHAN_WIDTH_80P80, | ||
2507 | NL80211_CHAN_WIDTH_160, | ||
2508 | }; | ||
2509 | |||
2510 | /** | ||
2451 | * enum nl80211_bss - netlink attributes for a BSS | 2511 | * enum nl80211_bss - netlink attributes for a BSS |
2452 | * | 2512 | * |
2453 | * @__NL80211_BSS_INVALID: invalid | 2513 | * @__NL80211_BSS_INVALID: invalid |