7#ifndef __OAL_NET_CFG80211_HCM_H__
8#define __OAL_NET_CFG80211_HCM_H__
10#if defined(_PRE_OS_VERSION_LINUX) && defined(_PRE_OS_VERSION) && (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
11#include <net/iw_handler.h>
12#include <net/rtnetlink.h>
13#include <net/netlink.h>
14#include <net/sch_generic.h>
15#include <net/ip6_checksum.h>
18#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0))
22#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34))
23#include <net/cfg80211.h>
25#include <net/wireless.h>
27#include <../net/wireless/nl80211.h>
29#include <linux/version.h>
30#include <linux/netdevice.h>
32#include <linux/etherdevice.h>
33#include <linux/wireless.h>
34#include <linux/socket.h>
35#include <linux/if_vlan.h>
36#include <linux/if_ether.h>
38#include <linux/rtnetlink.h>
39#include <linux/netfilter_bridge.h>
40#include <linux/if_arp.h>
43#include <linux/icmpv6.h>
44#include <linux/ipv6.h>
45#include <linux/inet.h>
46#include <linux/nl80211.h>
47#include <linux/ieee80211.h>
49#if defined(_PRE_OS_VERSION_LITEOS) && defined(_PRE_OS_VERSION) && (_PRE_OS_VERSION_LITEOS == _PRE_OS_VERSION)
50#include "lwip/netif.h"
51#include "oal_skbuff.h"
63#define OAL_MAC_ADDR_LEN 6
64#define OAL_IF_NAME_SIZE 16
65#define OAL_IEEE80211_MAX_SSID_LEN 32
66#define OAL_NL80211_MAX_NR_CIPHER_SUITES 5
67#define BSS_MEMBERSHIP_SELECTOR_SAE_H2E_ONLY 123
68#define MAX_STA_NUM_OF_ONE_GROUP 8
69#define MAX_NUM_OF_GROUP 8
77#if defined(_PRE_OS_VERSION_LITEOS) && defined(_PRE_OS_VERSION) && (_PRE_OS_VERSION_LITEOS == _PRE_OS_VERSION)
81#define IEEE80211_HT_MCS_MASK_LEN 10
82#define OAL_NL80211_MAX_NR_AKM_SUITES 2
83#define OAL_WLAN_SA_QUERY_TR_ID_LEN 2
84#ifdef _PRE_WLAN_FEATURE_015CHANNEL_EXP
85#define OAL_MAX_SCAN_CHANNELS 16
87#define OAL_MAX_SCAN_CHANNELS 14
89#define WLAN_SA_QUERY_TR_ID_LEN 2
90#define NL80211_RRF_NO_OFDM (1<<0)
91#define NL80211_RRF_DFS (1<<4)
92#define NL80211_RRF_NO_OUTDOOR (1<<3)
94typedef td_u8 oal_nl80211_channel_type_uint8;
95typedef td_u8 nl80211_iftype_uint8;
96typedef td_u8 cfg80211_signal_type_uint8;
97typedef td_u8 oal_ieee80211_band_enum_uint8;
107 IEEE80211_BAND_2GHZ = NL80211_BAND_2GHZ,
108 IEEE80211_BAND_5GHZ = NL80211_BAND_5GHZ,
114#define OAL_IEEE80211_BAND_2GHZ IEEE80211_BAND_2GHZ
115#define OAL_IEEE80211_BAND_5GHZ IEEE80211_BAND_5GHZ
116#define OAL_IEEE80211_NUM_BANDS IEEE80211_NUM_BANDS
118enum nl80211_channel_type {
121 NL80211_CHAN_HT40MINUS,
122 NL80211_CHAN_HT40PLUS
124typedef enum nl80211_channel_type oal_nl80211_channel_type;
126enum nl80211_key_type {
127 NL80211_KEYTYPE_GROUP,
128 NL80211_KEYTYPE_PAIRWISE,
129 NL80211_KEYTYPE_PEERKEY,
132typedef enum nl80211_key_type oal_nl80211_key_type;
135 NL80211_IFTYPE_UNSPECIFIED,
136 NL80211_IFTYPE_ADHOC,
137 NL80211_IFTYPE_STATION,
139 NL80211_IFTYPE_AP_VLAN,
141 NL80211_IFTYPE_MONITOR,
142 NL80211_IFTYPE_MESH_POINT,
143 NL80211_IFTYPE_P2P_CLIENT,
144 NL80211_IFTYPE_P2P_GO,
145 NL80211_IFTYPE_P2P_DEVICE,
148 NL80211_IFTYPE_MAX = NUM_NL80211_IFTYPES - 1
151enum cfg80211_signal_type {
152 CFG80211_SIGNAL_TYPE_NONE,
153 CFG80211_SIGNAL_TYPE_MBM,
154 CFG80211_SIGNAL_TYPE_UNSPEC,
157enum station_info_flags {
158 STATION_INFO_INACTIVE_TIME = 1 << 0,
159 STATION_INFO_RX_BYTES = 1 << 1,
160 STATION_INFO_TX_BYTES = 1 << 2,
161 STATION_INFO_LLID = 1 << 3,
162 STATION_INFO_PLID = 1 << 4,
163 STATION_INFO_PLINK_STATE = 1 << 5,
164 STATION_INFO_SIGNAL = 1 << 6,
165 STATION_INFO_TX_BITRATE = 1 << 7,
166 STATION_INFO_RX_PACKETS = 1 << 8,
167 STATION_INFO_TX_PACKETS = 1 << 9,
168 STATION_INFO_TX_RETRIES = 1 << 10,
169 STATION_INFO_TX_FAILED = 1 << 11,
170 STATION_INFO_RX_DROP_MISC = 1 << 12,
171 STATION_INFO_SIGNAL_AVG = 1 << 13,
172 STATION_INFO_RX_BITRATE = 1 << 14,
173 STATION_INFO_BSS_PARAM = 1 << 15,
174 STATION_INFO_CONNECTED_TIME = 1 << 16,
175 STATION_INFO_ASSOC_REQ_IES = 1 << 17,
176 STATION_INFO_STA_FLAGS = 1 << 18,
177 STATION_INFO_BEACON_LOSS_COUNT = 1 << 19,
178 STATION_INFO_T_OFFSET = 1 << 20,
179 STATION_INFO_LOCAL_PM = 1 << 21,
180 STATION_INFO_PEER_PM = 1 << 22,
181 STATION_INFO_NONPEER_PM = 1 << 23,
182 STATION_INFO_RX_BYTES64 = 1 << 24,
183 STATION_INFO_TX_BYTES64 = 1 << 25,
187typedef enum nl80211_auth_type {
188 NL80211_AUTHTYPE_OPEN_SYSTEM,
189 NL80211_AUTHTYPE_SHARED_KEY,
191 NL80211_AUTHTYPE_SAE,
192 NL80211_AUTHTYPE_NETWORK_EAP,
194 NL80211_AUTHTYPE_AUTOMATIC
195} oal_nl80211_auth_type_enum;
196typedef td_u8 oal_nl80211_auth_type_enum_uint8;
198enum nl80211_sae_pwe_mechanism {
199 NL80211_SAE_PWE_UNSPECIFIED,
200 NL80211_SAE_PWE_HUNT_AND_PECK,
201 NL80211_SAE_PWE_HASH_TO_ELEMENT,
202 NL80211_SAE_PWE_BOTH,
205enum nl80211_hidden_ssid {
206 NL80211_HIDDEN_SSID_NOT_IN_USE,
207 NL80211_HIDDEN_SSID_ZERO_LEN,
208 NL80211_HIDDEN_SSID_ZERO_CONTENTS
214typedef enum nl80211_mfp {
216 NL80211_MFP_REQUIRED,
217} oal_nl80211_mfp_enum;
218typedef td_u8 oal_nl80211_mfp_enum_uint8;
220enum nl80211_acl_policy {
221 NL80211_ACL_POLICY_ACCEPT_UNLESS_LISTED,
222 NL80211_ACL_POLICY_DENY_UNLESS_LISTED,
226 WIPHY_FLAG_CUSTOM_REGULATORY =
bit(0),
227 WIPHY_FLAG_STRICT_REGULATORY =
bit(1),
228 WIPHY_FLAG_DISABLE_BEACON_HINTS =
bit(2),
229 WIPHY_FLAG_NETNS_OK =
bit(3),
230 WIPHY_FLAG_PS_ON_BY_DEFAULT =
bit(4),
231 WIPHY_FLAG_4ADDR_AP =
bit(5),
232 WIPHY_FLAG_4ADDR_STATION =
bit(6),
233 WIPHY_FLAG_CONTROL_PORT_PROTOCOL =
bit(7),
234 WIPHY_FLAG_IBSS_RSN =
bit(8),
235 WIPHY_FLAG_MESH_AUTH =
bit(10),
236 WIPHY_FLAG_SUPPORTS_SCHED_SCAN =
bit(11),
238 WIPHY_FLAG_SUPPORTS_FW_ROAM =
bit(13),
239 WIPHY_FLAG_AP_UAPSD =
bit(14),
240 WIPHY_FLAG_SUPPORTS_TDLS =
bit(15),
241 WIPHY_FLAG_TDLS_EXTERNAL_SETUP =
bit(16),
242 WIPHY_FLAG_HAVE_AP_SME =
bit(17),
243 WIPHY_FLAG_REPORTS_OBSS =
bit(18),
244 WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD =
bit(19),
245 WIPHY_FLAG_OFFCHAN_TX =
bit(20),
246 WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL =
bit(21),
249enum nl80211_mesh_power_mode {
250 NL80211_MESH_POWER_UNKNOWN,
251 NL80211_MESH_POWER_ACTIVE,
252 NL80211_MESH_POWER_LIGHT_SLEEP,
253 NL80211_MESH_POWER_DEEP_SLEEP,
255 __NL80211_MESH_POWER_AFTER_LAST,
256 NL80211_MESH_POWER_MAX = __NL80211_MESH_POWER_AFTER_LAST - 1
259enum rate_info_flags {
260 RATE_INFO_FLAGS_MCS =
bit(0),
261 RATE_INFO_FLAGS_VHT_MCS =
bit(1),
262 RATE_INFO_FLAGS_40_MHZ_WIDTH =
bit(2),
263 RATE_INFO_FLAGS_80_MHZ_WIDTH =
bit(3),
264 RATE_INFO_FLAGS_80P80_MHZ_WIDTH =
bit(4),
265 RATE_INFO_FLAGS_160_MHZ_WIDTH =
bit(5),
266 RATE_INFO_FLAGS_SHORT_GI =
bit(6),
267 RATE_INFO_FLAGS_60G =
bit(7),
293} oal_iw_request_info_stru;
320} oal_iw_quality_stru;
327typedef struct netif oal_lwip_netif;
328struct ieee80211_mcs_info {
335struct ieee80211_freq_range {
341struct ieee80211_power_rule {
346struct ieee80211_reg_rule {
347 struct ieee80211_freq_range freq_range;
348 struct ieee80211_power_rule power_rule;
352struct ieee80211_msrment_ie {
359struct ieee80211_ext_chansw_ie {
361 td_u8 new_operating_class;
366struct callback_head {
367 struct callback_head *next;
368 td_void (*func)(
struct callback_head *head);
371#define RCU_HEAD callback_head
373struct ieee80211_regdomain {
374 struct RCU_HEAD RCU_HEAD;
378 struct ieee80211_reg_rule reg_rules[];
381typedef struct ieee80211_regdomain oal_ieee80211_regdomain_stru;
383typedef struct oal_cfg80211_ssid_tag {
387} oal_cfg80211_ssid_stru;
390typedef struct ieee80211_channel {
391 oal_ieee80211_band_enum_uint8 band;
402} oal_ieee80211_channel_stru;
403typedef struct ieee80211_channel oal_ieee80211_channel;
405typedef struct oal_cfg80211_crypto_settings_tag {
408 td_s32 n_ciphers_pairwise;
412 enum nl80211_sae_pwe_mechanism sae_pwe;
416} oal_cfg80211_crypto_settings_stru;
418typedef struct cfg80211_add_key_info_stru {
421}cfg80211_add_key_info_stru;
423typedef struct cfg80211_get_key_info_stru {
427 const td_u8 *mac_addr;
428}cfg80211_get_key_info_stru;
442typedef struct oal_app_ie oal_app_ie_stru;
446} oal_iw_statistics_stru;
451 oal_iw_point_stru essid;
452 oal_iw_param_stru nwid;
453 oal_iw_freq_stru freq;
454 oal_iw_param_stru sens;
455 oal_iw_param_stru bitrate;
456 oal_iw_param_stru txpower;
457 oal_iw_param_stru rts;
458 oal_iw_param_stru frag;
460 oal_iw_param_stru retry;
461 oal_iw_point_stru encoding;
462 oal_iw_param_stru power;
463 oal_iw_quality_stru qual;
464 oal_sockaddr_stru ap_addr;
465 oal_sockaddr_stru addr;
466 oal_iw_param_stru param;
467 oal_iw_point_stru
data;
468} oal_iwreq_data_union;
470struct oal_net_device;
471typedef td_u32 (*oal_iw_handler)(
struct oal_net_device* dev, oal_iw_request_info_stru* info,
472 oal_iwreq_data_union* wrqu,
td_s8* extra);
480} oal_iw_priv_args_stru;
483 const oal_iw_handler* standard;
488 const oal_iw_handler*
private;
493 const oal_iw_handler* private_win32;
495 const oal_iw_priv_args_stru* private_args;
496 oal_iw_statistics_stru* (*get_wireless_stats)(
struct oal_net_device* dev);
497} oal_iw_handler_def_stru;
499typedef struct _oal_ext_eapol_stru {
532 td_u32 tx_heartbeat_errors;
538} oal_net_device_stats_stru;
541typedef struct oal_net_device {
544 struct oal_net_device_ops* netdev_ops;
547 oal_iw_handler_def_stru* wireless_handlers;
556 struct oal_net_device* master;
557 struct wireless_dev* ieee80211_ptr;
558 oal_qdisc_stru* qdisc;
563 oal_net_device_stats_stru stats;
565 td_void (*destructor)(
struct oal_net_device*);
568 oal_ext_eapol_stru ext_eapol;
569 oal_lwip_netif* lwip_netif;
570#ifdef _PRE_WLAN_FEATURE_VLWIP
571 oal_lwip_netif* vlwip_netif;
573#ifdef _PRE_WLAN_LWIP_PAYLOAD_COPY_TRANS
576} oal_net_device_stru;
578typedef struct oal_net_notify {
581} oal_net_notify_stru;
584typedef struct ifreq oal_ifreq_stru;
586typedef struct oal_net_device_ops {
587 td_s32 (*ndo_init)(oal_net_device_stru*);
588 td_s32 (*ndo_open)(
struct oal_net_device*);
589 td_s32 (*ndo_stop)(
struct oal_net_device*);
591 td_void (*ndo_set_multicast_list)(
struct oal_net_device*);
592 oal_net_device_stats_stru* (*ndo_get_stats)(oal_net_device_stru*);
593 td_s32 (*ndo_do_ioctl)(
struct oal_net_device*, oal_ifreq_stru*,
td_s32);
594 td_s32 (*ndo_change_mtu)(
struct oal_net_device*,
td_s32);
595 td_s32 (*ndo_set_mac_address)(
struct oal_net_device*, oal_sockaddr_stru*);
597 td_s32 (*ndo_netif_notify)(oal_net_device_stru*, oal_net_notify_stru*);
598} oal_net_device_ops_stru;
601typedef struct ieee80211_rate {
609typedef struct ieee80211_sta_ht_cap {
615 struct ieee80211_mcs_info mcs;
616} oal_ieee80211_sta_ht_cap;
618typedef struct ieee80211_supported_band {
619 oal_ieee80211_channel* channels;
620 oal_ieee80211_rate* bitrates;
621 oal_ieee80211_band_enum_uint8 band;
624 oal_ieee80211_sta_ht_cap ht_cap;
625} oal_ieee80211_supported_band;
627typedef struct oal_wiphy_tag {
628 oal_ieee80211_supported_band* bands[IEEE80211_NUM_BANDS];
632typedef struct cfg80211_chan_def {
633 oal_ieee80211_channel* chan;
634 oal_nl80211_channel_type width;
637} oal_cfg80211_chan_def;
639typedef struct cfg80211_pmksa oal_cfg80211_pmksa_stru;
641typedef struct oal_key_params_tag {
647} oal_key_params_stru;
649typedef struct oal_cfg80211_scan_request_tag {
650 oal_cfg80211_ssid_stru* ssids;
656 oal_net_device_stru* dev;
657 struct wireless_dev* wdev;
660 td_u8 prefix_ssid_scan_flag;
661#if defined(_PRE_WLAN_FEATURE_WS92_MERGE) && defined(_PRE_WLAN_FEATURE_ACS)
670 oal_ieee80211_channel_stru* channels[OAL_MAX_SCAN_CHANNELS];
671} oal_cfg80211_scan_request_stru;
673typedef struct cfg80211_sched_scan_request {
674 struct cfg80211_ssid* ssids;
681 struct cfg80211_match_set* match_sets;
688 struct oal_net_device_stru* dev;
691 struct ieee80211_channel* channels[0];
692} oal_cfg80211_sched_scan_request_stru;
694typedef struct oal_cfg80211_connect_params_tag {
695 oal_ieee80211_channel_stru* channel;
703 oal_cfg80211_crypto_settings_stru crypto;
706 oal_nl80211_auth_type_enum_uint8 auth_type;
710 oal_nl80211_mfp_enum_uint8 mfp;
712} oal_cfg80211_connect_params_stru;
714typedef struct ieee80211_mgmt {
744 } assoc_resp, reassoc_resp;
786 struct ieee80211_ext_chansw_ie
data;
794 struct ieee80211_msrment_ie msr_elem;
826 td_u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];
841 } tdls_discover_resp;
844 td_u8 operating_mode;
849} oal_ieee80211_mgmt_stru;
851struct cfg80211_crypto_settings {
854 td_s32 n_ciphers_pairwise;
858 td_u16 control_port_ethertype;
860 td_bool control_port_no_encrypt;
863struct ieee80211_vht_mcs_info {
870typedef struct cfg80211_bss oal_cfg80211_bss_stru;
872typedef struct rate_info {
880typedef struct vif_params {
883} oal_vif_params_stru;
885typedef struct cfg80211_update_ft_ies_params {
889} oal_cfg80211_update_ft_ies_stru;
891typedef struct cfg80211_ft_event_params {
896 const td_u8 *ric_ies;
898} oal_cfg80211_ft_event_stru;
901typedef struct cfg80211_beacon_data {
904 const td_u8 *beacon_ies;
905 const td_u8 *proberesp_ies;
906 const td_u8 *assocresp_ies;
907 const td_u8 *probe_resp;
909 size_t head_len, tail_len;
910 size_t beacon_ies_len;
911 size_t proberesp_ies_len;
912 size_t assocresp_ies_len;
913 size_t probe_resp_len;
914} oal_beacon_data_stru;
916struct oal_mac_address {
920struct cfg80211_acl_data {
921 enum nl80211_acl_policy acl_policy;
925 struct oal_mac_address mac_addrs[];
928typedef struct cfg80211_ap_settings {
929 struct cfg80211_chan_def chandef;
930 struct cfg80211_beacon_data beacon;
937 enum nl80211_hidden_ssid hidden_ssid;
938 enum nl80211_auth_type auth_type;
939 enum nl80211_sae_pwe_mechanism sae_pwe;
940 struct cfg80211_crypto_settings crypto;
942 td_s32 inactivity_timeout;
948 const struct cfg80211_acl_data* acl;
949} oal_ap_settings_stru;
951typedef struct bss_parameters {
953 td_s32 use_short_preamble;
954 td_s32 use_short_slot_time;
955 const td_u8 *basic_rates;
956 td_u8 basic_rates_len;
963struct beacon_parameters {
965 td_s32 interval, dtim_period;
966 td_s32 head_len, tail_len;
968typedef struct beacon_parameters oal_beacon_parameters;
969typedef struct ieee80211_mgmt oal_ieee80211_mgmt;
972#if defined(_PRE_OS_VERSION_LITEOS) && defined(_PRE_OS_VERSION) && (_PRE_OS_VERSION_LITEOS == _PRE_OS_VERSION)
973#ifndef _PRE_WLAN_FEATURE_MFG_ONLY
974typedef ip4_addr_t oal_ip_addr_t;
976typedef linklayer_event_ap_conn_t oal_event_ap_conn_stru;
986struct sta_bss_parameters {
992struct nl80211_sta_flag_update {
997typedef struct oal_station_info_tag {
999 const td_u8* assoc_req_ies;
1000 td_u32 assoc_req_ies_len;
1001} oal_station_info_stru;
1003typedef struct module oal_module_stru;
1005typedef struct ieee80211_iface_limit {
1008} oal_ieee80211_iface_limit;
1010typedef struct ieee80211_iface_combination {
1011 const struct ieee80211_iface_limit* limits;
1012 td_u32 num_different_channels;
1015 td_u8 radar_detect_widths;
1016 td_bool beacon_int_infra_match;
1018} oal_ieee80211_iface_combination;
1020typedef struct wireless_dev {
1021 struct oal_net_device* netdev;
1022 oal_wiphy_stru* wiphy;
1023 nl80211_iftype_uint8 iftype;
1026 oal_cfg80211_chan_def preset_chandef;
1029typedef oal_wireless_dev oal_wireless_dev_stru;
1042typedef struct oal_cfg80211_ops_tag {
1043 td_s32 (*add_key)(oal_wiphy_stru* wiphy, oal_net_device_stru* netdev,
1044 cfg80211_add_key_info_stru *p_cfg80211_add_key_info,
1045 const td_u8* mac_addr, oal_key_params_stru* params);
1046 td_s32 (*get_key)(oal_wiphy_stru* wiphy, oal_net_device_stru* netdev,
1047 cfg80211_get_key_info_stru *p_cfg80211_get_key_info,
td_void* cookie,
1049 td_s32 (*del_key)(oal_wiphy_stru* wiphy, oal_net_device_stru* netdev,
td_u8 key_index,
td_bool pairwise,
1050 const td_u8* mac_addr);
1051 td_s32 (*set_default_key)(oal_wiphy_stru* wiphy, oal_net_device_stru* netdev,
td_u8 key_index,
td_bool unicast,
1053 td_s32 (*set_default_mgmt_key)(oal_wiphy_stru* wiphy, oal_net_device_stru* netdev,
td_u8 key_index);
1054 td_s32 (*scan)(oal_wiphy_stru* wiphy, oal_cfg80211_scan_request_stru* request);
1055 td_s32 (*connect)(oal_wiphy_stru* wiphy, oal_net_device_stru* netdev,
1056 oal_cfg80211_connect_params_stru* sme);
1057 td_s32 (*disconnect)(oal_wiphy_stru* wiphy, oal_net_device_stru* netdev,
td_u16 reason_code);
1058 td_s32 (*set_channel)(oal_wiphy_stru* wiphy, oal_ieee80211_channel* chan,
1059 oal_nl80211_channel_type channel_type);
1060 td_s32 (*set_wiphy_params)(oal_wiphy_stru* wiphy,
td_u32 changed);
1061 td_s32 (*add_beacon)(oal_wiphy_stru* wiphy, oal_net_device_stru* netdev, oal_beacon_parameters* info);
1062 td_s32 (*change_virtual_intf)(oal_wiphy_stru* wiphy, oal_net_device_stru* netdev, nl80211_iftype_uint8
type,
1063 td_u32* pul_flags, oal_vif_params_stru* params);
1064 td_s32 (*add_station)(oal_wiphy_stru* wiphy, oal_net_device_stru* netdev,
td_u8* mac_addr,
td_void* sta_parms);
1065 td_s32 (*del_station)(oal_wiphy_stru* wiphy, oal_net_device_stru* netdev,
const td_u8* mac_addr);
1066 td_s32 (*change_station)(oal_wiphy_stru* wiphy, oal_net_device_stru* netdev,
td_u8* mac_addr,
1068 td_s32 (*get_station)(oal_wiphy_stru* wiphy, oal_net_device_stru* netdev,
td_u8* mac_addr,
1069 oal_station_info_stru* sta_info);
1070 td_s32 (*dump_station)(oal_wiphy_stru* wiphy, oal_net_device_stru* dev,
td_s32 idx,
td_u8* mac,
1071 oal_station_info_stru* sta_info);
1072 td_s32 (*change_beacon)(oal_wiphy_stru* wiphy, oal_net_device_stru* netdev,
1073 oal_beacon_data_stru* beacon_info);
1074 td_s32 (*start_ap)(oal_wiphy_stru* wiphy, oal_net_device_stru* netdev,
1075 oal_ap_settings_stru* ap_settings);
1076 td_s32 (*stop_ap)(oal_wiphy_stru* wiphy, oal_net_device_stru* netdev);
1077 td_s32 (*change_bss)(oal_wiphy_stru* wiphy, oal_net_device_stru* netdev,
1079 td_s32 (*set_power_mgmt)(oal_wiphy_stru* wiphy, oal_net_device_stru* ndev,
td_bool enabled,
1081 td_s32 (*sched_scan_start)(oal_wiphy_stru* wiphy, oal_net_device_stru* dev,
1082 struct cfg80211_sched_scan_request* request);
1083 td_s32 (*sched_scan_stop)(oal_wiphy_stru* wiphy, oal_net_device_stru* dev);
1084 td_s32 (*remain_on_channel)(oal_wiphy_stru* wiphy,
struct wireless_dev* wdev,
struct ieee80211_channel* chan,
1086 td_s32 (*cancel_remain_on_channel)(oal_wiphy_stru* wiphy,
struct wireless_dev* wdev,
td_u64 cookie);
1087 td_s32 (*mgmt_tx)(oal_wiphy_stru* wiphy,
struct wireless_dev* wdev,
struct ieee80211_channel* chan,
1090 td_void (*mgmt_frame_register)(
struct wiphy* wiphy,
struct wireless_dev* wdev,
td_u16 frame_type,
td_bool reg);
1091 struct wireless_dev* (*add_virtual_intf)(oal_wiphy_stru* wiphy,
const td_char* name, nl80211_iftype_uint8
type,
1092 td_u32* flags,
struct vif_params* params);
1093 td_s32 (*del_virtual_intf)(oal_wiphy_stru* wiphy,
struct wireless_dev* wdev);
1094 td_s32 (*mgmt_tx_cancel_wait)(oal_wiphy_stru* wiphy,
struct wireless_dev* wdev,
td_u64 cookie);
1095 td_s32 (*start_p2p_device)(oal_wiphy_stru* wiphy,
struct wireless_dev* wdev);
1096 td_void (*stop_p2p_device)(oal_wiphy_stru* wiphy,
struct wireless_dev* wdev);
1101#define MAX_BLACKLIST_NUM 128
1110#if defined(_PRE_OS_VERSION_LINUX) && defined(_PRE_OS_VERSION) && (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
1111#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0))
1112#define OAL_IEEE80211_BAND_2GHZ NL80211_BAND_2GHZ
1113#define OAL_IEEE80211_BAND_5GHZ NL80211_BAND_5GHZ
1114#define OAL_IEEE80211_NUM_BANDS NUM_NL80211_BANDS
1116#define OAL_IEEE80211_BAND_2GHZ IEEE80211_BAND_2GHZ
1117#define OAL_IEEE80211_BAND_5GHZ IEEE80211_BAND_5GHZ
1118#define OAL_IEEE80211_NUM_BANDS IEEE80211_NUM_BANDS
1121typedef td_u8 oal_ieee80211_band_enum_uint8;
1124#if defined(_PRE_OS_VERSION_LINUX) && defined(_PRE_OS_VERSION) && (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
1131typedef struct iw_statistics oal_iw_statistics_stru;
1132typedef struct net_device oal_net_device_stru;
1133typedef struct net_device_ops oal_net_device_ops_stru;
1134typedef struct ethtool_ops oal_ethtool_ops_stru;
1135typedef struct iw_priv_args oal_iw_priv_args_stru;
1136typedef struct iw_handler_def oal_iw_handler_def_stru;
1137typedef struct iw_point oal_iw_point_stru;
1138typedef struct iw_param oal_iw_param_stru;
1139typedef struct iw_freq oal_iw_freq_stru;
1140typedef struct iw_request_info oal_iw_request_info_stru;
1141typedef struct rtnl_link_ops oal_rtnl_link_ops_stru;
1142typedef struct sockaddr oal_sockaddr_stru;
1143typedef struct net_device_stats oal_net_device_stats_stru;
1144typedef struct ifreq oal_ifreq_stru;
1145typedef struct Qdisc oal_qdisc_stru;
1146typedef struct vlan_ethhdr oal_vlan_ethhdr_stru;
1147typedef struct wiphy oal_wiphy_stru;
1148typedef struct wireless_dev oal_wireless_dev_stru;
1149typedef struct cfg80211_ops oal_cfg80211_ops_stru;
1150typedef struct wiphy_vendor_command oal_wiphy_vendor_command_stru;
1151typedef struct nl80211_vendor_cmd_info oal_nl80211_vendor_cmd_info_stru;
1153typedef struct kobj_uevent_env oal_kobj_uevent_env_stru;
1154typedef struct iw_quality oal_iw_quality_stru;
1155typedef struct cfg80211_gtk_rekey_data oal_cfg80211_gtk_rekey_data;
1156typedef union iwreq_data oal_iwreq_data_union;
1158#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
1159typedef struct cfg80211_pmksa oal_cfg80211_pmksa_stru;
1162#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
1163typedef struct survey_info oal_survey_info_stru;
1166typedef struct key_params oal_key_params_stru;
1168typedef struct cfg80211_scan_request oal_cfg80211_scan_request_stru;
1169typedef struct cfg80211_ssid oal_cfg80211_ssid_stru;
1170typedef struct cfg80211_sched_scan_request oal_cfg80211_sched_scan_request_stru;
1172#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
1173typedef enum nl80211_mfp oal_nl80211_mfp_enum_uint8;
1174typedef struct cfg80211_connect_params oal_cfg80211_conn_stru;
1175typedef struct cfg80211_crypto_settings oal_cfg80211_crypto_settings_stru;
1178typedef struct cfg80211_crypto_settings {
1181 td_s32 n_ciphers_pairwise;
1188}oal_cfg80211_crypto_settings_stru;
1192typedef struct ieee80211_mgmt oal_ieee80211_mgmt_stru;
1193typedef struct ieee80211_channel oal_ieee80211_channel_stru;
1194typedef struct cfg80211_bss oal_cfg80211_bss_stru;
1195typedef struct rate_info oal_rate_info_stru;
1196typedef struct station_info oal_station_info_stru;
1197typedef struct station_parameters oal_station_parameters_stru;
1198typedef enum station_info_flags oal_station_info_flags;
1200typedef struct nlattr oal_nlattr_stru;
1201typedef struct genl_family oal_genl_family_stru;
1202typedef struct genl_multicast_group oal_genl_multicast_group_stru;
1203typedef struct cfg80211_registered_device oal_cfg80211_registered_device_stru;
1205typedef struct ieee80211_rate oal_ieee80211_rate;
1206typedef struct ieee80211_channel oal_ieee80211_channel;
1207typedef struct ieee80211_supported_band oal_ieee80211_supported_band;
1208typedef enum cfg80211_signal_type oal_cfg80211_signal_type;
1209typedef enum nl80211_channel_type oal_nl80211_channel_type;
1210typedef struct cfg80211_update_owe_info oal_cfg80211_update_owe_info;
1212#ifdef CONTROLLER_CUSTOMIZATION
1213typedef struct cfg80211_update_p2p_ie oal_cfg80211_update_p2p_ie;
1216#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
1218typedef enum wiphy_flags oal_wiphy_flags;
1221typedef enum wiphy_flags {
1222 WIPHY_FLAG_CUSTOM_REGULATORY =
BIT(0),
1223 WIPHY_FLAG_STRICT_REGULATORY =
BIT(1),
1224 WIPHY_FLAG_DISABLE_BEACON_HINTS =
BIT(2),
1225 WIPHY_FLAG_NETNS_OK =
BIT(3),
1226 WIPHY_FLAG_PS_ON_BY_DEFAULT =
BIT(4),
1227 WIPHY_FLAG_4ADDR_AP =
BIT(5),
1228 WIPHY_FLAG_4ADDR_STATION =
BIT(6),
1229 WIPHY_FLAG_HAVE_AP_SME =
BIT(17),
1230 WIPHY_FLAG_OFFCHAN_TX =
BIT(20),
1231 WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL =
BIT(21),
1235typedef struct vif_params oal_vif_params_stru;
1237#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
1238typedef enum nl80211_key_type oal_nl80211_key_type;
1240enum nl80211_key_type {
1241 NL80211_KEYTYPE_GROUP,
1242 NL80211_KEYTYPE_PAIRWISE,
1243 NL80211_KEYTYPE_PEERKEY,
1244 NUM_NL80211_KEYTYPES
1246typedef enum nl80211_key_type oal_nl80211_key_type;
1249typedef struct ieee80211_sta_ht_cap oal_ieee80211_sta_ht_cap;
1250typedef struct ieee80211_regdomain oal_ieee80211_regdomain_stru;
1251typedef struct cfg80211_update_ft_ies_params oal_cfg80211_update_ft_ies_stru;
1252typedef struct cfg80211_ft_event_params oal_cfg80211_ft_event_stru;
1253typedef struct cfg80211_chan_def oal_cfg80211_chan_def;
1254#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0))
1256typedef struct cfg80211_beacon_data oal_beacon_data_stru;
1257typedef struct cfg80211_ap_settings oal_ap_settings_stru;
1258typedef struct bss_parameters oal_bss_parameters;
1259struct beacon_parameters {
1261 td_s32 interval, dtim_period;
1262 td_s32 head_len, tail_len;
1264typedef struct beacon_parameters oal_beacon_parameters;
1266typedef struct beacon_parameters oal_beacon_parameters;
1268typedef struct ieee80211_channel_sw_ie oal_ieee80211_channel_sw_ie;
1269typedef struct ieee80211_msrment_ie oal_ieee80211_msrment_ie;
1270typedef struct ieee80211_mgmt oal_ieee80211_mgmt;
1287typedef struct oal_app_ie oal_app_ie_stru;
1289typedef td_u8 oal_nl80211_auth_type_enum_uint8;
#define reg(base, offset)
Definition chip_io.h:178
#define bit(x)
Definition common_def.h:71
#define max(x, y)
Definition common_def.h:33
enum wiphy_params_flags oal_wiphy_params_flags
Definition eth_ip_common_rom.h:180
wiphy_params_flags
Definition eth_ip_common_rom.h:173
#define ETHER_ADDR_LEN
Definition eth_ip_common_rom.h:21
#define WLAN_MAC_ADDR_LEN
Definition mac_addr.c:28
addr_idx
Definition mac_addr.c:51
mac_header_frame_control_stru frame_control
Definition mac_frame_rom.h:0
osal_u16 resv2
Definition oal_net.h:3
osal_u8 type
Definition oal_net.h:0
app_ie_type_uint8 app_ie_type
Definition oal_net.h:1
osal_u32 ie_len
Definition oal_net.h:0
osal_u8 app_ie_type_uint8
Definition oal_net.h:308
osal_u8 rsv[3]
Definition oal_net.h:2
osal_u16 reserved
Definition oal_net.h:4
struct oal_net_dev_ioctl_data_tag oal_net_dev_ioctl_data_stru
oal_net_dev_tx_enum
Definition oal_net_cfg80211.h:71
@ OAL_NETDEV_TX_OK
Definition oal_net_cfg80211.h:72
@ OAL_NETDEV_TX_LOCKED
Definition oal_net_cfg80211.h:74
@ OAL_NETDEV_TX_BUSY
Definition oal_net_cfg80211.h:73
#define OAL_IEEE80211_MAX_SSID_LEN
Definition oal_net_cfg80211.h:65
#define MAX_STA_NUM_OF_ONE_GROUP
Definition oal_net_cfg80211.h:68
osal_u8 app_ie_type_uint8
Definition oal_net_cfg80211.h:62
#define MAX_BLACKLIST_NUM
Definition oal_net_cfg80211.h:1101
#define OAL_IF_NAME_SIZE
Definition oal_net_cfg80211.h:64
#define OAL_MAC_ADDR_LEN
Definition oal_net_cfg80211.h:63
#define OAL_NL80211_MAX_NR_CIPHER_SUITES
Definition oal_net_rom.h:178
#define OAL_IEEE80211_MAX_SSID_LEN
Definition oal_net_rom.h:181
#define OAL_NL80211_MAX_NR_AKM_SUITES
Definition oal_net_rom.h:179
#define IEEE80211_HT_MCS_MASK_LEN
Definition oal_net_rom.h:108
#define OAL_MAC_ADDR_LEN
Definition oal_net_rom.h:28
#define OAL_CONST
Definition oal_types.h:45
osal_u8 oal_bool_enum_uint8
Definition oal_types_device_rom.h:45
int osal_s32
Definition osal_types.h:19
unsigned char osal_u8
Definition osal_types.h:11
signed char osal_s8
Definition osal_types.h:17
unsigned long long osal_u64
Definition osal_types.h:14
unsigned int osal_u32
Definition osal_types.h:13
unsigned short osal_u16
Definition osal_types.h:12
#define BIT(x)
Definition pinctrl_porting_ws63.c:14
#define NL80211_IFTYPE_AP
Definition soc_wifi_service_api.c:3951
Definition oal_net_cfg80211.h:1348
struct hostap_sta_link_info * sta_info
Definition oal_net_cfg80211.h:1352
unsigned long buf_cnt
Definition oal_net_cfg80211.h:1349
unsigned int cur_channel
Definition oal_net_cfg80211.h:1351
struct hostap_sta_link_info_ext * sta_info_ext
Definition oal_net_cfg80211.h:1353
unsigned long sta_cnt
Definition oal_net_cfg80211.h:1350
Definition oal_net_cfg80211.h:1326
unsigned int cur_channel
Definition oal_net_cfg80211.h:1329
unsigned long sta_cnt
Definition oal_net_cfg80211.h:1328
unsigned long buf_cnt
Definition oal_net_cfg80211.h:1327
struct hostap_sta_link_info * sta_info
Definition oal_net_cfg80211.h:1330
Definition oal_net_cfg80211.h:1336
osal_u8 auth_st
Definition oal_net_cfg80211.h:1337
osal_u8 ps_st
Definition oal_net_cfg80211.h:1340
osal_u32 associated_time
Definition oal_net_cfg80211.h:1345
oal_bool_enum_uint8 wmm_switch
Definition oal_net_cfg80211.h:1339
osal_u8 sta_num
Definition oal_net_cfg80211.h:1341
osal_u8 work_mode
Definition oal_net_cfg80211.h:1342
osal_s8 c_noise
Definition oal_net_cfg80211.h:1343
oal_bool_enum_uint8 band
Definition oal_net_cfg80211.h:1338
osal_u8 auc_resv[1]
Definition oal_net_cfg80211.h:1344
Definition oal_net_cfg80211.h:1308
osal_u64 tx_bytes
Definition oal_net_cfg80211.h:1319
osal_u32 tx_rate
Definition oal_net_cfg80211.h:1313
osal_u32 tx_frames_all
Definition oal_net_cfg80211.h:1321
osal_u64 rx_bytes
Definition oal_net_cfg80211.h:1318
osal_u8 addr[6]
Definition oal_net_cfg80211.h:1309
osal_u32 tx_maxrate
Definition oal_net_cfg80211.h:1317
osal_u32 rx_maxrate
Definition oal_net_cfg80211.h:1315
osal_u32 tx_frames_fail
Definition oal_net_cfg80211.h:1322
osal_u8 tx_pwr
Definition oal_net_cfg80211.h:1311
osal_u32 rx_minrate
Definition oal_net_cfg80211.h:1314
osal_u32 rx_rate
Definition oal_net_cfg80211.h:1312
osal_u8 rx_rssi
Definition oal_net_cfg80211.h:1310
osal_u32 tx_frames_rty
Definition oal_net_cfg80211.h:1320
osal_u32 SNR
Definition oal_net_cfg80211.h:1323
osal_u32 tx_minrate
Definition oal_net_cfg80211.h:1316
Definition oal_net_cfg80211.h:1103
osal_u8 blkwhtlst_cnt
Definition oal_net_cfg80211.h:1104
osal_u8 mode
Definition oal_net_cfg80211.h:1105
Definition oal_net_cfg80211.h:1295
oal_bool_enum_uint8 support_11h
Definition oal_net_cfg80211.h:1297
osal_u8 reserve
Definition oal_net_cfg80211.h:1298
Definition oal_net_cfg80211.h:1301
oal_bool_enum_uint8 support_11r
Definition oal_net_cfg80211.h:1303
osal_u8 reserve
Definition oal_net_cfg80211.h:1304
Definition oal_net_cfg80211.h:1373
osal_s32 l_frag
Definition oal_net_cfg80211.h:1432
osal_s32 l_channel
Definition oal_net_cfg80211.h:1396
osal_u8 rsv[2]
Definition oal_net_cfg80211.h:1378
union oal_net_dev_ioctl_data_tag::@462 pri_data
osal_u8 * ie
Definition oal_net_cfg80211.h:1412
osal_u8 auc_country_code[4]
Definition oal_net_cfg80211.h:1388
osal_u8 wep_key_len
Definition oal_net_cfg80211.h:1419
struct oal_net_dev_ioctl_data_tag::@462::@468 kick_user_params
OAL_CONST osal_u8 * wep_key
Definition oal_net_cfg80211.h:1421
osal_u16 reason_code
Definition oal_net_cfg80211.h:1427
oal_hilink_get_sta_11h_ability fbt_get_sta_11h_ability
Definition oal_net_cfg80211.h:1431
osal_s32 l_center_freq1
Definition oal_net_cfg80211.h:1400
struct oal_net_dev_ioctl_data_tag::@462::@466 freq
osal_u32 vap_max_user
Definition oal_net_cfg80211.h:1392
oal_snoop_all_group_stru all_snoop_group
Definition oal_net_cfg80211.h:1435
osal_s32 l_center_freq2
Definition oal_net_cfg80211.h:1401
struct oal_net_dev_ioctl_data_tag::@462::@465 country_code
oal_net_all_sta_link_info_ext_stru all_sta_link_info_ext
Definition oal_net_cfg80211.h:1436
osal_u8 privacy
Definition oal_net_cfg80211.h:1416
osal_u32 buf_size
Definition oal_net_cfg80211.h:1379
osal_u8 * buf
Definition oal_net_cfg80211.h:1380
oal_nl80211_auth_type_enum_uint8 auth_type
Definition oal_net_cfg80211.h:1417
osal_s32 l_rts
Definition oal_net_cfg80211.h:1433
osal_u32 ie_len
Definition oal_net_cfg80211.h:1410
osal_u8 mac[6]
Definition oal_net_cfg80211.h:1377
OAL_CONST osal_u8 * bssid
Definition oal_net_cfg80211.h:1414
osal_s32 l_sec_channel_offset
Definition oal_net_cfg80211.h:1398
struct oal_net_dev_ioctl_data_tag::@462::@467 cfg80211_connect_params
osal_s32 l_ht_enabled
Definition oal_net_cfg80211.h:1397
struct oal_net_dev_ioctl_data_tag::@462::@464 auth_params
oal_cfg80211_crypto_settings_stru crypto
Definition oal_net_cfg80211.h:1423
osal_u8 ssid[32+4]
Definition oal_net_cfg80211.h:1391
osal_s32 l_cmd
Definition oal_net_cfg80211.h:1374
osal_s32 l_freq
Definition oal_net_cfg80211.h:1395
osal_u32 auth_alg
Definition oal_net_cfg80211.h:1384
osal_u32 ssid_len
Definition oal_net_cfg80211.h:1409
struct oal_net_dev_ioctl_data_tag::@462::@463 assoc_req_ie
oal_app_ie_stru app_ie
Definition oal_net_cfg80211.h:1405
osal_s32 l_bandwidth
Definition oal_net_cfg80211.h:1402
oal_blkwhtlst_stru blkwhtlst
Definition oal_net_cfg80211.h:1437
oal_net_all_sta_link_info_stru all_sta_link_info
Definition oal_net_cfg80211.h:1430
osal_u8 wep_key_index
Definition oal_net_cfg80211.h:1420
osal_s32 l_vht_enabled
Definition oal_net_cfg80211.h:1399
OAL_CONST osal_u8 * ssid
Definition oal_net_cfg80211.h:1413
Definition oal_net_cfg80211.h:1366
osal_u16 group_cnt
Definition oal_net_cfg80211.h:1367
oal_snoop_group_stru * buf
Definition oal_net_cfg80211.h:1369
Definition oal_net_cfg80211.h:1359
osal_u8 sta_num
Definition oal_net_cfg80211.h:1361
osal_u8 reserve
Definition oal_net_cfg80211.h:1362
Definition oal_skbuff.h:73
Definition oal_skbuff.h:82
unsigned short td_u16
Definition td_type.h:37
unsigned char td_u8
Definition td_type.h:36
td_u8 td_bool
Definition td_type.h:50
void td_void
Definition td_type.h:49
signed char td_s8
Definition td_type.h:42
unsigned int td_u32
Definition td_type.h:38
short td_s16
Definition td_type.h:43
int td_s32
Definition td_type.h:44
unsigned long long td_u64
Definition td_type.h:39
char td_char
Definition td_type.h:41
Definition hal_uart_v151_regs_def.h:38
#define WLAN_WPS_IE_MAX_SIZE
Definition wlan_spec_rom.h:178