1STRUCT WIRELESS_DEV(9) Device registration STRUCT WIRELESS_DEV(9)
2
3
4
6 struct_wireless_dev - wireless device state
7
9 struct wireless_dev {
10 struct wiphy * wiphy;
11 enum nl80211_iftype iftype;
12 struct list_head list;
13 struct net_device * netdev;
14 u32 identifier;
15 struct list_head mgmt_registrations;
16 spinlock_t mgmt_registrations_lock;
17 struct mutex mtx;
18 bool use_4addr;
19 bool is_running;
20 u8 address[ETH_ALEN];
21 u8 ssid[IEEE80211_MAX_SSID_LEN];
22 u8 ssid_len;
23 u8 mesh_id_len;
24 u8 mesh_id_up_len;
25 struct cfg80211_conn * conn;
26 struct cfg80211_cached_keys * connect_keys;
27 enum ieee80211_bss_type conn_bss_type;
28 u32 conn_owner_nlportid;
29 struct work_struct disconnect_wk;
30 u8 disconnect_bssid[ETH_ALEN];
31 struct list_head event_list;
32 spinlock_t event_lock;
33 struct cfg80211_internal_bss * current_bss;
34 struct cfg80211_chan_def preset_chandef;
35 struct cfg80211_chan_def chandef;
36 bool ibss_fixed;
37 bool ibss_dfs_possible;
38 bool ps;
39 int ps_timeout;
40 int beacon_interval;
41 u32 ap_unexpected_nlportid;
42 u32 owner_nlportid;
43 bool nl_owner_dead;
44 bool cac_started;
45 unsigned long cac_start_time;
46 unsigned int cac_time_ms;
47 #ifdef CONFIG_CFG80211_WEXT
48 struct wext;
49 #endif
50 struct cfg80211_cqm_config * cqm_config;
51 };
52
54 wiphy
55 pointer to hardware description
56
57 iftype
58 interface type
59
60 list
61 (private) Used to collect the interfaces
62
63 netdev
64 (private) Used to reference back to the netdev, may be NULL
65
66 identifier
67 (private) Identifier used in nl80211 to identify this wireless
68 device if it has no netdev
69
70 mgmt_registrations
71 list of registrations for management frames
72
73 mgmt_registrations_lock
74 lock for the list
75
76 mtx
77 mutex used to lock data in this struct, may be used by drivers and
78 some API functions require it held
79
80 use_4addr
81 indicates 4addr mode is used on this interface, must be set by
82 driver (if supported) on add_interface BEFORE registering the
83 netdev and may otherwise be used by driver read-only, will be
84 update by cfg80211 on change_interface
85
86 is_running
87 true if this is a non-netdev device that has been started, e.g. the
88 P2P Device.
89
90 address[ETH_ALEN]
91 The address for this device, valid only if netdev is NULL
92
93 ssid[IEEE80211_MAX_SSID_LEN]
94 (private) Used by the internal configuration code
95
96 ssid_len
97 (private) Used by the internal configuration code
98
99 mesh_id_len
100 (private) Used by the internal configuration code
101
102 mesh_id_up_len
103 (private) Used by the internal configuration code
104
105 conn
106 (private) cfg80211 software SME connection state machine data
107
108 connect_keys
109 (private) keys to set after connection is established
110
111 conn_bss_type
112 connecting/connected BSS type
113
114 conn_owner_nlportid
115 (private) connection owner socket port ID
116
117 disconnect_wk
118 (private) auto-disconnect work
119
120 disconnect_bssid[ETH_ALEN]
121 (private) the BSSID to use for auto-disconnect
122
123 event_list
124 (private) list for internal event processing
125
126 event_lock
127 (private) lock for event list
128
129 current_bss
130 (private) Used by the internal configuration code
131
132 preset_chandef
133 (private) Used by the internal configuration code to track the
134 channel to be used for AP later
135
136 chandef
137 (private) Used by the internal configuration code to track the
138 user-set channel definition.
139
140 ibss_fixed
141 (private) IBSS is using fixed BSSID
142
143 ibss_dfs_possible
144 (private) IBSS may change to a DFS channel
145
146 ps
147 powersave mode is enabled
148
149 ps_timeout
150 dynamic powersave timeout
151
152 beacon_interval
153 beacon interval used on this device for transmitting beacons, 0
154 when not valid
155
156 ap_unexpected_nlportid
157 (private) netlink port ID of application registered for unexpected
158 class 3 frames (AP mode)
159
160 owner_nlportid
161 (private) owner socket port ID
162
163 nl_owner_dead
164 (private) owner socket went away
165
166 cac_started
167 true if DFS channel availability check has been started
168
169 cac_start_time
170 timestamp (jiffies) when the dfs state was entered.
171
172 cac_time_ms
173 CAC time in ms
174
175 wext
176 (private) Used by the internal wireless extensions compat code
177
178 cqm_config
179 (private) nl80211 RSSI monitor state
180
182 For netdevs, this structure must be allocated by the driver that uses
183 the ieee80211_ptr field in struct net_device (this is intentional so it
184 can be allocated along with the netdev.) It need not be registered then
185 as netdev registration will be intercepted by cfg80211 to see the new
186 wireless device.
187
188 For non-netdev uses, it must also be allocated by the driver in
189 response to the cfg80211 callbacks that require it, as there's no
190 netdev registration in that case it may not be allocated outside of
191 callback operations that return it.
192
194 Johannes Berg <johannes@sipsolutions.net>
195 Author.
196
198Kernel Hackers Manual 3.10 June 2019 STRUCT WIRELESS_DEV(9)