.. | .. |
---|
1 | | -/* |
---|
2 | | - * Copyright (c) 2015-2016 Quantenna Communications, Inc. |
---|
3 | | - * All rights reserved. |
---|
4 | | - * |
---|
5 | | - * This program is free software; you can redistribute it and/or |
---|
6 | | - * modify it under the terms of the GNU General Public License |
---|
7 | | - * as published by the Free Software Foundation; either version 2 |
---|
8 | | - * of the License, or (at your option) any later version. |
---|
9 | | - * |
---|
10 | | - * This program is distributed in the hope that it will be useful, |
---|
11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | | - * GNU General Public License for more details. |
---|
14 | | - * |
---|
15 | | - */ |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0+ */ |
---|
| 2 | +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ |
---|
16 | 3 | |
---|
17 | 4 | #ifndef _QTN_QLINK_H_ |
---|
18 | 5 | #define _QTN_QLINK_H_ |
---|
19 | 6 | |
---|
20 | 7 | #include <linux/ieee80211.h> |
---|
21 | 8 | |
---|
22 | | -#define QLINK_PROTO_VER 11 |
---|
| 9 | +#define QLINK_PROTO_VER_MAJOR_M 0xFFFF |
---|
| 10 | +#define QLINK_PROTO_VER_MAJOR_S 16 |
---|
| 11 | +#define QLINK_PROTO_VER_MINOR_M 0xFFFF |
---|
| 12 | +#define QLINK_VER_MINOR(_ver) ((_ver) & QLINK_PROTO_VER_MINOR_M) |
---|
| 13 | +#define QLINK_VER_MAJOR(_ver) \ |
---|
| 14 | + (((_ver) >> QLINK_PROTO_VER_MAJOR_S) & QLINK_PROTO_VER_MAJOR_M) |
---|
| 15 | +#define QLINK_VER(_maj, _min) (((_maj) << QLINK_PROTO_VER_MAJOR_S) | (_min)) |
---|
| 16 | + |
---|
| 17 | +#define QLINK_PROTO_VER_MAJOR 18 |
---|
| 18 | +#define QLINK_PROTO_VER_MINOR 1 |
---|
| 19 | +#define QLINK_PROTO_VER \ |
---|
| 20 | + QLINK_VER(QLINK_PROTO_VER_MAJOR, QLINK_PROTO_VER_MINOR) |
---|
| 21 | + |
---|
| 22 | +#define QLINK_ALIGN 4 |
---|
23 | 23 | |
---|
24 | 24 | #define QLINK_MACID_RSVD 0xFF |
---|
25 | 25 | #define QLINK_VIFID_RSVD 0xFF |
---|
.. | .. |
---|
72 | 72 | * @QLINK_HW_CAPAB_SCAN_RANDOM_MAC_ADDR: device supports MAC Address |
---|
73 | 73 | * Randomization in probe requests. |
---|
74 | 74 | * @QLINK_HW_CAPAB_OBSS_SCAN: device can perform OBSS scanning. |
---|
| 75 | + * @QLINK_HW_CAPAB_HW_BRIDGE: device has hardware switch capabilities. |
---|
75 | 76 | */ |
---|
76 | 77 | enum qlink_hw_capab { |
---|
77 | | - QLINK_HW_CAPAB_REG_UPDATE = BIT(0), |
---|
78 | | - QLINK_HW_CAPAB_STA_INACT_TIMEOUT = BIT(1), |
---|
79 | | - QLINK_HW_CAPAB_DFS_OFFLOAD = BIT(2), |
---|
80 | | - QLINK_HW_CAPAB_SCAN_RANDOM_MAC_ADDR = BIT(3), |
---|
81 | | - QLINK_HW_CAPAB_PWR_MGMT = BIT(4), |
---|
82 | | - QLINK_HW_CAPAB_OBSS_SCAN = BIT(5), |
---|
| 78 | + QLINK_HW_CAPAB_REG_UPDATE = 0, |
---|
| 79 | + QLINK_HW_CAPAB_STA_INACT_TIMEOUT, |
---|
| 80 | + QLINK_HW_CAPAB_DFS_OFFLOAD, |
---|
| 81 | + QLINK_HW_CAPAB_SCAN_RANDOM_MAC_ADDR, |
---|
| 82 | + QLINK_HW_CAPAB_PWR_MGMT, |
---|
| 83 | + QLINK_HW_CAPAB_OBSS_SCAN, |
---|
| 84 | + QLINK_HW_CAPAB_SCAN_DWELL, |
---|
| 85 | + QLINK_HW_CAPAB_SAE, |
---|
| 86 | + QLINK_HW_CAPAB_HW_BRIDGE, |
---|
| 87 | + QLINK_HW_CAPAB_NUM |
---|
| 88 | +}; |
---|
| 89 | + |
---|
| 90 | +/** |
---|
| 91 | + * enum qlink_driver_capab - host driver capabilities. |
---|
| 92 | + * |
---|
| 93 | + */ |
---|
| 94 | +enum qlink_driver_capab { |
---|
| 95 | + QLINK_DRV_CAPAB_NUM = 0 |
---|
83 | 96 | }; |
---|
84 | 97 | |
---|
85 | 98 | enum qlink_iface_type { |
---|
.. | .. |
---|
104 | 117 | __le16 if_type; |
---|
105 | 118 | __le16 vlanid; |
---|
106 | 119 | u8 mac_addr[ETH_ALEN]; |
---|
107 | | - u8 rsvd[2]; |
---|
| 120 | + u8 use4addr; |
---|
| 121 | + u8 rsvd[1]; |
---|
108 | 122 | } __packed; |
---|
109 | 123 | |
---|
110 | 124 | enum qlink_sta_flags { |
---|
.. | .. |
---|
172 | 186 | __le16 center_freq1; |
---|
173 | 187 | __le16 center_freq2; |
---|
174 | 188 | u8 width; |
---|
175 | | - u8 rsvd; |
---|
| 189 | + u8 rsvd[3]; |
---|
176 | 190 | } __packed; |
---|
177 | 191 | |
---|
178 | 192 | #define QLINK_MAX_NR_CIPHER_SUITES 5 |
---|
.. | .. |
---|
204 | 218 | __le32 value; |
---|
205 | 219 | } __packed; |
---|
206 | 220 | |
---|
| 221 | +/** |
---|
| 222 | + * enum qlink_sr_ctrl_flags - control flags for spatial reuse parameter set |
---|
| 223 | + * |
---|
| 224 | + * @QLINK_SR_PSR_DISALLOWED: indicates whether or not PSR-based spatial reuse |
---|
| 225 | + * transmissions are allowed for STAs associated with the AP |
---|
| 226 | + * @QLINK_SR_NON_SRG_OBSS_PD_SR_DISALLOWED: indicates whether or not |
---|
| 227 | + * Non-SRG OBSS PD spatial reuse transmissions are allowed for STAs associated |
---|
| 228 | + * with the AP |
---|
| 229 | + * @NON_SRG_OFFSET_PRESENT: indicates whether or not Non-SRG OBSS PD Max offset |
---|
| 230 | + * field is valid in the element |
---|
| 231 | + * @QLINK_SR_SRG_INFORMATION_PRESENT: indicates whether or not SRG OBSS PD |
---|
| 232 | + * Min/Max offset fields ore valid in the element |
---|
| 233 | + */ |
---|
| 234 | +enum qlink_sr_ctrl_flags { |
---|
| 235 | + QLINK_SR_PSR_DISALLOWED = BIT(0), |
---|
| 236 | + QLINK_SR_NON_SRG_OBSS_PD_SR_DISALLOWED = BIT(1), |
---|
| 237 | + QLINK_SR_NON_SRG_OFFSET_PRESENT = BIT(2), |
---|
| 238 | + QLINK_SR_SRG_INFORMATION_PRESENT = BIT(3), |
---|
| 239 | +}; |
---|
| 240 | + |
---|
| 241 | +/** |
---|
| 242 | + * struct qlink_sr_params - spatial reuse parameters |
---|
| 243 | + * |
---|
| 244 | + * @sr_control: spatial reuse control field; flags contained in this field are |
---|
| 245 | + * defined in @qlink_sr_ctrl_flags |
---|
| 246 | + * @non_srg_obss_pd_max: added to -82 dBm to generate the value of the |
---|
| 247 | + * Non-SRG OBSS PD Max parameter |
---|
| 248 | + * @srg_obss_pd_min_offset: added to -82 dBm to generate the value of the |
---|
| 249 | + * SRG OBSS PD Min parameter |
---|
| 250 | + * @srg_obss_pd_max_offset: added to -82 dBm to generate the value of the |
---|
| 251 | + * SRG PBSS PD Max parameter |
---|
| 252 | + */ |
---|
| 253 | +struct qlink_sr_params { |
---|
| 254 | + u8 sr_control; |
---|
| 255 | + u8 non_srg_obss_pd_max; |
---|
| 256 | + u8 srg_obss_pd_min_offset; |
---|
| 257 | + u8 srg_obss_pd_max_offset; |
---|
| 258 | +} __packed; |
---|
| 259 | + |
---|
207 | 260 | /* QLINK Command messages related definitions |
---|
208 | 261 | */ |
---|
209 | 262 | |
---|
.. | .. |
---|
216 | 269 | * execution status (one of &enum qlink_cmd_result). Reply message |
---|
217 | 270 | * may also contain data payload specific to the command type. |
---|
218 | 271 | * |
---|
| 272 | + * @QLINK_CMD_SEND_FRAME: send specified frame over the air; firmware will |
---|
| 273 | + * encapsulate 802.3 packet into 802.11 frame automatically. |
---|
219 | 274 | * @QLINK_CMD_BAND_INFO_GET: for the specified MAC and specified band, get |
---|
220 | 275 | * the band's description including number of operational channels and |
---|
221 | 276 | * info on each channel, HT/VHT capabilities, supported rates etc. |
---|
.. | .. |
---|
225 | 280 | * command is supported only if device reports QLINK_HW_SUPPORTS_REG_UPDATE |
---|
226 | 281 | * capability. |
---|
227 | 282 | * @QLINK_CMD_START_CAC: start radar detection procedure on a specified channel. |
---|
| 283 | + * @QLINK_CMD_TXPWR: get or set current channel transmit power for |
---|
| 284 | + * the specified MAC. |
---|
| 285 | + * @QLINK_CMD_NDEV_EVENT: signalizes changes made with a corresponding network |
---|
| 286 | + * device. |
---|
228 | 287 | */ |
---|
229 | 288 | enum qlink_cmd_type { |
---|
230 | 289 | QLINK_CMD_FW_INIT = 0x0001, |
---|
231 | 290 | QLINK_CMD_FW_DEINIT = 0x0002, |
---|
232 | 291 | QLINK_CMD_REGISTER_MGMT = 0x0003, |
---|
233 | | - QLINK_CMD_SEND_MGMT_FRAME = 0x0004, |
---|
| 292 | + QLINK_CMD_SEND_FRAME = 0x0004, |
---|
234 | 293 | QLINK_CMD_MGMT_SET_APPIE = 0x0005, |
---|
235 | | - QLINK_CMD_PHY_PARAMS_GET = 0x0011, |
---|
236 | 294 | QLINK_CMD_PHY_PARAMS_SET = 0x0012, |
---|
237 | 295 | QLINK_CMD_GET_HW_INFO = 0x0013, |
---|
238 | 296 | QLINK_CMD_MAC_INFO = 0x0014, |
---|
.. | .. |
---|
257 | 315 | QLINK_CMD_DEL_STA = 0x0052, |
---|
258 | 316 | QLINK_CMD_SCAN = 0x0053, |
---|
259 | 317 | QLINK_CMD_CHAN_STATS = 0x0054, |
---|
| 318 | + QLINK_CMD_NDEV_EVENT = 0x0055, |
---|
260 | 319 | QLINK_CMD_CONNECT = 0x0060, |
---|
261 | 320 | QLINK_CMD_DISCONNECT = 0x0061, |
---|
262 | 321 | QLINK_CMD_PM_SET = 0x0062, |
---|
263 | 322 | QLINK_CMD_WOWLAN_SET = 0x0063, |
---|
| 323 | + QLINK_CMD_EXTERNAL_AUTH = 0x0066, |
---|
| 324 | + QLINK_CMD_TXPWR = 0x0067, |
---|
| 325 | + QLINK_CMD_UPDATE_OWE = 0x0068, |
---|
264 | 326 | }; |
---|
265 | 327 | |
---|
266 | 328 | /** |
---|
.. | .. |
---|
281 | 343 | struct qlink_msg_header mhdr; |
---|
282 | 344 | __le16 cmd_id; |
---|
283 | 345 | __le16 seq_num; |
---|
284 | | - u8 rsvd[2]; |
---|
285 | 346 | u8 macid; |
---|
286 | 347 | u8 vifid; |
---|
| 348 | + u8 rsvd[2]; |
---|
| 349 | +} __packed; |
---|
| 350 | + |
---|
| 351 | +/** |
---|
| 352 | + * struct qlink_cmd_init_fw - data for QLINK_CMD_FW_INIT |
---|
| 353 | + * |
---|
| 354 | + * Initialize firmware based on specified host configuration. This is the first |
---|
| 355 | + * command sent to wifi card and it's fixed part should never be changed, any |
---|
| 356 | + * additions must be done by appending TLVs. |
---|
| 357 | + * If wifi card can not operate with a specified parameters it will return |
---|
| 358 | + * error. |
---|
| 359 | + * |
---|
| 360 | + * @qlink_proto_ver: QLINK protocol version used by host driver. |
---|
| 361 | + */ |
---|
| 362 | +struct qlink_cmd_init_fw { |
---|
| 363 | + struct qlink_cmd chdr; |
---|
| 364 | + __le32 qlink_proto_ver; |
---|
| 365 | + u8 var_info[]; |
---|
287 | 366 | } __packed; |
---|
288 | 367 | |
---|
289 | 368 | /** |
---|
.. | .. |
---|
328 | 407 | struct qlink_cmd chdr; |
---|
329 | 408 | __le16 frame_type; |
---|
330 | 409 | u8 do_register; |
---|
| 410 | + u8 rsvd[1]; |
---|
331 | 411 | } __packed; |
---|
332 | 412 | |
---|
333 | | -enum qlink_mgmt_frame_tx_flags { |
---|
334 | | - QLINK_MGMT_FRAME_TX_FLAG_NONE = 0, |
---|
335 | | - QLINK_MGMT_FRAME_TX_FLAG_OFFCHAN = BIT(0), |
---|
336 | | - QLINK_MGMT_FRAME_TX_FLAG_NO_CCK = BIT(1), |
---|
337 | | - QLINK_MGMT_FRAME_TX_FLAG_ACK_NOWAIT = BIT(2), |
---|
| 413 | +/** |
---|
| 414 | + * @QLINK_FRAME_TX_FLAG_8023: frame has a 802.3 header; if not set, frame |
---|
| 415 | + * is a 802.11 encapsulated. |
---|
| 416 | + */ |
---|
| 417 | +enum qlink_frame_tx_flags { |
---|
| 418 | + QLINK_FRAME_TX_FLAG_OFFCHAN = BIT(0), |
---|
| 419 | + QLINK_FRAME_TX_FLAG_NO_CCK = BIT(1), |
---|
| 420 | + QLINK_FRAME_TX_FLAG_ACK_NOWAIT = BIT(2), |
---|
| 421 | + QLINK_FRAME_TX_FLAG_8023 = BIT(3), |
---|
338 | 422 | }; |
---|
339 | 423 | |
---|
340 | 424 | /** |
---|
341 | | - * struct qlink_cmd_mgmt_frame_tx - data for QLINK_CMD_SEND_MGMT_FRAME command |
---|
| 425 | + * struct qlink_cmd_frame_tx - data for QLINK_CMD_SEND_FRAME command |
---|
342 | 426 | * |
---|
343 | 427 | * @cookie: opaque request identifier. |
---|
344 | 428 | * @freq: Frequency to use for frame transmission. |
---|
345 | | - * @flags: Transmission flags, one of &enum qlink_mgmt_frame_tx_flags. |
---|
| 429 | + * @flags: Transmission flags, one of &enum qlink_frame_tx_flags. |
---|
346 | 430 | * @frame_data: frame to transmit. |
---|
347 | 431 | */ |
---|
348 | | -struct qlink_cmd_mgmt_frame_tx { |
---|
| 432 | +struct qlink_cmd_frame_tx { |
---|
349 | 433 | struct qlink_cmd chdr; |
---|
350 | 434 | __le32 cookie; |
---|
351 | 435 | __le16 freq; |
---|
352 | 436 | __le16 flags; |
---|
353 | | - u8 frame_data[0]; |
---|
| 437 | + u8 frame_data[]; |
---|
354 | 438 | } __packed; |
---|
355 | 439 | |
---|
356 | 440 | /** |
---|
.. | .. |
---|
361 | 445 | struct qlink_cmd_get_sta_info { |
---|
362 | 446 | struct qlink_cmd chdr; |
---|
363 | 447 | u8 sta_addr[ETH_ALEN]; |
---|
| 448 | + u8 rsvd[2]; |
---|
364 | 449 | } __packed; |
---|
365 | 450 | |
---|
366 | 451 | /** |
---|
.. | .. |
---|
380 | 465 | u8 addr[ETH_ALEN]; |
---|
381 | 466 | __le32 cipher; |
---|
382 | 467 | __le16 vlanid; |
---|
383 | | - u8 key_data[0]; |
---|
| 468 | + u8 rsvd[2]; |
---|
| 469 | + u8 key_data[]; |
---|
384 | 470 | } __packed; |
---|
385 | 471 | |
---|
386 | 472 | /** |
---|
.. | .. |
---|
409 | 495 | u8 key_index; |
---|
410 | 496 | u8 unicast; |
---|
411 | 497 | u8 multicast; |
---|
| 498 | + u8 rsvd[1]; |
---|
412 | 499 | } __packed; |
---|
413 | 500 | |
---|
414 | 501 | /** |
---|
.. | .. |
---|
419 | 506 | struct qlink_cmd_set_def_mgmt_key { |
---|
420 | 507 | struct qlink_cmd chdr; |
---|
421 | 508 | u8 key_index; |
---|
| 509 | + u8 rsvd[3]; |
---|
422 | 510 | } __packed; |
---|
423 | 511 | |
---|
424 | 512 | /** |
---|
.. | .. |
---|
435 | 523 | __le16 if_type; |
---|
436 | 524 | __le16 vlanid; |
---|
437 | 525 | u8 sta_addr[ETH_ALEN]; |
---|
| 526 | + u8 rsvd[2]; |
---|
438 | 527 | } __packed; |
---|
439 | 528 | |
---|
440 | 529 | /** |
---|
.. | .. |
---|
445 | 534 | struct qlink_cmd_del_sta { |
---|
446 | 535 | struct qlink_cmd chdr; |
---|
447 | 536 | __le16 reason_code; |
---|
448 | | - u8 subtype; |
---|
449 | 537 | u8 sta_addr[ETH_ALEN]; |
---|
| 538 | + u8 subtype; |
---|
| 539 | + u8 rsvd[3]; |
---|
450 | 540 | } __packed; |
---|
451 | 541 | |
---|
452 | 542 | enum qlink_sta_connect_flags { |
---|
.. | .. |
---|
488 | 578 | u8 mfp; |
---|
489 | 579 | u8 pbss; |
---|
490 | 580 | u8 rsvd[2]; |
---|
491 | | - u8 payload[0]; |
---|
| 581 | + u8 payload[]; |
---|
| 582 | +} __packed; |
---|
| 583 | + |
---|
| 584 | +/** |
---|
| 585 | + * struct qlink_cmd_external_auth - data for QLINK_CMD_EXTERNAL_AUTH command |
---|
| 586 | + * |
---|
| 587 | + * @bssid: BSSID of the BSS to connect to |
---|
| 588 | + * @status: authentication status code |
---|
| 589 | + * @payload: variable portion of connection request. |
---|
| 590 | + */ |
---|
| 591 | +struct qlink_cmd_external_auth { |
---|
| 592 | + struct qlink_cmd chdr; |
---|
| 593 | + u8 peer[ETH_ALEN]; |
---|
| 594 | + __le16 status; |
---|
| 595 | + u8 payload[]; |
---|
492 | 596 | } __packed; |
---|
493 | 597 | |
---|
494 | 598 | /** |
---|
.. | .. |
---|
499 | 603 | struct qlink_cmd_disconnect { |
---|
500 | 604 | struct qlink_cmd chdr; |
---|
501 | 605 | __le16 reason; |
---|
| 606 | + u8 rsvd[2]; |
---|
502 | 607 | } __packed; |
---|
503 | 608 | |
---|
504 | 609 | /** |
---|
.. | .. |
---|
510 | 615 | struct qlink_cmd_updown { |
---|
511 | 616 | struct qlink_cmd chdr; |
---|
512 | 617 | u8 if_up; |
---|
| 618 | + u8 rsvd[3]; |
---|
513 | 619 | } __packed; |
---|
514 | 620 | |
---|
515 | 621 | /** |
---|
.. | .. |
---|
533 | 639 | struct qlink_cmd_band_info_get { |
---|
534 | 640 | struct qlink_cmd chdr; |
---|
535 | 641 | u8 band; |
---|
| 642 | + u8 rsvd[3]; |
---|
536 | 643 | } __packed; |
---|
537 | 644 | |
---|
538 | 645 | /** |
---|
539 | 646 | * struct qlink_cmd_get_chan_stats - data for QLINK_CMD_CHAN_STATS command |
---|
540 | 647 | * |
---|
541 | | - * @channel: channel number according to 802.11 17.3.8.3.2 and Annex J |
---|
| 648 | + * @channel_freq: channel center frequency |
---|
542 | 649 | */ |
---|
543 | 650 | struct qlink_cmd_get_chan_stats { |
---|
544 | 651 | struct qlink_cmd chdr; |
---|
545 | | - __le16 channel; |
---|
| 652 | + __le32 channel_freq; |
---|
546 | 653 | } __packed; |
---|
547 | 654 | |
---|
548 | 655 | /** |
---|
.. | .. |
---|
575 | 682 | * @initiator: which entity sent the request, one of &enum qlink_reg_initiator. |
---|
576 | 683 | * @user_reg_hint_type: type of hint for QLINK_REGDOM_SET_BY_USER request, one |
---|
577 | 684 | * of &enum qlink_user_reg_hint_type. |
---|
| 685 | + * @num_channels: number of &struct qlink_tlv_channel in a variable portion of a |
---|
| 686 | + * payload. |
---|
| 687 | + * @dfs_region: one of &enum qlink_dfs_regions. |
---|
| 688 | + * @slave_radar: whether slave device should enable radar detection. |
---|
| 689 | + * @dfs_offload: enable or disable DFS offload to firmware. |
---|
| 690 | + * @info: variable portion of regulatory notifier callback. |
---|
578 | 691 | */ |
---|
579 | 692 | struct qlink_cmd_reg_notify { |
---|
580 | 693 | struct qlink_cmd chdr; |
---|
581 | 694 | u8 alpha2[2]; |
---|
582 | 695 | u8 initiator; |
---|
583 | 696 | u8 user_reg_hint_type; |
---|
| 697 | + u8 num_channels; |
---|
| 698 | + u8 dfs_region; |
---|
| 699 | + u8 slave_radar; |
---|
| 700 | + u8 dfs_offload; |
---|
| 701 | + u8 info[]; |
---|
584 | 702 | } __packed; |
---|
| 703 | + |
---|
| 704 | +/** |
---|
| 705 | + * enum qlink_chan_sw_flags - channel switch control flags |
---|
| 706 | + * |
---|
| 707 | + * @QLINK_CHAN_SW_RADAR_REQUIRED: whether radar detection is required on a new |
---|
| 708 | + * channel. |
---|
| 709 | + * @QLINK_CHAN_SW_BLOCK_TX: whether transmissions should be blocked while |
---|
| 710 | + * changing a channel. |
---|
| 711 | + */ |
---|
| 712 | +enum qlink_chan_sw_flags { |
---|
| 713 | + QLINK_CHAN_SW_RADAR_REQUIRED = BIT(0), |
---|
| 714 | + QLINK_CHAN_SW_BLOCK_TX = BIT(1), |
---|
| 715 | +}; |
---|
585 | 716 | |
---|
586 | 717 | /** |
---|
587 | 718 | * struct qlink_cmd_chan_switch - data for QLINK_CMD_CHAN_SWITCH command |
---|
588 | 719 | * |
---|
589 | | - * @channel: channel number according to 802.11 17.3.8.3.2 and Annex J |
---|
590 | | - * @radar_required: whether radar detection is required on the new channel |
---|
591 | | - * @block_tx: whether transmissions should be blocked while changing |
---|
| 720 | + * @channel: channel to switch to. |
---|
| 721 | + * @flags: flags to control channel switch, bitmap of &enum qlink_chan_sw_flags. |
---|
592 | 722 | * @beacon_count: number of beacons until switch |
---|
593 | 723 | */ |
---|
594 | 724 | struct qlink_cmd_chan_switch { |
---|
595 | 725 | struct qlink_cmd chdr; |
---|
596 | | - __le16 channel; |
---|
597 | | - u8 radar_required; |
---|
598 | | - u8 block_tx; |
---|
| 726 | + struct qlink_chandef channel; |
---|
| 727 | + __le64 flags; |
---|
| 728 | + __le32 n_counter_offsets_beacon; |
---|
| 729 | + __le32 n_counter_offsets_presp; |
---|
599 | 730 | u8 beacon_count; |
---|
| 731 | + u8 rsvd[3]; |
---|
600 | 732 | } __packed; |
---|
601 | 733 | |
---|
602 | 734 | /** |
---|
.. | .. |
---|
621 | 753 | * @ht_required: stations must support HT |
---|
622 | 754 | * @vht_required: stations must support VHT |
---|
623 | 755 | * @aen: encryption info |
---|
| 756 | + * @sr_params: spatial reuse parameters |
---|
| 757 | + * @twt_responder: enable Target Wake Time |
---|
624 | 758 | * @info: variable configurations |
---|
625 | 759 | */ |
---|
626 | 760 | struct qlink_cmd_start_ap { |
---|
.. | .. |
---|
636 | 770 | u8 ht_required; |
---|
637 | 771 | u8 vht_required; |
---|
638 | 772 | struct qlink_auth_encr aen; |
---|
639 | | - u8 info[0]; |
---|
| 773 | + struct qlink_sr_params sr_params; |
---|
| 774 | + u8 twt_responder; |
---|
| 775 | + u8 rsvd[3]; |
---|
| 776 | + u8 info[]; |
---|
640 | 777 | } __packed; |
---|
641 | 778 | |
---|
642 | 779 | /** |
---|
.. | .. |
---|
670 | 807 | struct qlink_acl_data { |
---|
671 | 808 | __le32 policy; |
---|
672 | 809 | __le32 num_entries; |
---|
673 | | - struct qlink_mac_address mac_addrs[0]; |
---|
| 810 | + struct qlink_mac_address mac_addrs[]; |
---|
674 | 811 | } __packed; |
---|
675 | 812 | |
---|
676 | 813 | /** |
---|
.. | .. |
---|
695 | 832 | struct qlink_cmd chdr; |
---|
696 | 833 | __le32 pm_standby_timer; |
---|
697 | 834 | u8 pm_mode; |
---|
| 835 | + u8 rsvd[3]; |
---|
| 836 | +} __packed; |
---|
| 837 | + |
---|
| 838 | +/** |
---|
| 839 | + * enum qlink_txpwr_op - transmit power operation type |
---|
| 840 | + * @QLINK_TXPWR_SET: set tx power |
---|
| 841 | + * @QLINK_TXPWR_GET: get current tx power setting |
---|
| 842 | + */ |
---|
| 843 | +enum qlink_txpwr_op { |
---|
| 844 | + QLINK_TXPWR_SET, |
---|
| 845 | + QLINK_TXPWR_GET |
---|
| 846 | +}; |
---|
| 847 | + |
---|
| 848 | +/** |
---|
| 849 | + * struct qlink_cmd_txpwr - get or set current transmit power |
---|
| 850 | + * |
---|
| 851 | + * @txpwr: new transmit power setting, in mBm |
---|
| 852 | + * @txpwr_setting: transmit power setting type, one of |
---|
| 853 | + * &enum nl80211_tx_power_setting |
---|
| 854 | + * @op_type: type of operation, one of &enum qlink_txpwr_op |
---|
| 855 | + */ |
---|
| 856 | +struct qlink_cmd_txpwr { |
---|
| 857 | + struct qlink_cmd chdr; |
---|
| 858 | + __le32 txpwr; |
---|
| 859 | + u8 txpwr_setting; |
---|
| 860 | + u8 op_type; |
---|
| 861 | + u8 rsvd[2]; |
---|
698 | 862 | } __packed; |
---|
699 | 863 | |
---|
700 | 864 | /** |
---|
.. | .. |
---|
718 | 882 | struct qlink_cmd_wowlan_set { |
---|
719 | 883 | struct qlink_cmd chdr; |
---|
720 | 884 | __le32 triggers; |
---|
721 | | - u8 data[0]; |
---|
| 885 | + u8 data[]; |
---|
| 886 | +} __packed; |
---|
| 887 | + |
---|
| 888 | +enum qlink_ndev_event_type { |
---|
| 889 | + QLINK_NDEV_EVENT_CHANGEUPPER, |
---|
| 890 | +}; |
---|
| 891 | + |
---|
| 892 | +/** |
---|
| 893 | + * struct qlink_cmd_ndev_event - data for QLINK_CMD_NDEV_EVENT command |
---|
| 894 | + * |
---|
| 895 | + * @event: type of event, one of &enum qlink_ndev_event_type |
---|
| 896 | + */ |
---|
| 897 | +struct qlink_cmd_ndev_event { |
---|
| 898 | + struct qlink_cmd chdr; |
---|
| 899 | + __le16 event; |
---|
| 900 | + u8 rsvd[2]; |
---|
| 901 | +} __packed; |
---|
| 902 | + |
---|
| 903 | +enum qlink_ndev_upper_type { |
---|
| 904 | + QLINK_NDEV_UPPER_TYPE_NONE, |
---|
| 905 | + QLINK_NDEV_UPPER_TYPE_BRIDGE, |
---|
| 906 | +}; |
---|
| 907 | + |
---|
| 908 | +/** |
---|
| 909 | + * struct qlink_cmd_ndev_changeupper - data for QLINK_NDEV_EVENT_CHANGEUPPER |
---|
| 910 | + * |
---|
| 911 | + * @br_domain: layer 2 broadcast domain ID that ndev is a member of |
---|
| 912 | + * @upper_type: type of upper device, one of &enum qlink_ndev_upper_type |
---|
| 913 | + */ |
---|
| 914 | +struct qlink_cmd_ndev_changeupper { |
---|
| 915 | + struct qlink_cmd_ndev_event nehdr; |
---|
| 916 | + __le64 flags; |
---|
| 917 | + __le32 br_domain; |
---|
| 918 | + __le32 netspace_id; |
---|
| 919 | + __le16 vlanid; |
---|
| 920 | + u8 upper_type; |
---|
| 921 | + u8 rsvd[1]; |
---|
| 922 | +} __packed; |
---|
| 923 | + |
---|
| 924 | +/** |
---|
| 925 | + * enum qlink_scan_flags - scan request control flags |
---|
| 926 | + * |
---|
| 927 | + * Scan flags are used to control QLINK_CMD_SCAN behavior. |
---|
| 928 | + * |
---|
| 929 | + * @QLINK_SCAN_FLAG_FLUSH: flush cache before scanning. |
---|
| 930 | + */ |
---|
| 931 | +enum qlink_scan_flags { |
---|
| 932 | + QLINK_SCAN_FLAG_FLUSH = BIT(0), |
---|
| 933 | + QLINK_SCAN_FLAG_DURATION_MANDATORY = BIT(1), |
---|
| 934 | +}; |
---|
| 935 | + |
---|
| 936 | +/** |
---|
| 937 | + * struct qlink_cmd_scan - data for QLINK_CMD_SCAN command |
---|
| 938 | + * |
---|
| 939 | + * @flags: scan flags, a bitmap of &enum qlink_scan_flags. |
---|
| 940 | + * @n_ssids: number of WLAN_EID_SSID TLVs expected in variable portion of the |
---|
| 941 | + * command. |
---|
| 942 | + * @n_channels: number of QTN_TLV_ID_CHANNEL TLVs expected in variable payload. |
---|
| 943 | + * @active_dwell: time spent on a single channel for an active scan. |
---|
| 944 | + * @passive_dwell: time spent on a single channel for a passive scan. |
---|
| 945 | + * @sample_duration: total duration of sampling a single channel during a scan |
---|
| 946 | + * including off-channel dwell time and operating channel time. |
---|
| 947 | + * @bssid: specific BSSID to scan for or a broadcast BSSID. |
---|
| 948 | + * @scan_width: channel width to use, one of &enum qlink_channel_width. |
---|
| 949 | + */ |
---|
| 950 | +struct qlink_cmd_scan { |
---|
| 951 | + struct qlink_cmd chdr; |
---|
| 952 | + __le64 flags; |
---|
| 953 | + __le16 n_ssids; |
---|
| 954 | + __le16 n_channels; |
---|
| 955 | + __le16 active_dwell; |
---|
| 956 | + __le16 passive_dwell; |
---|
| 957 | + __le16 sample_duration; |
---|
| 958 | + u8 bssid[ETH_ALEN]; |
---|
| 959 | + u8 scan_width; |
---|
| 960 | + u8 rsvd[3]; |
---|
| 961 | + u8 var_info[]; |
---|
| 962 | +} __packed; |
---|
| 963 | + |
---|
| 964 | +/** |
---|
| 965 | + * struct qlink_cmd_update_owe - data for QLINK_CMD_UPDATE_OWE_INFO command |
---|
| 966 | + * |
---|
| 967 | + * @peer: MAC of the peer device for which OWE processing has been completed |
---|
| 968 | + * @status: OWE external processing status code |
---|
| 969 | + * @ies: IEs for the peer constructed by the user space |
---|
| 970 | + */ |
---|
| 971 | +struct qlink_cmd_update_owe { |
---|
| 972 | + struct qlink_cmd chdr; |
---|
| 973 | + u8 peer[ETH_ALEN]; |
---|
| 974 | + __le16 status; |
---|
| 975 | + u8 ies[]; |
---|
722 | 976 | } __packed; |
---|
723 | 977 | |
---|
724 | 978 | /* QLINK Command Responses messages related definitions |
---|
.. | .. |
---|
732 | 986 | QLINK_CMD_RESULT_EALREADY, |
---|
733 | 987 | QLINK_CMD_RESULT_EADDRINUSE, |
---|
734 | 988 | QLINK_CMD_RESULT_EADDRNOTAVAIL, |
---|
| 989 | + QLINK_CMD_RESULT_EBUSY, |
---|
735 | 990 | }; |
---|
736 | 991 | |
---|
737 | 992 | /** |
---|
.. | .. |
---|
759 | 1014 | } __packed; |
---|
760 | 1015 | |
---|
761 | 1016 | /** |
---|
762 | | - * struct qlink_resp_get_mac_info - response for QLINK_CMD_MAC_INFO command |
---|
| 1017 | + * struct qlink_resp_init_fw - response for QLINK_CMD_FW_INIT |
---|
763 | 1018 | * |
---|
764 | | - * Data describing specific physical device providing wireless MAC |
---|
765 | | - * functionality. |
---|
766 | | - * |
---|
767 | | - * @dev_mac: MAC address of physical WMAC device (used for first BSS on |
---|
768 | | - * specified WMAC). |
---|
769 | | - * @num_tx_chain: Number of transmit chains used by WMAC. |
---|
770 | | - * @num_rx_chain: Number of receive chains used by WMAC. |
---|
771 | | - * @vht_cap_mod_mask: mask specifying which VHT capabilities can be altered. |
---|
772 | | - * @ht_cap_mod_mask: mask specifying which HT capabilities can be altered. |
---|
773 | | - * @bands_cap: wireless bands WMAC can operate in, bitmap of &enum qlink_band. |
---|
774 | | - * @max_ap_assoc_sta: Maximum number of associations supported by WMAC. |
---|
775 | | - * @radar_detect_widths: bitmask of channels BW for which WMAC can detect radar. |
---|
776 | | - * @var_info: variable-length WMAC info data. |
---|
| 1019 | + * @qlink_proto_ver: QLINK protocol version used by wifi card firmware. |
---|
777 | 1020 | */ |
---|
778 | | -struct qlink_resp_get_mac_info { |
---|
| 1021 | +struct qlink_resp_init_fw { |
---|
779 | 1022 | struct qlink_resp rhdr; |
---|
780 | | - u8 dev_mac[ETH_ALEN]; |
---|
781 | | - u8 num_tx_chain; |
---|
782 | | - u8 num_rx_chain; |
---|
783 | | - struct ieee80211_vht_cap vht_cap_mod_mask; |
---|
784 | | - struct ieee80211_ht_cap ht_cap_mod_mask; |
---|
785 | | - __le16 max_ap_assoc_sta; |
---|
786 | | - __le16 radar_detect_widths; |
---|
787 | | - __le32 max_acl_mac_addrs; |
---|
788 | | - u8 bands_cap; |
---|
789 | | - u8 rsvd[1]; |
---|
790 | | - u8 var_info[0]; |
---|
| 1023 | + __le32 qlink_proto_ver; |
---|
791 | 1024 | } __packed; |
---|
792 | 1025 | |
---|
793 | 1026 | /** |
---|
.. | .. |
---|
803 | 1036 | }; |
---|
804 | 1037 | |
---|
805 | 1038 | /** |
---|
| 1039 | + * struct qlink_resp_get_mac_info - response for QLINK_CMD_MAC_INFO command |
---|
| 1040 | + * |
---|
| 1041 | + * Data describing specific physical device providing wireless MAC |
---|
| 1042 | + * functionality. |
---|
| 1043 | + * |
---|
| 1044 | + * @dev_mac: MAC address of physical WMAC device (used for first BSS on |
---|
| 1045 | + * specified WMAC). |
---|
| 1046 | + * @num_tx_chain: Number of transmit chains used by WMAC. |
---|
| 1047 | + * @num_rx_chain: Number of receive chains used by WMAC. |
---|
| 1048 | + * @vht_cap_mod_mask: mask specifying which VHT capabilities can be altered. |
---|
| 1049 | + * @ht_cap_mod_mask: mask specifying which HT capabilities can be altered. |
---|
| 1050 | + * @max_scan_ssids: maximum number of SSIDs the device can scan for in any scan. |
---|
| 1051 | + * @bands_cap: wireless bands WMAC can operate in, bitmap of &enum qlink_band. |
---|
| 1052 | + * @max_ap_assoc_sta: Maximum number of associations supported by WMAC. |
---|
| 1053 | + * @radar_detect_widths: bitmask of channels BW for which WMAC can detect radar. |
---|
| 1054 | + * @alpha2: country code ID firmware is configured to. |
---|
| 1055 | + * @n_reg_rules: number of regulatory rules TLVs in variable portion of the |
---|
| 1056 | + * message. |
---|
| 1057 | + * @dfs_region: regulatory DFS region, one of &enum qlink_dfs_regions. |
---|
| 1058 | + * @var_info: variable-length WMAC info data. |
---|
| 1059 | + */ |
---|
| 1060 | +struct qlink_resp_get_mac_info { |
---|
| 1061 | + struct qlink_resp rhdr; |
---|
| 1062 | + u8 dev_mac[ETH_ALEN]; |
---|
| 1063 | + u8 num_tx_chain; |
---|
| 1064 | + u8 num_rx_chain; |
---|
| 1065 | + struct ieee80211_vht_cap vht_cap_mod_mask; |
---|
| 1066 | + struct ieee80211_ht_cap ht_cap_mod_mask; |
---|
| 1067 | + |
---|
| 1068 | + __le16 max_ap_assoc_sta; |
---|
| 1069 | + __le32 hw_version; |
---|
| 1070 | + __le32 probe_resp_offload; |
---|
| 1071 | + __le32 bss_select_support; |
---|
| 1072 | + __le16 n_addresses; |
---|
| 1073 | + __le16 radar_detect_widths; |
---|
| 1074 | + __le16 max_remain_on_channel_duration; |
---|
| 1075 | + __le16 max_acl_mac_addrs; |
---|
| 1076 | + |
---|
| 1077 | + __le32 frag_threshold; |
---|
| 1078 | + __le32 rts_threshold; |
---|
| 1079 | + u8 retry_short; |
---|
| 1080 | + u8 retry_long; |
---|
| 1081 | + u8 coverage_class; |
---|
| 1082 | + |
---|
| 1083 | + u8 max_scan_ssids; |
---|
| 1084 | + u8 max_sched_scan_reqs; |
---|
| 1085 | + u8 max_sched_scan_ssids; |
---|
| 1086 | + u8 max_match_sets; |
---|
| 1087 | + u8 max_adj_channel_rssi_comp; |
---|
| 1088 | + |
---|
| 1089 | + __le16 max_scan_ie_len; |
---|
| 1090 | + __le16 max_sched_scan_ie_len; |
---|
| 1091 | + __le32 max_sched_scan_plans; |
---|
| 1092 | + __le32 max_sched_scan_plan_interval; |
---|
| 1093 | + __le32 max_sched_scan_plan_iterations; |
---|
| 1094 | + |
---|
| 1095 | + u8 n_cipher_suites; |
---|
| 1096 | + u8 n_akm_suites; |
---|
| 1097 | + u8 max_num_pmkids; |
---|
| 1098 | + u8 num_iftype_ext_capab; |
---|
| 1099 | + u8 extended_capabilities_len; |
---|
| 1100 | + u8 max_data_retry_count; |
---|
| 1101 | + u8 n_iface_combinations; |
---|
| 1102 | + u8 max_num_csa_counters; |
---|
| 1103 | + |
---|
| 1104 | + u8 bands_cap; |
---|
| 1105 | + u8 alpha2[2]; |
---|
| 1106 | + u8 n_reg_rules; |
---|
| 1107 | + u8 dfs_region; |
---|
| 1108 | + u8 rsvd[3]; |
---|
| 1109 | + u8 var_info[]; |
---|
| 1110 | +} __packed; |
---|
| 1111 | + |
---|
| 1112 | +/** |
---|
806 | 1113 | * struct qlink_resp_get_hw_info - response for QLINK_CMD_GET_HW_INFO command |
---|
807 | 1114 | * |
---|
808 | 1115 | * Description of wireless hardware capabilities and features. |
---|
809 | 1116 | * |
---|
810 | 1117 | * @fw_ver: wireless hardware firmware version. |
---|
811 | | - * @hw_capab: Bitmap of capabilities supported by firmware. |
---|
812 | | - * @ql_proto_ver: Version of QLINK protocol used by firmware. |
---|
813 | 1118 | * @num_mac: Number of separate physical radio devices provided by hardware. |
---|
814 | 1119 | * @mac_bitmap: Bitmap of MAC IDs that are active and can be used in firmware. |
---|
815 | 1120 | * @total_tx_chains: total number of transmit chains used by device. |
---|
816 | 1121 | * @total_rx_chains: total number of receive chains. |
---|
817 | | - * @alpha2: country code ID firmware is configured to. |
---|
818 | | - * @n_reg_rules: number of regulatory rules TLVs in variable portion of the |
---|
819 | | - * message. |
---|
820 | | - * @dfs_region: regulatory DFS region, one of @enum qlink_dfs_region. |
---|
821 | | - * @info: variable-length HW info, can contain QTN_TLV_ID_REG_RULE. |
---|
| 1122 | + * @info: variable-length HW info. |
---|
822 | 1123 | */ |
---|
823 | 1124 | struct qlink_resp_get_hw_info { |
---|
824 | 1125 | struct qlink_resp rhdr; |
---|
825 | 1126 | __le32 fw_ver; |
---|
826 | | - __le32 hw_capab; |
---|
827 | 1127 | __le32 bld_tmstamp; |
---|
828 | 1128 | __le32 plat_id; |
---|
829 | 1129 | __le32 hw_ver; |
---|
830 | | - __le16 ql_proto_ver; |
---|
831 | 1130 | u8 num_mac; |
---|
832 | 1131 | u8 mac_bitmap; |
---|
833 | 1132 | u8 total_tx_chain; |
---|
834 | 1133 | u8 total_rx_chain; |
---|
835 | | - u8 alpha2[2]; |
---|
836 | | - u8 n_reg_rules; |
---|
837 | | - u8 dfs_region; |
---|
838 | | - u8 info[0]; |
---|
| 1134 | + u8 info[]; |
---|
839 | 1135 | } __packed; |
---|
840 | 1136 | |
---|
841 | 1137 | /** |
---|
.. | .. |
---|
856 | 1152 | QLINK_STA_INFO_RATE_FLAG_VHT_MCS = BIT(1), |
---|
857 | 1153 | QLINK_STA_INFO_RATE_FLAG_SHORT_GI = BIT(2), |
---|
858 | 1154 | QLINK_STA_INFO_RATE_FLAG_60G = BIT(3), |
---|
| 1155 | + QLINK_STA_INFO_RATE_FLAG_HE_MCS = BIT(4), |
---|
859 | 1156 | }; |
---|
860 | 1157 | |
---|
861 | 1158 | /** |
---|
.. | .. |
---|
863 | 1160 | * |
---|
864 | 1161 | * Response data containing statistics for specified STA. |
---|
865 | 1162 | * |
---|
866 | | - * @filled: a bitmask of &enum qlink_sta_info, specifies which info in response |
---|
867 | | - * is valid. |
---|
868 | 1163 | * @sta_addr: MAC address of STA the response carries statistic for. |
---|
869 | 1164 | * @info: variable statistics for specified STA. |
---|
870 | 1165 | */ |
---|
.. | .. |
---|
872 | 1167 | struct qlink_resp rhdr; |
---|
873 | 1168 | u8 sta_addr[ETH_ALEN]; |
---|
874 | 1169 | u8 rsvd[2]; |
---|
875 | | - u8 info[0]; |
---|
| 1170 | + u8 info[]; |
---|
876 | 1171 | } __packed; |
---|
877 | 1172 | |
---|
878 | 1173 | /** |
---|
.. | .. |
---|
889 | 1184 | u8 num_chans; |
---|
890 | 1185 | u8 num_bitrates; |
---|
891 | 1186 | u8 rsvd[1]; |
---|
892 | | - u8 info[0]; |
---|
893 | | -} __packed; |
---|
894 | | - |
---|
895 | | -/** |
---|
896 | | - * struct qlink_resp_phy_params - response for QLINK_CMD_PHY_PARAMS_GET command |
---|
897 | | - * |
---|
898 | | - * @info: variable-length array of PHY params. |
---|
899 | | - */ |
---|
900 | | -struct qlink_resp_phy_params { |
---|
901 | | - struct qlink_resp rhdr; |
---|
902 | | - u8 info[0]; |
---|
| 1187 | + u8 info[]; |
---|
903 | 1188 | } __packed; |
---|
904 | 1189 | |
---|
905 | 1190 | /** |
---|
906 | 1191 | * struct qlink_resp_get_chan_stats - response for QLINK_CMD_CHAN_STATS cmd |
---|
907 | 1192 | * |
---|
| 1193 | + * @chan_freq: center frequency for a channel the report is sent for. |
---|
908 | 1194 | * @info: variable-length channel info. |
---|
909 | 1195 | */ |
---|
910 | 1196 | struct qlink_resp_get_chan_stats { |
---|
911 | | - struct qlink_cmd rhdr; |
---|
912 | | - u8 info[0]; |
---|
| 1197 | + struct qlink_resp rhdr; |
---|
| 1198 | + __le32 chan_freq; |
---|
| 1199 | + u8 info[]; |
---|
913 | 1200 | } __packed; |
---|
914 | 1201 | |
---|
915 | 1202 | /** |
---|
.. | .. |
---|
920 | 1207 | struct qlink_resp_channel_get { |
---|
921 | 1208 | struct qlink_resp rhdr; |
---|
922 | 1209 | struct qlink_chandef chan; |
---|
| 1210 | +} __packed; |
---|
| 1211 | + |
---|
| 1212 | +/** |
---|
| 1213 | + * struct qlink_resp_txpwr - response for QLINK_CMD_TXPWR command |
---|
| 1214 | + * |
---|
| 1215 | + * This response is intended for QLINK_TXPWR_GET operation and does not |
---|
| 1216 | + * contain any meaningful information in case of QLINK_TXPWR_SET operation. |
---|
| 1217 | + * |
---|
| 1218 | + * @txpwr: current transmit power setting, in mBm |
---|
| 1219 | + */ |
---|
| 1220 | +struct qlink_resp_txpwr { |
---|
| 1221 | + struct qlink_resp rhdr; |
---|
| 1222 | + __le32 txpwr; |
---|
923 | 1223 | } __packed; |
---|
924 | 1224 | |
---|
925 | 1225 | /* QLINK Events messages related definitions |
---|
.. | .. |
---|
935 | 1235 | QLINK_EVENT_BSS_LEAVE = 0x0027, |
---|
936 | 1236 | QLINK_EVENT_FREQ_CHANGE = 0x0028, |
---|
937 | 1237 | QLINK_EVENT_RADAR = 0x0029, |
---|
| 1238 | + QLINK_EVENT_EXTERNAL_AUTH = 0x0030, |
---|
| 1239 | + QLINK_EVENT_MIC_FAILURE = 0x0031, |
---|
| 1240 | + QLINK_EVENT_UPDATE_OWE = 0x0032, |
---|
938 | 1241 | }; |
---|
939 | 1242 | |
---|
940 | 1243 | /** |
---|
.. | .. |
---|
967 | 1270 | struct qlink_event ehdr; |
---|
968 | 1271 | u8 sta_addr[ETH_ALEN]; |
---|
969 | 1272 | __le16 frame_control; |
---|
970 | | - u8 ies[0]; |
---|
| 1273 | + u8 ies[]; |
---|
971 | 1274 | } __packed; |
---|
972 | 1275 | |
---|
973 | 1276 | /** |
---|
.. | .. |
---|
985 | 1288 | /** |
---|
986 | 1289 | * struct qlink_event_bss_join - data for QLINK_EVENT_BSS_JOIN event |
---|
987 | 1290 | * |
---|
| 1291 | + * @chan: new operating channel definition |
---|
988 | 1292 | * @bssid: BSSID of a BSS which interface tried to joined. |
---|
989 | 1293 | * @status: status of joining attempt, see &enum ieee80211_statuscode. |
---|
990 | 1294 | */ |
---|
991 | 1295 | struct qlink_event_bss_join { |
---|
992 | 1296 | struct qlink_event ehdr; |
---|
| 1297 | + struct qlink_chandef chan; |
---|
993 | 1298 | u8 bssid[ETH_ALEN]; |
---|
994 | 1299 | __le16 status; |
---|
| 1300 | + u8 ies[]; |
---|
995 | 1301 | } __packed; |
---|
996 | 1302 | |
---|
997 | 1303 | /** |
---|
.. | .. |
---|
1002 | 1308 | struct qlink_event_bss_leave { |
---|
1003 | 1309 | struct qlink_event ehdr; |
---|
1004 | 1310 | __le16 reason; |
---|
| 1311 | + u8 rsvd[2]; |
---|
1005 | 1312 | } __packed; |
---|
1006 | 1313 | |
---|
1007 | 1314 | /** |
---|
.. | .. |
---|
1032 | 1339 | __le32 flags; |
---|
1033 | 1340 | s8 sig_dbm; |
---|
1034 | 1341 | u8 rsvd[3]; |
---|
1035 | | - u8 frame_data[0]; |
---|
| 1342 | + u8 frame_data[]; |
---|
1036 | 1343 | } __packed; |
---|
1037 | 1344 | |
---|
1038 | 1345 | /** |
---|
.. | .. |
---|
1060 | 1367 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
---|
1061 | 1368 | u8 bssid[ETH_ALEN]; |
---|
1062 | 1369 | u8 rsvd[2]; |
---|
1063 | | - u8 payload[0]; |
---|
| 1370 | + u8 payload[]; |
---|
1064 | 1371 | } __packed; |
---|
1065 | 1372 | |
---|
1066 | 1373 | /** |
---|
.. | .. |
---|
1107 | 1414 | u8 rsvd[3]; |
---|
1108 | 1415 | } __packed; |
---|
1109 | 1416 | |
---|
| 1417 | +/** |
---|
| 1418 | + * struct qlink_event_external_auth - data for QLINK_EVENT_EXTERNAL_AUTH event |
---|
| 1419 | + * |
---|
| 1420 | + * @ssid: SSID announced by BSS |
---|
| 1421 | + * @ssid_len: SSID length |
---|
| 1422 | + * @bssid: BSSID of the BSS to connect to |
---|
| 1423 | + * @akm_suite: AKM suite for external authentication |
---|
| 1424 | + * @action: action type/trigger for external authentication |
---|
| 1425 | + */ |
---|
| 1426 | +struct qlink_event_external_auth { |
---|
| 1427 | + struct qlink_event ehdr; |
---|
| 1428 | + __le32 akm_suite; |
---|
| 1429 | + u8 ssid[IEEE80211_MAX_SSID_LEN]; |
---|
| 1430 | + u8 bssid[ETH_ALEN]; |
---|
| 1431 | + u8 ssid_len; |
---|
| 1432 | + u8 action; |
---|
| 1433 | +} __packed; |
---|
| 1434 | + |
---|
| 1435 | +/** |
---|
| 1436 | + * struct qlink_event_mic_failure - data for QLINK_EVENT_MIC_FAILURE event |
---|
| 1437 | + * |
---|
| 1438 | + * @src: source MAC address of the frame |
---|
| 1439 | + * @key_index: index of the key being reported |
---|
| 1440 | + * @pairwise: whether the key is pairwise or group |
---|
| 1441 | + */ |
---|
| 1442 | +struct qlink_event_mic_failure { |
---|
| 1443 | + struct qlink_event ehdr; |
---|
| 1444 | + u8 src[ETH_ALEN]; |
---|
| 1445 | + u8 key_index; |
---|
| 1446 | + u8 pairwise; |
---|
| 1447 | +} __packed; |
---|
| 1448 | + |
---|
| 1449 | +/** |
---|
| 1450 | + * struct qlink_event_update_owe - data for QLINK_EVENT_UPDATE_OWE event |
---|
| 1451 | + * |
---|
| 1452 | + * @peer: MAC addr of the peer device for which OWE processing needs to be done |
---|
| 1453 | + * @ies: IEs from the peer |
---|
| 1454 | + */ |
---|
| 1455 | +struct qlink_event_update_owe { |
---|
| 1456 | + struct qlink_event ehdr; |
---|
| 1457 | + u8 peer[ETH_ALEN]; |
---|
| 1458 | + u8 rsvd[2]; |
---|
| 1459 | + u8 ies[]; |
---|
| 1460 | +} __packed; |
---|
| 1461 | + |
---|
1110 | 1462 | /* QLINK TLVs (Type-Length Values) definitions |
---|
1111 | 1463 | */ |
---|
1112 | 1464 | |
---|
1113 | 1465 | /** |
---|
1114 | 1466 | * enum qlink_tlv_id - list of TLVs that Qlink messages can carry |
---|
1115 | 1467 | * |
---|
1116 | | - * @QTN_TLV_ID_STA_STATS_MAP: a bitmap of &enum qlink_sta_info, used to |
---|
1117 | | - * indicate which statistic carried in QTN_TLV_ID_STA_STATS is valid. |
---|
| 1468 | + * @QTN_TLV_ID_BITMAP: a data representing a bitmap that is used together with |
---|
| 1469 | + * other TLVs: |
---|
| 1470 | + * &enum qlink_sta_info used to indicate which statistic carried in |
---|
| 1471 | + * QTN_TLV_ID_STA_STATS is valid. |
---|
| 1472 | + * &enum qlink_hw_capab listing wireless card capabilities. |
---|
| 1473 | + * &enum qlink_driver_capab listing driver/host system capabilities. |
---|
| 1474 | + * &enum qlink_chan_stat used to indicate which statistic carried in |
---|
| 1475 | + * QTN_TLV_ID_CHANNEL_STATS is valid. |
---|
1118 | 1476 | * @QTN_TLV_ID_STA_STATS: per-STA statistics as defined by |
---|
1119 | 1477 | * &struct qlink_sta_stats. Valid values are marked as such in a bitmap |
---|
1120 | | - * carried by QTN_TLV_ID_STA_STATS_MAP. |
---|
1121 | | - * @QTN_TLV_ID_MAX_SCAN_SSIDS: maximum number of SSIDs the device can scan |
---|
1122 | | - * for in any given scan. |
---|
| 1478 | + * carried by QTN_TLV_ID_BITMAP. |
---|
| 1479 | + * @QTN_TLV_ID_IFTYPE_DATA: supported band data. |
---|
1123 | 1480 | */ |
---|
1124 | 1481 | enum qlink_tlv_id { |
---|
1125 | 1482 | QTN_TLV_ID_FRAG_THRESH = 0x0201, |
---|
.. | .. |
---|
1129 | 1486 | QTN_TLV_ID_REG_RULE = 0x0207, |
---|
1130 | 1487 | QTN_TLV_ID_CHANNEL = 0x020F, |
---|
1131 | 1488 | QTN_TLV_ID_CHANDEF = 0x0210, |
---|
1132 | | - QTN_TLV_ID_STA_STATS_MAP = 0x0211, |
---|
| 1489 | + QTN_TLV_ID_BITMAP = 0x0211, |
---|
1133 | 1490 | QTN_TLV_ID_STA_STATS = 0x0212, |
---|
1134 | 1491 | QTN_TLV_ID_COVERAGE_CLASS = 0x0213, |
---|
1135 | 1492 | QTN_TLV_ID_IFACE_LIMIT = 0x0214, |
---|
1136 | | - QTN_TLV_ID_NUM_IFACE_COMB = 0x0215, |
---|
1137 | 1493 | QTN_TLV_ID_CHANNEL_STATS = 0x0216, |
---|
1138 | 1494 | QTN_TLV_ID_KEY = 0x0302, |
---|
1139 | 1495 | QTN_TLV_ID_SEQ = 0x0303, |
---|
.. | .. |
---|
1148 | 1504 | QTN_TLV_ID_CALIBRATION_VER = 0x0406, |
---|
1149 | 1505 | QTN_TLV_ID_UBOOT_VER = 0x0407, |
---|
1150 | 1506 | QTN_TLV_ID_RANDOM_MAC_ADDR = 0x0408, |
---|
1151 | | - QTN_TLV_ID_MAX_SCAN_SSIDS = 0x0409, |
---|
1152 | 1507 | QTN_TLV_ID_WOWLAN_CAPAB = 0x0410, |
---|
1153 | 1508 | QTN_TLV_ID_WOWLAN_PATTERN = 0x0411, |
---|
| 1509 | + QTN_TLV_ID_IFTYPE_DATA = 0x0418, |
---|
1154 | 1510 | }; |
---|
1155 | 1511 | |
---|
1156 | 1512 | struct qlink_tlv_hdr { |
---|
1157 | 1513 | __le16 type; |
---|
1158 | 1514 | __le16 len; |
---|
1159 | | - u8 val[0]; |
---|
1160 | | -} __packed; |
---|
1161 | | - |
---|
1162 | | -struct qlink_iface_comb_num { |
---|
1163 | | - __le32 iface_comb_num; |
---|
| 1515 | + u8 val[]; |
---|
1164 | 1516 | } __packed; |
---|
1165 | 1517 | |
---|
1166 | 1518 | struct qlink_iface_limit { |
---|
.. | .. |
---|
1172 | 1524 | __le16 max_interfaces; |
---|
1173 | 1525 | u8 num_different_channels; |
---|
1174 | 1526 | u8 n_limits; |
---|
1175 | | - struct qlink_iface_limit limits[0]; |
---|
| 1527 | + struct qlink_iface_limit limits[]; |
---|
1176 | 1528 | } __packed; |
---|
1177 | 1529 | |
---|
1178 | 1530 | #define QLINK_RSSI_OFFSET 120 |
---|
1179 | | - |
---|
1180 | | -struct qlink_tlv_frag_rts_thr { |
---|
1181 | | - struct qlink_tlv_hdr hdr; |
---|
1182 | | - __le16 thr; |
---|
1183 | | -} __packed; |
---|
1184 | | - |
---|
1185 | | -struct qlink_tlv_rlimit { |
---|
1186 | | - struct qlink_tlv_hdr hdr; |
---|
1187 | | - u8 rlimit; |
---|
1188 | | -} __packed; |
---|
1189 | | - |
---|
1190 | | -struct qlink_tlv_cclass { |
---|
1191 | | - struct qlink_tlv_hdr hdr; |
---|
1192 | | - u8 cclass; |
---|
1193 | | -} __packed; |
---|
1194 | 1531 | |
---|
1195 | 1532 | /** |
---|
1196 | 1533 | * enum qlink_reg_rule_flags - regulatory rule flags |
---|
.. | .. |
---|
1309 | 1646 | struct qlink_tlv_hdr hdr; |
---|
1310 | 1647 | u8 type; |
---|
1311 | 1648 | u8 flags; |
---|
1312 | | - u8 ie_data[0]; |
---|
| 1649 | + u8 rsvd[2]; |
---|
| 1650 | + u8 ie_data[]; |
---|
1313 | 1651 | } __packed; |
---|
1314 | 1652 | |
---|
| 1653 | +/** |
---|
| 1654 | + * struct qlink_tlv_ext_ie - extension IE |
---|
| 1655 | + * |
---|
| 1656 | + * @eid_ext: element ID extension, one of &enum ieee80211_eid_ext. |
---|
| 1657 | + * @ie_data: IEs data. |
---|
| 1658 | + */ |
---|
| 1659 | +struct qlink_tlv_ext_ie { |
---|
| 1660 | + struct qlink_tlv_hdr hdr; |
---|
| 1661 | + u8 eid_ext; |
---|
| 1662 | + u8 rsvd[3]; |
---|
| 1663 | + u8 ie_data[]; |
---|
| 1664 | +} __packed; |
---|
| 1665 | + |
---|
| 1666 | +#define IEEE80211_HE_PPE_THRES_MAX_LEN 25 |
---|
| 1667 | +struct qlink_sband_iftype_data { |
---|
| 1668 | + __le16 types_mask; |
---|
| 1669 | + struct ieee80211_he_cap_elem he_cap_elem; |
---|
| 1670 | + struct ieee80211_he_mcs_nss_supp he_mcs_nss_supp; |
---|
| 1671 | + u8 ppe_thres[IEEE80211_HE_PPE_THRES_MAX_LEN]; |
---|
| 1672 | +} __packed; |
---|
| 1673 | + |
---|
| 1674 | +/** |
---|
| 1675 | + * struct qlink_tlv_iftype_data - data for QTN_TLV_ID_IFTYPE_DATA |
---|
| 1676 | + * |
---|
| 1677 | + * @n_iftype_data: number of entries in iftype_data. |
---|
| 1678 | + * @iftype_data: interface type data entries. |
---|
| 1679 | + */ |
---|
| 1680 | +struct qlink_tlv_iftype_data { |
---|
| 1681 | + struct qlink_tlv_hdr hdr; |
---|
| 1682 | + u8 n_iftype_data; |
---|
| 1683 | + u8 rsvd[3]; |
---|
| 1684 | + struct qlink_sband_iftype_data iftype_data[]; |
---|
| 1685 | +} __packed; |
---|
| 1686 | + |
---|
| 1687 | +/** |
---|
| 1688 | + * enum qlink_chan_stat - channel statistics bitmap |
---|
| 1689 | + * |
---|
| 1690 | + * Used to indicate which statistics values in &struct qlink_chan_stats |
---|
| 1691 | + * are valid. Individual values are used to fill a bitmap carried in a |
---|
| 1692 | + * payload of QTN_TLV_ID_BITMAP. |
---|
| 1693 | + * |
---|
| 1694 | + * @QLINK_CHAN_STAT_TIME_ON: time_on value is valid. |
---|
| 1695 | + * @QLINK_CHAN_STAT_TIME_TX: time_tx value is valid. |
---|
| 1696 | + * @QLINK_CHAN_STAT_TIME_RX: time_rx value is valid. |
---|
| 1697 | + * @QLINK_CHAN_STAT_CCA_BUSY: cca_busy value is valid. |
---|
| 1698 | + * @QLINK_CHAN_STAT_CCA_BUSY_EXT: cca_busy_ext value is valid. |
---|
| 1699 | + * @QLINK_CHAN_STAT_TIME_SCAN: time_scan value is valid. |
---|
| 1700 | + * @QLINK_CHAN_STAT_CHAN_NOISE: chan_noise value is valid. |
---|
| 1701 | + */ |
---|
| 1702 | +enum qlink_chan_stat { |
---|
| 1703 | + QLINK_CHAN_STAT_TIME_ON, |
---|
| 1704 | + QLINK_CHAN_STAT_TIME_TX, |
---|
| 1705 | + QLINK_CHAN_STAT_TIME_RX, |
---|
| 1706 | + QLINK_CHAN_STAT_CCA_BUSY, |
---|
| 1707 | + QLINK_CHAN_STAT_CCA_BUSY_EXT, |
---|
| 1708 | + QLINK_CHAN_STAT_TIME_SCAN, |
---|
| 1709 | + QLINK_CHAN_STAT_CHAN_NOISE, |
---|
| 1710 | + QLINK_CHAN_STAT_NUM, |
---|
| 1711 | +}; |
---|
| 1712 | + |
---|
| 1713 | +/** |
---|
| 1714 | + * struct qlink_chan_stats - data for QTN_TLV_ID_CHANNEL_STATS |
---|
| 1715 | + * |
---|
| 1716 | + * Carries a per-channel statistics. Not all fields may be filled with |
---|
| 1717 | + * valid values. Valid fields should be indicated as such using a bitmap of |
---|
| 1718 | + * &enum qlink_chan_stat. Bitmap is carried separately in a payload of |
---|
| 1719 | + * QTN_TLV_ID_BITMAP. |
---|
| 1720 | + * |
---|
| 1721 | + * @time_on: amount of time radio operated on that channel. |
---|
| 1722 | + * @time_tx: amount of time radio spent transmitting on the channel. |
---|
| 1723 | + * @time_rx: amount of time radio spent receiving on the channel. |
---|
| 1724 | + * @cca_busy: amount of time the the primary channel was busy. |
---|
| 1725 | + * @cca_busy_ext: amount of time the the secondary channel was busy. |
---|
| 1726 | + * @time_scan: amount of radio spent scanning on the channel. |
---|
| 1727 | + * @chan_noise: channel noise. |
---|
| 1728 | + */ |
---|
1315 | 1729 | struct qlink_chan_stats { |
---|
1316 | | - __le32 chan_num; |
---|
1317 | | - __le32 cca_tx; |
---|
1318 | | - __le32 cca_rx; |
---|
1319 | | - __le32 cca_busy; |
---|
1320 | | - __le32 cca_try; |
---|
| 1730 | + __le64 time_on; |
---|
| 1731 | + __le64 time_tx; |
---|
| 1732 | + __le64 time_rx; |
---|
| 1733 | + __le64 cca_busy; |
---|
| 1734 | + __le64 cca_busy_ext; |
---|
| 1735 | + __le64 time_scan; |
---|
1321 | 1736 | s8 chan_noise; |
---|
| 1737 | + u8 rsvd[3]; |
---|
1322 | 1738 | } __packed; |
---|
1323 | 1739 | |
---|
1324 | 1740 | /** |
---|
.. | .. |
---|
1326 | 1742 | * |
---|
1327 | 1743 | * Used to indicate which statistics values in &struct qlink_sta_stats |
---|
1328 | 1744 | * are valid. Individual values are used to fill a bitmap carried in a |
---|
1329 | | - * payload of QTN_TLV_ID_STA_STATS_MAP. |
---|
| 1745 | + * payload of QTN_TLV_ID_BITMAP. |
---|
1330 | 1746 | * |
---|
1331 | 1747 | * @QLINK_STA_INFO_CONNECTED_TIME: connected_time value is valid. |
---|
1332 | 1748 | * @QLINK_STA_INFO_INACTIVE_TIME: inactive_time value is valid. |
---|
.. | .. |
---|
1390 | 1806 | * Carries statistics of a STA. Not all fields may be filled with |
---|
1391 | 1807 | * valid values. Valid fields should be indicated as such using a bitmap of |
---|
1392 | 1808 | * &enum qlink_sta_info. Bitmap is carried separately in a payload of |
---|
1393 | | - * QTN_TLV_ID_STA_STATS_MAP. |
---|
| 1809 | + * QTN_TLV_ID_BITMAP. |
---|
1394 | 1810 | */ |
---|
1395 | 1811 | struct qlink_sta_stats { |
---|
1396 | 1812 | __le64 rx_bytes; |
---|
.. | .. |
---|
1451 | 1867 | struct qlink_wowlan_capab_data { |
---|
1452 | 1868 | __le16 version; |
---|
1453 | 1869 | __le16 len; |
---|
1454 | | - u8 data[0]; |
---|
| 1870 | + u8 data[]; |
---|
1455 | 1871 | } __packed; |
---|
1456 | 1872 | |
---|
1457 | 1873 | /** |
---|