]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blame - net/mac80211/driver-ops.h
Merge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/ac97-mfd', 'asoc/topic...
[mirror_ubuntu-focal-kernel.git] / net / mac80211 / driver-ops.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
f59374eb
SS
2/*
3* Portions of this file
4* Copyright(c) 2016 Intel Deutschland GmbH
5*/
6
24487981
JB
7#ifndef __MAC80211_DRIVER_OPS
8#define __MAC80211_DRIVER_OPS
9
10#include <net/mac80211.h>
11#include "ieee80211_i.h"
011ad0e9 12#include "trace.h"
24487981 13
f6837ba8 14static inline bool check_sdata_in_driver(struct ieee80211_sub_if_data *sdata)
7b7eab6f 15{
f6837ba8
JB
16 return !WARN(!(sdata->flags & IEEE80211_SDATA_IN_DRIVER),
17 "%s: Failed check-sdata-in-driver check, flags: 0x%x\n",
18 sdata->dev ? sdata->dev->name : sdata->name, sdata->flags);
7b7eab6f
JB
19}
20
bc192f89
FF
21static inline struct ieee80211_sub_if_data *
22get_bss_sdata(struct ieee80211_sub_if_data *sdata)
23{
24 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
25 sdata = container_of(sdata->bss, struct ieee80211_sub_if_data,
26 u.ap);
27
28 return sdata;
29}
30
36323f81
TH
31static inline void drv_tx(struct ieee80211_local *local,
32 struct ieee80211_tx_control *control,
33 struct sk_buff *skb)
24487981 34{
36323f81 35 local->ops->tx(&local->hw, control, skb);
24487981
JB
36}
37
f59374eb
SS
38static inline void drv_sync_rx_queues(struct ieee80211_local *local,
39 struct sta_info *sta)
40{
41 if (local->ops->sync_rx_queues) {
42 trace_drv_sync_rx_queues(local, sta->sdata, &sta->sta);
43 local->ops->sync_rx_queues(&local->hw);
44 trace_drv_return_void(local);
45 }
46}
47
e352114f
BG
48static inline void drv_get_et_strings(struct ieee80211_sub_if_data *sdata,
49 u32 sset, u8 *data)
50{
51 struct ieee80211_local *local = sdata->local;
52 if (local->ops->get_et_strings) {
53 trace_drv_get_et_strings(local, sset);
54 local->ops->get_et_strings(&local->hw, &sdata->vif, sset, data);
55 trace_drv_return_void(local);
56 }
57}
58
59static inline void drv_get_et_stats(struct ieee80211_sub_if_data *sdata,
60 struct ethtool_stats *stats,
61 u64 *data)
62{
63 struct ieee80211_local *local = sdata->local;
64 if (local->ops->get_et_stats) {
65 trace_drv_get_et_stats(local);
66 local->ops->get_et_stats(&local->hw, &sdata->vif, stats, data);
67 trace_drv_return_void(local);
68 }
69}
70
71static inline int drv_get_et_sset_count(struct ieee80211_sub_if_data *sdata,
72 int sset)
73{
74 struct ieee80211_local *local = sdata->local;
75 int rv = 0;
76 if (local->ops->get_et_sset_count) {
77 trace_drv_get_et_sset_count(local, sset);
78 rv = local->ops->get_et_sset_count(&local->hw, &sdata->vif,
79 sset);
80 trace_drv_return_int(local, rv);
81 }
82 return rv;
83}
84
968a76ce
EP
85int drv_start(struct ieee80211_local *local);
86void drv_stop(struct ieee80211_local *local);
24487981 87
eecc4800
JB
88#ifdef CONFIG_PM
89static inline int drv_suspend(struct ieee80211_local *local,
90 struct cfg80211_wowlan *wowlan)
91{
92 int ret;
93
94 might_sleep();
95
96 trace_drv_suspend(local);
97 ret = local->ops->suspend(&local->hw, wowlan);
98 trace_drv_return_int(local, ret);
99 return ret;
100}
101
102static inline int drv_resume(struct ieee80211_local *local)
103{
104 int ret;
105
106 might_sleep();
107
108 trace_drv_resume(local);
109 ret = local->ops->resume(&local->hw);
110 trace_drv_return_int(local, ret);
111 return ret;
112}
6d52563f
JB
113
114static inline void drv_set_wakeup(struct ieee80211_local *local,
115 bool enabled)
116{
117 might_sleep();
118
119 if (!local->ops->set_wakeup)
120 return;
121
122 trace_drv_set_wakeup(local, enabled);
123 local->ops->set_wakeup(&local->hw, enabled);
124 trace_drv_return_void(local);
125}
eecc4800
JB
126#endif
127
9aae296a
DV
128int drv_add_interface(struct ieee80211_local *local,
129 struct ieee80211_sub_if_data *sdata);
7b7eab6f 130
9aae296a
DV
131int drv_change_interface(struct ieee80211_local *local,
132 struct ieee80211_sub_if_data *sdata,
133 enum nl80211_iftype type, bool p2p);
7b7eab6f 134
9aae296a
DV
135void drv_remove_interface(struct ieee80211_local *local,
136 struct ieee80211_sub_if_data *sdata);
24487981
JB
137
138static inline int drv_config(struct ieee80211_local *local, u32 changed)
139{
e1781ed3
KV
140 int ret;
141
142 might_sleep();
143
4efc76bd 144 trace_drv_config(local, changed);
e1781ed3 145 ret = local->ops->config(&local->hw, changed);
4efc76bd 146 trace_drv_return_int(local, ret);
0a2b8bb2 147 return ret;
24487981
JB
148}
149
150static inline void drv_bss_info_changed(struct ieee80211_local *local,
12375ef9 151 struct ieee80211_sub_if_data *sdata,
24487981
JB
152 struct ieee80211_bss_conf *info,
153 u32 changed)
154{
e1781ed3
KV
155 might_sleep();
156
5bbe754d
JB
157 if (WARN_ON_ONCE(changed & (BSS_CHANGED_BEACON |
158 BSS_CHANGED_BEACON_ENABLED) &&
159 sdata->vif.type != NL80211_IFTYPE_AP &&
160 sdata->vif.type != NL80211_IFTYPE_ADHOC &&
239281f8
RL
161 sdata->vif.type != NL80211_IFTYPE_MESH_POINT &&
162 sdata->vif.type != NL80211_IFTYPE_OCB))
5bbe754d
JB
163 return;
164
165 if (WARN_ON_ONCE(sdata->vif.type == NL80211_IFTYPE_P2P_DEVICE ||
708d50ed 166 sdata->vif.type == NL80211_IFTYPE_NAN ||
42bd20d9
AE
167 (sdata->vif.type == NL80211_IFTYPE_MONITOR &&
168 !sdata->vif.mu_mimo_owner)))
5bbe754d 169 return;
b8dc1a35 170
f6837ba8
JB
171 if (!check_sdata_in_driver(sdata))
172 return;
7b7eab6f 173
4efc76bd 174 trace_drv_bss_info_changed(local, sdata, info, changed);
24487981 175 if (local->ops->bss_info_changed)
12375ef9 176 local->ops->bss_info_changed(&local->hw, &sdata->vif, info, changed);
4efc76bd 177 trace_drv_return_void(local);
24487981
JB
178}
179
3ac64bee 180static inline u64 drv_prepare_multicast(struct ieee80211_local *local,
22bedad3 181 struct netdev_hw_addr_list *mc_list)
3ac64bee
JB
182{
183 u64 ret = 0;
184
4efc76bd
JB
185 trace_drv_prepare_multicast(local, mc_list->count);
186
3ac64bee 187 if (local->ops->prepare_multicast)
22bedad3 188 ret = local->ops->prepare_multicast(&local->hw, mc_list);
3ac64bee 189
4efc76bd 190 trace_drv_return_u64(local, ret);
3ac64bee
JB
191
192 return ret;
193}
194
24487981
JB
195static inline void drv_configure_filter(struct ieee80211_local *local,
196 unsigned int changed_flags,
197 unsigned int *total_flags,
3ac64bee 198 u64 multicast)
24487981 199{
3ac64bee
JB
200 might_sleep();
201
0a2b8bb2 202 trace_drv_configure_filter(local, changed_flags, total_flags,
3ac64bee 203 multicast);
4efc76bd
JB
204 local->ops->configure_filter(&local->hw, changed_flags, total_flags,
205 multicast);
206 trace_drv_return_void(local);
24487981
JB
207}
208
1b09b556
AO
209static inline void drv_config_iface_filter(struct ieee80211_local *local,
210 struct ieee80211_sub_if_data *sdata,
211 unsigned int filter_flags,
212 unsigned int changed_flags)
213{
214 might_sleep();
215
216 trace_drv_config_iface_filter(local, sdata, filter_flags,
217 changed_flags);
218 if (local->ops->config_iface_filter)
219 local->ops->config_iface_filter(&local->hw, &sdata->vif,
220 filter_flags,
221 changed_flags);
222 trace_drv_return_void(local);
223}
224
24487981
JB
225static inline int drv_set_tim(struct ieee80211_local *local,
226 struct ieee80211_sta *sta, bool set)
227{
0a2b8bb2 228 int ret = 0;
4efc76bd 229 trace_drv_set_tim(local, sta, set);
24487981 230 if (local->ops->set_tim)
0a2b8bb2 231 ret = local->ops->set_tim(&local->hw, sta, set);
4efc76bd 232 trace_drv_return_int(local, ret);
0a2b8bb2 233 return ret;
24487981
JB
234}
235
236static inline int drv_set_key(struct ieee80211_local *local,
12375ef9
JB
237 enum set_key_cmd cmd,
238 struct ieee80211_sub_if_data *sdata,
24487981
JB
239 struct ieee80211_sta *sta,
240 struct ieee80211_key_conf *key)
241{
e1781ed3
KV
242 int ret;
243
244 might_sleep();
245
077f4939 246 sdata = get_bss_sdata(sdata);
f6837ba8
JB
247 if (!check_sdata_in_driver(sdata))
248 return -EIO;
7b7eab6f 249
4efc76bd 250 trace_drv_set_key(local, cmd, sdata, sta, key);
e1781ed3 251 ret = local->ops->set_key(&local->hw, cmd, &sdata->vif, sta, key);
4efc76bd 252 trace_drv_return_int(local, ret);
0a2b8bb2 253 return ret;
24487981
JB
254}
255
256static inline void drv_update_tkip_key(struct ieee80211_local *local,
b3fbdcf4 257 struct ieee80211_sub_if_data *sdata,
24487981 258 struct ieee80211_key_conf *conf,
b3fbdcf4 259 struct sta_info *sta, u32 iv32,
24487981
JB
260 u16 *phase1key)
261{
b3fbdcf4
JB
262 struct ieee80211_sta *ista = NULL;
263
b3fbdcf4
JB
264 if (sta)
265 ista = &sta->sta;
266
077f4939 267 sdata = get_bss_sdata(sdata);
f6837ba8
JB
268 if (!check_sdata_in_driver(sdata))
269 return;
7b7eab6f 270
4efc76bd 271 trace_drv_update_tkip_key(local, sdata, conf, ista, iv32);
24487981 272 if (local->ops->update_tkip_key)
b3fbdcf4
JB
273 local->ops->update_tkip_key(&local->hw, &sdata->vif, conf,
274 ista, iv32, phase1key);
4efc76bd 275 trace_drv_return_void(local);
24487981
JB
276}
277
278static inline int drv_hw_scan(struct ieee80211_local *local,
a060bbfe 279 struct ieee80211_sub_if_data *sdata,
c56ef672 280 struct ieee80211_scan_request *req)
24487981 281{
e1781ed3
KV
282 int ret;
283
284 might_sleep();
285
f6837ba8
JB
286 if (!check_sdata_in_driver(sdata))
287 return -EIO;
7b7eab6f 288
79f460ca 289 trace_drv_hw_scan(local, sdata);
a060bbfe 290 ret = local->ops->hw_scan(&local->hw, &sdata->vif, req);
4efc76bd 291 trace_drv_return_int(local, ret);
0a2b8bb2 292 return ret;
24487981
JB
293}
294
b856439b
EP
295static inline void drv_cancel_hw_scan(struct ieee80211_local *local,
296 struct ieee80211_sub_if_data *sdata)
297{
298 might_sleep();
299
f6837ba8
JB
300 if (!check_sdata_in_driver(sdata))
301 return;
7b7eab6f 302
b856439b
EP
303 trace_drv_cancel_hw_scan(local, sdata);
304 local->ops->cancel_hw_scan(&local->hw, &sdata->vif);
305 trace_drv_return_void(local);
306}
307
79f460ca
LC
308static inline int
309drv_sched_scan_start(struct ieee80211_local *local,
310 struct ieee80211_sub_if_data *sdata,
311 struct cfg80211_sched_scan_request *req,
633e2713 312 struct ieee80211_scan_ies *ies)
79f460ca
LC
313{
314 int ret;
315
316 might_sleep();
317
f6837ba8
JB
318 if (!check_sdata_in_driver(sdata))
319 return -EIO;
7b7eab6f 320
79f460ca
LC
321 trace_drv_sched_scan_start(local, sdata);
322 ret = local->ops->sched_scan_start(&local->hw, &sdata->vif,
323 req, ies);
324 trace_drv_return_int(local, ret);
325 return ret;
326}
327
37e3308c
JB
328static inline int drv_sched_scan_stop(struct ieee80211_local *local,
329 struct ieee80211_sub_if_data *sdata)
79f460ca 330{
37e3308c
JB
331 int ret;
332
79f460ca
LC
333 might_sleep();
334
f6837ba8
JB
335 if (!check_sdata_in_driver(sdata))
336 return -EIO;
7b7eab6f 337
79f460ca 338 trace_drv_sched_scan_stop(local, sdata);
37e3308c
JB
339 ret = local->ops->sched_scan_stop(&local->hw, &sdata->vif);
340 trace_drv_return_int(local, ret);
341
342 return ret;
79f460ca
LC
343}
344
a344d677
JB
345static inline void drv_sw_scan_start(struct ieee80211_local *local,
346 struct ieee80211_sub_if_data *sdata,
347 const u8 *mac_addr)
24487981 348{
e1781ed3
KV
349 might_sleep();
350
a344d677 351 trace_drv_sw_scan_start(local, sdata, mac_addr);
24487981 352 if (local->ops->sw_scan_start)
a344d677 353 local->ops->sw_scan_start(&local->hw, &sdata->vif, mac_addr);
4efc76bd 354 trace_drv_return_void(local);
24487981
JB
355}
356
a344d677
JB
357static inline void drv_sw_scan_complete(struct ieee80211_local *local,
358 struct ieee80211_sub_if_data *sdata)
24487981 359{
e1781ed3
KV
360 might_sleep();
361
a344d677 362 trace_drv_sw_scan_complete(local, sdata);
24487981 363 if (local->ops->sw_scan_complete)
a344d677 364 local->ops->sw_scan_complete(&local->hw, &sdata->vif);
4efc76bd 365 trace_drv_return_void(local);
24487981
JB
366}
367
368static inline int drv_get_stats(struct ieee80211_local *local,
369 struct ieee80211_low_level_stats *stats)
370{
0a2b8bb2
JB
371 int ret = -EOPNOTSUPP;
372
e1781ed3
KV
373 might_sleep();
374
0a2b8bb2
JB
375 if (local->ops->get_stats)
376 ret = local->ops->get_stats(&local->hw, stats);
377 trace_drv_get_stats(local, stats, ret);
378
379 return ret;
24487981
JB
380}
381
9352c19f
JB
382static inline void drv_get_key_seq(struct ieee80211_local *local,
383 struct ieee80211_key *key,
384 struct ieee80211_key_seq *seq)
24487981 385{
9352c19f
JB
386 if (local->ops->get_key_seq)
387 local->ops->get_key_seq(&local->hw, &key->conf, seq);
388 trace_drv_get_key_seq(local, &key->conf);
24487981
JB
389}
390
f23a4780
AN
391static inline int drv_set_frag_threshold(struct ieee80211_local *local,
392 u32 value)
393{
394 int ret = 0;
395
396 might_sleep();
397
398 trace_drv_set_frag_threshold(local, value);
399 if (local->ops->set_frag_threshold)
400 ret = local->ops->set_frag_threshold(&local->hw, value);
401 trace_drv_return_int(local, ret);
402 return ret;
403}
404
24487981
JB
405static inline int drv_set_rts_threshold(struct ieee80211_local *local,
406 u32 value)
407{
0a2b8bb2 408 int ret = 0;
e1781ed3
KV
409
410 might_sleep();
411
4efc76bd 412 trace_drv_set_rts_threshold(local, value);
24487981 413 if (local->ops->set_rts_threshold)
0a2b8bb2 414 ret = local->ops->set_rts_threshold(&local->hw, value);
4efc76bd 415 trace_drv_return_int(local, ret);
0a2b8bb2 416 return ret;
24487981
JB
417}
418
310bc676 419static inline int drv_set_coverage_class(struct ieee80211_local *local,
a4bcaf55 420 s16 value)
310bc676
LT
421{
422 int ret = 0;
423 might_sleep();
424
4efc76bd 425 trace_drv_set_coverage_class(local, value);
310bc676
LT
426 if (local->ops->set_coverage_class)
427 local->ops->set_coverage_class(&local->hw, value);
428 else
429 ret = -EOPNOTSUPP;
430
4efc76bd 431 trace_drv_return_int(local, ret);
310bc676
LT
432 return ret;
433}
434
24487981 435static inline void drv_sta_notify(struct ieee80211_local *local,
12375ef9 436 struct ieee80211_sub_if_data *sdata,
24487981
JB
437 enum sta_notify_cmd cmd,
438 struct ieee80211_sta *sta)
439{
bc192f89 440 sdata = get_bss_sdata(sdata);
f6837ba8
JB
441 if (!check_sdata_in_driver(sdata))
442 return;
7b7eab6f 443
4efc76bd 444 trace_drv_sta_notify(local, sdata, cmd, sta);
24487981 445 if (local->ops->sta_notify)
12375ef9 446 local->ops->sta_notify(&local->hw, &sdata->vif, cmd, sta);
4efc76bd 447 trace_drv_return_void(local);
24487981
JB
448}
449
34e89507
JB
450static inline int drv_sta_add(struct ieee80211_local *local,
451 struct ieee80211_sub_if_data *sdata,
452 struct ieee80211_sta *sta)
453{
454 int ret = 0;
455
456 might_sleep();
457
bc192f89 458 sdata = get_bss_sdata(sdata);
f6837ba8
JB
459 if (!check_sdata_in_driver(sdata))
460 return -EIO;
7b7eab6f 461
4efc76bd 462 trace_drv_sta_add(local, sdata, sta);
34e89507
JB
463 if (local->ops->sta_add)
464 ret = local->ops->sta_add(&local->hw, &sdata->vif, sta);
34e89507 465
4efc76bd 466 trace_drv_return_int(local, ret);
34e89507
JB
467
468 return ret;
469}
470
471static inline void drv_sta_remove(struct ieee80211_local *local,
472 struct ieee80211_sub_if_data *sdata,
473 struct ieee80211_sta *sta)
474{
475 might_sleep();
476
bc192f89 477 sdata = get_bss_sdata(sdata);
f6837ba8
JB
478 if (!check_sdata_in_driver(sdata))
479 return;
7b7eab6f 480
4efc76bd 481 trace_drv_sta_remove(local, sdata, sta);
34e89507
JB
482 if (local->ops->sta_remove)
483 local->ops->sta_remove(&local->hw, &sdata->vif, sta);
34e89507 484
4efc76bd 485 trace_drv_return_void(local);
34e89507
JB
486}
487
77d2ece6
SM
488#ifdef CONFIG_MAC80211_DEBUGFS
489static inline void drv_sta_add_debugfs(struct ieee80211_local *local,
490 struct ieee80211_sub_if_data *sdata,
491 struct ieee80211_sta *sta,
492 struct dentry *dir)
493{
494 might_sleep();
495
496 sdata = get_bss_sdata(sdata);
f6837ba8
JB
497 if (!check_sdata_in_driver(sdata))
498 return;
77d2ece6
SM
499
500 if (local->ops->sta_add_debugfs)
501 local->ops->sta_add_debugfs(&local->hw, &sdata->vif,
502 sta, dir);
503}
77d2ece6
SM
504#endif
505
6a9d1b91
JB
506static inline void drv_sta_pre_rcu_remove(struct ieee80211_local *local,
507 struct ieee80211_sub_if_data *sdata,
508 struct sta_info *sta)
509{
510 might_sleep();
511
512 sdata = get_bss_sdata(sdata);
f6837ba8
JB
513 if (!check_sdata_in_driver(sdata))
514 return;
6a9d1b91
JB
515
516 trace_drv_sta_pre_rcu_remove(local, sdata, &sta->sta);
517 if (local->ops->sta_pre_rcu_remove)
518 local->ops->sta_pre_rcu_remove(&local->hw, &sdata->vif,
519 &sta->sta);
520 trace_drv_return_void(local);
521}
522
727da60b 523__must_check
f09603a2
JB
524int drv_sta_state(struct ieee80211_local *local,
525 struct ieee80211_sub_if_data *sdata,
526 struct sta_info *sta,
527 enum ieee80211_sta_state old_state,
727da60b 528 enum ieee80211_sta_state new_state);
f09603a2 529
4fbd572c
DV
530void drv_sta_rc_update(struct ieee80211_local *local,
531 struct ieee80211_sub_if_data *sdata,
532 struct ieee80211_sta *sta, u32 changed);
8f727ef3 533
f815e2b3
JB
534static inline void drv_sta_rate_tbl_update(struct ieee80211_local *local,
535 struct ieee80211_sub_if_data *sdata,
536 struct ieee80211_sta *sta)
537{
538 sdata = get_bss_sdata(sdata);
539 if (!check_sdata_in_driver(sdata))
540 return;
541
542 trace_drv_sta_rate_tbl_update(local, sdata, sta);
543 if (local->ops->sta_rate_tbl_update)
544 local->ops->sta_rate_tbl_update(&local->hw, &sdata->vif, sta);
545
546 trace_drv_return_void(local);
547}
548
2b9a7e1b
JB
549static inline void drv_sta_statistics(struct ieee80211_local *local,
550 struct ieee80211_sub_if_data *sdata,
551 struct ieee80211_sta *sta,
552 struct station_info *sinfo)
553{
554 sdata = get_bss_sdata(sdata);
555 if (!check_sdata_in_driver(sdata))
556 return;
557
558 trace_drv_sta_statistics(local, sdata, sta);
559 if (local->ops->sta_statistics)
560 local->ops->sta_statistics(&local->hw, &sdata->vif, sta, sinfo);
561 trace_drv_return_void(local);
562}
563
b23dcd4a
DV
564int drv_conf_tx(struct ieee80211_local *local,
565 struct ieee80211_sub_if_data *sdata, u16 ac,
566 const struct ieee80211_tx_queue_params *params);
24487981 567
416eb9fc
DV
568u64 drv_get_tsf(struct ieee80211_local *local,
569 struct ieee80211_sub_if_data *sdata);
570void drv_set_tsf(struct ieee80211_local *local,
571 struct ieee80211_sub_if_data *sdata,
572 u64 tsf);
354d381b
PT
573void drv_offset_tsf(struct ieee80211_local *local,
574 struct ieee80211_sub_if_data *sdata,
575 s64 offset);
416eb9fc
DV
576void drv_reset_tsf(struct ieee80211_local *local,
577 struct ieee80211_sub_if_data *sdata);
24487981
JB
578
579static inline int drv_tx_last_beacon(struct ieee80211_local *local)
580{
02582e9b 581 int ret = 0; /* default unsupported op for less congestion */
e1781ed3
KV
582
583 might_sleep();
584
4efc76bd 585 trace_drv_tx_last_beacon(local);
24487981 586 if (local->ops->tx_last_beacon)
0a2b8bb2 587 ret = local->ops->tx_last_beacon(&local->hw);
4efc76bd 588 trace_drv_return_int(local, ret);
0a2b8bb2 589 return ret;
24487981
JB
590}
591
6db96838
DV
592int drv_ampdu_action(struct ieee80211_local *local,
593 struct ieee80211_sub_if_data *sdata,
50ea05ef 594 struct ieee80211_ampdu_params *params);
1f87f7d3 595
1289723e
HS
596static inline int drv_get_survey(struct ieee80211_local *local, int idx,
597 struct survey_info *survey)
598{
599 int ret = -EOPNOTSUPP;
c466d4ef
JL
600
601 trace_drv_get_survey(local, idx, survey);
602
35dd0509 603 if (local->ops->get_survey)
1289723e 604 ret = local->ops->get_survey(&local->hw, idx, survey);
c466d4ef
JL
605
606 trace_drv_return_int(local, ret);
607
1289723e
HS
608 return ret;
609}
1f87f7d3
JB
610
611static inline void drv_rfkill_poll(struct ieee80211_local *local)
612{
e1781ed3
KV
613 might_sleep();
614
1f87f7d3
JB
615 if (local->ops->rfkill_poll)
616 local->ops->rfkill_poll(&local->hw);
617}
a80f7c0b 618
39ecc01d 619static inline void drv_flush(struct ieee80211_local *local,
77be2c54 620 struct ieee80211_sub_if_data *sdata,
39ecc01d 621 u32 queues, bool drop)
a80f7c0b 622{
77be2c54
EG
623 struct ieee80211_vif *vif = sdata ? &sdata->vif : NULL;
624
e1781ed3
KV
625 might_sleep();
626
f6837ba8
JB
627 if (sdata && !check_sdata_in_driver(sdata))
628 return;
77be2c54 629
39ecc01d 630 trace_drv_flush(local, queues, drop);
a80f7c0b 631 if (local->ops->flush)
77be2c54 632 local->ops->flush(&local->hw, vif, queues, drop);
4efc76bd 633 trace_drv_return_void(local);
a80f7c0b 634}
5ce6e438
JB
635
636static inline void drv_channel_switch(struct ieee80211_local *local,
0f791eb4
LC
637 struct ieee80211_sub_if_data *sdata,
638 struct ieee80211_channel_switch *ch_switch)
5ce6e438
JB
639{
640 might_sleep();
641
0f791eb4
LC
642 trace_drv_channel_switch(local, sdata, ch_switch);
643 local->ops->channel_switch(&local->hw, &sdata->vif, ch_switch);
4efc76bd 644 trace_drv_return_void(local);
5ce6e438
JB
645}
646
15d96753
BR
647
648static inline int drv_set_antenna(struct ieee80211_local *local,
649 u32 tx_ant, u32 rx_ant)
650{
651 int ret = -EOPNOTSUPP;
652 might_sleep();
653 if (local->ops->set_antenna)
654 ret = local->ops->set_antenna(&local->hw, tx_ant, rx_ant);
655 trace_drv_set_antenna(local, tx_ant, rx_ant, ret);
656 return ret;
657}
658
659static inline int drv_get_antenna(struct ieee80211_local *local,
660 u32 *tx_ant, u32 *rx_ant)
661{
662 int ret = -EOPNOTSUPP;
663 might_sleep();
664 if (local->ops->get_antenna)
665 ret = local->ops->get_antenna(&local->hw, tx_ant, rx_ant);
666 trace_drv_get_antenna(local, *tx_ant, *rx_ant, ret);
667 return ret;
668}
669
21f83589 670static inline int drv_remain_on_channel(struct ieee80211_local *local,
49884568 671 struct ieee80211_sub_if_data *sdata,
21f83589 672 struct ieee80211_channel *chan,
d339d5ca
IP
673 unsigned int duration,
674 enum ieee80211_roc_type type)
21f83589
JB
675{
676 int ret;
677
678 might_sleep();
679
d339d5ca 680 trace_drv_remain_on_channel(local, sdata, chan, duration, type);
49884568 681 ret = local->ops->remain_on_channel(&local->hw, &sdata->vif,
d339d5ca 682 chan, duration, type);
21f83589
JB
683 trace_drv_return_int(local, ret);
684
685 return ret;
686}
687
688static inline int drv_cancel_remain_on_channel(struct ieee80211_local *local)
689{
690 int ret;
691
692 might_sleep();
693
694 trace_drv_cancel_remain_on_channel(local);
695 ret = local->ops->cancel_remain_on_channel(&local->hw);
696 trace_drv_return_int(local, ret);
5f16a436
JB
697
698 return ret;
699}
700
38c09159
JL
701static inline int drv_set_ringparam(struct ieee80211_local *local,
702 u32 tx, u32 rx)
703{
704 int ret = -ENOTSUPP;
705
706 might_sleep();
707
708 trace_drv_set_ringparam(local, tx, rx);
709 if (local->ops->set_ringparam)
710 ret = local->ops->set_ringparam(&local->hw, tx, rx);
711 trace_drv_return_int(local, ret);
712
713 return ret;
714}
715
716static inline void drv_get_ringparam(struct ieee80211_local *local,
717 u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max)
718{
719 might_sleep();
720
721 trace_drv_get_ringparam(local, tx, tx_max, rx, rx_max);
722 if (local->ops->get_ringparam)
723 local->ops->get_ringparam(&local->hw, tx, tx_max, rx, rx_max);
724 trace_drv_return_void(local);
725}
726
e8306f98
VN
727static inline bool drv_tx_frames_pending(struct ieee80211_local *local)
728{
729 bool ret = false;
730
731 might_sleep();
732
733 trace_drv_tx_frames_pending(local);
734 if (local->ops->tx_frames_pending)
735 ret = local->ops->tx_frames_pending(&local->hw);
736 trace_drv_return_bool(local, ret);
737
738 return ret;
739}
bdbfd6b5
SM
740
741static inline int drv_set_bitrate_mask(struct ieee80211_local *local,
742 struct ieee80211_sub_if_data *sdata,
743 const struct cfg80211_bitrate_mask *mask)
744{
745 int ret = -EOPNOTSUPP;
746
747 might_sleep();
748
f6837ba8
JB
749 if (!check_sdata_in_driver(sdata))
750 return -EIO;
7b7eab6f 751
bdbfd6b5
SM
752 trace_drv_set_bitrate_mask(local, sdata, mask);
753 if (local->ops->set_bitrate_mask)
754 ret = local->ops->set_bitrate_mask(&local->hw,
755 &sdata->vif, mask);
756 trace_drv_return_int(local, ret);
757
758 return ret;
759}
760
c68f4b89
JB
761static inline void drv_set_rekey_data(struct ieee80211_local *local,
762 struct ieee80211_sub_if_data *sdata,
763 struct cfg80211_gtk_rekey_data *data)
764{
f6837ba8
JB
765 if (!check_sdata_in_driver(sdata))
766 return;
7b7eab6f 767
c68f4b89
JB
768 trace_drv_set_rekey_data(local, sdata, data);
769 if (local->ops->set_rekey_data)
770 local->ops->set_rekey_data(&local->hw, &sdata->vif, data);
771 trace_drv_return_void(local);
772}
773
a8182929
EG
774static inline void drv_event_callback(struct ieee80211_local *local,
775 struct ieee80211_sub_if_data *sdata,
776 const struct ieee80211_event *event)
615f7b9b 777{
a8182929
EG
778 trace_drv_event_callback(local, sdata, event);
779 if (local->ops->event_callback)
780 local->ops->event_callback(&local->hw, &sdata->vif, event);
615f7b9b
MV
781 trace_drv_return_void(local);
782}
4049e09a
JB
783
784static inline void
785drv_release_buffered_frames(struct ieee80211_local *local,
786 struct sta_info *sta, u16 tids, int num_frames,
787 enum ieee80211_frame_release_type reason,
788 bool more_data)
789{
790 trace_drv_release_buffered_frames(local, &sta->sta, tids, num_frames,
791 reason, more_data);
792 if (local->ops->release_buffered_frames)
793 local->ops->release_buffered_frames(&local->hw, &sta->sta, tids,
794 num_frames, reason,
795 more_data);
796 trace_drv_return_void(local);
797}
40b96408
JB
798
799static inline void
800drv_allow_buffered_frames(struct ieee80211_local *local,
801 struct sta_info *sta, u16 tids, int num_frames,
802 enum ieee80211_frame_release_type reason,
803 bool more_data)
804{
805 trace_drv_allow_buffered_frames(local, &sta->sta, tids, num_frames,
806 reason, more_data);
807 if (local->ops->allow_buffered_frames)
808 local->ops->allow_buffered_frames(&local->hw, &sta->sta,
809 tids, num_frames, reason,
810 more_data);
811 trace_drv_return_void(local);
812}
66572cfc 813
a1845fc7
JB
814static inline void drv_mgd_prepare_tx(struct ieee80211_local *local,
815 struct ieee80211_sub_if_data *sdata)
816{
817 might_sleep();
818
f6837ba8
JB
819 if (!check_sdata_in_driver(sdata))
820 return;
a1845fc7
JB
821 WARN_ON_ONCE(sdata->vif.type != NL80211_IFTYPE_STATION);
822
823 trace_drv_mgd_prepare_tx(local, sdata);
824 if (local->ops->mgd_prepare_tx)
825 local->ops->mgd_prepare_tx(&local->hw, &sdata->vif);
826 trace_drv_return_void(local);
827}
c3645eac 828
ee10f2c7
AN
829static inline void
830drv_mgd_protect_tdls_discover(struct ieee80211_local *local,
831 struct ieee80211_sub_if_data *sdata)
832{
833 might_sleep();
834
835 if (!check_sdata_in_driver(sdata))
836 return;
837 WARN_ON_ONCE(sdata->vif.type != NL80211_IFTYPE_STATION);
838
839 trace_drv_mgd_protect_tdls_discover(local, sdata);
840 if (local->ops->mgd_protect_tdls_discover)
841 local->ops->mgd_protect_tdls_discover(&local->hw, &sdata->vif);
842 trace_drv_return_void(local);
843}
844
c3645eac
MK
845static inline int drv_add_chanctx(struct ieee80211_local *local,
846 struct ieee80211_chanctx *ctx)
847{
848 int ret = -EOPNOTSUPP;
849
dcae9e02
C
850 might_sleep();
851
c3645eac
MK
852 trace_drv_add_chanctx(local, ctx);
853 if (local->ops->add_chanctx)
854 ret = local->ops->add_chanctx(&local->hw, &ctx->conf);
855 trace_drv_return_int(local, ret);
8a61af65
JB
856 if (!ret)
857 ctx->driver_present = true;
c3645eac
MK
858
859 return ret;
860}
861
862static inline void drv_remove_chanctx(struct ieee80211_local *local,
863 struct ieee80211_chanctx *ctx)
864{
dcae9e02
C
865 might_sleep();
866
f6837ba8
JB
867 if (WARN_ON(!ctx->driver_present))
868 return;
869
c3645eac
MK
870 trace_drv_remove_chanctx(local, ctx);
871 if (local->ops->remove_chanctx)
872 local->ops->remove_chanctx(&local->hw, &ctx->conf);
873 trace_drv_return_void(local);
8a61af65 874 ctx->driver_present = false;
c3645eac
MK
875}
876
877static inline void drv_change_chanctx(struct ieee80211_local *local,
878 struct ieee80211_chanctx *ctx,
879 u32 changed)
880{
dcae9e02
C
881 might_sleep();
882
c3645eac 883 trace_drv_change_chanctx(local, ctx, changed);
8a61af65
JB
884 if (local->ops->change_chanctx) {
885 WARN_ON_ONCE(!ctx->driver_present);
c3645eac 886 local->ops->change_chanctx(&local->hw, &ctx->conf, changed);
8a61af65 887 }
c3645eac
MK
888 trace_drv_return_void(local);
889}
890
891static inline int drv_assign_vif_chanctx(struct ieee80211_local *local,
892 struct ieee80211_sub_if_data *sdata,
893 struct ieee80211_chanctx *ctx)
894{
895 int ret = 0;
896
f6837ba8
JB
897 if (!check_sdata_in_driver(sdata))
898 return -EIO;
c3645eac
MK
899
900 trace_drv_assign_vif_chanctx(local, sdata, ctx);
8a61af65
JB
901 if (local->ops->assign_vif_chanctx) {
902 WARN_ON_ONCE(!ctx->driver_present);
c3645eac
MK
903 ret = local->ops->assign_vif_chanctx(&local->hw,
904 &sdata->vif,
905 &ctx->conf);
8a61af65 906 }
c3645eac
MK
907 trace_drv_return_int(local, ret);
908
909 return ret;
910}
911
912static inline void drv_unassign_vif_chanctx(struct ieee80211_local *local,
913 struct ieee80211_sub_if_data *sdata,
914 struct ieee80211_chanctx *ctx)
915{
dcae9e02
C
916 might_sleep();
917
f6837ba8
JB
918 if (!check_sdata_in_driver(sdata))
919 return;
c3645eac
MK
920
921 trace_drv_unassign_vif_chanctx(local, sdata, ctx);
8a61af65
JB
922 if (local->ops->unassign_vif_chanctx) {
923 WARN_ON_ONCE(!ctx->driver_present);
c3645eac
MK
924 local->ops->unassign_vif_chanctx(&local->hw,
925 &sdata->vif,
926 &ctx->conf);
8a61af65 927 }
c3645eac
MK
928 trace_drv_return_void(local);
929}
930
42677ed3
DV
931int drv_switch_vif_chanctx(struct ieee80211_local *local,
932 struct ieee80211_vif_chanctx_switch *vifs,
933 int n_vifs, enum ieee80211_chanctx_switch_mode mode);
1a5f0c13 934
1041638f
JB
935static inline int drv_start_ap(struct ieee80211_local *local,
936 struct ieee80211_sub_if_data *sdata)
937{
938 int ret = 0;
939
dcae9e02
C
940 might_sleep();
941
f6837ba8
JB
942 if (!check_sdata_in_driver(sdata))
943 return -EIO;
1041638f
JB
944
945 trace_drv_start_ap(local, sdata, &sdata->vif.bss_conf);
946 if (local->ops->start_ap)
947 ret = local->ops->start_ap(&local->hw, &sdata->vif);
948 trace_drv_return_int(local, ret);
949 return ret;
950}
951
952static inline void drv_stop_ap(struct ieee80211_local *local,
953 struct ieee80211_sub_if_data *sdata)
954{
f6837ba8
JB
955 if (!check_sdata_in_driver(sdata))
956 return;
1041638f
JB
957
958 trace_drv_stop_ap(local, sdata);
959 if (local->ops->stop_ap)
960 local->ops->stop_ap(&local->hw, &sdata->vif);
961 trace_drv_return_void(local);
962}
963
cf2c92d8
EP
964static inline void
965drv_reconfig_complete(struct ieee80211_local *local,
966 enum ieee80211_reconfig_type reconfig_type)
9214ad7f
JB
967{
968 might_sleep();
969
cf2c92d8
EP
970 trace_drv_reconfig_complete(local, reconfig_type);
971 if (local->ops->reconfig_complete)
972 local->ops->reconfig_complete(&local->hw, reconfig_type);
9214ad7f
JB
973 trace_drv_return_void(local);
974}
975
de5fad81
YD
976static inline void
977drv_set_default_unicast_key(struct ieee80211_local *local,
978 struct ieee80211_sub_if_data *sdata,
979 int key_idx)
980{
f6837ba8
JB
981 if (!check_sdata_in_driver(sdata))
982 return;
de5fad81
YD
983
984 WARN_ON_ONCE(key_idx < -1 || key_idx > 3);
985
986 trace_drv_set_default_unicast_key(local, sdata, key_idx);
987 if (local->ops->set_default_unicast_key)
988 local->ops->set_default_unicast_key(&local->hw, &sdata->vif,
989 key_idx);
990 trace_drv_return_void(local);
991}
992
a65240c1
JB
993#if IS_ENABLED(CONFIG_IPV6)
994static inline void drv_ipv6_addr_change(struct ieee80211_local *local,
995 struct ieee80211_sub_if_data *sdata,
996 struct inet6_dev *idev)
997{
998 trace_drv_ipv6_addr_change(local, sdata);
999 if (local->ops->ipv6_addr_change)
1000 local->ops->ipv6_addr_change(&local->hw, &sdata->vif, idev);
1001 trace_drv_return_void(local);
1002}
1003#endif
1004
73da7d5b
SW
1005static inline void
1006drv_channel_switch_beacon(struct ieee80211_sub_if_data *sdata,
1007 struct cfg80211_chan_def *chandef)
1008{
1009 struct ieee80211_local *local = sdata->local;
1010
1011 if (local->ops->channel_switch_beacon) {
1012 trace_drv_channel_switch_beacon(local, sdata, chandef);
1013 local->ops->channel_switch_beacon(&local->hw, &sdata->vif,
1014 chandef);
1015 }
1016}
1017
6d027bcc
LC
1018static inline int
1019drv_pre_channel_switch(struct ieee80211_sub_if_data *sdata,
1020 struct ieee80211_channel_switch *ch_switch)
1021{
1022 struct ieee80211_local *local = sdata->local;
1023 int ret = 0;
1024
1025 if (!check_sdata_in_driver(sdata))
1026 return -EIO;
1027
1028 trace_drv_pre_channel_switch(local, sdata, ch_switch);
1029 if (local->ops->pre_channel_switch)
1030 ret = local->ops->pre_channel_switch(&local->hw, &sdata->vif,
1031 ch_switch);
1032 trace_drv_return_int(local, ret);
1033 return ret;
1034}
1035
f1d65583
LC
1036static inline int
1037drv_post_channel_switch(struct ieee80211_sub_if_data *sdata)
1038{
1039 struct ieee80211_local *local = sdata->local;
1040 int ret = 0;
1041
1042 if (!check_sdata_in_driver(sdata))
1043 return -EIO;
1044
1045 trace_drv_post_channel_switch(local, sdata);
1046 if (local->ops->post_channel_switch)
1047 ret = local->ops->post_channel_switch(&local->hw, &sdata->vif);
1048 trace_drv_return_int(local, ret);
1049 return ret;
1050}
1051
55fff501
JB
1052static inline int drv_join_ibss(struct ieee80211_local *local,
1053 struct ieee80211_sub_if_data *sdata)
1054{
1055 int ret = 0;
1056
1057 might_sleep();
f6837ba8
JB
1058 if (!check_sdata_in_driver(sdata))
1059 return -EIO;
55fff501
JB
1060
1061 trace_drv_join_ibss(local, sdata, &sdata->vif.bss_conf);
1062 if (local->ops->join_ibss)
1063 ret = local->ops->join_ibss(&local->hw, &sdata->vif);
1064 trace_drv_return_int(local, ret);
1065 return ret;
1066}
1067
1068static inline void drv_leave_ibss(struct ieee80211_local *local,
1069 struct ieee80211_sub_if_data *sdata)
1070{
1071 might_sleep();
f6837ba8
JB
1072 if (!check_sdata_in_driver(sdata))
1073 return;
55fff501
JB
1074
1075 trace_drv_leave_ibss(local, sdata);
1076 if (local->ops->leave_ibss)
1077 local->ops->leave_ibss(&local->hw, &sdata->vif);
1078 trace_drv_return_void(local);
1079}
1080
cca674d4 1081static inline u32 drv_get_expected_throughput(struct ieee80211_local *local,
4fdbc67a 1082 struct sta_info *sta)
cca674d4
AQ
1083{
1084 u32 ret = 0;
1085
4fdbc67a
MA
1086 trace_drv_get_expected_throughput(&sta->sta);
1087 if (local->ops->get_expected_throughput && sta->uploaded)
1088 ret = local->ops->get_expected_throughput(&local->hw, &sta->sta);
cca674d4
AQ
1089 trace_drv_return_u32(local, ret);
1090
1091 return ret;
1092}
1093
5b3dc42b
FF
1094static inline int drv_get_txpower(struct ieee80211_local *local,
1095 struct ieee80211_sub_if_data *sdata, int *dbm)
1096{
1097 int ret;
1098
1099 if (!local->ops->get_txpower)
1100 return -EOPNOTSUPP;
1101
1102 ret = local->ops->get_txpower(&local->hw, &sdata->vif, dbm);
1103 trace_drv_get_txpower(local, sdata, *dbm, ret);
1104
1105 return ret;
1106}
1107
a7a6bdd0
AN
1108static inline int
1109drv_tdls_channel_switch(struct ieee80211_local *local,
1110 struct ieee80211_sub_if_data *sdata,
1111 struct ieee80211_sta *sta, u8 oper_class,
1112 struct cfg80211_chan_def *chandef,
1113 struct sk_buff *tmpl_skb, u32 ch_sw_tm_ie)
1114{
1115 int ret;
1116
1117 might_sleep();
1118 if (!check_sdata_in_driver(sdata))
1119 return -EIO;
1120
1121 if (!local->ops->tdls_channel_switch)
1122 return -EOPNOTSUPP;
1123
1124 trace_drv_tdls_channel_switch(local, sdata, sta, oper_class, chandef);
1125 ret = local->ops->tdls_channel_switch(&local->hw, &sdata->vif, sta,
1126 oper_class, chandef, tmpl_skb,
1127 ch_sw_tm_ie);
1128 trace_drv_return_int(local, ret);
1129 return ret;
1130}
1131
1132static inline void
1133drv_tdls_cancel_channel_switch(struct ieee80211_local *local,
1134 struct ieee80211_sub_if_data *sdata,
1135 struct ieee80211_sta *sta)
1136{
1137 might_sleep();
1138 if (!check_sdata_in_driver(sdata))
1139 return;
1140
1141 if (!local->ops->tdls_cancel_channel_switch)
1142 return;
1143
1144 trace_drv_tdls_cancel_channel_switch(local, sdata, sta);
1145 local->ops->tdls_cancel_channel_switch(&local->hw, &sdata->vif, sta);
1146 trace_drv_return_void(local);
1147}
1148
8a4d32f3
AN
1149static inline void
1150drv_tdls_recv_channel_switch(struct ieee80211_local *local,
1151 struct ieee80211_sub_if_data *sdata,
1152 struct ieee80211_tdls_ch_sw_params *params)
1153{
1154 trace_drv_tdls_recv_channel_switch(local, sdata, params);
1155 if (local->ops->tdls_recv_channel_switch)
1156 local->ops->tdls_recv_channel_switch(&local->hw, &sdata->vif,
1157 params);
1158 trace_drv_return_void(local);
1159}
1160
ba8c3d6f
FF
1161static inline void drv_wake_tx_queue(struct ieee80211_local *local,
1162 struct txq_info *txq)
1163{
1164 struct ieee80211_sub_if_data *sdata = vif_to_sdata(txq->txq.vif);
1165
1166 if (!check_sdata_in_driver(sdata))
1167 return;
1168
1169 trace_drv_wake_tx_queue(local, sdata, txq);
1170 local->ops->wake_tx_queue(&local->hw, &txq->txq);
1171}
1172
708d50ed
AB
1173static inline int drv_start_nan(struct ieee80211_local *local,
1174 struct ieee80211_sub_if_data *sdata,
1175 struct cfg80211_nan_conf *conf)
1176{
1177 int ret;
1178
1179 might_sleep();
1180 check_sdata_in_driver(sdata);
1181
1182 trace_drv_start_nan(local, sdata, conf);
1183 ret = local->ops->start_nan(&local->hw, &sdata->vif, conf);
1184 trace_drv_return_int(local, ret);
1185 return ret;
1186}
1187
1188static inline void drv_stop_nan(struct ieee80211_local *local,
1189 struct ieee80211_sub_if_data *sdata)
1190{
1191 might_sleep();
1192 check_sdata_in_driver(sdata);
1193
1194 trace_drv_stop_nan(local, sdata);
1195 local->ops->stop_nan(&local->hw, &sdata->vif);
1196 trace_drv_return_void(local);
1197}
1198
5953ff6d
AB
1199static inline int drv_nan_change_conf(struct ieee80211_local *local,
1200 struct ieee80211_sub_if_data *sdata,
1201 struct cfg80211_nan_conf *conf,
1202 u32 changes)
1203{
1204 int ret;
1205
1206 might_sleep();
1207 check_sdata_in_driver(sdata);
1208
1209 if (!local->ops->nan_change_conf)
1210 return -EOPNOTSUPP;
1211
1212 trace_drv_nan_change_conf(local, sdata, conf, changes);
1213 ret = local->ops->nan_change_conf(&local->hw, &sdata->vif, conf,
1214 changes);
1215 trace_drv_return_int(local, ret);
1216
1217 return ret;
1218}
1219
167e33f4
AB
1220static inline int drv_add_nan_func(struct ieee80211_local *local,
1221 struct ieee80211_sub_if_data *sdata,
1222 const struct cfg80211_nan_func *nan_func)
1223{
1224 int ret;
1225
1226 might_sleep();
1227 check_sdata_in_driver(sdata);
1228
1229 if (!local->ops->add_nan_func)
1230 return -EOPNOTSUPP;
1231
1232 trace_drv_add_nan_func(local, sdata, nan_func);
1233 ret = local->ops->add_nan_func(&local->hw, &sdata->vif, nan_func);
1234 trace_drv_return_int(local, ret);
1235
1236 return ret;
1237}
1238
1239static inline void drv_del_nan_func(struct ieee80211_local *local,
1240 struct ieee80211_sub_if_data *sdata,
1241 u8 instance_id)
1242{
1243 might_sleep();
1244 check_sdata_in_driver(sdata);
1245
1246 trace_drv_del_nan_func(local, sdata, instance_id);
1247 if (local->ops->del_nan_func)
1248 local->ops->del_nan_func(&local->hw, &sdata->vif, instance_id);
1249 trace_drv_return_void(local);
1250}
1251
24487981 1252#endif /* __MAC80211_DRIVER_OPS */