From bedbef8ad3e75a304af6361af235302bcc61d06b Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Tue, 14 May 2024 06:39:01 +0000 Subject: [PATCH] 修改内核路径 --- kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/wlioctl.h | 148 +++++++++---------------------------------------- 1 files changed, 28 insertions(+), 120 deletions(-) diff --git a/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/wlioctl.h b/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/wlioctl.h old mode 100644 new mode 100755 index 72c9d9f..97f0148 --- a/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/wlioctl.h +++ b/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/wlioctl.h @@ -713,7 +713,7 @@ #define WL_SCAN_PARAMS_SSID_MAX 10 -typedef struct wl_scan_params_v1 { +struct wl_scan_params { wlc_ssid_t ssid; /**< default: {0, ""} */ struct ether_addr bssid; /**< default: bcast */ int8 bss_type; /**< default: any, @@ -744,13 +744,8 @@ * parameter portion is assumed, otherwise ssid in * the fixed portion is ignored */ - uint16 channel_list[BCM_FLEX_ARRAY]; -} wl_scan_params_v1_t; - -/** size of wl_scan_params_v1 not including variable length array */ -#define WL_SCAN_PARAMS_V1_FIXED_SIZE (OFFSETOF(wl_scan_params_v1_t, channel_list)) -#define WL_MAX_ROAMSCAN_V1_DATSZ \ - (WL_SCAN_PARAMS_V1_FIXED_SIZE + (WL_NUMCHANNELS * sizeof(uint16))) + uint16 channel_list[1]; /**< list of chanspecs */ +}; /* changes in wl_scan_params_v2 as comapred to wl_scan_params (v1) * unit8 scantype to uint32 @@ -862,16 +857,16 @@ #define WL_MAX_ROAMSCAN_V3_DATSZ \ (WL_SCAN_PARAMS_V3_FIXED_SIZE + (WL_NUMCHANNELS * sizeof(uint16))) -#define ISCAN_REQ_VERSION_V1 1 +#define ISCAN_REQ_VERSION 1 #define ISCAN_REQ_VERSION_V2 2 /** incremental scan struct */ -typedef struct wl_iscan_params_v1 { +struct wl_iscan_params { uint32 version; uint16 action; uint16 scan_duration; - struct wl_scan_params_v1 params; -} wl_iscan_params_v1_t; + struct wl_scan_params params; +}; /** incremental scan struct */ typedef struct wl_iscan_params_v2 { @@ -900,9 +895,8 @@ uint32 buflen; uint32 version; uint32 count; - wl_bss_info_v109_t bss_info[BCM_FLEX_ARRAY]; + wl_bss_info_v109_t bss_info[1]; } wl_scan_results_v109_t; -#define WL_SCAN_RESULTS_V109_FIXED_SIZE (OFFSETOF(wl_scan_results_v109_t, bss_info)) typedef struct wl_scan_results_v2 { uint32 buflen; @@ -926,15 +920,15 @@ } iscan_buf_t; #endif /* SIMPLE_ISCAN */ #define ESCAN_REQ_VERSION 1 -#define ESCAN_REQ_VERSION_V1 1 #define ESCAN_REQ_VERSION_V2 2 -typedef struct wl_escan_params_v1 { +/** event scan reduces amount of SOC memory needed to store scan results */ +struct wl_escan_params { uint32 version; uint16 action; uint16 sync_id; - struct wl_scan_params_v1 params; -} wl_escan_params_v1_t; + struct wl_scan_params params; +}; typedef struct wl_escan_params_v2 { uint32 version; @@ -950,7 +944,7 @@ wl_scan_params_v3_t params; } wl_escan_params_v3_t; -#define WL_ESCAN_PARAMS_V1_FIXED_SIZE (OFFSETOF(wl_escan_params_v1_t, params) + sizeof(wlc_ssid_t)) +#define WL_ESCAN_PARAMS_FIXED_SIZE (OFFSETOF(wl_escan_params_t, params) + sizeof(wlc_ssid_t)) #define WL_ESCAN_PARAMS_V2_FIXED_SIZE (OFFSETOF(wl_escan_params_v2_t, params) + sizeof(wlc_ssid_t)) #define WL_ESCAN_PARAMS_V3_FIXED_SIZE (OFFSETOF(wl_escan_params_v3_t, params) + sizeof(wlc_ssid_t)) /* New scan version is defined then change old version of scan to @@ -973,9 +967,9 @@ typedef struct wl_iscan_params_v2 wl_iscan_params_t; #define WL_SCAN_PARAMS_FIXED_SIZE (OFFSETOF(wl_scan_params_t, channel_list)) #else -typedef struct wl_scan_params_v1 wl_scan_params_t; -typedef struct wl_escan_params_v1 wl_escan_params_t; -typedef struct wl_iscan_params_v1 wl_iscan_params_t; +typedef struct wl_scan_params wl_scan_params_t; +typedef struct wl_escan_params wl_escan_params_t; +typedef struct wl_iscan_params wl_iscan_params_t; #define WL_SCAN_PARAMS_FIXED_SIZE 64 #endif /* WL_SCAN_PARAMS_V3 */ @@ -985,9 +979,8 @@ uint32 version; uint16 sync_id; uint16 bss_count; - wl_bss_info_v109_t bss_info[BCM_FLEX_ARRAY]; + wl_bss_info_v109_t bss_info[1]; } wl_escan_result_v109_t; -#define WL_ESCAN_RESULTS_V109_FIXED_SIZE (OFFSETOF(wl_escan_result_v109_t, bss_info)) /** event scan reduces amount of SOC memory needed to store scan results */ typedef struct wl_escan_result_v2 { @@ -2313,7 +2306,6 @@ #define WL_STA_VER_4 4 #define WL_STA_VER_5 5 -#define WL_STA_VER_6 6u /* FIXME: the user/branch should make the selection! */ #define WL_STA_VER WL_STA_VER_4 @@ -6238,15 +6230,6 @@ #define WL_ICMP_CFG_IPV6_LEN(count) (WL_ICMP_CFG_IPV6_FIXED_LEN + \ ((count) * sizeof(struct ipv6_addr))) -typedef struct wl_mkeep_alive_pkt_v1 { - uint16 version; /* Version for mkeep_alive */ - uint16 length; /* length of fixed parameters in the structure */ - uint32 period_msec; /* high bit on means immediate send */ - uint16 len_bytes; - uint8 keep_alive_id; /* 0 - 3 for N = 4 */ - uint8 data[BCM_FLEX_ARRAY]; -} wl_mkeep_alive_pkt_v1_t; - typedef struct wl_mkeep_alive_pkt { uint16 version; /* Version for mkeep_alive */ uint16 length; /* length of fixed parameters in the structure */ @@ -6256,7 +6239,6 @@ uint8 data[1]; } wl_mkeep_alive_pkt_t; -#define WL_MKEEP_ALIVE_VERSION_1 1u #define WL_MKEEP_ALIVE_VERSION 1 #define WL_MKEEP_ALIVE_FIXED_LEN OFFSETOF(wl_mkeep_alive_pkt_t, data) /* 1/2 second precision since idle time is a seconds counter anyway */ @@ -21245,13 +21227,6 @@ */ /* TWT Setup descriptor */ - -/* Any change to wl_twt_sdesc is not possible without affecting this ROMed structure - * in various current branches. Hence to use new updated structure wl_twt_sdesc_v1 - * typecast it to wl_twt_sdesc_t and define WL_TWT_SDESC_TYPEDEF_HAS_ALIAS - * in required branches - */ -#ifndef WL_TWT_SDESC_TYPEDEF_HAS_ALIAS typedef struct wl_twt_sdesc { /* Setup Command. */ uint8 setup_cmd; /* See TWT_SETUP_CMD_XXXX in 802.11ah.h */ @@ -21273,7 +21248,6 @@ /* deprecated - to be removed */ uint16 li; } wl_twt_sdesc_t; -#endif /* WL_TWT_SDESC_TYPEDEF_HAS_ALIAS */ #define WL_TWT_SETUP_DESC_VER 1u @@ -21309,9 +21283,7 @@ uint16 version; /* structure version */ uint16 length; /* data length (starting after this field) */ uint8 negotiation_type; /* Negotiation Type: See macros TWT_NEGO_TYPE_X */ - uint8 configID; /* TWT Configuration ID */ - uint8 flow_flags; /* Flow Flags Configuration. See WL_TWT_FLOW_FLAG_XXXX */ - uint8 PAD; + uint8 PAD[3]; uint32 wake_time_h; /* target wake time - BSS TSF (us) */ uint32 wake_time_l; uint32 wake_dur; /* target wake duration in unit of microseconds */ @@ -21321,7 +21293,6 @@ uint32 wake_dur_min; /* Min. wake duration allowed for TWT Setup */ uint32 wake_dur_max; /* Max. wake duration allowed for TWT Setup */ uint32 avg_pkt_num; /* Average Number of Packets per interval */ - uint32 avg_pkt_size; /* Average packet size for TWT SP */ } wl_twt_cdesc_t; /* Flow flags */ @@ -21345,14 +21316,6 @@ #define WL_TWT_INV_BCAST_ID 0xFFu #define WL_TWT_INV_FLOW_ID 0xFFu -#define WL_TWT_INV_CONFIG_ID 0xFFu -#define WL_TWT_ALL_TWT_CONFIG_ID 0u /* ConfigID 0 corresponds to All TWT */ - -#define WL_TWT_INV_WAKE_DUR 0xFFFFFFFFu -#define WL_TWT_INV_WAKE_INT 0xFFFFFFFFu -#define WL_TWT_INV_PKT_NUM 0xFFFFFFFFu -#define WL_TWT_INV_PKT_SIZE 0xFFFFFFFFu -#define WL_TWT_INV_WAKE_TIME 0xFFFFFFFFu /* auto flow_id */ #define WL_TWT_SETUP_FLOW_ID_AUTO 0xFFu @@ -21369,11 +21332,10 @@ #define WL_TWT_STATS_MAX_BTWT WL_TWT_MAX_BTWT #define WL_TWT_STATS_MAX_ITWT WL_TWT_MAX_ITWT -/* TWT States */ #define WL_TWT_INACTIVE 0u /* Resource is not allotted */ -#define WL_TWT_ACTIVE 1u /* Resource is allotted and HEB is programmed */ -#define WL_TWT_SUSPEND 2u /* Resource is suspended and HEB released */ -#define WL_TWT_RESERVED 3u /* Resource is allotted but HEB is not yet programmed */ +#define WL_TWT_RESERVED 1u /* Resource is allotted but HEB is not yet programmed */ +#define WL_TWT_ACTIVE 2u /* Resource is allotted and HEB is programmed */ +#define WL_TWT_SUSPEND 3u /* Resource is suspended and HEB released */ /* Wake type */ /* TODO: not yet finalized */ @@ -21394,13 +21356,7 @@ uint16 length; /* data length (starting after this field) */ struct ether_addr peer; /* Peer address - leave it all 0s' for AP */ uint8 pad[2]; -#ifndef WL_TWT_SDESC_TYPEDEF_HAS_ALIAS /* Use either legacy structure or - * the new versioned structure - */ wl_twt_sdesc_t desc; /* Setup Descriptor */ -#else - struct wl_twt_sdesc_v1 desc; -#endif /* WL_TWT_SDESC_TYPEDEF_HAS_ALIAS */ uint16 dialog; /* Deprecated - to be removed */ uint8 pad1[2]; } wl_twt_setup_t; @@ -21436,13 +21392,11 @@ struct ether_addr peer; /* leave it all 0s' for AP */ wl_twt_teardesc_t teardesc; /* Teardown descriptor */ - /* deprecated - to be removed - Start here */ + /* deprecated - to be removed */ uint8 flow_flags; uint8 flow_id; uint8 bid; - /* deprecated - to be removed - End here */ - - uint8 configID; /* TWT Configuration ID */ + uint8 pad; } wl_twt_teardown_t; /* twt information descriptor */ @@ -21476,8 +21430,7 @@ uint16 length; /* data length (starting after this field) */ /* peer address */ struct ether_addr peer; /* leave it all 0s' for AP */ - uint8 configID; /* TWT Configuration ID */ - uint8 pad[1]; + uint8 pad[2]; wl_twt_infodesc_t infodesc; /* information descriptor */ /* deprecated - to be removed */ wl_twt_idesc_t desc; @@ -21493,19 +21446,10 @@ typedef struct wl_twt_status { uint8 state; /* TWT State */ uint8 heb_id; /* HEB ID */ - uint8 configID; /* TWT Configuration ID */ - uint8 PAD[1]; + uint8 PAD[2]; struct ether_addr peer; uint8 PAD[2]; - uint32 avg_pkt_num; /* Average Packet number per TWT SP Interval */ - uint32 avg_pkt_size; /* Average Packet size for TWT SP */ -#ifndef WL_TWT_SDESC_TYPEDEF_HAS_ALIAS /* Use either legacy structure or - * the new versioned structure - */ - wl_twt_sdesc_t desc; /* Setup Descriptor */ -#else - struct wl_twt_sdesc_v1 desc; -#endif /* WL_TWT_SDESC_TYPEDEF_HAS_ALIAS */ + wl_twt_sdesc_t desc; /* TWT Descriptor */ } wl_twt_status_t; /* wl twt status output */ @@ -21524,8 +21468,7 @@ uint16 version; uint16 length; struct ether_addr peer; - uint8 configID; - uint8 PAD; + uint8 PAD[2]; } wl_twt_status_cmd_v1_t; #define WL_TWT_PEER_STATS_VERSION_1 1u @@ -21558,40 +21501,6 @@ wl_twt_peer_stats_v1_t peer_stats_list[]; } wl_twt_stats_v1_t; -#define WL_TWT_PEER_STATS_VERSION_2 2u -typedef struct wl_twt_peer_stats_v2 { - uint16 version; - uint16 length; - struct ether_addr peer; - uint8 id; /* TWT session ID */ - uint8 flow_flags; - uint8 configID; /* TWT Configuration ID */ - uint8 PAD[3]; - uint32 sp_seq; /* sequence number of the service period */ - uint32 tx_ucast_pkts; /* Number of unicast Tx packets in TWT SPs */ - uint32 tx_pkts_min; /* Minimum number of Tx packets in a TWT SP */ - uint32 tx_pkts_max; /* Maximum number of Tx packets in a TWT SP */ - uint32 tx_pkts_avg; /* Average number of Tx packets in each TWT SP */ - uint32 tx_failures; /* Tx packets failure count */ - uint32 rx_ucast_pkts; /* Number of unicast Rx packets in TWT SPs */ - uint32 rx_pkts_min; /* Minimum number of Rx packets in a TWT SP */ - uint32 rx_pkts_max; /* Maximum number of Rx packets in a TWT SP */ - uint32 rx_pkts_avg; /* Average number of Rx packets in each TWT SP */ - uint32 rx_pkts_retried; /* retried Rx packets count */ - uint32 tx_pkt_sz_avg; /* Average Tx packet size in TWT SPs */ - uint32 rx_pkt_sz_avg; /* Average Rx Packet size in TWT SPs */ - uint32 eosp_dur_avg; /* Average Wake duration in SPs ended due to EOSP */ - uint32 eosp_count; /* Count of TWT SPs ended due to EOSP */ -} wl_twt_peer_stats_v2_t; - -#define WL_TWT_STATS_VERSION_2 2u -typedef struct wl_twt_stats_v2 { - uint16 version; - uint16 length; - uint32 num_stats; /* number of peer stats in the peer_stats_list */ - wl_twt_peer_stats_v2_t peer_stats_list[]; -} wl_twt_stats_v2_t; - #define WL_TWT_STATS_CMD_VERSION_1 1 #define WL_TWT_STATS_CMD_FLAGS_RESET (1u << 0u) /* HE TWT stats command */ @@ -21599,8 +21508,7 @@ uint16 version; uint16 length; struct ether_addr peer; - uint8 configID; /* TWT Configuration ID */ - uint8 PAD; + uint8 PAD[2]; uint16 flags; /* see WL_TWT_STATS_CMD_FLAGS */ uint8 num_fid; uint8 num_bid; -- Gitblit v1.6.2