1STRUCT WIPHY(9) Device registration STRUCT WIPHY(9)
2
3
4
6 struct_wiphy - wireless hardware description
7
9 struct wiphy {
10 u8 perm_addr[ETH_ALEN];
11 u8 addr_mask[ETH_ALEN];
12 struct mac_address * addresses;
13 const struct ieee80211_txrx_stypes * mgmt_stypes;
14 const struct ieee80211_iface_combination * iface_combinations;
15 int n_iface_combinations;
16 u16 software_iftypes;
17 u16 n_addresses;
18 u16 interface_modes;
19 u16 max_acl_mac_addrs;
20 u32 flags;
21 u32 regulatory_flags;
22 u32 features;
23 u8 ext_features[DIV_ROUND_UP(NUM_NL80211_EXT_FEATURES# 8)];
24 u32 ap_sme_capa;
25 enum cfg80211_signal_type signal_type;
26 int bss_priv_size;
27 u8 max_scan_ssids;
28 u8 max_sched_scan_reqs;
29 u8 max_sched_scan_ssids;
30 u8 max_match_sets;
31 u16 max_scan_ie_len;
32 u16 max_sched_scan_ie_len;
33 u32 max_sched_scan_plans;
34 u32 max_sched_scan_plan_interval;
35 u32 max_sched_scan_plan_iterations;
36 int n_cipher_suites;
37 const u32 * cipher_suites;
38 u8 retry_short;
39 u8 retry_long;
40 u32 frag_threshold;
41 u32 rts_threshold;
42 u8 coverage_class;
43 char fw_version[ETHTOOL_FWVERS_LEN];
44 u32 hw_version;
45 #ifdef CONFIG_PM
46 const struct wiphy_wowlan_support * wowlan;
47 struct cfg80211_wowlan * wowlan_config;
48 #endif
49 u16 max_remain_on_channel_duration;
50 u8 max_num_pmkids;
51 u32 available_antennas_tx;
52 u32 available_antennas_rx;
53 u32 probe_resp_offload;
54 const u8 * extended_capabilities;
55 const u8 * extended_capabilities_mask;
56 u8 extended_capabilities_len;
57 const struct wiphy_iftype_ext_capab * iftype_ext_capab;
58 unsigned int num_iftype_ext_capab;
59 const void * privid;
60 struct ieee80211_supported_band * bands[NUM_NL80211_BANDS];
61 void (* reg_notifier) (struct wiphy *wiphy,struct regulatory_request *request);
62 const struct ieee80211_regdomain __rcu * regd;
63 struct device dev;
64 bool registered;
65 struct dentry * debugfsdir;
66 const struct ieee80211_ht_cap * ht_capa_mod_mask;
67 const struct ieee80211_vht_cap * vht_capa_mod_mask;
68 struct list_head wdev_list;
69 possible_net_t _net;
70 #ifdef CONFIG_CFG80211_WEXT
71 const struct iw_handler_def * wext;
72 #endif
73 const struct wiphy_coalesce_support * coalesce;
74 const struct wiphy_vendor_command * vendor_commands;
75 const struct nl80211_vendor_cmd_info * vendor_events;
76 int n_vendor_commands;
77 int n_vendor_events;
78 u16 max_ap_assoc_sta;
79 u8 max_num_csa_counters;
80 u8 max_adj_channel_rssi_comp;
81 u32 bss_select_support;
82 u64 cookie_counter;
83 u8 nan_supported_bands;
84 char priv[0];
85 };
86
88 perm_addr[ETH_ALEN]
89 permanent MAC address of this device
90
91 addr_mask[ETH_ALEN]
92 If the device supports multiple MAC addresses by masking, set this
93 to a mask with variable bits set to 1, e.g. if the last four bits
94 are variable then set it to 00-00-00-00-00-0f. The actual variable
95 bits shall be determined by the interfaces added, with interfaces
96 not matching the mask being rejected to be brought up.
97
98 addresses
99 If the device has more than one address, set this pointer to a list
100 of addresses (6 bytes each). The first one will be used by default
101 for perm_addr. In this case, the mask should be set to all-zeroes.
102 In this case it is assumed that the device can handle the same
103 number of arbitrary MAC addresses.
104
105 mgmt_stypes
106 bitmasks of frame subtypes that can be subscribed to or transmitted
107 through nl80211, points to an array indexed by interface type
108
109 iface_combinations
110 Valid interface combinations array, should not list single
111 interface types.
112
113 n_iface_combinations
114 number of entries in iface_combinations array.
115
116 software_iftypes
117 bitmask of software interface types, these are not subject to any
118 restrictions since they are purely managed in SW.
119
120 n_addresses
121 number of addresses in addresses.
122
123 interface_modes
124 bitmask of interfaces types valid for this wiphy, must be set by
125 driver
126
127 max_acl_mac_addrs
128 Maximum number of MAC addresses that the device supports for ACL.
129
130 flags
131 wiphy flags, see enum wiphy_flags
132
133 regulatory_flags
134 wiphy regulatory flags, see enum ieee80211_regulatory_flags
135
136 features
137 features advertised to nl80211, see enum nl80211_feature_flags.
138
139 ext_features[DIV_ROUND_UP(NUM_NL80211_EXT_FEATURES# 8)]
140 extended features advertised to nl80211, see enum
141 nl80211_ext_feature_index.
142
143 ap_sme_capa
144 AP SME capabilities, flags from enum nl80211_ap_sme_features.
145
146 signal_type
147 signal type reported in struct cfg80211_bss.
148
149 bss_priv_size
150 each BSS struct has private data allocated with it, this variable
151 determines its size
152
153 max_scan_ssids
154 maximum number of SSIDs the device can scan for in any given scan
155
156 max_sched_scan_reqs
157 maximum number of scheduled scan requests that the device can run
158 concurrently.
159
160 max_sched_scan_ssids
161 maximum number of SSIDs the device can scan for in any given
162 scheduled scan
163
164 max_match_sets
165 maximum number of match sets the device can handle when performing
166 a scheduled scan, 0 if filtering is not supported.
167
168 max_scan_ie_len
169 maximum length of user-controlled IEs device can add to probe
170 request frames transmitted during a scan, must not include fixed
171 IEs like supported rates
172
173 max_sched_scan_ie_len
174 same as max_scan_ie_len, but for scheduled scans
175
176 max_sched_scan_plans
177 maximum number of scan plans (scan interval and number of
178 iterations) for scheduled scan supported by the device.
179
180 max_sched_scan_plan_interval
181 maximum interval (in seconds) for a single scan plan supported by
182 the device.
183
184 max_sched_scan_plan_iterations
185 maximum number of iterations for a single scan plan supported by
186 the device.
187
188 n_cipher_suites
189 number of supported cipher suites
190
191 cipher_suites
192 supported cipher suites
193
194 retry_short
195 Retry limit for short frames (dot11ShortRetryLimit)
196
197 retry_long
198 Retry limit for long frames (dot11LongRetryLimit)
199
200 frag_threshold
201 Fragmentation threshold (dot11FragmentationThreshold); -1 =
202 fragmentation disabled, only odd values >= 256 used
203
204 rts_threshold
205 RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled
206
207 coverage_class
208 current coverage class
209
210 fw_version[ETHTOOL_FWVERS_LEN]
211 firmware version for ethtool reporting
212
213 hw_version
214 hardware version for ethtool reporting
215
216 wowlan
217 WoWLAN support information
218
219 wowlan_config
220 current WoWLAN configuration; this should usually not be used since
221 access to it is necessarily racy, use the parameter passed to the
222 suspend operation instead.
223
224 max_remain_on_channel_duration
225 Maximum time a remain-on-channel operation may request, if
226 implemented.
227
228 max_num_pmkids
229 maximum number of PMKIDs supported by device
230
231 available_antennas_tx
232 bitmap of antennas which are available to be configured as TX
233 antennas. Antenna configuration commands will be rejected unless
234 this or available_antennas_rx is set.
235
236 available_antennas_rx
237 bitmap of antennas which are available to be configured as RX
238 antennas. Antenna configuration commands will be rejected unless
239 this or available_antennas_tx is set.
240
241 probe_resp_offload
242 Bitmap of supported protocols for probe response offloading. See
243 enum nl80211_probe_resp_offload_support_attr. Only valid when the
244 wiphy flag WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD is set.
245
246 extended_capabilities
247 extended capabilities supported by the driver, additional
248 capabilities might be supported by userspace; these are the 802.11
249 extended capabilities (“Extended Capabilities element”) and are in
250 the same format as in the information element. See 802.11-2012
251 8.4.2.29 for the defined fields. These are the default extended
252 capabilities to be used if the capabilities are not specified for a
253 specific interface type in iftype_ext_capab.
254
255 extended_capabilities_mask
256 mask of the valid values
257
258 extended_capabilities_len
259 length of the extended capabilities
260
261 iftype_ext_capab
262 array of extended capabilities per interface type
263
264 num_iftype_ext_capab
265 number of interface types for which extended capabilities are
266 specified separately.
267
268 privid
269 a pointer that drivers can use to identify if an arbitrary wiphy is
270 theirs, e.g. in global notifiers
271
272 bands[NUM_NL80211_BANDS]
273 information about bands/channels supported by this device
274
275 reg_notifier
276 the driver's regulatory notification callback, note that if your
277 driver uses wiphy_apply_custom_regulatory the reg_notifier's
278 request can be passed as NULL
279
280 regd
281 the driver's regulatory domain, if one was requested via the
282 regulatory_hint API. This can be used by the driver on the
283 reg_notifier if it chooses to ignore future regulatory domain
284 changes caused by other drivers.
285
286 dev
287 (virtual) struct device for this wiphy
288
289 registered
290 helps synchronize suspend/resume with wiphy unregister
291
292 debugfsdir
293 debugfs directory used for this wiphy, will be renamed
294 automatically on wiphy renames
295
296 ht_capa_mod_mask
297 Specify what ht_cap values can be over-ridden. If null, then none
298 can be over-ridden.
299
300 vht_capa_mod_mask
301 Specify what VHT capabilities can be over-ridden. If null, then
302 none can be over-ridden.
303
304 wdev_list
305 the list of associated (virtual) interfaces; this list must not be
306 modified by the driver, but can be read with RTNL/RCU protection.
307
308 _net
309 the network namespace this wiphy currently lives in
310
311 wext
312 wireless extension handlers
313
314 coalesce
315 packet coalescing support information
316
317 vendor_commands
318 array of vendor commands supported by the hardware
319
320 vendor_events
321 array of vendor events supported by the hardware
322
323 n_vendor_commands
324 number of vendor commands
325
326 n_vendor_events
327 number of vendor events
328
329 max_ap_assoc_sta
330 maximum number of associated stations supported in AP mode
331 (including P2P GO) or 0 to indicate no such limit is advertised.
332 The driver is allowed to advertise a theoretical limit that it can
333 reach in some cases, but may not always reach.
334
335 max_num_csa_counters
336 Number of supported csa_counters in beacons and probe responses.
337 This value should be set if the driver wishes to limit the number
338 of csa counters. Default (0) means infinite.
339
340 max_adj_channel_rssi_comp
341 max offset of between the channel on which the frame was sent and
342 the channel on which the frame was heard for which the reported
343 rssi is still valid. If a driver is able to compensate the low rssi
344 when a frame is heard on different channel, then it should set this
345 variable to the maximal offset for which it can compensate. This
346 value should be set in MHz.
347
348 bss_select_support
349 bitmask indicating the BSS selection criteria supported by the
350 driver in the .connect callback. The bit position maps to the
351 attribute indices defined in enum nl80211_bss_select_attr.
352
353 cookie_counter
354 unique generic cookie counter, used to identify objects.
355
356 nan_supported_bands
357 bands supported by the device in NAN mode, a bitmap of enum
358 nl80211_band values. For instance, for NL80211_BAND_2GHZ, bit 0
359 would be set (i.e. BIT(NL80211_BAND_2GHZ)).
360
361 priv[0]
362 driver private data (sized according to wiphy_new parameter)
363
365 Johannes Berg <johannes@sipsolutions.net>
366 Author.
367
369Kernel Hackers Manual 3.10 June 2019 STRUCT WIPHY(9)