diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/cfg80211.h | 164 | ||||
-rw-r--r-- | include/net/ieee80211_radiotap.h | 4 | ||||
-rw-r--r-- | include/net/mac80211.h | 30 |
3 files changed, 172 insertions, 26 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 7b0730aeb892..aeaf6dff6e05 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -461,6 +461,33 @@ ieee80211_chandef_rate_flags(struct cfg80211_chan_def *chandef) | |||
461 | } | 461 | } |
462 | 462 | ||
463 | /** | 463 | /** |
464 | * ieee80211_chandef_max_power - maximum transmission power for the chandef | ||
465 | * | ||
466 | * In some regulations, the transmit power may depend on the configured channel | ||
467 | * bandwidth which may be defined as dBm/MHz. This function returns the actual | ||
468 | * max_power for non-standard (20 MHz) channels. | ||
469 | * | ||
470 | * @chandef: channel definition for the channel | ||
471 | * | ||
472 | * Returns: maximum allowed transmission power in dBm for the chandef | ||
473 | */ | ||
474 | static inline int | ||
475 | ieee80211_chandef_max_power(struct cfg80211_chan_def *chandef) | ||
476 | { | ||
477 | switch (chandef->width) { | ||
478 | case NL80211_CHAN_WIDTH_5: | ||
479 | return min(chandef->chan->max_reg_power - 6, | ||
480 | chandef->chan->max_power); | ||
481 | case NL80211_CHAN_WIDTH_10: | ||
482 | return min(chandef->chan->max_reg_power - 3, | ||
483 | chandef->chan->max_power); | ||
484 | default: | ||
485 | break; | ||
486 | } | ||
487 | return chandef->chan->max_power; | ||
488 | } | ||
489 | |||
490 | /** | ||
464 | * enum survey_info_flags - survey information flags | 491 | * enum survey_info_flags - survey information flags |
465 | * | 492 | * |
466 | * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in | 493 | * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in |
@@ -490,7 +517,7 @@ enum survey_info_flags { | |||
490 | * @channel: the channel this survey record reports, mandatory | 517 | * @channel: the channel this survey record reports, mandatory |
491 | * @filled: bitflag of flags from &enum survey_info_flags | 518 | * @filled: bitflag of flags from &enum survey_info_flags |
492 | * @noise: channel noise in dBm. This and all following fields are | 519 | * @noise: channel noise in dBm. This and all following fields are |
493 | * optional | 520 | * optional |
494 | * @channel_time: amount of time in ms the radio spent on the channel | 521 | * @channel_time: amount of time in ms the radio spent on the channel |
495 | * @channel_time_busy: amount of time the primary channel was sensed busy | 522 | * @channel_time_busy: amount of time the primary channel was sensed busy |
496 | * @channel_time_ext_busy: amount of time the extension channel was sensed busy | 523 | * @channel_time_ext_busy: amount of time the extension channel was sensed busy |
@@ -546,9 +573,9 @@ struct cfg80211_crypto_settings { | |||
546 | /** | 573 | /** |
547 | * struct cfg80211_beacon_data - beacon data | 574 | * struct cfg80211_beacon_data - beacon data |
548 | * @head: head portion of beacon (before TIM IE) | 575 | * @head: head portion of beacon (before TIM IE) |
549 | * or %NULL if not changed | 576 | * or %NULL if not changed |
550 | * @tail: tail portion of beacon (after TIM IE) | 577 | * @tail: tail portion of beacon (after TIM IE) |
551 | * or %NULL if not changed | 578 | * or %NULL if not changed |
552 | * @head_len: length of @head | 579 | * @head_len: length of @head |
553 | * @tail_len: length of @tail | 580 | * @tail_len: length of @tail |
554 | * @beacon_ies: extra information element(s) to add into Beacon frames or %NULL | 581 | * @beacon_ies: extra information element(s) to add into Beacon frames or %NULL |
@@ -764,7 +791,7 @@ int cfg80211_check_station_change(struct wiphy *wiphy, | |||
764 | * @STATION_INFO_PLINK_STATE: @plink_state filled | 791 | * @STATION_INFO_PLINK_STATE: @plink_state filled |
765 | * @STATION_INFO_SIGNAL: @signal filled | 792 | * @STATION_INFO_SIGNAL: @signal filled |
766 | * @STATION_INFO_TX_BITRATE: @txrate fields are filled | 793 | * @STATION_INFO_TX_BITRATE: @txrate fields are filled |
767 | * (tx_bitrate, tx_bitrate_flags and tx_bitrate_mcs) | 794 | * (tx_bitrate, tx_bitrate_flags and tx_bitrate_mcs) |
768 | * @STATION_INFO_RX_PACKETS: @rx_packets filled with 32-bit value | 795 | * @STATION_INFO_RX_PACKETS: @rx_packets filled with 32-bit value |
769 | * @STATION_INFO_TX_PACKETS: @tx_packets filled with 32-bit value | 796 | * @STATION_INFO_TX_PACKETS: @tx_packets filled with 32-bit value |
770 | * @STATION_INFO_TX_RETRIES: @tx_retries filled | 797 | * @STATION_INFO_TX_RETRIES: @tx_retries filled |
@@ -1285,6 +1312,7 @@ struct cfg80211_ssid { | |||
1285 | * @n_ssids: number of SSIDs | 1312 | * @n_ssids: number of SSIDs |
1286 | * @channels: channels to scan on. | 1313 | * @channels: channels to scan on. |
1287 | * @n_channels: total number of channels to scan | 1314 | * @n_channels: total number of channels to scan |
1315 | * @scan_width: channel width for scanning | ||
1288 | * @ie: optional information element(s) to add into Probe Request or %NULL | 1316 | * @ie: optional information element(s) to add into Probe Request or %NULL |
1289 | * @ie_len: length of ie in octets | 1317 | * @ie_len: length of ie in octets |
1290 | * @flags: bit field of flags controlling operation | 1318 | * @flags: bit field of flags controlling operation |
@@ -1300,6 +1328,7 @@ struct cfg80211_scan_request { | |||
1300 | struct cfg80211_ssid *ssids; | 1328 | struct cfg80211_ssid *ssids; |
1301 | int n_ssids; | 1329 | int n_ssids; |
1302 | u32 n_channels; | 1330 | u32 n_channels; |
1331 | enum nl80211_bss_scan_width scan_width; | ||
1303 | const u8 *ie; | 1332 | const u8 *ie; |
1304 | size_t ie_len; | 1333 | size_t ie_len; |
1305 | u32 flags; | 1334 | u32 flags; |
@@ -1333,6 +1362,7 @@ struct cfg80211_match_set { | |||
1333 | * @ssids: SSIDs to scan for (passed in the probe_reqs in active scans) | 1362 | * @ssids: SSIDs to scan for (passed in the probe_reqs in active scans) |
1334 | * @n_ssids: number of SSIDs | 1363 | * @n_ssids: number of SSIDs |
1335 | * @n_channels: total number of channels to scan | 1364 | * @n_channels: total number of channels to scan |
1365 | * @scan_width: channel width for scanning | ||
1336 | * @interval: interval between each scheduled scan cycle | 1366 | * @interval: interval between each scheduled scan cycle |
1337 | * @ie: optional information element(s) to add into Probe Request or %NULL | 1367 | * @ie: optional information element(s) to add into Probe Request or %NULL |
1338 | * @ie_len: length of ie in octets | 1368 | * @ie_len: length of ie in octets |
@@ -1352,6 +1382,7 @@ struct cfg80211_sched_scan_request { | |||
1352 | struct cfg80211_ssid *ssids; | 1382 | struct cfg80211_ssid *ssids; |
1353 | int n_ssids; | 1383 | int n_ssids; |
1354 | u32 n_channels; | 1384 | u32 n_channels; |
1385 | enum nl80211_bss_scan_width scan_width; | ||
1355 | u32 interval; | 1386 | u32 interval; |
1356 | const u8 *ie; | 1387 | const u8 *ie; |
1357 | size_t ie_len; | 1388 | size_t ie_len; |
@@ -1403,6 +1434,7 @@ struct cfg80211_bss_ies { | |||
1403 | * for use in scan results and similar. | 1434 | * for use in scan results and similar. |
1404 | * | 1435 | * |
1405 | * @channel: channel this BSS is on | 1436 | * @channel: channel this BSS is on |
1437 | * @scan_width: width of the control channel | ||
1406 | * @bssid: BSSID of the BSS | 1438 | * @bssid: BSSID of the BSS |
1407 | * @beacon_interval: the beacon interval as from the frame | 1439 | * @beacon_interval: the beacon interval as from the frame |
1408 | * @capability: the capability field in host byte order | 1440 | * @capability: the capability field in host byte order |
@@ -1424,6 +1456,7 @@ struct cfg80211_bss_ies { | |||
1424 | */ | 1456 | */ |
1425 | struct cfg80211_bss { | 1457 | struct cfg80211_bss { |
1426 | struct ieee80211_channel *channel; | 1458 | struct ieee80211_channel *channel; |
1459 | enum nl80211_bss_scan_width scan_width; | ||
1427 | 1460 | ||
1428 | const struct cfg80211_bss_ies __rcu *ies; | 1461 | const struct cfg80211_bss_ies __rcu *ies; |
1429 | const struct cfg80211_bss_ies __rcu *beacon_ies; | 1462 | const struct cfg80211_bss_ies __rcu *beacon_ies; |
@@ -1509,7 +1542,7 @@ enum cfg80211_assoc_req_flags { | |||
1509 | * @prev_bssid: previous BSSID, if not %NULL use reassociate frame | 1542 | * @prev_bssid: previous BSSID, if not %NULL use reassociate frame |
1510 | * @flags: See &enum cfg80211_assoc_req_flags | 1543 | * @flags: See &enum cfg80211_assoc_req_flags |
1511 | * @ht_capa: HT Capabilities over-rides. Values set in ht_capa_mask | 1544 | * @ht_capa: HT Capabilities over-rides. Values set in ht_capa_mask |
1512 | * will be used in ht_capa. Un-supported values will be ignored. | 1545 | * will be used in ht_capa. Un-supported values will be ignored. |
1513 | * @ht_capa_mask: The bits of ht_capa which are to be used. | 1546 | * @ht_capa_mask: The bits of ht_capa which are to be used. |
1514 | * @vht_capa: VHT capability override | 1547 | * @vht_capa: VHT capability override |
1515 | * @vht_capa_mask: VHT capability mask indicating which fields to use | 1548 | * @vht_capa_mask: VHT capability mask indicating which fields to use |
@@ -1592,6 +1625,9 @@ struct cfg80211_disassoc_request { | |||
1592 | * user space. Otherwise, port is marked authorized by default. | 1625 | * user space. Otherwise, port is marked authorized by default. |
1593 | * @basic_rates: bitmap of basic rates to use when creating the IBSS | 1626 | * @basic_rates: bitmap of basic rates to use when creating the IBSS |
1594 | * @mcast_rate: per-band multicast rate index + 1 (0: disabled) | 1627 | * @mcast_rate: per-band multicast rate index + 1 (0: disabled) |
1628 | * @ht_capa: HT Capabilities over-rides. Values set in ht_capa_mask | ||
1629 | * will be used in ht_capa. Un-supported values will be ignored. | ||
1630 | * @ht_capa_mask: The bits of ht_capa which are to be used. | ||
1595 | */ | 1631 | */ |
1596 | struct cfg80211_ibss_params { | 1632 | struct cfg80211_ibss_params { |
1597 | u8 *ssid; | 1633 | u8 *ssid; |
@@ -1605,6 +1641,8 @@ struct cfg80211_ibss_params { | |||
1605 | bool privacy; | 1641 | bool privacy; |
1606 | bool control_port; | 1642 | bool control_port; |
1607 | int mcast_rate[IEEE80211_NUM_BANDS]; | 1643 | int mcast_rate[IEEE80211_NUM_BANDS]; |
1644 | struct ieee80211_ht_cap ht_capa; | ||
1645 | struct ieee80211_ht_cap ht_capa_mask; | ||
1608 | }; | 1646 | }; |
1609 | 1647 | ||
1610 | /** | 1648 | /** |
@@ -1630,9 +1668,9 @@ struct cfg80211_ibss_params { | |||
1630 | * @key: WEP key for shared key authentication | 1668 | * @key: WEP key for shared key authentication |
1631 | * @flags: See &enum cfg80211_assoc_req_flags | 1669 | * @flags: See &enum cfg80211_assoc_req_flags |
1632 | * @bg_scan_period: Background scan period in seconds | 1670 | * @bg_scan_period: Background scan period in seconds |
1633 | * or -1 to indicate that default value is to be used. | 1671 | * or -1 to indicate that default value is to be used. |
1634 | * @ht_capa: HT Capabilities over-rides. Values set in ht_capa_mask | 1672 | * @ht_capa: HT Capabilities over-rides. Values set in ht_capa_mask |
1635 | * will be used in ht_capa. Un-supported values will be ignored. | 1673 | * will be used in ht_capa. Un-supported values will be ignored. |
1636 | * @ht_capa_mask: The bits of ht_capa which are to be used. | 1674 | * @ht_capa_mask: The bits of ht_capa which are to be used. |
1637 | * @vht_capa: VHT Capability overrides | 1675 | * @vht_capa: VHT Capability overrides |
1638 | * @vht_capa_mask: The bits of vht_capa which are to be used. | 1676 | * @vht_capa_mask: The bits of vht_capa which are to be used. |
@@ -1698,7 +1736,7 @@ struct cfg80211_pmksa { | |||
1698 | }; | 1736 | }; |
1699 | 1737 | ||
1700 | /** | 1738 | /** |
1701 | * struct cfg80211_wowlan_trig_pkt_pattern - packet pattern | 1739 | * struct cfg80211_pkt_pattern - packet pattern |
1702 | * @mask: bitmask where to match pattern and where to ignore bytes, | 1740 | * @mask: bitmask where to match pattern and where to ignore bytes, |
1703 | * one bit per byte, in same format as nl80211 | 1741 | * one bit per byte, in same format as nl80211 |
1704 | * @pattern: bytes to match where bitmask is 1 | 1742 | * @pattern: bytes to match where bitmask is 1 |
@@ -1708,7 +1746,7 @@ struct cfg80211_pmksa { | |||
1708 | * Internal note: @mask and @pattern are allocated in one chunk of | 1746 | * Internal note: @mask and @pattern are allocated in one chunk of |
1709 | * memory, free @mask only! | 1747 | * memory, free @mask only! |
1710 | */ | 1748 | */ |
1711 | struct cfg80211_wowlan_trig_pkt_pattern { | 1749 | struct cfg80211_pkt_pattern { |
1712 | u8 *mask, *pattern; | 1750 | u8 *mask, *pattern; |
1713 | int pattern_len; | 1751 | int pattern_len; |
1714 | int pkt_offset; | 1752 | int pkt_offset; |
@@ -1770,12 +1808,41 @@ struct cfg80211_wowlan { | |||
1770 | bool any, disconnect, magic_pkt, gtk_rekey_failure, | 1808 | bool any, disconnect, magic_pkt, gtk_rekey_failure, |
1771 | eap_identity_req, four_way_handshake, | 1809 | eap_identity_req, four_way_handshake, |
1772 | rfkill_release; | 1810 | rfkill_release; |
1773 | struct cfg80211_wowlan_trig_pkt_pattern *patterns; | 1811 | struct cfg80211_pkt_pattern *patterns; |
1774 | struct cfg80211_wowlan_tcp *tcp; | 1812 | struct cfg80211_wowlan_tcp *tcp; |
1775 | int n_patterns; | 1813 | int n_patterns; |
1776 | }; | 1814 | }; |
1777 | 1815 | ||
1778 | /** | 1816 | /** |
1817 | * struct cfg80211_coalesce_rules - Coalesce rule parameters | ||
1818 | * | ||
1819 | * This structure defines coalesce rule for the device. | ||
1820 | * @delay: maximum coalescing delay in msecs. | ||
1821 | * @condition: condition for packet coalescence. | ||
1822 | * see &enum nl80211_coalesce_condition. | ||
1823 | * @patterns: array of packet patterns | ||
1824 | * @n_patterns: number of patterns | ||
1825 | */ | ||
1826 | struct cfg80211_coalesce_rules { | ||
1827 | int delay; | ||
1828 | enum nl80211_coalesce_condition condition; | ||
1829 | struct cfg80211_pkt_pattern *patterns; | ||
1830 | int n_patterns; | ||
1831 | }; | ||
1832 | |||
1833 | /** | ||
1834 | * struct cfg80211_coalesce - Packet coalescing settings | ||
1835 | * | ||
1836 | * This structure defines coalescing settings. | ||
1837 | * @rules: array of coalesce rules | ||
1838 | * @n_rules: number of rules | ||
1839 | */ | ||
1840 | struct cfg80211_coalesce { | ||
1841 | struct cfg80211_coalesce_rules *rules; | ||
1842 | int n_rules; | ||
1843 | }; | ||
1844 | |||
1845 | /** | ||
1779 | * struct cfg80211_wowlan_wakeup - wakeup report | 1846 | * struct cfg80211_wowlan_wakeup - wakeup report |
1780 | * @disconnect: woke up by getting disconnected | 1847 | * @disconnect: woke up by getting disconnected |
1781 | * @magic_pkt: woke up by receiving magic packet | 1848 | * @magic_pkt: woke up by receiving magic packet |
@@ -2071,6 +2138,7 @@ struct cfg80211_update_ft_ies_params { | |||
2071 | * driver can take the most appropriate actions. | 2138 | * driver can take the most appropriate actions. |
2072 | * @crit_proto_stop: Indicates critical protocol no longer needs increased link | 2139 | * @crit_proto_stop: Indicates critical protocol no longer needs increased link |
2073 | * reliability. This operation can not fail. | 2140 | * reliability. This operation can not fail. |
2141 | * @set_coalesce: Set coalesce parameters. | ||
2074 | */ | 2142 | */ |
2075 | struct cfg80211_ops { | 2143 | struct cfg80211_ops { |
2076 | int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); | 2144 | int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); |
@@ -2306,6 +2374,8 @@ struct cfg80211_ops { | |||
2306 | u16 duration); | 2374 | u16 duration); |
2307 | void (*crit_proto_stop)(struct wiphy *wiphy, | 2375 | void (*crit_proto_stop)(struct wiphy *wiphy, |
2308 | struct wireless_dev *wdev); | 2376 | struct wireless_dev *wdev); |
2377 | int (*set_coalesce)(struct wiphy *wiphy, | ||
2378 | struct cfg80211_coalesce *coalesce); | ||
2309 | }; | 2379 | }; |
2310 | 2380 | ||
2311 | /* | 2381 | /* |
@@ -2532,6 +2602,25 @@ struct wiphy_wowlan_support { | |||
2532 | }; | 2602 | }; |
2533 | 2603 | ||
2534 | /** | 2604 | /** |
2605 | * struct wiphy_coalesce_support - coalesce support data | ||
2606 | * @n_rules: maximum number of coalesce rules | ||
2607 | * @max_delay: maximum supported coalescing delay in msecs | ||
2608 | * @n_patterns: number of supported patterns in a rule | ||
2609 | * (see nl80211.h for the pattern definition) | ||
2610 | * @pattern_max_len: maximum length of each pattern | ||
2611 | * @pattern_min_len: minimum length of each pattern | ||
2612 | * @max_pkt_offset: maximum Rx packet offset | ||
2613 | */ | ||
2614 | struct wiphy_coalesce_support { | ||
2615 | int n_rules; | ||
2616 | int max_delay; | ||
2617 | int n_patterns; | ||
2618 | int pattern_max_len; | ||
2619 | int pattern_min_len; | ||
2620 | int max_pkt_offset; | ||
2621 | }; | ||
2622 | |||
2623 | /** | ||
2535 | * struct wiphy - wireless hardware description | 2624 | * struct wiphy - wireless hardware description |
2536 | * @reg_notifier: the driver's regulatory notification callback, | 2625 | * @reg_notifier: the driver's regulatory notification callback, |
2537 | * note that if your driver uses wiphy_apply_custom_regulatory() | 2626 | * note that if your driver uses wiphy_apply_custom_regulatory() |
@@ -2641,6 +2730,7 @@ struct wiphy_wowlan_support { | |||
2641 | * 802.11-2012 8.4.2.29 for the defined fields. | 2730 | * 802.11-2012 8.4.2.29 for the defined fields. |
2642 | * @extended_capabilities_mask: mask of the valid values | 2731 | * @extended_capabilities_mask: mask of the valid values |
2643 | * @extended_capabilities_len: length of the extended capabilities | 2732 | * @extended_capabilities_len: length of the extended capabilities |
2733 | * @coalesce: packet coalescing support information | ||
2644 | */ | 2734 | */ |
2645 | struct wiphy { | 2735 | struct wiphy { |
2646 | /* assign these fields before you register the wiphy */ | 2736 | /* assign these fields before you register the wiphy */ |
@@ -2750,6 +2840,8 @@ struct wiphy { | |||
2750 | const struct iw_handler_def *wext; | 2840 | const struct iw_handler_def *wext; |
2751 | #endif | 2841 | #endif |
2752 | 2842 | ||
2843 | const struct wiphy_coalesce_support *coalesce; | ||
2844 | |||
2753 | char priv[0] __aligned(NETDEV_ALIGN); | 2845 | char priv[0] __aligned(NETDEV_ALIGN); |
2754 | }; | 2846 | }; |
2755 | 2847 | ||
@@ -3063,11 +3155,13 @@ ieee80211_get_response_rate(struct ieee80211_supported_band *sband, | |||
3063 | /** | 3155 | /** |
3064 | * ieee80211_mandatory_rates - get mandatory rates for a given band | 3156 | * ieee80211_mandatory_rates - get mandatory rates for a given band |
3065 | * @sband: the band to look for rates in | 3157 | * @sband: the band to look for rates in |
3158 | * @scan_width: width of the control channel | ||
3066 | * | 3159 | * |
3067 | * This function returns a bitmap of the mandatory rates for the given | 3160 | * This function returns a bitmap of the mandatory rates for the given |
3068 | * band, bits are set according to the rate position in the bitrates array. | 3161 | * band, bits are set according to the rate position in the bitrates array. |
3069 | */ | 3162 | */ |
3070 | u32 ieee80211_mandatory_rates(struct ieee80211_supported_band *sband); | 3163 | u32 ieee80211_mandatory_rates(struct ieee80211_supported_band *sband, |
3164 | enum nl80211_bss_scan_width scan_width); | ||
3071 | 3165 | ||
3072 | /* | 3166 | /* |
3073 | * Radiotap parsing functions -- for controlled injection support | 3167 | * Radiotap parsing functions -- for controlled injection support |
@@ -3379,10 +3473,11 @@ void cfg80211_sched_scan_results(struct wiphy *wiphy); | |||
3379 | void cfg80211_sched_scan_stopped(struct wiphy *wiphy); | 3473 | void cfg80211_sched_scan_stopped(struct wiphy *wiphy); |
3380 | 3474 | ||
3381 | /** | 3475 | /** |
3382 | * cfg80211_inform_bss_frame - inform cfg80211 of a received BSS frame | 3476 | * cfg80211_inform_bss_width_frame - inform cfg80211 of a received BSS frame |
3383 | * | 3477 | * |
3384 | * @wiphy: the wiphy reporting the BSS | 3478 | * @wiphy: the wiphy reporting the BSS |
3385 | * @channel: The channel the frame was received on | 3479 | * @channel: The channel the frame was received on |
3480 | * @scan_width: width of the control channel | ||
3386 | * @mgmt: the management frame (probe response or beacon) | 3481 | * @mgmt: the management frame (probe response or beacon) |
3387 | * @len: length of the management frame | 3482 | * @len: length of the management frame |
3388 | * @signal: the signal strength, type depends on the wiphy's signal_type | 3483 | * @signal: the signal strength, type depends on the wiphy's signal_type |
@@ -3395,16 +3490,29 @@ void cfg80211_sched_scan_stopped(struct wiphy *wiphy); | |||
3395 | * Or %NULL on error. | 3490 | * Or %NULL on error. |
3396 | */ | 3491 | */ |
3397 | struct cfg80211_bss * __must_check | 3492 | struct cfg80211_bss * __must_check |
3493 | cfg80211_inform_bss_width_frame(struct wiphy *wiphy, | ||
3494 | struct ieee80211_channel *channel, | ||
3495 | enum nl80211_bss_scan_width scan_width, | ||
3496 | struct ieee80211_mgmt *mgmt, size_t len, | ||
3497 | s32 signal, gfp_t gfp); | ||
3498 | |||
3499 | static inline struct cfg80211_bss * __must_check | ||
3398 | cfg80211_inform_bss_frame(struct wiphy *wiphy, | 3500 | cfg80211_inform_bss_frame(struct wiphy *wiphy, |
3399 | struct ieee80211_channel *channel, | 3501 | struct ieee80211_channel *channel, |
3400 | struct ieee80211_mgmt *mgmt, size_t len, | 3502 | struct ieee80211_mgmt *mgmt, size_t len, |
3401 | s32 signal, gfp_t gfp); | 3503 | s32 signal, gfp_t gfp) |
3504 | { | ||
3505 | return cfg80211_inform_bss_width_frame(wiphy, channel, | ||
3506 | NL80211_BSS_CHAN_WIDTH_20, | ||
3507 | mgmt, len, signal, gfp); | ||
3508 | } | ||
3402 | 3509 | ||
3403 | /** | 3510 | /** |
3404 | * cfg80211_inform_bss - inform cfg80211 of a new BSS | 3511 | * cfg80211_inform_bss - inform cfg80211 of a new BSS |
3405 | * | 3512 | * |
3406 | * @wiphy: the wiphy reporting the BSS | 3513 | * @wiphy: the wiphy reporting the BSS |
3407 | * @channel: The channel the frame was received on | 3514 | * @channel: The channel the frame was received on |
3515 | * @scan_width: width of the control channel | ||
3408 | * @bssid: the BSSID of the BSS | 3516 | * @bssid: the BSSID of the BSS |
3409 | * @tsf: the TSF sent by the peer in the beacon/probe response (or 0) | 3517 | * @tsf: the TSF sent by the peer in the beacon/probe response (or 0) |
3410 | * @capability: the capability field sent by the peer | 3518 | * @capability: the capability field sent by the peer |
@@ -3421,11 +3529,26 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy, | |||
3421 | * Or %NULL on error. | 3529 | * Or %NULL on error. |
3422 | */ | 3530 | */ |
3423 | struct cfg80211_bss * __must_check | 3531 | struct cfg80211_bss * __must_check |
3532 | cfg80211_inform_bss_width(struct wiphy *wiphy, | ||
3533 | struct ieee80211_channel *channel, | ||
3534 | enum nl80211_bss_scan_width scan_width, | ||
3535 | const u8 *bssid, u64 tsf, u16 capability, | ||
3536 | u16 beacon_interval, const u8 *ie, size_t ielen, | ||
3537 | s32 signal, gfp_t gfp); | ||
3538 | |||
3539 | static inline struct cfg80211_bss * __must_check | ||
3424 | cfg80211_inform_bss(struct wiphy *wiphy, | 3540 | cfg80211_inform_bss(struct wiphy *wiphy, |
3425 | struct ieee80211_channel *channel, | 3541 | struct ieee80211_channel *channel, |
3426 | const u8 *bssid, u64 tsf, u16 capability, | 3542 | const u8 *bssid, u64 tsf, u16 capability, |
3427 | u16 beacon_interval, const u8 *ie, size_t ielen, | 3543 | u16 beacon_interval, const u8 *ie, size_t ielen, |
3428 | s32 signal, gfp_t gfp); | 3544 | s32 signal, gfp_t gfp) |
3545 | { | ||
3546 | return cfg80211_inform_bss_width(wiphy, channel, | ||
3547 | NL80211_BSS_CHAN_WIDTH_20, | ||
3548 | bssid, tsf, capability, | ||
3549 | beacon_interval, ie, ielen, signal, | ||
3550 | gfp); | ||
3551 | } | ||
3429 | 3552 | ||
3430 | struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy, | 3553 | struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy, |
3431 | struct ieee80211_channel *channel, | 3554 | struct ieee80211_channel *channel, |
@@ -3471,6 +3594,19 @@ void cfg80211_put_bss(struct wiphy *wiphy, struct cfg80211_bss *bss); | |||
3471 | */ | 3594 | */ |
3472 | void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss); | 3595 | void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss); |
3473 | 3596 | ||
3597 | static inline enum nl80211_bss_scan_width | ||
3598 | cfg80211_chandef_to_scan_width(const struct cfg80211_chan_def *chandef) | ||
3599 | { | ||
3600 | switch (chandef->width) { | ||
3601 | case NL80211_CHAN_WIDTH_5: | ||
3602 | return NL80211_BSS_CHAN_WIDTH_5; | ||
3603 | case NL80211_CHAN_WIDTH_10: | ||
3604 | return NL80211_BSS_CHAN_WIDTH_10; | ||
3605 | default: | ||
3606 | return NL80211_BSS_CHAN_WIDTH_20; | ||
3607 | } | ||
3608 | } | ||
3609 | |||
3474 | /** | 3610 | /** |
3475 | * cfg80211_rx_mlme_mgmt - notification of processed MLME management frame | 3611 | * cfg80211_rx_mlme_mgmt - notification of processed MLME management frame |
3476 | * @dev: network device | 3612 | * @dev: network device |
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h index c6d07cb074bc..8b5b71433297 100644 --- a/include/net/ieee80211_radiotap.h +++ b/include/net/ieee80211_radiotap.h | |||
@@ -230,6 +230,10 @@ enum ieee80211_radiotap_type { | |||
230 | #define IEEE80211_CHAN_PASSIVE 0x0200 /* Only passive scan allowed */ | 230 | #define IEEE80211_CHAN_PASSIVE 0x0200 /* Only passive scan allowed */ |
231 | #define IEEE80211_CHAN_DYN 0x0400 /* Dynamic CCK-OFDM channel */ | 231 | #define IEEE80211_CHAN_DYN 0x0400 /* Dynamic CCK-OFDM channel */ |
232 | #define IEEE80211_CHAN_GFSK 0x0800 /* GFSK channel (FHSS PHY) */ | 232 | #define IEEE80211_CHAN_GFSK 0x0800 /* GFSK channel (FHSS PHY) */ |
233 | #define IEEE80211_CHAN_GSM 0x1000 /* GSM (900 MHz) */ | ||
234 | #define IEEE80211_CHAN_STURBO 0x2000 /* Static Turbo */ | ||
235 | #define IEEE80211_CHAN_HALF 0x4000 /* Half channel (10 MHz wide) */ | ||
236 | #define IEEE80211_CHAN_QUARTER 0x8000 /* Quarter channel (5 MHz wide) */ | ||
233 | 237 | ||
234 | /* For IEEE80211_RADIOTAP_FLAGS */ | 238 | /* For IEEE80211_RADIOTAP_FLAGS */ |
235 | #define IEEE80211_RADIOTAP_F_CFP 0x01 /* sent/received | 239 | #define IEEE80211_RADIOTAP_F_CFP 0x01 /* sent/received |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 5b7a3dadadde..3124036285eb 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -811,6 +811,8 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) | |||
811 | * @RX_FLAG_AMPDU_DELIM_CRC_KNOWN: The delimiter CRC field is known (the CRC | 811 | * @RX_FLAG_AMPDU_DELIM_CRC_KNOWN: The delimiter CRC field is known (the CRC |
812 | * is stored in the @ampdu_delimiter_crc field) | 812 | * is stored in the @ampdu_delimiter_crc field) |
813 | * @RX_FLAG_STBC_MASK: STBC 2 bit bitmask. 1 - Nss=1, 2 - Nss=2, 3 - Nss=3 | 813 | * @RX_FLAG_STBC_MASK: STBC 2 bit bitmask. 1 - Nss=1, 2 - Nss=2, 3 - Nss=3 |
814 | * @RX_FLAG_10MHZ: 10 MHz (half channel) was used | ||
815 | * @RX_FLAG_5MHZ: 5 MHz (quarter channel) was used | ||
814 | */ | 816 | */ |
815 | enum mac80211_rx_flags { | 817 | enum mac80211_rx_flags { |
816 | RX_FLAG_MMIC_ERROR = BIT(0), | 818 | RX_FLAG_MMIC_ERROR = BIT(0), |
@@ -839,6 +841,8 @@ enum mac80211_rx_flags { | |||
839 | RX_FLAG_80P80MHZ = BIT(24), | 841 | RX_FLAG_80P80MHZ = BIT(24), |
840 | RX_FLAG_160MHZ = BIT(25), | 842 | RX_FLAG_160MHZ = BIT(25), |
841 | RX_FLAG_STBC_MASK = BIT(26) | BIT(27), | 843 | RX_FLAG_STBC_MASK = BIT(26) | BIT(27), |
844 | RX_FLAG_10MHZ = BIT(28), | ||
845 | RX_FLAG_5MHZ = BIT(29), | ||
842 | }; | 846 | }; |
843 | 847 | ||
844 | #define RX_FLAG_STBC_SHIFT 26 | 848 | #define RX_FLAG_STBC_SHIFT 26 |
@@ -1004,11 +1008,11 @@ enum ieee80211_smps_mode { | |||
1004 | * @radar_enabled: whether radar detection is enabled | 1008 | * @radar_enabled: whether radar detection is enabled |
1005 | * | 1009 | * |
1006 | * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame | 1010 | * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame |
1007 | * (a frame not RTS protected), called "dot11LongRetryLimit" in 802.11, | 1011 | * (a frame not RTS protected), called "dot11LongRetryLimit" in 802.11, |
1008 | * but actually means the number of transmissions not the number of retries | 1012 | * but actually means the number of transmissions not the number of retries |
1009 | * @short_frame_max_tx_count: Maximum number of transmissions for a "short" | 1013 | * @short_frame_max_tx_count: Maximum number of transmissions for a "short" |
1010 | * frame, called "dot11ShortRetryLimit" in 802.11, but actually means the | 1014 | * frame, called "dot11ShortRetryLimit" in 802.11, but actually means the |
1011 | * number of transmissions not the number of retries | 1015 | * number of transmissions not the number of retries |
1012 | * | 1016 | * |
1013 | * @smps_mode: spatial multiplexing powersave mode; note that | 1017 | * @smps_mode: spatial multiplexing powersave mode; note that |
1014 | * %IEEE80211_SMPS_STATIC is used when the device is not | 1018 | * %IEEE80211_SMPS_STATIC is used when the device is not |
@@ -1092,7 +1096,7 @@ enum ieee80211_vif_flags { | |||
1092 | * be off when it is %NULL there can still be races and packets could be | 1096 | * be off when it is %NULL there can still be races and packets could be |
1093 | * processed after it switches back to %NULL. | 1097 | * processed after it switches back to %NULL. |
1094 | * @debugfs_dir: debugfs dentry, can be used by drivers to create own per | 1098 | * @debugfs_dir: debugfs dentry, can be used by drivers to create own per |
1095 | * interface debug files. Note that it will be NULL for the virtual | 1099 | * interface debug files. Note that it will be NULL for the virtual |
1096 | * monitor interface (if that is requested.) | 1100 | * monitor interface (if that is requested.) |
1097 | * @drv_priv: data area for driver use, will always be aligned to | 1101 | * @drv_priv: data area for driver use, will always be aligned to |
1098 | * sizeof(void *). | 1102 | * sizeof(void *). |
@@ -1425,10 +1429,10 @@ struct ieee80211_tx_control { | |||
1425 | * the stack. | 1429 | * the stack. |
1426 | * | 1430 | * |
1427 | * @IEEE80211_HW_CONNECTION_MONITOR: | 1431 | * @IEEE80211_HW_CONNECTION_MONITOR: |
1428 | * The hardware performs its own connection monitoring, including | 1432 | * The hardware performs its own connection monitoring, including |
1429 | * periodic keep-alives to the AP and probing the AP on beacon loss. | 1433 | * periodic keep-alives to the AP and probing the AP on beacon loss. |
1430 | * When this flag is set, signaling beacon-loss will cause an immediate | 1434 | * When this flag is set, signaling beacon-loss will cause an immediate |
1431 | * change to disassociated state. | 1435 | * change to disassociated state. |
1432 | * | 1436 | * |
1433 | * @IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC: | 1437 | * @IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC: |
1434 | * This device needs to get data from beacon before association (i.e. | 1438 | * This device needs to get data from beacon before association (i.e. |
@@ -1526,10 +1530,10 @@ enum ieee80211_hw_flags { | |||
1526 | * @channel_change_time: time (in microseconds) it takes to change channels. | 1530 | * @channel_change_time: time (in microseconds) it takes to change channels. |
1527 | * | 1531 | * |
1528 | * @max_signal: Maximum value for signal (rssi) in RX information, used | 1532 | * @max_signal: Maximum value for signal (rssi) in RX information, used |
1529 | * only when @IEEE80211_HW_SIGNAL_UNSPEC or @IEEE80211_HW_SIGNAL_DB | 1533 | * only when @IEEE80211_HW_SIGNAL_UNSPEC or @IEEE80211_HW_SIGNAL_DB |
1530 | * | 1534 | * |
1531 | * @max_listen_interval: max listen interval in units of beacon interval | 1535 | * @max_listen_interval: max listen interval in units of beacon interval |
1532 | * that HW supports | 1536 | * that HW supports |
1533 | * | 1537 | * |
1534 | * @queues: number of available hardware transmit queues for | 1538 | * @queues: number of available hardware transmit queues for |
1535 | * data packets. WMM/QoS requires at least four, these | 1539 | * data packets. WMM/QoS requires at least four, these |
@@ -2443,7 +2447,7 @@ enum ieee80211_roc_type { | |||
2443 | * The callback can sleep. | 2447 | * The callback can sleep. |
2444 | * | 2448 | * |
2445 | * @set_tsf: Set the TSF timer to the specified value in the firmware/hardware. | 2449 | * @set_tsf: Set the TSF timer to the specified value in the firmware/hardware. |
2446 | * Currently, this is only used for IBSS mode debugging. Is not a | 2450 | * Currently, this is only used for IBSS mode debugging. Is not a |
2447 | * required function. | 2451 | * required function. |
2448 | * The callback can sleep. | 2452 | * The callback can sleep. |
2449 | * | 2453 | * |
@@ -4204,8 +4208,10 @@ struct rate_control_ops { | |||
4204 | 4208 | ||
4205 | void *(*alloc_sta)(void *priv, struct ieee80211_sta *sta, gfp_t gfp); | 4209 | void *(*alloc_sta)(void *priv, struct ieee80211_sta *sta, gfp_t gfp); |
4206 | void (*rate_init)(void *priv, struct ieee80211_supported_band *sband, | 4210 | void (*rate_init)(void *priv, struct ieee80211_supported_band *sband, |
4211 | struct cfg80211_chan_def *chandef, | ||
4207 | struct ieee80211_sta *sta, void *priv_sta); | 4212 | struct ieee80211_sta *sta, void *priv_sta); |
4208 | void (*rate_update)(void *priv, struct ieee80211_supported_band *sband, | 4213 | void (*rate_update)(void *priv, struct ieee80211_supported_band *sband, |
4214 | struct cfg80211_chan_def *chandef, | ||
4209 | struct ieee80211_sta *sta, void *priv_sta, | 4215 | struct ieee80211_sta *sta, void *priv_sta, |
4210 | u32 changed); | 4216 | u32 changed); |
4211 | void (*free_sta)(void *priv, struct ieee80211_sta *sta, | 4217 | void (*free_sta)(void *priv, struct ieee80211_sta *sta, |