diff options
| author | John W. Linville <linville@tuxdriver.com> | 2013-08-09 15:08:10 -0400 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2013-08-09 15:08:10 -0400 |
| commit | fa5978447cb0144411df3a588e3d01459c12d855 (patch) | |
| tree | 998e58c515def864c8cd87511625d1e7184a7a21 /include | |
| parent | 2437f3c5d6bc07252c6d7d24448755e0c35ed91c (diff) | |
| parent | 73da7d5bab79ad7e16ff44d67c3fe8b9c0b33e5b (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 | 9 | ||||
| -rw-r--r-- | include/net/cfg80211.h | 33 | ||||
| -rw-r--r-- | include/net/mac80211.h | 37 | ||||
| -rw-r--r-- | include/uapi/linux/nl80211.h | 30 |
4 files changed, 109 insertions, 0 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index b0dc87a2a376..b3ce299782af 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
| @@ -1709,6 +1709,10 @@ enum ieee80211_eid { | |||
| 1709 | WLAN_EID_OPMODE_NOTIF = 199, | 1709 | WLAN_EID_OPMODE_NOTIF = 199, |
| 1710 | WLAN_EID_WIDE_BW_CHANNEL_SWITCH = 194, | 1710 | WLAN_EID_WIDE_BW_CHANNEL_SWITCH = 194, |
| 1711 | WLAN_EID_CHANNEL_SWITCH_WRAPPER = 196, | 1711 | WLAN_EID_CHANNEL_SWITCH_WRAPPER = 196, |
| 1712 | WLAN_EID_EXTENDED_BSS_LOAD = 193, | ||
| 1713 | WLAN_EID_VHT_TX_POWER_ENVELOPE = 195, | ||
| 1714 | WLAN_EID_AID = 197, | ||
| 1715 | WLAN_EID_QUIET_CHANNEL = 198, | ||
| 1712 | 1716 | ||
| 1713 | /* 802.11ad */ | 1717 | /* 802.11ad */ |
| 1714 | WLAN_EID_NON_TX_BSSID_CAP = 83, | 1718 | WLAN_EID_NON_TX_BSSID_CAP = 83, |
| @@ -1860,6 +1864,11 @@ enum ieee80211_tdls_actioncode { | |||
| 1860 | WLAN_TDLS_DISCOVERY_REQUEST = 10, | 1864 | WLAN_TDLS_DISCOVERY_REQUEST = 10, |
| 1861 | }; | 1865 | }; |
| 1862 | 1866 | ||
| 1867 | /* Interworking capabilities are set in 7th bit of 4th byte of the | ||
| 1868 | * @WLAN_EID_EXT_CAPABILITY information element | ||
| 1869 | */ | ||
| 1870 | #define WLAN_EXT_CAPA4_INTERWORKING_ENABLED BIT(7) | ||
| 1871 | |||
| 1863 | /* | 1872 | /* |
| 1864 | * TDLS capabililites to be enabled in the 5th byte of the | 1873 | * TDLS capabililites to be enabled in the 5th byte of the |
| 1865 | * @WLAN_EID_EXT_CAPABILITY information element | 1874 | * @WLAN_EID_EXT_CAPABILITY information element |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index aeaf6dff6e05..b7495c72061c 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
| @@ -666,6 +666,30 @@ struct cfg80211_ap_settings { | |||
| 666 | }; | 666 | }; |
| 667 | 667 | ||
| 668 | /** | 668 | /** |
| 669 | * struct cfg80211_csa_settings - channel switch settings | ||
| 670 | * | ||
| 671 | * Used for channel switch | ||
| 672 | * | ||
| 673 | * @chandef: defines the channel to use after the switch | ||
| 674 | * @beacon_csa: beacon data while performing the switch | ||
| 675 | * @counter_offset_beacon: offset for the counter within the beacon (tail) | ||
| 676 | * @counter_offset_presp: offset for the counter within the probe response | ||
| 677 | * @beacon_after: beacon data to be used on the new channel | ||
| 678 | * @radar_required: whether radar detection is required on the new channel | ||
| 679 | * @block_tx: whether transmissions should be blocked while changing | ||
| 680 | * @count: number of beacons until switch | ||
| 681 | */ | ||
| 682 | struct cfg80211_csa_settings { | ||
| 683 | struct cfg80211_chan_def chandef; | ||
| 684 | struct cfg80211_beacon_data beacon_csa; | ||
| 685 | u16 counter_offset_beacon, counter_offset_presp; | ||
| 686 | struct cfg80211_beacon_data beacon_after; | ||
| 687 | bool radar_required; | ||
| 688 | bool block_tx; | ||
| 689 | u8 count; | ||
| 690 | }; | ||
| 691 | |||
| 692 | /** | ||
| 669 | * enum station_parameters_apply_mask - station parameter values to apply | 693 | * enum station_parameters_apply_mask - station parameter values to apply |
| 670 | * @STATION_PARAM_APPLY_UAPSD: apply new uAPSD parameters (uapsd_queues, max_sp) | 694 | * @STATION_PARAM_APPLY_UAPSD: apply new uAPSD parameters (uapsd_queues, max_sp) |
| 671 | * @STATION_PARAM_APPLY_CAPABILITY: apply new capability | 695 | * @STATION_PARAM_APPLY_CAPABILITY: apply new capability |
| @@ -2139,6 +2163,8 @@ struct cfg80211_update_ft_ies_params { | |||
| 2139 | * @crit_proto_stop: Indicates critical protocol no longer needs increased link | 2163 | * @crit_proto_stop: Indicates critical protocol no longer needs increased link |
| 2140 | * reliability. This operation can not fail. | 2164 | * reliability. This operation can not fail. |
| 2141 | * @set_coalesce: Set coalesce parameters. | 2165 | * @set_coalesce: Set coalesce parameters. |
| 2166 | * | ||
| 2167 | * @channel_switch: initiate channel-switch procedure (with CSA) | ||
| 2142 | */ | 2168 | */ |
| 2143 | struct cfg80211_ops { | 2169 | struct cfg80211_ops { |
| 2144 | int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); | 2170 | int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); |
| @@ -2376,6 +2402,10 @@ struct cfg80211_ops { | |||
| 2376 | struct wireless_dev *wdev); | 2402 | struct wireless_dev *wdev); |
| 2377 | int (*set_coalesce)(struct wiphy *wiphy, | 2403 | int (*set_coalesce)(struct wiphy *wiphy, |
| 2378 | struct cfg80211_coalesce *coalesce); | 2404 | struct cfg80211_coalesce *coalesce); |
| 2405 | |||
| 2406 | int (*channel_switch)(struct wiphy *wiphy, | ||
| 2407 | struct net_device *dev, | ||
| 2408 | struct cfg80211_csa_settings *params); | ||
| 2379 | }; | 2409 | }; |
| 2380 | 2410 | ||
| 2381 | /* | 2411 | /* |
| @@ -2441,6 +2471,8 @@ struct cfg80211_ops { | |||
| 2441 | * @WIPHY_FLAG_OFFCHAN_TX: Device supports direct off-channel TX. | 2471 | * @WIPHY_FLAG_OFFCHAN_TX: Device supports direct off-channel TX. |
| 2442 | * @WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL: Device supports remain-on-channel call. | 2472 | * @WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL: Device supports remain-on-channel call. |
| 2443 | * @WIPHY_FLAG_SUPPORTS_5_10_MHZ: Device supports 5 MHz and 10 MHz channels. | 2473 | * @WIPHY_FLAG_SUPPORTS_5_10_MHZ: Device supports 5 MHz and 10 MHz channels. |
| 2474 | * @WIPHY_FLAG_HAS_CHANNEL_SWITCH: Device supports channel switch in | ||
| 2475 | * beaconing mode (AP, IBSS, Mesh, ...). | ||
| 2444 | */ | 2476 | */ |
| 2445 | enum wiphy_flags { | 2477 | enum wiphy_flags { |
| 2446 | WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), | 2478 | WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), |
| @@ -2465,6 +2497,7 @@ enum wiphy_flags { | |||
| 2465 | WIPHY_FLAG_OFFCHAN_TX = BIT(20), | 2497 | WIPHY_FLAG_OFFCHAN_TX = BIT(20), |
| 2466 | WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL = BIT(21), | 2498 | WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL = BIT(21), |
| 2467 | WIPHY_FLAG_SUPPORTS_5_10_MHZ = BIT(22), | 2499 | WIPHY_FLAG_SUPPORTS_5_10_MHZ = BIT(22), |
| 2500 | WIPHY_FLAG_HAS_CHANNEL_SWITCH = BIT(23), | ||
| 2468 | }; | 2501 | }; |
| 2469 | 2502 | ||
| 2470 | /** | 2503 | /** |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 3124036285eb..9cda3728c2cb 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
| @@ -152,11 +152,14 @@ struct ieee80211_low_level_stats { | |||
| 152 | * @IEEE80211_CHANCTX_CHANGE_WIDTH: The channel width changed | 152 | * @IEEE80211_CHANCTX_CHANGE_WIDTH: The channel width changed |
| 153 | * @IEEE80211_CHANCTX_CHANGE_RX_CHAINS: The number of RX chains changed | 153 | * @IEEE80211_CHANCTX_CHANGE_RX_CHAINS: The number of RX chains changed |
| 154 | * @IEEE80211_CHANCTX_CHANGE_RADAR: radar detection flag changed | 154 | * @IEEE80211_CHANCTX_CHANGE_RADAR: radar detection flag changed |
| 155 | * @IEEE80211_CHANCTX_CHANGE_CHANNEL: switched to another operating channel, | ||
| 156 | * this is used only with channel switching with CSA | ||
| 155 | */ | 157 | */ |
| 156 | enum ieee80211_chanctx_change { | 158 | enum ieee80211_chanctx_change { |
| 157 | IEEE80211_CHANCTX_CHANGE_WIDTH = BIT(0), | 159 | IEEE80211_CHANCTX_CHANGE_WIDTH = BIT(0), |
| 158 | IEEE80211_CHANCTX_CHANGE_RX_CHAINS = BIT(1), | 160 | IEEE80211_CHANCTX_CHANGE_RX_CHAINS = BIT(1), |
| 159 | IEEE80211_CHANCTX_CHANGE_RADAR = BIT(2), | 161 | IEEE80211_CHANCTX_CHANGE_RADAR = BIT(2), |
| 162 | IEEE80211_CHANCTX_CHANGE_CHANNEL = BIT(3), | ||
| 160 | }; | 163 | }; |
| 161 | 164 | ||
| 162 | /** | 165 | /** |
| @@ -1084,6 +1087,7 @@ enum ieee80211_vif_flags { | |||
| 1084 | * @addr: address of this interface | 1087 | * @addr: address of this interface |
| 1085 | * @p2p: indicates whether this AP or STA interface is a p2p | 1088 | * @p2p: indicates whether this AP or STA interface is a p2p |
| 1086 | * interface, i.e. a GO or p2p-sta respectively | 1089 | * interface, i.e. a GO or p2p-sta respectively |
| 1090 | * @csa_active: marks whether a channel switch is going on | ||
| 1087 | * @driver_flags: flags/capabilities the driver has for this interface, | 1091 | * @driver_flags: flags/capabilities the driver has for this interface, |
| 1088 | * these need to be set (or cleared) when the interface is added | 1092 | * these need to be set (or cleared) when the interface is added |
| 1089 | * or, if supported by the driver, the interface type is changed | 1093 | * or, if supported by the driver, the interface type is changed |
| @@ -1106,6 +1110,7 @@ struct ieee80211_vif { | |||
| 1106 | struct ieee80211_bss_conf bss_conf; | 1110 | struct ieee80211_bss_conf bss_conf; |
| 1107 | u8 addr[ETH_ALEN]; | 1111 | u8 addr[ETH_ALEN]; |
| 1108 | bool p2p; | 1112 | bool p2p; |
| 1113 | bool csa_active; | ||
| 1109 | 1114 | ||
| 1110 | u8 cab_queue; | 1115 | u8 cab_queue; |
| 1111 | u8 hw_queue[IEEE80211_NUM_ACS]; | 1116 | u8 hw_queue[IEEE80211_NUM_ACS]; |
| @@ -2637,6 +2642,16 @@ enum ieee80211_roc_type { | |||
| 2637 | * @ipv6_addr_change: IPv6 address assignment on the given interface changed. | 2642 | * @ipv6_addr_change: IPv6 address assignment on the given interface changed. |
| 2638 | * Currently, this is only called for managed or P2P client interfaces. | 2643 | * Currently, this is only called for managed or P2P client interfaces. |
| 2639 | * This callback is optional; it must not sleep. | 2644 | * This callback is optional; it must not sleep. |
| 2645 | * | ||
| 2646 | * @channel_switch_beacon: Starts a channel switch to a new channel. | ||
| 2647 | * Beacons are modified to include CSA or ECSA IEs before calling this | ||
| 2648 | * function. The corresponding count fields in these IEs must be | ||
| 2649 | * decremented, and when they reach zero the driver must call | ||
| 2650 | * ieee80211_csa_finish(). Drivers which use ieee80211_beacon_get() | ||
| 2651 | * get the csa counter decremented by mac80211, but must check if it is | ||
| 2652 | * zero using ieee80211_csa_is_complete() after the beacon has been | ||
| 2653 | * transmitted and then call ieee80211_csa_finish(). | ||
| 2654 | * | ||
| 2640 | */ | 2655 | */ |
| 2641 | struct ieee80211_ops { | 2656 | struct ieee80211_ops { |
| 2642 | void (*tx)(struct ieee80211_hw *hw, | 2657 | void (*tx)(struct ieee80211_hw *hw, |
| @@ -2824,6 +2839,9 @@ struct ieee80211_ops { | |||
| 2824 | struct ieee80211_vif *vif, | 2839 | struct ieee80211_vif *vif, |
| 2825 | struct inet6_dev *idev); | 2840 | struct inet6_dev *idev); |
| 2826 | #endif | 2841 | #endif |
| 2842 | void (*channel_switch_beacon)(struct ieee80211_hw *hw, | ||
| 2843 | struct ieee80211_vif *vif, | ||
| 2844 | struct cfg80211_chan_def *chandef); | ||
| 2827 | }; | 2845 | }; |
| 2828 | 2846 | ||
| 2829 | /** | 2847 | /** |
| @@ -3319,6 +3337,25 @@ static inline struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, | |||
| 3319 | } | 3337 | } |
| 3320 | 3338 | ||
| 3321 | /** | 3339 | /** |
| 3340 | * ieee80211_csa_finish - notify mac80211 about channel switch | ||
| 3341 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | ||
| 3342 | * | ||
| 3343 | * After a channel switch announcement was scheduled and the counter in this | ||
| 3344 | * announcement hit zero, this function must be called by the driver to | ||
| 3345 | * notify mac80211 that the channel can be changed. | ||
| 3346 | */ | ||
| 3347 | void ieee80211_csa_finish(struct ieee80211_vif *vif); | ||
| 3348 | |||
| 3349 | /** | ||
| 3350 | * ieee80211_csa_is_complete - find out if counters reached zero | ||
| 3351 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | ||
| 3352 | * | ||
| 3353 | * This function returns whether the channel switch counters reached zero. | ||
| 3354 | */ | ||
| 3355 | bool ieee80211_csa_is_complete(struct ieee80211_vif *vif); | ||
| 3356 | |||
| 3357 | |||
| 3358 | /** | ||
| 3322 | * ieee80211_proberesp_get - retrieve a Probe Response template | 3359 | * ieee80211_proberesp_get - retrieve a Probe Response template |
| 3323 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 3360 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
| 3324 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | 3361 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index eb68735b3318..1f42bc3dcb9c 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h | |||
| @@ -676,6 +676,16 @@ | |||
| 676 | * @NL80211_CMD_GET_COALESCE: Get currently supported coalesce rules. | 676 | * @NL80211_CMD_GET_COALESCE: Get currently supported coalesce rules. |
| 677 | * @NL80211_CMD_SET_COALESCE: Configure coalesce rules or clear existing rules. | 677 | * @NL80211_CMD_SET_COALESCE: Configure coalesce rules or clear existing rules. |
| 678 | * | 678 | * |
| 679 | * @NL80211_CMD_CHANNEL_SWITCH: Perform a channel switch by announcing the | ||
| 680 | * the new channel information (Channel Switch Announcement - CSA) | ||
| 681 | * in the beacon for some time (as defined in the | ||
| 682 | * %NL80211_ATTR_CH_SWITCH_COUNT parameter) and then change to the | ||
| 683 | * new channel. Userspace provides the new channel information (using | ||
| 684 | * %NL80211_ATTR_WIPHY_FREQ and the attributes determining channel | ||
| 685 | * width). %NL80211_ATTR_CH_SWITCH_BLOCK_TX may be supplied to inform | ||
| 686 | * other station that transmission must be blocked until the channel | ||
| 687 | * switch is complete. | ||
| 688 | * | ||
| 679 | * @NL80211_CMD_MAX: highest used command number | 689 | * @NL80211_CMD_MAX: highest used command number |
| 680 | * @__NL80211_CMD_AFTER_LAST: internal use | 690 | * @__NL80211_CMD_AFTER_LAST: internal use |
| 681 | */ | 691 | */ |
| @@ -841,6 +851,8 @@ enum nl80211_commands { | |||
| 841 | NL80211_CMD_GET_COALESCE, | 851 | NL80211_CMD_GET_COALESCE, |
| 842 | NL80211_CMD_SET_COALESCE, | 852 | NL80211_CMD_SET_COALESCE, |
| 843 | 853 | ||
| 854 | NL80211_CMD_CHANNEL_SWITCH, | ||
| 855 | |||
| 844 | /* add new commands above here */ | 856 | /* add new commands above here */ |
| 845 | 857 | ||
| 846 | /* used to define NL80211_CMD_MAX below */ | 858 | /* used to define NL80211_CMD_MAX below */ |
| @@ -1469,6 +1481,18 @@ enum nl80211_commands { | |||
| 1469 | * | 1481 | * |
| 1470 | * @NL80211_ATTR_COALESCE_RULE: Coalesce rule information. | 1482 | * @NL80211_ATTR_COALESCE_RULE: Coalesce rule information. |
| 1471 | * | 1483 | * |
| 1484 | * @NL80211_ATTR_CH_SWITCH_COUNT: u32 attribute specifying the number of TBTT's | ||
| 1485 | * until the channel switch event. | ||
| 1486 | * @NL80211_ATTR_CH_SWITCH_BLOCK_TX: flag attribute specifying that transmission | ||
| 1487 | * must be blocked on the current channel (before the channel switch | ||
| 1488 | * operation). | ||
| 1489 | * @NL80211_ATTR_CSA_IES: Nested set of attributes containing the IE information | ||
| 1490 | * for the time while performing a channel switch. | ||
| 1491 | * @NL80211_ATTR_CSA_C_OFF_BEACON: Offset of the channel switch counter | ||
| 1492 | * field in the beacons tail (%NL80211_ATTR_BEACON_TAIL). | ||
| 1493 | * @NL80211_ATTR_CSA_C_OFF_PRESP: Offset of the channel switch counter | ||
| 1494 | * field in the probe response (%NL80211_ATTR_PROBE_RESP). | ||
| 1495 | * | ||
| 1472 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 1496 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 1473 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1497 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| 1474 | */ | 1498 | */ |
| @@ -1771,6 +1795,12 @@ enum nl80211_attrs { | |||
| 1771 | 1795 | ||
| 1772 | NL80211_ATTR_COALESCE_RULE, | 1796 | NL80211_ATTR_COALESCE_RULE, |
| 1773 | 1797 | ||
| 1798 | NL80211_ATTR_CH_SWITCH_COUNT, | ||
| 1799 | NL80211_ATTR_CH_SWITCH_BLOCK_TX, | ||
| 1800 | NL80211_ATTR_CSA_IES, | ||
| 1801 | NL80211_ATTR_CSA_C_OFF_BEACON, | ||
| 1802 | NL80211_ATTR_CSA_C_OFF_PRESP, | ||
| 1803 | |||
| 1774 | /* add attributes here, update the policy in nl80211.c */ | 1804 | /* add attributes here, update the policy in nl80211.c */ |
| 1775 | 1805 | ||
| 1776 | __NL80211_ATTR_AFTER_LAST, | 1806 | __NL80211_ATTR_AFTER_LAST, |
