hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/wlioctl.h
old mode 100644new mode 100755
....@@ -713,7 +713,7 @@
713713
714714 #define WL_SCAN_PARAMS_SSID_MAX 10
715715
716
-typedef struct wl_scan_params_v1 {
716
+struct wl_scan_params {
717717 wlc_ssid_t ssid; /**< default: {0, ""} */
718718 struct ether_addr bssid; /**< default: bcast */
719719 int8 bss_type; /**< default: any,
....@@ -744,13 +744,8 @@
744744 * parameter portion is assumed, otherwise ssid in
745745 * the fixed portion is ignored
746746 */
747
- uint16 channel_list[BCM_FLEX_ARRAY];
748
-} wl_scan_params_v1_t;
749
-
750
-/** size of wl_scan_params_v1 not including variable length array */
751
-#define WL_SCAN_PARAMS_V1_FIXED_SIZE (OFFSETOF(wl_scan_params_v1_t, channel_list))
752
-#define WL_MAX_ROAMSCAN_V1_DATSZ \
753
- (WL_SCAN_PARAMS_V1_FIXED_SIZE + (WL_NUMCHANNELS * sizeof(uint16)))
747
+ uint16 channel_list[1]; /**< list of chanspecs */
748
+};
754749
755750 /* changes in wl_scan_params_v2 as comapred to wl_scan_params (v1)
756751 * unit8 scantype to uint32
....@@ -862,16 +857,16 @@
862857 #define WL_MAX_ROAMSCAN_V3_DATSZ \
863858 (WL_SCAN_PARAMS_V3_FIXED_SIZE + (WL_NUMCHANNELS * sizeof(uint16)))
864859
865
-#define ISCAN_REQ_VERSION_V1 1
860
+#define ISCAN_REQ_VERSION 1
866861 #define ISCAN_REQ_VERSION_V2 2
867862
868863 /** incremental scan struct */
869
-typedef struct wl_iscan_params_v1 {
864
+struct wl_iscan_params {
870865 uint32 version;
871866 uint16 action;
872867 uint16 scan_duration;
873
- struct wl_scan_params_v1 params;
874
-} wl_iscan_params_v1_t;
868
+ struct wl_scan_params params;
869
+};
875870
876871 /** incremental scan struct */
877872 typedef struct wl_iscan_params_v2 {
....@@ -900,9 +895,8 @@
900895 uint32 buflen;
901896 uint32 version;
902897 uint32 count;
903
- wl_bss_info_v109_t bss_info[BCM_FLEX_ARRAY];
898
+ wl_bss_info_v109_t bss_info[1];
904899 } wl_scan_results_v109_t;
905
-#define WL_SCAN_RESULTS_V109_FIXED_SIZE (OFFSETOF(wl_scan_results_v109_t, bss_info))
906900
907901 typedef struct wl_scan_results_v2 {
908902 uint32 buflen;
....@@ -926,15 +920,15 @@
926920 } iscan_buf_t;
927921 #endif /* SIMPLE_ISCAN */
928922 #define ESCAN_REQ_VERSION 1
929
-#define ESCAN_REQ_VERSION_V1 1
930923 #define ESCAN_REQ_VERSION_V2 2
931924
932
-typedef struct wl_escan_params_v1 {
925
+/** event scan reduces amount of SOC memory needed to store scan results */
926
+struct wl_escan_params {
933927 uint32 version;
934928 uint16 action;
935929 uint16 sync_id;
936
- struct wl_scan_params_v1 params;
937
-} wl_escan_params_v1_t;
930
+ struct wl_scan_params params;
931
+};
938932
939933 typedef struct wl_escan_params_v2 {
940934 uint32 version;
....@@ -950,7 +944,7 @@
950944 wl_scan_params_v3_t params;
951945 } wl_escan_params_v3_t;
952946
953
-#define WL_ESCAN_PARAMS_V1_FIXED_SIZE (OFFSETOF(wl_escan_params_v1_t, params) + sizeof(wlc_ssid_t))
947
+#define WL_ESCAN_PARAMS_FIXED_SIZE (OFFSETOF(wl_escan_params_t, params) + sizeof(wlc_ssid_t))
954948 #define WL_ESCAN_PARAMS_V2_FIXED_SIZE (OFFSETOF(wl_escan_params_v2_t, params) + sizeof(wlc_ssid_t))
955949 #define WL_ESCAN_PARAMS_V3_FIXED_SIZE (OFFSETOF(wl_escan_params_v3_t, params) + sizeof(wlc_ssid_t))
956950 /* New scan version is defined then change old version of scan to
....@@ -973,9 +967,9 @@
973967 typedef struct wl_iscan_params_v2 wl_iscan_params_t;
974968 #define WL_SCAN_PARAMS_FIXED_SIZE (OFFSETOF(wl_scan_params_t, channel_list))
975969 #else
976
-typedef struct wl_scan_params_v1 wl_scan_params_t;
977
-typedef struct wl_escan_params_v1 wl_escan_params_t;
978
-typedef struct wl_iscan_params_v1 wl_iscan_params_t;
970
+typedef struct wl_scan_params wl_scan_params_t;
971
+typedef struct wl_escan_params wl_escan_params_t;
972
+typedef struct wl_iscan_params wl_iscan_params_t;
979973 #define WL_SCAN_PARAMS_FIXED_SIZE 64
980974 #endif /* WL_SCAN_PARAMS_V3 */
981975
....@@ -985,9 +979,8 @@
985979 uint32 version;
986980 uint16 sync_id;
987981 uint16 bss_count;
988
- wl_bss_info_v109_t bss_info[BCM_FLEX_ARRAY];
982
+ wl_bss_info_v109_t bss_info[1];
989983 } wl_escan_result_v109_t;
990
-#define WL_ESCAN_RESULTS_V109_FIXED_SIZE (OFFSETOF(wl_escan_result_v109_t, bss_info))
991984
992985 /** event scan reduces amount of SOC memory needed to store scan results */
993986 typedef struct wl_escan_result_v2 {
....@@ -2313,7 +2306,6 @@
23132306
23142307 #define WL_STA_VER_4 4
23152308 #define WL_STA_VER_5 5
2316
-#define WL_STA_VER_6 6u
23172309 /* FIXME: the user/branch should make the selection! */
23182310 #define WL_STA_VER WL_STA_VER_4
23192311
....@@ -6238,15 +6230,6 @@
62386230 #define WL_ICMP_CFG_IPV6_LEN(count) (WL_ICMP_CFG_IPV6_FIXED_LEN + \
62396231 ((count) * sizeof(struct ipv6_addr)))
62406232
6241
-typedef struct wl_mkeep_alive_pkt_v1 {
6242
- uint16 version; /* Version for mkeep_alive */
6243
- uint16 length; /* length of fixed parameters in the structure */
6244
- uint32 period_msec; /* high bit on means immediate send */
6245
- uint16 len_bytes;
6246
- uint8 keep_alive_id; /* 0 - 3 for N = 4 */
6247
- uint8 data[BCM_FLEX_ARRAY];
6248
-} wl_mkeep_alive_pkt_v1_t;
6249
-
62506233 typedef struct wl_mkeep_alive_pkt {
62516234 uint16 version; /* Version for mkeep_alive */
62526235 uint16 length; /* length of fixed parameters in the structure */
....@@ -6256,7 +6239,6 @@
62566239 uint8 data[1];
62576240 } wl_mkeep_alive_pkt_t;
62586241
6259
-#define WL_MKEEP_ALIVE_VERSION_1 1u
62606242 #define WL_MKEEP_ALIVE_VERSION 1
62616243 #define WL_MKEEP_ALIVE_FIXED_LEN OFFSETOF(wl_mkeep_alive_pkt_t, data)
62626244 /* 1/2 second precision since idle time is a seconds counter anyway */
....@@ -21245,13 +21227,6 @@
2124521227 */
2124621228
2124721229 /* TWT Setup descriptor */
21248
-
21249
-/* Any change to wl_twt_sdesc is not possible without affecting this ROMed structure
21250
- * in various current branches. Hence to use new updated structure wl_twt_sdesc_v1
21251
- * typecast it to wl_twt_sdesc_t and define WL_TWT_SDESC_TYPEDEF_HAS_ALIAS
21252
- * in required branches
21253
- */
21254
-#ifndef WL_TWT_SDESC_TYPEDEF_HAS_ALIAS
2125521230 typedef struct wl_twt_sdesc {
2125621231 /* Setup Command. */
2125721232 uint8 setup_cmd; /* See TWT_SETUP_CMD_XXXX in 802.11ah.h */
....@@ -21273,7 +21248,6 @@
2127321248 /* deprecated - to be removed */
2127421249 uint16 li;
2127521250 } wl_twt_sdesc_t;
21276
-#endif /* WL_TWT_SDESC_TYPEDEF_HAS_ALIAS */
2127721251
2127821252 #define WL_TWT_SETUP_DESC_VER 1u
2127921253
....@@ -21309,9 +21283,7 @@
2130921283 uint16 version; /* structure version */
2131021284 uint16 length; /* data length (starting after this field) */
2131121285 uint8 negotiation_type; /* Negotiation Type: See macros TWT_NEGO_TYPE_X */
21312
- uint8 configID; /* TWT Configuration ID */
21313
- uint8 flow_flags; /* Flow Flags Configuration. See WL_TWT_FLOW_FLAG_XXXX */
21314
- uint8 PAD;
21286
+ uint8 PAD[3];
2131521287 uint32 wake_time_h; /* target wake time - BSS TSF (us) */
2131621288 uint32 wake_time_l;
2131721289 uint32 wake_dur; /* target wake duration in unit of microseconds */
....@@ -21321,7 +21293,6 @@
2132121293 uint32 wake_dur_min; /* Min. wake duration allowed for TWT Setup */
2132221294 uint32 wake_dur_max; /* Max. wake duration allowed for TWT Setup */
2132321295 uint32 avg_pkt_num; /* Average Number of Packets per interval */
21324
- uint32 avg_pkt_size; /* Average packet size for TWT SP */
2132521296 } wl_twt_cdesc_t;
2132621297
2132721298 /* Flow flags */
....@@ -21345,14 +21316,6 @@
2134521316
2134621317 #define WL_TWT_INV_BCAST_ID 0xFFu
2134721318 #define WL_TWT_INV_FLOW_ID 0xFFu
21348
-#define WL_TWT_INV_CONFIG_ID 0xFFu
21349
-#define WL_TWT_ALL_TWT_CONFIG_ID 0u /* ConfigID 0 corresponds to All TWT */
21350
-
21351
-#define WL_TWT_INV_WAKE_DUR 0xFFFFFFFFu
21352
-#define WL_TWT_INV_WAKE_INT 0xFFFFFFFFu
21353
-#define WL_TWT_INV_PKT_NUM 0xFFFFFFFFu
21354
-#define WL_TWT_INV_PKT_SIZE 0xFFFFFFFFu
21355
-#define WL_TWT_INV_WAKE_TIME 0xFFFFFFFFu
2135621319
2135721320 /* auto flow_id */
2135821321 #define WL_TWT_SETUP_FLOW_ID_AUTO 0xFFu
....@@ -21369,11 +21332,10 @@
2136921332 #define WL_TWT_STATS_MAX_BTWT WL_TWT_MAX_BTWT
2137021333 #define WL_TWT_STATS_MAX_ITWT WL_TWT_MAX_ITWT
2137121334
21372
-/* TWT States */
2137321335 #define WL_TWT_INACTIVE 0u /* Resource is not allotted */
21374
-#define WL_TWT_ACTIVE 1u /* Resource is allotted and HEB is programmed */
21375
-#define WL_TWT_SUSPEND 2u /* Resource is suspended and HEB released */
21376
-#define WL_TWT_RESERVED 3u /* Resource is allotted but HEB is not yet programmed */
21336
+#define WL_TWT_RESERVED 1u /* Resource is allotted but HEB is not yet programmed */
21337
+#define WL_TWT_ACTIVE 2u /* Resource is allotted and HEB is programmed */
21338
+#define WL_TWT_SUSPEND 3u /* Resource is suspended and HEB released */
2137721339
2137821340 /* Wake type */
2137921341 /* TODO: not yet finalized */
....@@ -21394,13 +21356,7 @@
2139421356 uint16 length; /* data length (starting after this field) */
2139521357 struct ether_addr peer; /* Peer address - leave it all 0s' for AP */
2139621358 uint8 pad[2];
21397
-#ifndef WL_TWT_SDESC_TYPEDEF_HAS_ALIAS /* Use either legacy structure or
21398
- * the new versioned structure
21399
- */
2140021359 wl_twt_sdesc_t desc; /* Setup Descriptor */
21401
-#else
21402
- struct wl_twt_sdesc_v1 desc;
21403
-#endif /* WL_TWT_SDESC_TYPEDEF_HAS_ALIAS */
2140421360 uint16 dialog; /* Deprecated - to be removed */
2140521361 uint8 pad1[2];
2140621362 } wl_twt_setup_t;
....@@ -21436,13 +21392,11 @@
2143621392 struct ether_addr peer; /* leave it all 0s' for AP */
2143721393 wl_twt_teardesc_t teardesc; /* Teardown descriptor */
2143821394
21439
- /* deprecated - to be removed - Start here */
21395
+ /* deprecated - to be removed */
2144021396 uint8 flow_flags;
2144121397 uint8 flow_id;
2144221398 uint8 bid;
21443
- /* deprecated - to be removed - End here */
21444
-
21445
- uint8 configID; /* TWT Configuration ID */
21399
+ uint8 pad;
2144621400 } wl_twt_teardown_t;
2144721401
2144821402 /* twt information descriptor */
....@@ -21476,8 +21430,7 @@
2147621430 uint16 length; /* data length (starting after this field) */
2147721431 /* peer address */
2147821432 struct ether_addr peer; /* leave it all 0s' for AP */
21479
- uint8 configID; /* TWT Configuration ID */
21480
- uint8 pad[1];
21433
+ uint8 pad[2];
2148121434 wl_twt_infodesc_t infodesc; /* information descriptor */
2148221435 /* deprecated - to be removed */
2148321436 wl_twt_idesc_t desc;
....@@ -21493,19 +21446,10 @@
2149321446 typedef struct wl_twt_status {
2149421447 uint8 state; /* TWT State */
2149521448 uint8 heb_id; /* HEB ID */
21496
- uint8 configID; /* TWT Configuration ID */
21497
- uint8 PAD[1];
21449
+ uint8 PAD[2];
2149821450 struct ether_addr peer;
2149921451 uint8 PAD[2];
21500
- uint32 avg_pkt_num; /* Average Packet number per TWT SP Interval */
21501
- uint32 avg_pkt_size; /* Average Packet size for TWT SP */
21502
-#ifndef WL_TWT_SDESC_TYPEDEF_HAS_ALIAS /* Use either legacy structure or
21503
- * the new versioned structure
21504
- */
21505
- wl_twt_sdesc_t desc; /* Setup Descriptor */
21506
-#else
21507
- struct wl_twt_sdesc_v1 desc;
21508
-#endif /* WL_TWT_SDESC_TYPEDEF_HAS_ALIAS */
21452
+ wl_twt_sdesc_t desc; /* TWT Descriptor */
2150921453 } wl_twt_status_t;
2151021454
2151121455 /* wl twt status output */
....@@ -21524,8 +21468,7 @@
2152421468 uint16 version;
2152521469 uint16 length;
2152621470 struct ether_addr peer;
21527
- uint8 configID;
21528
- uint8 PAD;
21471
+ uint8 PAD[2];
2152921472 } wl_twt_status_cmd_v1_t;
2153021473
2153121474 #define WL_TWT_PEER_STATS_VERSION_1 1u
....@@ -21558,40 +21501,6 @@
2155821501 wl_twt_peer_stats_v1_t peer_stats_list[];
2155921502 } wl_twt_stats_v1_t;
2156021503
21561
-#define WL_TWT_PEER_STATS_VERSION_2 2u
21562
-typedef struct wl_twt_peer_stats_v2 {
21563
- uint16 version;
21564
- uint16 length;
21565
- struct ether_addr peer;
21566
- uint8 id; /* TWT session ID */
21567
- uint8 flow_flags;
21568
- uint8 configID; /* TWT Configuration ID */
21569
- uint8 PAD[3];
21570
- uint32 sp_seq; /* sequence number of the service period */
21571
- uint32 tx_ucast_pkts; /* Number of unicast Tx packets in TWT SPs */
21572
- uint32 tx_pkts_min; /* Minimum number of Tx packets in a TWT SP */
21573
- uint32 tx_pkts_max; /* Maximum number of Tx packets in a TWT SP */
21574
- uint32 tx_pkts_avg; /* Average number of Tx packets in each TWT SP */
21575
- uint32 tx_failures; /* Tx packets failure count */
21576
- uint32 rx_ucast_pkts; /* Number of unicast Rx packets in TWT SPs */
21577
- uint32 rx_pkts_min; /* Minimum number of Rx packets in a TWT SP */
21578
- uint32 rx_pkts_max; /* Maximum number of Rx packets in a TWT SP */
21579
- uint32 rx_pkts_avg; /* Average number of Rx packets in each TWT SP */
21580
- uint32 rx_pkts_retried; /* retried Rx packets count */
21581
- uint32 tx_pkt_sz_avg; /* Average Tx packet size in TWT SPs */
21582
- uint32 rx_pkt_sz_avg; /* Average Rx Packet size in TWT SPs */
21583
- uint32 eosp_dur_avg; /* Average Wake duration in SPs ended due to EOSP */
21584
- uint32 eosp_count; /* Count of TWT SPs ended due to EOSP */
21585
-} wl_twt_peer_stats_v2_t;
21586
-
21587
-#define WL_TWT_STATS_VERSION_2 2u
21588
-typedef struct wl_twt_stats_v2 {
21589
- uint16 version;
21590
- uint16 length;
21591
- uint32 num_stats; /* number of peer stats in the peer_stats_list */
21592
- wl_twt_peer_stats_v2_t peer_stats_list[];
21593
-} wl_twt_stats_v2_t;
21594
-
2159521504 #define WL_TWT_STATS_CMD_VERSION_1 1
2159621505 #define WL_TWT_STATS_CMD_FLAGS_RESET (1u << 0u)
2159721506 /* HE TWT stats command */
....@@ -21599,8 +21508,7 @@
2159921508 uint16 version;
2160021509 uint16 length;
2160121510 struct ether_addr peer;
21602
- uint8 configID; /* TWT Configuration ID */
21603
- uint8 PAD;
21511
+ uint8 PAD[2];
2160421512 uint16 flags; /* see WL_TWT_STATS_CMD_FLAGS */
2160521513 uint8 num_fid;
2160621514 uint8 num_bid;