forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/net/wireless/quantenna/qtnfmac/qlink.h
....@@ -1,25 +1,25 @@
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. */
163
174 #ifndef _QTN_QLINK_H_
185 #define _QTN_QLINK_H_
196
207 #include <linux/ieee80211.h>
218
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
2323
2424 #define QLINK_MACID_RSVD 0xFF
2525 #define QLINK_VIFID_RSVD 0xFF
....@@ -72,14 +72,27 @@
7272 * @QLINK_HW_CAPAB_SCAN_RANDOM_MAC_ADDR: device supports MAC Address
7373 * Randomization in probe requests.
7474 * @QLINK_HW_CAPAB_OBSS_SCAN: device can perform OBSS scanning.
75
+ * @QLINK_HW_CAPAB_HW_BRIDGE: device has hardware switch capabilities.
7576 */
7677 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
8396 };
8497
8598 enum qlink_iface_type {
....@@ -104,7 +117,8 @@
104117 __le16 if_type;
105118 __le16 vlanid;
106119 u8 mac_addr[ETH_ALEN];
107
- u8 rsvd[2];
120
+ u8 use4addr;
121
+ u8 rsvd[1];
108122 } __packed;
109123
110124 enum qlink_sta_flags {
....@@ -172,7 +186,7 @@
172186 __le16 center_freq1;
173187 __le16 center_freq2;
174188 u8 width;
175
- u8 rsvd;
189
+ u8 rsvd[3];
176190 } __packed;
177191
178192 #define QLINK_MAX_NR_CIPHER_SUITES 5
....@@ -204,6 +218,45 @@
204218 __le32 value;
205219 } __packed;
206220
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
+
207260 /* QLINK Command messages related definitions
208261 */
209262
....@@ -216,6 +269,8 @@
216269 * execution status (one of &enum qlink_cmd_result). Reply message
217270 * may also contain data payload specific to the command type.
218271 *
272
+ * @QLINK_CMD_SEND_FRAME: send specified frame over the air; firmware will
273
+ * encapsulate 802.3 packet into 802.11 frame automatically.
219274 * @QLINK_CMD_BAND_INFO_GET: for the specified MAC and specified band, get
220275 * the band's description including number of operational channels and
221276 * info on each channel, HT/VHT capabilities, supported rates etc.
....@@ -225,14 +280,17 @@
225280 * command is supported only if device reports QLINK_HW_SUPPORTS_REG_UPDATE
226281 * capability.
227282 * @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.
228287 */
229288 enum qlink_cmd_type {
230289 QLINK_CMD_FW_INIT = 0x0001,
231290 QLINK_CMD_FW_DEINIT = 0x0002,
232291 QLINK_CMD_REGISTER_MGMT = 0x0003,
233
- QLINK_CMD_SEND_MGMT_FRAME = 0x0004,
292
+ QLINK_CMD_SEND_FRAME = 0x0004,
234293 QLINK_CMD_MGMT_SET_APPIE = 0x0005,
235
- QLINK_CMD_PHY_PARAMS_GET = 0x0011,
236294 QLINK_CMD_PHY_PARAMS_SET = 0x0012,
237295 QLINK_CMD_GET_HW_INFO = 0x0013,
238296 QLINK_CMD_MAC_INFO = 0x0014,
....@@ -257,10 +315,14 @@
257315 QLINK_CMD_DEL_STA = 0x0052,
258316 QLINK_CMD_SCAN = 0x0053,
259317 QLINK_CMD_CHAN_STATS = 0x0054,
318
+ QLINK_CMD_NDEV_EVENT = 0x0055,
260319 QLINK_CMD_CONNECT = 0x0060,
261320 QLINK_CMD_DISCONNECT = 0x0061,
262321 QLINK_CMD_PM_SET = 0x0062,
263322 QLINK_CMD_WOWLAN_SET = 0x0063,
323
+ QLINK_CMD_EXTERNAL_AUTH = 0x0066,
324
+ QLINK_CMD_TXPWR = 0x0067,
325
+ QLINK_CMD_UPDATE_OWE = 0x0068,
264326 };
265327
266328 /**
....@@ -281,9 +343,26 @@
281343 struct qlink_msg_header mhdr;
282344 __le16 cmd_id;
283345 __le16 seq_num;
284
- u8 rsvd[2];
285346 u8 macid;
286347 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[];
287366 } __packed;
288367
289368 /**
....@@ -328,29 +407,34 @@
328407 struct qlink_cmd chdr;
329408 __le16 frame_type;
330409 u8 do_register;
410
+ u8 rsvd[1];
331411 } __packed;
332412
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),
338422 };
339423
340424 /**
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
342426 *
343427 * @cookie: opaque request identifier.
344428 * @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.
346430 * @frame_data: frame to transmit.
347431 */
348
-struct qlink_cmd_mgmt_frame_tx {
432
+struct qlink_cmd_frame_tx {
349433 struct qlink_cmd chdr;
350434 __le32 cookie;
351435 __le16 freq;
352436 __le16 flags;
353
- u8 frame_data[0];
437
+ u8 frame_data[];
354438 } __packed;
355439
356440 /**
....@@ -361,6 +445,7 @@
361445 struct qlink_cmd_get_sta_info {
362446 struct qlink_cmd chdr;
363447 u8 sta_addr[ETH_ALEN];
448
+ u8 rsvd[2];
364449 } __packed;
365450
366451 /**
....@@ -380,7 +465,8 @@
380465 u8 addr[ETH_ALEN];
381466 __le32 cipher;
382467 __le16 vlanid;
383
- u8 key_data[0];
468
+ u8 rsvd[2];
469
+ u8 key_data[];
384470 } __packed;
385471
386472 /**
....@@ -409,6 +495,7 @@
409495 u8 key_index;
410496 u8 unicast;
411497 u8 multicast;
498
+ u8 rsvd[1];
412499 } __packed;
413500
414501 /**
....@@ -419,6 +506,7 @@
419506 struct qlink_cmd_set_def_mgmt_key {
420507 struct qlink_cmd chdr;
421508 u8 key_index;
509
+ u8 rsvd[3];
422510 } __packed;
423511
424512 /**
....@@ -435,6 +523,7 @@
435523 __le16 if_type;
436524 __le16 vlanid;
437525 u8 sta_addr[ETH_ALEN];
526
+ u8 rsvd[2];
438527 } __packed;
439528
440529 /**
....@@ -445,8 +534,9 @@
445534 struct qlink_cmd_del_sta {
446535 struct qlink_cmd chdr;
447536 __le16 reason_code;
448
- u8 subtype;
449537 u8 sta_addr[ETH_ALEN];
538
+ u8 subtype;
539
+ u8 rsvd[3];
450540 } __packed;
451541
452542 enum qlink_sta_connect_flags {
....@@ -488,7 +578,21 @@
488578 u8 mfp;
489579 u8 pbss;
490580 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[];
492596 } __packed;
493597
494598 /**
....@@ -499,6 +603,7 @@
499603 struct qlink_cmd_disconnect {
500604 struct qlink_cmd chdr;
501605 __le16 reason;
606
+ u8 rsvd[2];
502607 } __packed;
503608
504609 /**
....@@ -510,6 +615,7 @@
510615 struct qlink_cmd_updown {
511616 struct qlink_cmd chdr;
512617 u8 if_up;
618
+ u8 rsvd[3];
513619 } __packed;
514620
515621 /**
....@@ -533,16 +639,17 @@
533639 struct qlink_cmd_band_info_get {
534640 struct qlink_cmd chdr;
535641 u8 band;
642
+ u8 rsvd[3];
536643 } __packed;
537644
538645 /**
539646 * struct qlink_cmd_get_chan_stats - data for QLINK_CMD_CHAN_STATS command
540647 *
541
- * @channel: channel number according to 802.11 17.3.8.3.2 and Annex J
648
+ * @channel_freq: channel center frequency
542649 */
543650 struct qlink_cmd_get_chan_stats {
544651 struct qlink_cmd chdr;
545
- __le16 channel;
652
+ __le32 channel_freq;
546653 } __packed;
547654
548655 /**
....@@ -575,28 +682,53 @@
575682 * @initiator: which entity sent the request, one of &enum qlink_reg_initiator.
576683 * @user_reg_hint_type: type of hint for QLINK_REGDOM_SET_BY_USER request, one
577684 * 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.
578691 */
579692 struct qlink_cmd_reg_notify {
580693 struct qlink_cmd chdr;
581694 u8 alpha2[2];
582695 u8 initiator;
583696 u8 user_reg_hint_type;
697
+ u8 num_channels;
698
+ u8 dfs_region;
699
+ u8 slave_radar;
700
+ u8 dfs_offload;
701
+ u8 info[];
584702 } __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
+};
585716
586717 /**
587718 * struct qlink_cmd_chan_switch - data for QLINK_CMD_CHAN_SWITCH command
588719 *
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.
592722 * @beacon_count: number of beacons until switch
593723 */
594724 struct qlink_cmd_chan_switch {
595725 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;
599730 u8 beacon_count;
731
+ u8 rsvd[3];
600732 } __packed;
601733
602734 /**
....@@ -621,6 +753,8 @@
621753 * @ht_required: stations must support HT
622754 * @vht_required: stations must support VHT
623755 * @aen: encryption info
756
+ * @sr_params: spatial reuse parameters
757
+ * @twt_responder: enable Target Wake Time
624758 * @info: variable configurations
625759 */
626760 struct qlink_cmd_start_ap {
....@@ -636,7 +770,10 @@
636770 u8 ht_required;
637771 u8 vht_required;
638772 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[];
640777 } __packed;
641778
642779 /**
....@@ -670,7 +807,7 @@
670807 struct qlink_acl_data {
671808 __le32 policy;
672809 __le32 num_entries;
673
- struct qlink_mac_address mac_addrs[0];
810
+ struct qlink_mac_address mac_addrs[];
674811 } __packed;
675812
676813 /**
....@@ -695,6 +832,33 @@
695832 struct qlink_cmd chdr;
696833 __le32 pm_standby_timer;
697834 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];
698862 } __packed;
699863
700864 /**
....@@ -718,7 +882,97 @@
718882 struct qlink_cmd_wowlan_set {
719883 struct qlink_cmd chdr;
720884 __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[];
722976 } __packed;
723977
724978 /* QLINK Command Responses messages related definitions
....@@ -732,6 +986,7 @@
732986 QLINK_CMD_RESULT_EALREADY,
733987 QLINK_CMD_RESULT_EADDRINUSE,
734988 QLINK_CMD_RESULT_EADDRNOTAVAIL,
989
+ QLINK_CMD_RESULT_EBUSY,
735990 };
736991
737992 /**
....@@ -759,35 +1014,13 @@
7591014 } __packed;
7601015
7611016 /**
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
7631018 *
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.
7771020 */
778
-struct qlink_resp_get_mac_info {
1021
+struct qlink_resp_init_fw {
7791022 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;
7911024 } __packed;
7921025
7931026 /**
....@@ -803,39 +1036,102 @@
8031036 };
8041037
8051038 /**
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
+/**
8061113 * struct qlink_resp_get_hw_info - response for QLINK_CMD_GET_HW_INFO command
8071114 *
8081115 * Description of wireless hardware capabilities and features.
8091116 *
8101117 * @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.
8131118 * @num_mac: Number of separate physical radio devices provided by hardware.
8141119 * @mac_bitmap: Bitmap of MAC IDs that are active and can be used in firmware.
8151120 * @total_tx_chains: total number of transmit chains used by device.
8161121 * @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.
8221123 */
8231124 struct qlink_resp_get_hw_info {
8241125 struct qlink_resp rhdr;
8251126 __le32 fw_ver;
826
- __le32 hw_capab;
8271127 __le32 bld_tmstamp;
8281128 __le32 plat_id;
8291129 __le32 hw_ver;
830
- __le16 ql_proto_ver;
8311130 u8 num_mac;
8321131 u8 mac_bitmap;
8331132 u8 total_tx_chain;
8341133 u8 total_rx_chain;
835
- u8 alpha2[2];
836
- u8 n_reg_rules;
837
- u8 dfs_region;
838
- u8 info[0];
1134
+ u8 info[];
8391135 } __packed;
8401136
8411137 /**
....@@ -856,6 +1152,7 @@
8561152 QLINK_STA_INFO_RATE_FLAG_VHT_MCS = BIT(1),
8571153 QLINK_STA_INFO_RATE_FLAG_SHORT_GI = BIT(2),
8581154 QLINK_STA_INFO_RATE_FLAG_60G = BIT(3),
1155
+ QLINK_STA_INFO_RATE_FLAG_HE_MCS = BIT(4),
8591156 };
8601157
8611158 /**
....@@ -863,8 +1160,6 @@
8631160 *
8641161 * Response data containing statistics for specified STA.
8651162 *
866
- * @filled: a bitmask of &enum qlink_sta_info, specifies which info in response
867
- * is valid.
8681163 * @sta_addr: MAC address of STA the response carries statistic for.
8691164 * @info: variable statistics for specified STA.
8701165 */
....@@ -872,7 +1167,7 @@
8721167 struct qlink_resp rhdr;
8731168 u8 sta_addr[ETH_ALEN];
8741169 u8 rsvd[2];
875
- u8 info[0];
1170
+ u8 info[];
8761171 } __packed;
8771172
8781173 /**
....@@ -889,27 +1184,19 @@
8891184 u8 num_chans;
8901185 u8 num_bitrates;
8911186 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[];
9031188 } __packed;
9041189
9051190 /**
9061191 * struct qlink_resp_get_chan_stats - response for QLINK_CMD_CHAN_STATS cmd
9071192 *
1193
+ * @chan_freq: center frequency for a channel the report is sent for.
9081194 * @info: variable-length channel info.
9091195 */
9101196 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[];
9131200 } __packed;
9141201
9151202 /**
....@@ -920,6 +1207,19 @@
9201207 struct qlink_resp_channel_get {
9211208 struct qlink_resp rhdr;
9221209 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;
9231223 } __packed;
9241224
9251225 /* QLINK Events messages related definitions
....@@ -935,6 +1235,9 @@
9351235 QLINK_EVENT_BSS_LEAVE = 0x0027,
9361236 QLINK_EVENT_FREQ_CHANGE = 0x0028,
9371237 QLINK_EVENT_RADAR = 0x0029,
1238
+ QLINK_EVENT_EXTERNAL_AUTH = 0x0030,
1239
+ QLINK_EVENT_MIC_FAILURE = 0x0031,
1240
+ QLINK_EVENT_UPDATE_OWE = 0x0032,
9381241 };
9391242
9401243 /**
....@@ -967,7 +1270,7 @@
9671270 struct qlink_event ehdr;
9681271 u8 sta_addr[ETH_ALEN];
9691272 __le16 frame_control;
970
- u8 ies[0];
1273
+ u8 ies[];
9711274 } __packed;
9721275
9731276 /**
....@@ -985,13 +1288,16 @@
9851288 /**
9861289 * struct qlink_event_bss_join - data for QLINK_EVENT_BSS_JOIN event
9871290 *
1291
+ * @chan: new operating channel definition
9881292 * @bssid: BSSID of a BSS which interface tried to joined.
9891293 * @status: status of joining attempt, see &enum ieee80211_statuscode.
9901294 */
9911295 struct qlink_event_bss_join {
9921296 struct qlink_event ehdr;
1297
+ struct qlink_chandef chan;
9931298 u8 bssid[ETH_ALEN];
9941299 __le16 status;
1300
+ u8 ies[];
9951301 } __packed;
9961302
9971303 /**
....@@ -1002,6 +1308,7 @@
10021308 struct qlink_event_bss_leave {
10031309 struct qlink_event ehdr;
10041310 __le16 reason;
1311
+ u8 rsvd[2];
10051312 } __packed;
10061313
10071314 /**
....@@ -1032,7 +1339,7 @@
10321339 __le32 flags;
10331340 s8 sig_dbm;
10341341 u8 rsvd[3];
1035
- u8 frame_data[0];
1342
+ u8 frame_data[];
10361343 } __packed;
10371344
10381345 /**
....@@ -1060,7 +1367,7 @@
10601367 u8 ssid[IEEE80211_MAX_SSID_LEN];
10611368 u8 bssid[ETH_ALEN];
10621369 u8 rsvd[2];
1063
- u8 payload[0];
1370
+ u8 payload[];
10641371 } __packed;
10651372
10661373 /**
....@@ -1107,19 +1414,69 @@
11071414 u8 rsvd[3];
11081415 } __packed;
11091416
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
+
11101462 /* QLINK TLVs (Type-Length Values) definitions
11111463 */
11121464
11131465 /**
11141466 * enum qlink_tlv_id - list of TLVs that Qlink messages can carry
11151467 *
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.
11181476 * @QTN_TLV_ID_STA_STATS: per-STA statistics as defined by
11191477 * &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.
11231480 */
11241481 enum qlink_tlv_id {
11251482 QTN_TLV_ID_FRAG_THRESH = 0x0201,
....@@ -1129,11 +1486,10 @@
11291486 QTN_TLV_ID_REG_RULE = 0x0207,
11301487 QTN_TLV_ID_CHANNEL = 0x020F,
11311488 QTN_TLV_ID_CHANDEF = 0x0210,
1132
- QTN_TLV_ID_STA_STATS_MAP = 0x0211,
1489
+ QTN_TLV_ID_BITMAP = 0x0211,
11331490 QTN_TLV_ID_STA_STATS = 0x0212,
11341491 QTN_TLV_ID_COVERAGE_CLASS = 0x0213,
11351492 QTN_TLV_ID_IFACE_LIMIT = 0x0214,
1136
- QTN_TLV_ID_NUM_IFACE_COMB = 0x0215,
11371493 QTN_TLV_ID_CHANNEL_STATS = 0x0216,
11381494 QTN_TLV_ID_KEY = 0x0302,
11391495 QTN_TLV_ID_SEQ = 0x0303,
....@@ -1148,19 +1504,15 @@
11481504 QTN_TLV_ID_CALIBRATION_VER = 0x0406,
11491505 QTN_TLV_ID_UBOOT_VER = 0x0407,
11501506 QTN_TLV_ID_RANDOM_MAC_ADDR = 0x0408,
1151
- QTN_TLV_ID_MAX_SCAN_SSIDS = 0x0409,
11521507 QTN_TLV_ID_WOWLAN_CAPAB = 0x0410,
11531508 QTN_TLV_ID_WOWLAN_PATTERN = 0x0411,
1509
+ QTN_TLV_ID_IFTYPE_DATA = 0x0418,
11541510 };
11551511
11561512 struct qlink_tlv_hdr {
11571513 __le16 type;
11581514 __le16 len;
1159
- u8 val[0];
1160
-} __packed;
1161
-
1162
-struct qlink_iface_comb_num {
1163
- __le32 iface_comb_num;
1515
+ u8 val[];
11641516 } __packed;
11651517
11661518 struct qlink_iface_limit {
....@@ -1172,25 +1524,10 @@
11721524 __le16 max_interfaces;
11731525 u8 num_different_channels;
11741526 u8 n_limits;
1175
- struct qlink_iface_limit limits[0];
1527
+ struct qlink_iface_limit limits[];
11761528 } __packed;
11771529
11781530 #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;
11941531
11951532 /**
11961533 * enum qlink_reg_rule_flags - regulatory rule flags
....@@ -1309,16 +1646,95 @@
13091646 struct qlink_tlv_hdr hdr;
13101647 u8 type;
13111648 u8 flags;
1312
- u8 ie_data[0];
1649
+ u8 rsvd[2];
1650
+ u8 ie_data[];
13131651 } __packed;
13141652
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
+ */
13151729 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;
13211736 s8 chan_noise;
1737
+ u8 rsvd[3];
13221738 } __packed;
13231739
13241740 /**
....@@ -1326,7 +1742,7 @@
13261742 *
13271743 * Used to indicate which statistics values in &struct qlink_sta_stats
13281744 * 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.
13301746 *
13311747 * @QLINK_STA_INFO_CONNECTED_TIME: connected_time value is valid.
13321748 * @QLINK_STA_INFO_INACTIVE_TIME: inactive_time value is valid.
....@@ -1390,7 +1806,7 @@
13901806 * Carries statistics of a STA. Not all fields may be filled with
13911807 * valid values. Valid fields should be indicated as such using a bitmap of
13921808 * &enum qlink_sta_info. Bitmap is carried separately in a payload of
1393
- * QTN_TLV_ID_STA_STATS_MAP.
1809
+ * QTN_TLV_ID_BITMAP.
13941810 */
13951811 struct qlink_sta_stats {
13961812 __le64 rx_bytes;
....@@ -1451,7 +1867,7 @@
14511867 struct qlink_wowlan_capab_data {
14521868 __le16 version;
14531869 __le16 len;
1454
- u8 data[0];
1870
+ u8 data[];
14551871 } __packed;
14561872
14571873 /**