diff options
author | Andrei Otcheretianski <andrei.otcheretianski@intel.com> | 2014-05-09 07:11:46 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-05-15 09:00:42 -0400 |
commit | 9a774c78e2114c7e8605e3a168ccd552cbe3d922 (patch) | |
tree | d1ba64609c6fc1b0b7609630635ee66c601e30cc /include/net | |
parent | 387910cc79da2e529f2fb4ca9428e861b9402975 (diff) |
cfg80211: Support multiple CSA counters
Change the type of NL80211_ATTR_CSA_C_OFF_BEACON and
NL80211_ATTR_CSA_C_OFF_PRESP to be NLA_BINARY which allows
userspace to use beacons and probe responses with
multiple CSA counters.
This isn't breaking the API since userspace can
continue to use nla_put_u16 for this attributes, which
is equivalent to a single element u16 array.
In addition advertise max number of supported CSA counters.
This is needed when using CSA and eCSA IEs together.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/cfg80211.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index f46e1e15746d..447cb58f0d77 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -694,8 +694,10 @@ struct cfg80211_ap_settings { | |||
694 | * | 694 | * |
695 | * @chandef: defines the channel to use after the switch | 695 | * @chandef: defines the channel to use after the switch |
696 | * @beacon_csa: beacon data while performing the switch | 696 | * @beacon_csa: beacon data while performing the switch |
697 | * @counter_offset_beacon: offset for the counter within the beacon (tail) | 697 | * @counter_offsets_beacon: offsets of the counters within the beacon (tail) |
698 | * @counter_offset_presp: offset for the counter within the probe response | 698 | * @counter_offsets_presp: offsets of the counters within the probe response |
699 | * @n_counter_offsets_beacon: number of csa counters the beacon (tail) | ||
700 | * @n_counter_offsets_presp: number of csa counters in the probe response | ||
699 | * @beacon_after: beacon data to be used on the new channel | 701 | * @beacon_after: beacon data to be used on the new channel |
700 | * @radar_required: whether radar detection is required on the new channel | 702 | * @radar_required: whether radar detection is required on the new channel |
701 | * @block_tx: whether transmissions should be blocked while changing | 703 | * @block_tx: whether transmissions should be blocked while changing |
@@ -704,7 +706,10 @@ struct cfg80211_ap_settings { | |||
704 | struct cfg80211_csa_settings { | 706 | struct cfg80211_csa_settings { |
705 | struct cfg80211_chan_def chandef; | 707 | struct cfg80211_chan_def chandef; |
706 | struct cfg80211_beacon_data beacon_csa; | 708 | struct cfg80211_beacon_data beacon_csa; |
707 | u16 counter_offset_beacon, counter_offset_presp; | 709 | const u16 *counter_offsets_beacon; |
710 | const u16 *counter_offsets_presp; | ||
711 | unsigned int n_counter_offsets_beacon; | ||
712 | unsigned int n_counter_offsets_presp; | ||
708 | struct cfg80211_beacon_data beacon_after; | 713 | struct cfg80211_beacon_data beacon_after; |
709 | bool radar_required; | 714 | bool radar_required; |
710 | bool block_tx; | 715 | bool block_tx; |
@@ -3048,6 +3053,13 @@ struct wiphy { | |||
3048 | 3053 | ||
3049 | u16 max_ap_assoc_sta; | 3054 | u16 max_ap_assoc_sta; |
3050 | 3055 | ||
3056 | /* | ||
3057 | * Number of supported csa_counters in beacons and probe responses. | ||
3058 | * This value should be set if the driver wishes to limit the number of | ||
3059 | * csa counters. Default (0) means infinite. | ||
3060 | */ | ||
3061 | u8 max_num_csa_counters; | ||
3062 | |||
3051 | char priv[0] __aligned(NETDEV_ALIGN); | 3063 | char priv[0] __aligned(NETDEV_ALIGN); |
3052 | }; | 3064 | }; |
3053 | 3065 | ||