iw: sync nl80211 header to fix the multicast rate setting
[openwrt.git] / package / iw / patches / 001-nl80211_sync.patch
1 --- a/nl80211.h
2 +++ b/nl80211.h
3 @@ -295,7 +295,9 @@
4   *     auth and assoc steps. For this, you need to specify the SSID in a
5   *     %NL80211_ATTR_SSID attribute, and can optionally specify the association
6   *     IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_MAC,
7 - *     %NL80211_ATTR_WIPHY_FREQ and %NL80211_ATTR_CONTROL_PORT.
8 + *     %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT,
9 + *     %NL80211_ATTR_CONTROL_PORT_ETHERTYPE and
10 + *     %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT.
11   *     It is also sent as an event, with the BSSID and response IEs when the
12   *     connection is established or failed to be established. This can be
13   *     determined by the STATUS_CODE attribute.
14 @@ -313,8 +315,8 @@
15   *     channel for the specified amount of time. This can be used to do
16   *     off-channel operations like transmit a Public Action frame and wait for
17   *     a response while being associated to an AP on another channel.
18 - *     %NL80211_ATTR_WIPHY or %NL80211_ATTR_IFINDEX is used to specify which
19 - *     radio is used. %NL80211_ATTR_WIPHY_FREQ is used to specify the
20 + *     %NL80211_ATTR_IFINDEX is used to specify which interface (and thus
21 + *     radio) is used. %NL80211_ATTR_WIPHY_FREQ is used to specify the
22   *     frequency for the operation and %NL80211_ATTR_WIPHY_CHANNEL_TYPE may be
23   *     optionally used to specify additional channel parameters.
24   *     %NL80211_ATTR_DURATION is used to specify the duration in milliseconds
25 @@ -385,6 +387,8 @@
26   *     of any other interfaces, and other interfaces will again take
27   *     precedence when they are used.
28   *
29 + * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface.
30 + *
31   * @NL80211_CMD_MAX: highest used command number
32   * @__NL80211_CMD_AFTER_LAST: internal use
33   */
34 @@ -487,6 +491,7 @@ enum nl80211_commands {
35         NL80211_CMD_NOTIFY_CQM,
36  
37         NL80211_CMD_SET_CHANNEL,
38 +       NL80211_CMD_SET_WDS_PEER,
39  
40         /* add new commands above here */
41  
42 @@ -686,6 +691,15 @@ enum nl80211_commands {
43   *     request, the driver will assume that the port is unauthorized until
44   *     authorized by user space. Otherwise, port is marked authorized by
45   *     default in station mode.
46 + * @NL80211_ATTR_CONTROL_PORT_ETHERTYPE: A 16-bit value indicating the
47 + *     ethertype that will be used for key negotiation. It can be
48 + *     specified with the associate and connect commands. If it is not
49 + *     specified, the value defaults to 0x888E (PAE, 802.1X). This
50 + *     attribute is also used as a flag in the wiphy information to
51 + *     indicate that protocols other than PAE are supported.
52 + * @NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT: When included along with
53 + *     %NL80211_ATTR_CONTROL_PORT_ETHERTYPE, indicates that the custom
54 + *     ethertype frames used for key negotiation must not be encrypted.
55   *
56   * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver.
57   *     We recommend using nested, driver-specific attributes within this.
58 @@ -787,6 +801,33 @@ enum nl80211_commands {
59   *      This is used in association with @NL80211_ATTR_WIPHY_TX_POWER_SETTING
60   *      for non-automatic settings.
61   *
62 + * @NL80211_ATTR_SUPPORT_IBSS_RSN: The device supports IBSS RSN, which mostly
63 + *     means support for per-station GTKs.
64 + *
65 + * @NL80211_ATTR_WIPHY_ANTENNA_TX: Bitmap of allowed antennas for transmitting.
66 + *     This can be used to mask out antennas which are not attached or should
67 + *     not be used for transmitting. If an antenna is not selected in this
68 + *     bitmap the hardware is not allowed to transmit on this antenna.
69 + *
70 + *     Each bit represents one antenna, starting with antenna 1 at the first
71 + *     bit. Depending on which antennas are selected in the bitmap, 802.11n
72 + *     drivers can derive which chainmasks to use (if all antennas belonging to
73 + *     a particular chain are disabled this chain should be disabled) and if
74 + *     a chain has diversity antennas wether diversity should be used or not.
75 + *     HT capabilities (STBC, TX Beamforming, Antenna selection) can be
76 + *     derived from the available chains after applying the antenna mask.
77 + *     Non-802.11n drivers can derive wether to use diversity or not.
78 + *     Drivers may reject configurations or RX/TX mask combinations they cannot
79 + *     support by returning -EINVAL.
80 + *
81 + * @NL80211_ATTR_WIPHY_ANTENNA_RX: Bitmap of allowed antennas for receiving.
82 + *     This can be used to mask out antennas which are not attached or should
83 + *     not be used for receiving. If an antenna is not selected in this bitmap
84 + *     the hardware should not be configured to receive on this antenna.
85 + *     For a more detailed descripton see @NL80211_ATTR_WIPHY_ANTENNA_TX.
86 + *
87 + * @NL80211_ATTR_MCAST_RATE: Multicast tx rate (in 100 kbps) for IBSS
88 + *
89   * @NL80211_ATTR_MAX: highest attribute number currently defined
90   * @__NL80211_ATTR_AFTER_LAST: internal use
91   */
92 @@ -951,6 +992,16 @@ enum nl80211_attrs {
93         NL80211_ATTR_RX_FRAME_TYPES,
94         NL80211_ATTR_FRAME_TYPE,
95  
96 +       NL80211_ATTR_CONTROL_PORT_ETHERTYPE,
97 +       NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT,
98 +
99 +       NL80211_ATTR_SUPPORT_IBSS_RSN,
100 +
101 +       NL80211_ATTR_WIPHY_ANTENNA_TX,
102 +       NL80211_ATTR_WIPHY_ANTENNA_RX,
103 +
104 +       NL80211_ATTR_MCAST_RATE,
105 +
106         /* add attributes here, update the policy in nl80211.c */
107  
108         __NL80211_ATTR_AFTER_LAST,
109 @@ -1006,6 +1057,8 @@ enum nl80211_attrs {
110   * @NL80211_IFTYPE_WDS: wireless distribution interface
111   * @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames
112   * @NL80211_IFTYPE_MESH_POINT: mesh point
113 + * @NL80211_IFTYPE_P2P_CLIENT: P2P client
114 + * @NL80211_IFTYPE_P2P_GO: P2P group owner
115   * @NL80211_IFTYPE_MAX: highest interface type number currently defined
116   * @NUM_NL80211_IFTYPES: number of defined interface types
117   *
118 @@ -1022,6 +1075,8 @@ enum nl80211_iftype {
119         NL80211_IFTYPE_WDS,
120         NL80211_IFTYPE_MONITOR,
121         NL80211_IFTYPE_MESH_POINT,
122 +       NL80211_IFTYPE_P2P_CLIENT,
123 +       NL80211_IFTYPE_P2P_GO,
124  
125         /* keep last */
126         NUM_NL80211_IFTYPES,
127 @@ -1111,6 +1166,8 @@ enum nl80211_rate_info {
128   * @NL80211_STA_INFO_RX_PACKETS: total received packet (u32, from this station)
129   * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (u32, to this
130   *     station)
131 + * @NL80211_STA_INFO_TX_RETRIES: total retries (u32, to this station)
132 + * @NL80211_STA_INFO_TX_FAILED: total failed packets (u32, to this station)
133   */
134  enum nl80211_sta_info {
135         __NL80211_STA_INFO_INVALID,
136 @@ -1124,6 +1181,8 @@ enum nl80211_sta_info {
137         NL80211_STA_INFO_TX_BITRATE,
138         NL80211_STA_INFO_RX_PACKETS,
139         NL80211_STA_INFO_TX_PACKETS,
140 +       NL80211_STA_INFO_TX_RETRIES,
141 +       NL80211_STA_INFO_TX_FAILED,
142  
143         /* keep last */
144         __NL80211_STA_INFO_AFTER_LAST,
145 @@ -1277,7 +1336,11 @@ enum nl80211_bitrate_attr {
146   *     wireless core it thinks its knows the regulatory domain we should be in.
147   * @NL80211_REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an
148   *     802.11 country information element with regulatory information it
149 - *     thinks we should consider.
150 + *     thinks we should consider. cfg80211 only processes the country
151 + *     code from the IE, and relies on the regulatory domain information
152 + *     structure pased by userspace (CRDA) from our wireless-regdb.
153 + *     If a channel is enabled but the country code indicates it should
154 + *     be disabled we disable the channel and re-enable it upon disassociation.
155   */
156  enum nl80211_reg_initiator {
157         NL80211_REGDOM_SET_BY_CORE,
158 @@ -1382,6 +1445,17 @@ enum nl80211_reg_rule_flags {
159   * @__NL80211_SURVEY_INFO_INVALID: attribute number 0 is reserved
160   * @NL80211_SURVEY_INFO_FREQUENCY: center frequency of channel
161   * @NL80211_SURVEY_INFO_NOISE: noise level of channel (u8, dBm)
162 + * @NL80211_SURVEY_INFO_IN_USE: channel is currently being used
163 + * @NL80211_SURVEY_INFO_CHANNEL_TIME: amount of time (in ms) that the radio
164 + *     spent on this channel
165 + * @NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY: amount of the time the primary
166 + *     channel was sensed busy (either due to activity or energy detect)
167 + * @NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY: amount of time the extension
168 + *     channel was sensed busy
169 + * @NL80211_SURVEY_INFO_CHANNEL_TIME_RX: amount of time the radio spent
170 + *     receiving data
171 + * @NL80211_SURVEY_INFO_CHANNEL_TIME_TX: amount of time the radio spent
172 + *     transmitting data
173   * @NL80211_SURVEY_INFO_MAX: highest survey info attribute number
174   *     currently defined
175   * @__NL80211_SURVEY_INFO_AFTER_LAST: internal use
176 @@ -1390,6 +1464,12 @@ enum nl80211_survey_info {
177         __NL80211_SURVEY_INFO_INVALID,
178         NL80211_SURVEY_INFO_FREQUENCY,
179         NL80211_SURVEY_INFO_NOISE,
180 +       NL80211_SURVEY_INFO_IN_USE,
181 +       NL80211_SURVEY_INFO_CHANNEL_TIME,
182 +       NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY,
183 +       NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY,
184 +       NL80211_SURVEY_INFO_CHANNEL_TIME_RX,
185 +       NL80211_SURVEY_INFO_CHANNEL_TIME_TX,
186  
187         /* keep last */
188         __NL80211_SURVEY_INFO_AFTER_LAST,
189 @@ -1636,11 +1716,14 @@ enum nl80211_auth_type {
190   * @NL80211_KEYTYPE_GROUP: Group (broadcast/multicast) key
191   * @NL80211_KEYTYPE_PAIRWISE: Pairwise (unicast/individual) key
192   * @NL80211_KEYTYPE_PEERKEY: PeerKey (DLS)
193 + * @NUM_NL80211_KEYTYPES: number of defined key types
194   */
195  enum nl80211_key_type {
196         NL80211_KEYTYPE_GROUP,
197         NL80211_KEYTYPE_PAIRWISE,
198         NL80211_KEYTYPE_PEERKEY,
199 +
200 +       NUM_NL80211_KEYTYPES
201  };
202  
203  /**
204 @@ -1671,6 +1754,9 @@ enum nl80211_wpa_versions {
205   *     CCMP keys, each six bytes in little endian
206   * @NL80211_KEY_DEFAULT: flag indicating default key
207   * @NL80211_KEY_DEFAULT_MGMT: flag indicating default management key
208 + * @NL80211_KEY_TYPE: the key type from enum nl80211_key_type, if not
209 + *     specified the default depends on whether a MAC address was
210 + *     given with the command using the key or not (u32)
211   * @__NL80211_KEY_AFTER_LAST: internal
212   * @NL80211_KEY_MAX: highest key attribute
213   */
214 @@ -1682,6 +1768,7 @@ enum nl80211_key_attributes {
215         NL80211_KEY_SEQ,
216         NL80211_KEY_DEFAULT,
217         NL80211_KEY_DEFAULT_MGMT,
218 +       NL80211_KEY_TYPE,
219  
220         /* keep last */
221         __NL80211_KEY_AFTER_LAST,