1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __CFG80211_RDEV_OPS
3 #define __CFG80211_RDEV_OPS
5 #include <linux/rtnetlink.h>
6 #include <net/cfg80211.h>
10 static inline int rdev_suspend(struct cfg80211_registered_device
*rdev
,
11 struct cfg80211_wowlan
*wowlan
)
14 trace_rdev_suspend(&rdev
->wiphy
, wowlan
);
15 ret
= rdev
->ops
->suspend(&rdev
->wiphy
, wowlan
);
16 trace_rdev_return_int(&rdev
->wiphy
, ret
);
20 static inline int rdev_resume(struct cfg80211_registered_device
*rdev
)
23 trace_rdev_resume(&rdev
->wiphy
);
24 ret
= rdev
->ops
->resume(&rdev
->wiphy
);
25 trace_rdev_return_int(&rdev
->wiphy
, ret
);
29 static inline void rdev_set_wakeup(struct cfg80211_registered_device
*rdev
,
32 trace_rdev_set_wakeup(&rdev
->wiphy
, enabled
);
33 rdev
->ops
->set_wakeup(&rdev
->wiphy
, enabled
);
34 trace_rdev_return_void(&rdev
->wiphy
);
37 static inline struct wireless_dev
38 *rdev_add_virtual_intf(struct cfg80211_registered_device
*rdev
, char *name
,
39 unsigned char name_assign_type
,
40 enum nl80211_iftype type
,
41 struct vif_params
*params
)
43 struct wireless_dev
*ret
;
44 trace_rdev_add_virtual_intf(&rdev
->wiphy
, name
, type
);
45 ret
= rdev
->ops
->add_virtual_intf(&rdev
->wiphy
, name
, name_assign_type
,
47 trace_rdev_return_wdev(&rdev
->wiphy
, ret
);
52 rdev_del_virtual_intf(struct cfg80211_registered_device
*rdev
,
53 struct wireless_dev
*wdev
)
56 trace_rdev_del_virtual_intf(&rdev
->wiphy
, wdev
);
57 ret
= rdev
->ops
->del_virtual_intf(&rdev
->wiphy
, wdev
);
58 trace_rdev_return_int(&rdev
->wiphy
, ret
);
63 rdev_change_virtual_intf(struct cfg80211_registered_device
*rdev
,
64 struct net_device
*dev
, enum nl80211_iftype type
,
65 struct vif_params
*params
)
68 trace_rdev_change_virtual_intf(&rdev
->wiphy
, dev
, type
);
69 ret
= rdev
->ops
->change_virtual_intf(&rdev
->wiphy
, dev
, type
, params
);
70 trace_rdev_return_int(&rdev
->wiphy
, ret
);
74 static inline int rdev_add_key(struct cfg80211_registered_device
*rdev
,
75 struct net_device
*netdev
, u8 key_index
,
76 bool pairwise
, const u8
*mac_addr
,
77 struct key_params
*params
)
80 trace_rdev_add_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
,
81 mac_addr
, params
->mode
);
82 ret
= rdev
->ops
->add_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
,
84 trace_rdev_return_int(&rdev
->wiphy
, ret
);
89 rdev_get_key(struct cfg80211_registered_device
*rdev
, struct net_device
*netdev
,
90 u8 key_index
, bool pairwise
, const u8
*mac_addr
, void *cookie
,
91 void (*callback
)(void *cookie
, struct key_params
*))
94 trace_rdev_get_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
, mac_addr
);
95 ret
= rdev
->ops
->get_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
,
96 mac_addr
, cookie
, callback
);
97 trace_rdev_return_int(&rdev
->wiphy
, ret
);
101 static inline int rdev_del_key(struct cfg80211_registered_device
*rdev
,
102 struct net_device
*netdev
, u8 key_index
,
103 bool pairwise
, const u8
*mac_addr
)
106 trace_rdev_del_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
, mac_addr
);
107 ret
= rdev
->ops
->del_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
,
109 trace_rdev_return_int(&rdev
->wiphy
, ret
);
114 rdev_set_default_key(struct cfg80211_registered_device
*rdev
,
115 struct net_device
*netdev
, u8 key_index
, bool unicast
,
119 trace_rdev_set_default_key(&rdev
->wiphy
, netdev
, key_index
,
121 ret
= rdev
->ops
->set_default_key(&rdev
->wiphy
, netdev
, key_index
,
123 trace_rdev_return_int(&rdev
->wiphy
, ret
);
128 rdev_set_default_mgmt_key(struct cfg80211_registered_device
*rdev
,
129 struct net_device
*netdev
, u8 key_index
)
132 trace_rdev_set_default_mgmt_key(&rdev
->wiphy
, netdev
, key_index
);
133 ret
= rdev
->ops
->set_default_mgmt_key(&rdev
->wiphy
, netdev
,
135 trace_rdev_return_int(&rdev
->wiphy
, ret
);
140 rdev_set_default_beacon_key(struct cfg80211_registered_device
*rdev
,
141 struct net_device
*netdev
, u8 key_index
)
145 trace_rdev_set_default_beacon_key(&rdev
->wiphy
, netdev
, key_index
);
146 ret
= rdev
->ops
->set_default_beacon_key(&rdev
->wiphy
, netdev
,
148 trace_rdev_return_int(&rdev
->wiphy
, ret
);
152 static inline int rdev_start_ap(struct cfg80211_registered_device
*rdev
,
153 struct net_device
*dev
,
154 struct cfg80211_ap_settings
*settings
)
157 trace_rdev_start_ap(&rdev
->wiphy
, dev
, settings
);
158 ret
= rdev
->ops
->start_ap(&rdev
->wiphy
, dev
, settings
);
159 trace_rdev_return_int(&rdev
->wiphy
, ret
);
163 static inline int rdev_change_beacon(struct cfg80211_registered_device
*rdev
,
164 struct net_device
*dev
,
165 struct cfg80211_beacon_data
*info
)
168 trace_rdev_change_beacon(&rdev
->wiphy
, dev
, info
);
169 ret
= rdev
->ops
->change_beacon(&rdev
->wiphy
, dev
, info
);
170 trace_rdev_return_int(&rdev
->wiphy
, ret
);
174 static inline int rdev_stop_ap(struct cfg80211_registered_device
*rdev
,
175 struct net_device
*dev
)
178 trace_rdev_stop_ap(&rdev
->wiphy
, dev
);
179 ret
= rdev
->ops
->stop_ap(&rdev
->wiphy
, dev
);
180 trace_rdev_return_int(&rdev
->wiphy
, ret
);
184 static inline int rdev_add_station(struct cfg80211_registered_device
*rdev
,
185 struct net_device
*dev
, u8
*mac
,
186 struct station_parameters
*params
)
189 trace_rdev_add_station(&rdev
->wiphy
, dev
, mac
, params
);
190 ret
= rdev
->ops
->add_station(&rdev
->wiphy
, dev
, mac
, params
);
191 trace_rdev_return_int(&rdev
->wiphy
, ret
);
195 static inline int rdev_del_station(struct cfg80211_registered_device
*rdev
,
196 struct net_device
*dev
,
197 struct station_del_parameters
*params
)
200 trace_rdev_del_station(&rdev
->wiphy
, dev
, params
);
201 ret
= rdev
->ops
->del_station(&rdev
->wiphy
, dev
, params
);
202 trace_rdev_return_int(&rdev
->wiphy
, ret
);
206 static inline int rdev_change_station(struct cfg80211_registered_device
*rdev
,
207 struct net_device
*dev
, u8
*mac
,
208 struct station_parameters
*params
)
211 trace_rdev_change_station(&rdev
->wiphy
, dev
, mac
, params
);
212 ret
= rdev
->ops
->change_station(&rdev
->wiphy
, dev
, mac
, params
);
213 trace_rdev_return_int(&rdev
->wiphy
, ret
);
217 static inline int rdev_get_station(struct cfg80211_registered_device
*rdev
,
218 struct net_device
*dev
, const u8
*mac
,
219 struct station_info
*sinfo
)
222 trace_rdev_get_station(&rdev
->wiphy
, dev
, mac
);
223 ret
= rdev
->ops
->get_station(&rdev
->wiphy
, dev
, mac
, sinfo
);
224 trace_rdev_return_int_station_info(&rdev
->wiphy
, ret
, sinfo
);
228 static inline int rdev_dump_station(struct cfg80211_registered_device
*rdev
,
229 struct net_device
*dev
, int idx
, u8
*mac
,
230 struct station_info
*sinfo
)
233 trace_rdev_dump_station(&rdev
->wiphy
, dev
, idx
, mac
);
234 ret
= rdev
->ops
->dump_station(&rdev
->wiphy
, dev
, idx
, mac
, sinfo
);
235 trace_rdev_return_int_station_info(&rdev
->wiphy
, ret
, sinfo
);
239 static inline int rdev_add_mpath(struct cfg80211_registered_device
*rdev
,
240 struct net_device
*dev
, u8
*dst
, u8
*next_hop
)
243 trace_rdev_add_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
);
244 ret
= rdev
->ops
->add_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
);
245 trace_rdev_return_int(&rdev
->wiphy
, ret
);
249 static inline int rdev_del_mpath(struct cfg80211_registered_device
*rdev
,
250 struct net_device
*dev
, u8
*dst
)
253 trace_rdev_del_mpath(&rdev
->wiphy
, dev
, dst
);
254 ret
= rdev
->ops
->del_mpath(&rdev
->wiphy
, dev
, dst
);
255 trace_rdev_return_int(&rdev
->wiphy
, ret
);
259 static inline int rdev_change_mpath(struct cfg80211_registered_device
*rdev
,
260 struct net_device
*dev
, u8
*dst
,
264 trace_rdev_change_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
);
265 ret
= rdev
->ops
->change_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
);
266 trace_rdev_return_int(&rdev
->wiphy
, ret
);
270 static inline int rdev_get_mpath(struct cfg80211_registered_device
*rdev
,
271 struct net_device
*dev
, u8
*dst
, u8
*next_hop
,
272 struct mpath_info
*pinfo
)
275 trace_rdev_get_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
);
276 ret
= rdev
->ops
->get_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
, pinfo
);
277 trace_rdev_return_int_mpath_info(&rdev
->wiphy
, ret
, pinfo
);
282 static inline int rdev_get_mpp(struct cfg80211_registered_device
*rdev
,
283 struct net_device
*dev
, u8
*dst
, u8
*mpp
,
284 struct mpath_info
*pinfo
)
288 trace_rdev_get_mpp(&rdev
->wiphy
, dev
, dst
, mpp
);
289 ret
= rdev
->ops
->get_mpp(&rdev
->wiphy
, dev
, dst
, mpp
, pinfo
);
290 trace_rdev_return_int_mpath_info(&rdev
->wiphy
, ret
, pinfo
);
294 static inline int rdev_dump_mpath(struct cfg80211_registered_device
*rdev
,
295 struct net_device
*dev
, int idx
, u8
*dst
,
296 u8
*next_hop
, struct mpath_info
*pinfo
)
300 trace_rdev_dump_mpath(&rdev
->wiphy
, dev
, idx
, dst
, next_hop
);
301 ret
= rdev
->ops
->dump_mpath(&rdev
->wiphy
, dev
, idx
, dst
, next_hop
,
303 trace_rdev_return_int_mpath_info(&rdev
->wiphy
, ret
, pinfo
);
307 static inline int rdev_dump_mpp(struct cfg80211_registered_device
*rdev
,
308 struct net_device
*dev
, int idx
, u8
*dst
,
309 u8
*mpp
, struct mpath_info
*pinfo
)
314 trace_rdev_dump_mpp(&rdev
->wiphy
, dev
, idx
, dst
, mpp
);
315 ret
= rdev
->ops
->dump_mpp(&rdev
->wiphy
, dev
, idx
, dst
, mpp
, pinfo
);
316 trace_rdev_return_int_mpath_info(&rdev
->wiphy
, ret
, pinfo
);
321 rdev_get_mesh_config(struct cfg80211_registered_device
*rdev
,
322 struct net_device
*dev
, struct mesh_config
*conf
)
325 trace_rdev_get_mesh_config(&rdev
->wiphy
, dev
);
326 ret
= rdev
->ops
->get_mesh_config(&rdev
->wiphy
, dev
, conf
);
327 trace_rdev_return_int_mesh_config(&rdev
->wiphy
, ret
, conf
);
332 rdev_update_mesh_config(struct cfg80211_registered_device
*rdev
,
333 struct net_device
*dev
, u32 mask
,
334 const struct mesh_config
*nconf
)
337 trace_rdev_update_mesh_config(&rdev
->wiphy
, dev
, mask
, nconf
);
338 ret
= rdev
->ops
->update_mesh_config(&rdev
->wiphy
, dev
, mask
, nconf
);
339 trace_rdev_return_int(&rdev
->wiphy
, ret
);
343 static inline int rdev_join_mesh(struct cfg80211_registered_device
*rdev
,
344 struct net_device
*dev
,
345 const struct mesh_config
*conf
,
346 const struct mesh_setup
*setup
)
349 trace_rdev_join_mesh(&rdev
->wiphy
, dev
, conf
, setup
);
350 ret
= rdev
->ops
->join_mesh(&rdev
->wiphy
, dev
, conf
, setup
);
351 trace_rdev_return_int(&rdev
->wiphy
, ret
);
356 static inline int rdev_leave_mesh(struct cfg80211_registered_device
*rdev
,
357 struct net_device
*dev
)
360 trace_rdev_leave_mesh(&rdev
->wiphy
, dev
);
361 ret
= rdev
->ops
->leave_mesh(&rdev
->wiphy
, dev
);
362 trace_rdev_return_int(&rdev
->wiphy
, ret
);
366 static inline int rdev_join_ocb(struct cfg80211_registered_device
*rdev
,
367 struct net_device
*dev
,
368 struct ocb_setup
*setup
)
371 trace_rdev_join_ocb(&rdev
->wiphy
, dev
, setup
);
372 ret
= rdev
->ops
->join_ocb(&rdev
->wiphy
, dev
, setup
);
373 trace_rdev_return_int(&rdev
->wiphy
, ret
);
377 static inline int rdev_leave_ocb(struct cfg80211_registered_device
*rdev
,
378 struct net_device
*dev
)
381 trace_rdev_leave_ocb(&rdev
->wiphy
, dev
);
382 ret
= rdev
->ops
->leave_ocb(&rdev
->wiphy
, dev
);
383 trace_rdev_return_int(&rdev
->wiphy
, ret
);
387 static inline int rdev_change_bss(struct cfg80211_registered_device
*rdev
,
388 struct net_device
*dev
,
389 struct bss_parameters
*params
)
393 trace_rdev_change_bss(&rdev
->wiphy
, dev
, params
);
394 ret
= rdev
->ops
->change_bss(&rdev
->wiphy
, dev
, params
);
395 trace_rdev_return_int(&rdev
->wiphy
, ret
);
399 static inline int rdev_set_txq_params(struct cfg80211_registered_device
*rdev
,
400 struct net_device
*dev
,
401 struct ieee80211_txq_params
*params
)
405 trace_rdev_set_txq_params(&rdev
->wiphy
, dev
, params
);
406 ret
= rdev
->ops
->set_txq_params(&rdev
->wiphy
, dev
, params
);
407 trace_rdev_return_int(&rdev
->wiphy
, ret
);
412 rdev_libertas_set_mesh_channel(struct cfg80211_registered_device
*rdev
,
413 struct net_device
*dev
,
414 struct ieee80211_channel
*chan
)
417 trace_rdev_libertas_set_mesh_channel(&rdev
->wiphy
, dev
, chan
);
418 ret
= rdev
->ops
->libertas_set_mesh_channel(&rdev
->wiphy
, dev
, chan
);
419 trace_rdev_return_int(&rdev
->wiphy
, ret
);
424 rdev_set_monitor_channel(struct cfg80211_registered_device
*rdev
,
425 struct cfg80211_chan_def
*chandef
)
428 trace_rdev_set_monitor_channel(&rdev
->wiphy
, chandef
);
429 ret
= rdev
->ops
->set_monitor_channel(&rdev
->wiphy
, chandef
);
430 trace_rdev_return_int(&rdev
->wiphy
, ret
);
434 static inline int rdev_scan(struct cfg80211_registered_device
*rdev
,
435 struct cfg80211_scan_request
*request
)
438 trace_rdev_scan(&rdev
->wiphy
, request
);
439 ret
= rdev
->ops
->scan(&rdev
->wiphy
, request
);
440 trace_rdev_return_int(&rdev
->wiphy
, ret
);
444 static inline void rdev_abort_scan(struct cfg80211_registered_device
*rdev
,
445 struct wireless_dev
*wdev
)
447 trace_rdev_abort_scan(&rdev
->wiphy
, wdev
);
448 rdev
->ops
->abort_scan(&rdev
->wiphy
, wdev
);
449 trace_rdev_return_void(&rdev
->wiphy
);
452 static inline int rdev_auth(struct cfg80211_registered_device
*rdev
,
453 struct net_device
*dev
,
454 struct cfg80211_auth_request
*req
)
457 trace_rdev_auth(&rdev
->wiphy
, dev
, req
);
458 ret
= rdev
->ops
->auth(&rdev
->wiphy
, dev
, req
);
459 trace_rdev_return_int(&rdev
->wiphy
, ret
);
463 static inline int rdev_assoc(struct cfg80211_registered_device
*rdev
,
464 struct net_device
*dev
,
465 struct cfg80211_assoc_request
*req
)
468 trace_rdev_assoc(&rdev
->wiphy
, dev
, req
);
469 ret
= rdev
->ops
->assoc(&rdev
->wiphy
, dev
, req
);
470 trace_rdev_return_int(&rdev
->wiphy
, ret
);
474 static inline int rdev_deauth(struct cfg80211_registered_device
*rdev
,
475 struct net_device
*dev
,
476 struct cfg80211_deauth_request
*req
)
479 trace_rdev_deauth(&rdev
->wiphy
, dev
, req
);
480 ret
= rdev
->ops
->deauth(&rdev
->wiphy
, dev
, req
);
481 trace_rdev_return_int(&rdev
->wiphy
, ret
);
485 static inline int rdev_disassoc(struct cfg80211_registered_device
*rdev
,
486 struct net_device
*dev
,
487 struct cfg80211_disassoc_request
*req
)
490 trace_rdev_disassoc(&rdev
->wiphy
, dev
, req
);
491 ret
= rdev
->ops
->disassoc(&rdev
->wiphy
, dev
, req
);
492 trace_rdev_return_int(&rdev
->wiphy
, ret
);
496 static inline int rdev_connect(struct cfg80211_registered_device
*rdev
,
497 struct net_device
*dev
,
498 struct cfg80211_connect_params
*sme
)
501 trace_rdev_connect(&rdev
->wiphy
, dev
, sme
);
502 ret
= rdev
->ops
->connect(&rdev
->wiphy
, dev
, sme
);
503 trace_rdev_return_int(&rdev
->wiphy
, ret
);
508 rdev_update_connect_params(struct cfg80211_registered_device
*rdev
,
509 struct net_device
*dev
,
510 struct cfg80211_connect_params
*sme
, u32 changed
)
513 trace_rdev_update_connect_params(&rdev
->wiphy
, dev
, sme
, changed
);
514 ret
= rdev
->ops
->update_connect_params(&rdev
->wiphy
, dev
, sme
, changed
);
515 trace_rdev_return_int(&rdev
->wiphy
, ret
);
519 static inline int rdev_disconnect(struct cfg80211_registered_device
*rdev
,
520 struct net_device
*dev
, u16 reason_code
)
523 trace_rdev_disconnect(&rdev
->wiphy
, dev
, reason_code
);
524 ret
= rdev
->ops
->disconnect(&rdev
->wiphy
, dev
, reason_code
);
525 trace_rdev_return_int(&rdev
->wiphy
, ret
);
529 static inline int rdev_join_ibss(struct cfg80211_registered_device
*rdev
,
530 struct net_device
*dev
,
531 struct cfg80211_ibss_params
*params
)
534 trace_rdev_join_ibss(&rdev
->wiphy
, dev
, params
);
535 ret
= rdev
->ops
->join_ibss(&rdev
->wiphy
, dev
, params
);
536 trace_rdev_return_int(&rdev
->wiphy
, ret
);
540 static inline int rdev_leave_ibss(struct cfg80211_registered_device
*rdev
,
541 struct net_device
*dev
)
544 trace_rdev_leave_ibss(&rdev
->wiphy
, dev
);
545 ret
= rdev
->ops
->leave_ibss(&rdev
->wiphy
, dev
);
546 trace_rdev_return_int(&rdev
->wiphy
, ret
);
551 rdev_set_wiphy_params(struct cfg80211_registered_device
*rdev
, u32 changed
)
555 if (!rdev
->ops
->set_wiphy_params
)
558 trace_rdev_set_wiphy_params(&rdev
->wiphy
, changed
);
559 ret
= rdev
->ops
->set_wiphy_params(&rdev
->wiphy
, changed
);
560 trace_rdev_return_int(&rdev
->wiphy
, ret
);
564 static inline int rdev_set_tx_power(struct cfg80211_registered_device
*rdev
,
565 struct wireless_dev
*wdev
,
566 enum nl80211_tx_power_setting type
, int mbm
)
569 trace_rdev_set_tx_power(&rdev
->wiphy
, wdev
, type
, mbm
);
570 ret
= rdev
->ops
->set_tx_power(&rdev
->wiphy
, wdev
, type
, mbm
);
571 trace_rdev_return_int(&rdev
->wiphy
, ret
);
575 static inline int rdev_get_tx_power(struct cfg80211_registered_device
*rdev
,
576 struct wireless_dev
*wdev
, int *dbm
)
579 trace_rdev_get_tx_power(&rdev
->wiphy
, wdev
);
580 ret
= rdev
->ops
->get_tx_power(&rdev
->wiphy
, wdev
, dbm
);
581 trace_rdev_return_int_int(&rdev
->wiphy
, ret
, *dbm
);
586 rdev_set_multicast_to_unicast(struct cfg80211_registered_device
*rdev
,
587 struct net_device
*dev
,
591 trace_rdev_set_multicast_to_unicast(&rdev
->wiphy
, dev
, enabled
);
592 ret
= rdev
->ops
->set_multicast_to_unicast(&rdev
->wiphy
, dev
, enabled
);
593 trace_rdev_return_int(&rdev
->wiphy
, ret
);
598 rdev_get_txq_stats(struct cfg80211_registered_device
*rdev
,
599 struct wireless_dev
*wdev
,
600 struct cfg80211_txq_stats
*txqstats
)
603 trace_rdev_get_txq_stats(&rdev
->wiphy
, wdev
);
604 ret
= rdev
->ops
->get_txq_stats(&rdev
->wiphy
, wdev
, txqstats
);
605 trace_rdev_return_int(&rdev
->wiphy
, ret
);
609 static inline void rdev_rfkill_poll(struct cfg80211_registered_device
*rdev
)
611 trace_rdev_rfkill_poll(&rdev
->wiphy
);
612 rdev
->ops
->rfkill_poll(&rdev
->wiphy
);
613 trace_rdev_return_void(&rdev
->wiphy
);
617 #ifdef CONFIG_NL80211_TESTMODE
618 static inline int rdev_testmode_cmd(struct cfg80211_registered_device
*rdev
,
619 struct wireless_dev
*wdev
,
623 trace_rdev_testmode_cmd(&rdev
->wiphy
, wdev
);
624 ret
= rdev
->ops
->testmode_cmd(&rdev
->wiphy
, wdev
, data
, len
);
625 trace_rdev_return_int(&rdev
->wiphy
, ret
);
629 static inline int rdev_testmode_dump(struct cfg80211_registered_device
*rdev
,
631 struct netlink_callback
*cb
, void *data
,
635 trace_rdev_testmode_dump(&rdev
->wiphy
);
636 ret
= rdev
->ops
->testmode_dump(&rdev
->wiphy
, skb
, cb
, data
, len
);
637 trace_rdev_return_int(&rdev
->wiphy
, ret
);
643 rdev_set_bitrate_mask(struct cfg80211_registered_device
*rdev
,
644 struct net_device
*dev
, const u8
*peer
,
645 const struct cfg80211_bitrate_mask
*mask
)
648 trace_rdev_set_bitrate_mask(&rdev
->wiphy
, dev
, peer
, mask
);
649 ret
= rdev
->ops
->set_bitrate_mask(&rdev
->wiphy
, dev
, peer
, mask
);
650 trace_rdev_return_int(&rdev
->wiphy
, ret
);
654 static inline int rdev_dump_survey(struct cfg80211_registered_device
*rdev
,
655 struct net_device
*netdev
, int idx
,
656 struct survey_info
*info
)
659 trace_rdev_dump_survey(&rdev
->wiphy
, netdev
, idx
);
660 ret
= rdev
->ops
->dump_survey(&rdev
->wiphy
, netdev
, idx
, info
);
662 trace_rdev_return_int(&rdev
->wiphy
, ret
);
664 trace_rdev_return_int_survey_info(&rdev
->wiphy
, ret
, info
);
668 static inline int rdev_set_pmksa(struct cfg80211_registered_device
*rdev
,
669 struct net_device
*netdev
,
670 struct cfg80211_pmksa
*pmksa
)
673 trace_rdev_set_pmksa(&rdev
->wiphy
, netdev
, pmksa
);
674 ret
= rdev
->ops
->set_pmksa(&rdev
->wiphy
, netdev
, pmksa
);
675 trace_rdev_return_int(&rdev
->wiphy
, ret
);
679 static inline int rdev_del_pmksa(struct cfg80211_registered_device
*rdev
,
680 struct net_device
*netdev
,
681 struct cfg80211_pmksa
*pmksa
)
684 trace_rdev_del_pmksa(&rdev
->wiphy
, netdev
, pmksa
);
685 ret
= rdev
->ops
->del_pmksa(&rdev
->wiphy
, netdev
, pmksa
);
686 trace_rdev_return_int(&rdev
->wiphy
, ret
);
690 static inline int rdev_flush_pmksa(struct cfg80211_registered_device
*rdev
,
691 struct net_device
*netdev
)
694 trace_rdev_flush_pmksa(&rdev
->wiphy
, netdev
);
695 ret
= rdev
->ops
->flush_pmksa(&rdev
->wiphy
, netdev
);
696 trace_rdev_return_int(&rdev
->wiphy
, ret
);
701 rdev_remain_on_channel(struct cfg80211_registered_device
*rdev
,
702 struct wireless_dev
*wdev
,
703 struct ieee80211_channel
*chan
,
704 unsigned int duration
, u64
*cookie
)
707 trace_rdev_remain_on_channel(&rdev
->wiphy
, wdev
, chan
, duration
);
708 ret
= rdev
->ops
->remain_on_channel(&rdev
->wiphy
, wdev
, chan
,
710 trace_rdev_return_int_cookie(&rdev
->wiphy
, ret
, *cookie
);
715 rdev_cancel_remain_on_channel(struct cfg80211_registered_device
*rdev
,
716 struct wireless_dev
*wdev
, u64 cookie
)
719 trace_rdev_cancel_remain_on_channel(&rdev
->wiphy
, wdev
, cookie
);
720 ret
= rdev
->ops
->cancel_remain_on_channel(&rdev
->wiphy
, wdev
, cookie
);
721 trace_rdev_return_int(&rdev
->wiphy
, ret
);
725 static inline int rdev_mgmt_tx(struct cfg80211_registered_device
*rdev
,
726 struct wireless_dev
*wdev
,
727 struct cfg80211_mgmt_tx_params
*params
,
731 trace_rdev_mgmt_tx(&rdev
->wiphy
, wdev
, params
);
732 ret
= rdev
->ops
->mgmt_tx(&rdev
->wiphy
, wdev
, params
, cookie
);
733 trace_rdev_return_int_cookie(&rdev
->wiphy
, ret
, *cookie
);
737 static inline int rdev_tx_control_port(struct cfg80211_registered_device
*rdev
,
738 struct net_device
*dev
,
739 const void *buf
, size_t len
,
740 const u8
*dest
, __be16 proto
,
741 const bool noencrypt
, u64
*cookie
)
744 trace_rdev_tx_control_port(&rdev
->wiphy
, dev
, buf
, len
,
745 dest
, proto
, noencrypt
);
746 ret
= rdev
->ops
->tx_control_port(&rdev
->wiphy
, dev
, buf
, len
,
747 dest
, proto
, noencrypt
, cookie
);
749 trace_rdev_return_int_cookie(&rdev
->wiphy
, ret
, *cookie
);
751 trace_rdev_return_int(&rdev
->wiphy
, ret
);
756 rdev_mgmt_tx_cancel_wait(struct cfg80211_registered_device
*rdev
,
757 struct wireless_dev
*wdev
, u64 cookie
)
760 trace_rdev_mgmt_tx_cancel_wait(&rdev
->wiphy
, wdev
, cookie
);
761 ret
= rdev
->ops
->mgmt_tx_cancel_wait(&rdev
->wiphy
, wdev
, cookie
);
762 trace_rdev_return_int(&rdev
->wiphy
, ret
);
766 static inline int rdev_set_power_mgmt(struct cfg80211_registered_device
*rdev
,
767 struct net_device
*dev
, bool enabled
,
771 trace_rdev_set_power_mgmt(&rdev
->wiphy
, dev
, enabled
, timeout
);
772 ret
= rdev
->ops
->set_power_mgmt(&rdev
->wiphy
, dev
, enabled
, timeout
);
773 trace_rdev_return_int(&rdev
->wiphy
, ret
);
778 rdev_set_cqm_rssi_config(struct cfg80211_registered_device
*rdev
,
779 struct net_device
*dev
, s32 rssi_thold
, u32 rssi_hyst
)
782 trace_rdev_set_cqm_rssi_config(&rdev
->wiphy
, dev
, rssi_thold
,
784 ret
= rdev
->ops
->set_cqm_rssi_config(&rdev
->wiphy
, dev
, rssi_thold
,
786 trace_rdev_return_int(&rdev
->wiphy
, ret
);
791 rdev_set_cqm_rssi_range_config(struct cfg80211_registered_device
*rdev
,
792 struct net_device
*dev
, s32 low
, s32 high
)
795 trace_rdev_set_cqm_rssi_range_config(&rdev
->wiphy
, dev
, low
, high
);
796 ret
= rdev
->ops
->set_cqm_rssi_range_config(&rdev
->wiphy
, dev
,
798 trace_rdev_return_int(&rdev
->wiphy
, ret
);
803 rdev_set_cqm_txe_config(struct cfg80211_registered_device
*rdev
,
804 struct net_device
*dev
, u32 rate
, u32 pkts
, u32 intvl
)
807 trace_rdev_set_cqm_txe_config(&rdev
->wiphy
, dev
, rate
, pkts
, intvl
);
808 ret
= rdev
->ops
->set_cqm_txe_config(&rdev
->wiphy
, dev
, rate
, pkts
,
810 trace_rdev_return_int(&rdev
->wiphy
, ret
);
815 rdev_update_mgmt_frame_registrations(struct cfg80211_registered_device
*rdev
,
816 struct wireless_dev
*wdev
,
817 struct mgmt_frame_regs
*upd
)
821 trace_rdev_update_mgmt_frame_registrations(&rdev
->wiphy
, wdev
, upd
);
822 if (rdev
->ops
->update_mgmt_frame_registrations
)
823 rdev
->ops
->update_mgmt_frame_registrations(&rdev
->wiphy
, wdev
,
825 trace_rdev_return_void(&rdev
->wiphy
);
828 static inline int rdev_set_antenna(struct cfg80211_registered_device
*rdev
,
829 u32 tx_ant
, u32 rx_ant
)
832 trace_rdev_set_antenna(&rdev
->wiphy
, tx_ant
, rx_ant
);
833 ret
= rdev
->ops
->set_antenna(&rdev
->wiphy
, tx_ant
, rx_ant
);
834 trace_rdev_return_int(&rdev
->wiphy
, ret
);
838 static inline int rdev_get_antenna(struct cfg80211_registered_device
*rdev
,
839 u32
*tx_ant
, u32
*rx_ant
)
842 trace_rdev_get_antenna(&rdev
->wiphy
);
843 ret
= rdev
->ops
->get_antenna(&rdev
->wiphy
, tx_ant
, rx_ant
);
845 trace_rdev_return_int(&rdev
->wiphy
, ret
);
847 trace_rdev_return_int_tx_rx(&rdev
->wiphy
, ret
, *tx_ant
,
853 rdev_sched_scan_start(struct cfg80211_registered_device
*rdev
,
854 struct net_device
*dev
,
855 struct cfg80211_sched_scan_request
*request
)
858 trace_rdev_sched_scan_start(&rdev
->wiphy
, dev
, request
->reqid
);
859 ret
= rdev
->ops
->sched_scan_start(&rdev
->wiphy
, dev
, request
);
860 trace_rdev_return_int(&rdev
->wiphy
, ret
);
864 static inline int rdev_sched_scan_stop(struct cfg80211_registered_device
*rdev
,
865 struct net_device
*dev
, u64 reqid
)
868 trace_rdev_sched_scan_stop(&rdev
->wiphy
, dev
, reqid
);
869 ret
= rdev
->ops
->sched_scan_stop(&rdev
->wiphy
, dev
, reqid
);
870 trace_rdev_return_int(&rdev
->wiphy
, ret
);
874 static inline int rdev_set_rekey_data(struct cfg80211_registered_device
*rdev
,
875 struct net_device
*dev
,
876 struct cfg80211_gtk_rekey_data
*data
)
879 trace_rdev_set_rekey_data(&rdev
->wiphy
, dev
);
880 ret
= rdev
->ops
->set_rekey_data(&rdev
->wiphy
, dev
, data
);
881 trace_rdev_return_int(&rdev
->wiphy
, ret
);
885 static inline int rdev_tdls_mgmt(struct cfg80211_registered_device
*rdev
,
886 struct net_device
*dev
, u8
*peer
,
887 u8 action_code
, u8 dialog_token
,
888 u16 status_code
, u32 peer_capability
,
889 bool initiator
, const u8
*buf
, size_t len
)
892 trace_rdev_tdls_mgmt(&rdev
->wiphy
, dev
, peer
, action_code
,
893 dialog_token
, status_code
, peer_capability
,
894 initiator
, buf
, len
);
895 ret
= rdev
->ops
->tdls_mgmt(&rdev
->wiphy
, dev
, peer
, action_code
,
896 dialog_token
, status_code
, peer_capability
,
897 initiator
, buf
, len
);
898 trace_rdev_return_int(&rdev
->wiphy
, ret
);
902 static inline int rdev_tdls_oper(struct cfg80211_registered_device
*rdev
,
903 struct net_device
*dev
, u8
*peer
,
904 enum nl80211_tdls_operation oper
)
907 trace_rdev_tdls_oper(&rdev
->wiphy
, dev
, peer
, oper
);
908 ret
= rdev
->ops
->tdls_oper(&rdev
->wiphy
, dev
, peer
, oper
);
909 trace_rdev_return_int(&rdev
->wiphy
, ret
);
913 static inline int rdev_probe_client(struct cfg80211_registered_device
*rdev
,
914 struct net_device
*dev
, const u8
*peer
,
918 trace_rdev_probe_client(&rdev
->wiphy
, dev
, peer
);
919 ret
= rdev
->ops
->probe_client(&rdev
->wiphy
, dev
, peer
, cookie
);
920 trace_rdev_return_int_cookie(&rdev
->wiphy
, ret
, *cookie
);
924 static inline int rdev_set_noack_map(struct cfg80211_registered_device
*rdev
,
925 struct net_device
*dev
, u16 noack_map
)
928 trace_rdev_set_noack_map(&rdev
->wiphy
, dev
, noack_map
);
929 ret
= rdev
->ops
->set_noack_map(&rdev
->wiphy
, dev
, noack_map
);
930 trace_rdev_return_int(&rdev
->wiphy
, ret
);
935 rdev_get_channel(struct cfg80211_registered_device
*rdev
,
936 struct wireless_dev
*wdev
,
937 struct cfg80211_chan_def
*chandef
)
941 trace_rdev_get_channel(&rdev
->wiphy
, wdev
);
942 ret
= rdev
->ops
->get_channel(&rdev
->wiphy
, wdev
, chandef
);
943 trace_rdev_return_chandef(&rdev
->wiphy
, ret
, chandef
);
948 static inline int rdev_start_p2p_device(struct cfg80211_registered_device
*rdev
,
949 struct wireless_dev
*wdev
)
953 trace_rdev_start_p2p_device(&rdev
->wiphy
, wdev
);
954 ret
= rdev
->ops
->start_p2p_device(&rdev
->wiphy
, wdev
);
955 trace_rdev_return_int(&rdev
->wiphy
, ret
);
959 static inline void rdev_stop_p2p_device(struct cfg80211_registered_device
*rdev
,
960 struct wireless_dev
*wdev
)
962 trace_rdev_stop_p2p_device(&rdev
->wiphy
, wdev
);
963 rdev
->ops
->stop_p2p_device(&rdev
->wiphy
, wdev
);
964 trace_rdev_return_void(&rdev
->wiphy
);
967 static inline int rdev_start_nan(struct cfg80211_registered_device
*rdev
,
968 struct wireless_dev
*wdev
,
969 struct cfg80211_nan_conf
*conf
)
973 trace_rdev_start_nan(&rdev
->wiphy
, wdev
, conf
);
974 ret
= rdev
->ops
->start_nan(&rdev
->wiphy
, wdev
, conf
);
975 trace_rdev_return_int(&rdev
->wiphy
, ret
);
979 static inline void rdev_stop_nan(struct cfg80211_registered_device
*rdev
,
980 struct wireless_dev
*wdev
)
982 trace_rdev_stop_nan(&rdev
->wiphy
, wdev
);
983 rdev
->ops
->stop_nan(&rdev
->wiphy
, wdev
);
984 trace_rdev_return_void(&rdev
->wiphy
);
988 rdev_add_nan_func(struct cfg80211_registered_device
*rdev
,
989 struct wireless_dev
*wdev
,
990 struct cfg80211_nan_func
*nan_func
)
994 trace_rdev_add_nan_func(&rdev
->wiphy
, wdev
, nan_func
);
995 ret
= rdev
->ops
->add_nan_func(&rdev
->wiphy
, wdev
, nan_func
);
996 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1000 static inline void rdev_del_nan_func(struct cfg80211_registered_device
*rdev
,
1001 struct wireless_dev
*wdev
, u64 cookie
)
1003 trace_rdev_del_nan_func(&rdev
->wiphy
, wdev
, cookie
);
1004 rdev
->ops
->del_nan_func(&rdev
->wiphy
, wdev
, cookie
);
1005 trace_rdev_return_void(&rdev
->wiphy
);
1009 rdev_nan_change_conf(struct cfg80211_registered_device
*rdev
,
1010 struct wireless_dev
*wdev
,
1011 struct cfg80211_nan_conf
*conf
, u32 changes
)
1015 trace_rdev_nan_change_conf(&rdev
->wiphy
, wdev
, conf
, changes
);
1016 if (rdev
->ops
->nan_change_conf
)
1017 ret
= rdev
->ops
->nan_change_conf(&rdev
->wiphy
, wdev
, conf
,
1021 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1025 static inline int rdev_set_mac_acl(struct cfg80211_registered_device
*rdev
,
1026 struct net_device
*dev
,
1027 struct cfg80211_acl_data
*params
)
1031 trace_rdev_set_mac_acl(&rdev
->wiphy
, dev
, params
);
1032 ret
= rdev
->ops
->set_mac_acl(&rdev
->wiphy
, dev
, params
);
1033 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1037 static inline int rdev_update_ft_ies(struct cfg80211_registered_device
*rdev
,
1038 struct net_device
*dev
,
1039 struct cfg80211_update_ft_ies_params
*ftie
)
1043 trace_rdev_update_ft_ies(&rdev
->wiphy
, dev
, ftie
);
1044 ret
= rdev
->ops
->update_ft_ies(&rdev
->wiphy
, dev
, ftie
);
1045 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1049 static inline int rdev_crit_proto_start(struct cfg80211_registered_device
*rdev
,
1050 struct wireless_dev
*wdev
,
1051 enum nl80211_crit_proto_id protocol
,
1056 trace_rdev_crit_proto_start(&rdev
->wiphy
, wdev
, protocol
, duration
);
1057 ret
= rdev
->ops
->crit_proto_start(&rdev
->wiphy
, wdev
,
1058 protocol
, duration
);
1059 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1063 static inline void rdev_crit_proto_stop(struct cfg80211_registered_device
*rdev
,
1064 struct wireless_dev
*wdev
)
1066 trace_rdev_crit_proto_stop(&rdev
->wiphy
, wdev
);
1067 rdev
->ops
->crit_proto_stop(&rdev
->wiphy
, wdev
);
1068 trace_rdev_return_void(&rdev
->wiphy
);
1071 static inline int rdev_channel_switch(struct cfg80211_registered_device
*rdev
,
1072 struct net_device
*dev
,
1073 struct cfg80211_csa_settings
*params
)
1077 trace_rdev_channel_switch(&rdev
->wiphy
, dev
, params
);
1078 ret
= rdev
->ops
->channel_switch(&rdev
->wiphy
, dev
, params
);
1079 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1083 static inline int rdev_set_qos_map(struct cfg80211_registered_device
*rdev
,
1084 struct net_device
*dev
,
1085 struct cfg80211_qos_map
*qos_map
)
1087 int ret
= -EOPNOTSUPP
;
1089 if (rdev
->ops
->set_qos_map
) {
1090 trace_rdev_set_qos_map(&rdev
->wiphy
, dev
, qos_map
);
1091 ret
= rdev
->ops
->set_qos_map(&rdev
->wiphy
, dev
, qos_map
);
1092 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1099 rdev_set_ap_chanwidth(struct cfg80211_registered_device
*rdev
,
1100 struct net_device
*dev
, struct cfg80211_chan_def
*chandef
)
1104 trace_rdev_set_ap_chanwidth(&rdev
->wiphy
, dev
, chandef
);
1105 ret
= rdev
->ops
->set_ap_chanwidth(&rdev
->wiphy
, dev
, chandef
);
1106 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1112 rdev_add_tx_ts(struct cfg80211_registered_device
*rdev
,
1113 struct net_device
*dev
, u8 tsid
, const u8
*peer
,
1114 u8 user_prio
, u16 admitted_time
)
1116 int ret
= -EOPNOTSUPP
;
1118 trace_rdev_add_tx_ts(&rdev
->wiphy
, dev
, tsid
, peer
,
1119 user_prio
, admitted_time
);
1120 if (rdev
->ops
->add_tx_ts
)
1121 ret
= rdev
->ops
->add_tx_ts(&rdev
->wiphy
, dev
, tsid
, peer
,
1122 user_prio
, admitted_time
);
1123 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1129 rdev_del_tx_ts(struct cfg80211_registered_device
*rdev
,
1130 struct net_device
*dev
, u8 tsid
, const u8
*peer
)
1132 int ret
= -EOPNOTSUPP
;
1134 trace_rdev_del_tx_ts(&rdev
->wiphy
, dev
, tsid
, peer
);
1135 if (rdev
->ops
->del_tx_ts
)
1136 ret
= rdev
->ops
->del_tx_ts(&rdev
->wiphy
, dev
, tsid
, peer
);
1137 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1143 rdev_tdls_channel_switch(struct cfg80211_registered_device
*rdev
,
1144 struct net_device
*dev
, const u8
*addr
,
1145 u8 oper_class
, struct cfg80211_chan_def
*chandef
)
1149 trace_rdev_tdls_channel_switch(&rdev
->wiphy
, dev
, addr
, oper_class
,
1151 ret
= rdev
->ops
->tdls_channel_switch(&rdev
->wiphy
, dev
, addr
,
1152 oper_class
, chandef
);
1153 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1158 rdev_tdls_cancel_channel_switch(struct cfg80211_registered_device
*rdev
,
1159 struct net_device
*dev
, const u8
*addr
)
1161 trace_rdev_tdls_cancel_channel_switch(&rdev
->wiphy
, dev
, addr
);
1162 rdev
->ops
->tdls_cancel_channel_switch(&rdev
->wiphy
, dev
, addr
);
1163 trace_rdev_return_void(&rdev
->wiphy
);
1167 rdev_start_radar_detection(struct cfg80211_registered_device
*rdev
,
1168 struct net_device
*dev
,
1169 struct cfg80211_chan_def
*chandef
,
1172 int ret
= -ENOTSUPP
;
1174 trace_rdev_start_radar_detection(&rdev
->wiphy
, dev
, chandef
,
1176 if (rdev
->ops
->start_radar_detection
)
1177 ret
= rdev
->ops
->start_radar_detection(&rdev
->wiphy
, dev
,
1178 chandef
, cac_time_ms
);
1179 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1184 rdev_end_cac(struct cfg80211_registered_device
*rdev
,
1185 struct net_device
*dev
)
1187 trace_rdev_end_cac(&rdev
->wiphy
, dev
);
1188 if (rdev
->ops
->end_cac
)
1189 rdev
->ops
->end_cac(&rdev
->wiphy
, dev
);
1190 trace_rdev_return_void(&rdev
->wiphy
);
1194 rdev_set_mcast_rate(struct cfg80211_registered_device
*rdev
,
1195 struct net_device
*dev
,
1196 int mcast_rate
[NUM_NL80211_BANDS
])
1198 int ret
= -ENOTSUPP
;
1200 trace_rdev_set_mcast_rate(&rdev
->wiphy
, dev
, mcast_rate
);
1201 if (rdev
->ops
->set_mcast_rate
)
1202 ret
= rdev
->ops
->set_mcast_rate(&rdev
->wiphy
, dev
, mcast_rate
);
1203 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1208 rdev_set_coalesce(struct cfg80211_registered_device
*rdev
,
1209 struct cfg80211_coalesce
*coalesce
)
1211 int ret
= -ENOTSUPP
;
1213 trace_rdev_set_coalesce(&rdev
->wiphy
, coalesce
);
1214 if (rdev
->ops
->set_coalesce
)
1215 ret
= rdev
->ops
->set_coalesce(&rdev
->wiphy
, coalesce
);
1216 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1220 static inline int rdev_set_pmk(struct cfg80211_registered_device
*rdev
,
1221 struct net_device
*dev
,
1222 struct cfg80211_pmk_conf
*pmk_conf
)
1224 int ret
= -EOPNOTSUPP
;
1226 trace_rdev_set_pmk(&rdev
->wiphy
, dev
, pmk_conf
);
1227 if (rdev
->ops
->set_pmk
)
1228 ret
= rdev
->ops
->set_pmk(&rdev
->wiphy
, dev
, pmk_conf
);
1229 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1233 static inline int rdev_del_pmk(struct cfg80211_registered_device
*rdev
,
1234 struct net_device
*dev
, const u8
*aa
)
1236 int ret
= -EOPNOTSUPP
;
1238 trace_rdev_del_pmk(&rdev
->wiphy
, dev
, aa
);
1239 if (rdev
->ops
->del_pmk
)
1240 ret
= rdev
->ops
->del_pmk(&rdev
->wiphy
, dev
, aa
);
1241 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1246 rdev_external_auth(struct cfg80211_registered_device
*rdev
,
1247 struct net_device
*dev
,
1248 struct cfg80211_external_auth_params
*params
)
1250 int ret
= -EOPNOTSUPP
;
1252 trace_rdev_external_auth(&rdev
->wiphy
, dev
, params
);
1253 if (rdev
->ops
->external_auth
)
1254 ret
= rdev
->ops
->external_auth(&rdev
->wiphy
, dev
, params
);
1255 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1260 rdev_get_ftm_responder_stats(struct cfg80211_registered_device
*rdev
,
1261 struct net_device
*dev
,
1262 struct cfg80211_ftm_responder_stats
*ftm_stats
)
1264 int ret
= -EOPNOTSUPP
;
1266 trace_rdev_get_ftm_responder_stats(&rdev
->wiphy
, dev
, ftm_stats
);
1267 if (rdev
->ops
->get_ftm_responder_stats
)
1268 ret
= rdev
->ops
->get_ftm_responder_stats(&rdev
->wiphy
, dev
,
1270 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1275 rdev_start_pmsr(struct cfg80211_registered_device
*rdev
,
1276 struct wireless_dev
*wdev
,
1277 struct cfg80211_pmsr_request
*request
)
1279 int ret
= -EOPNOTSUPP
;
1281 trace_rdev_start_pmsr(&rdev
->wiphy
, wdev
, request
->cookie
);
1282 if (rdev
->ops
->start_pmsr
)
1283 ret
= rdev
->ops
->start_pmsr(&rdev
->wiphy
, wdev
, request
);
1284 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1289 rdev_abort_pmsr(struct cfg80211_registered_device
*rdev
,
1290 struct wireless_dev
*wdev
,
1291 struct cfg80211_pmsr_request
*request
)
1293 trace_rdev_abort_pmsr(&rdev
->wiphy
, wdev
, request
->cookie
);
1294 if (rdev
->ops
->abort_pmsr
)
1295 rdev
->ops
->abort_pmsr(&rdev
->wiphy
, wdev
, request
);
1296 trace_rdev_return_void(&rdev
->wiphy
);
1299 static inline int rdev_update_owe_info(struct cfg80211_registered_device
*rdev
,
1300 struct net_device
*dev
,
1301 struct cfg80211_update_owe_info
*oweinfo
)
1303 int ret
= -EOPNOTSUPP
;
1305 trace_rdev_update_owe_info(&rdev
->wiphy
, dev
, oweinfo
);
1306 if (rdev
->ops
->update_owe_info
)
1307 ret
= rdev
->ops
->update_owe_info(&rdev
->wiphy
, dev
, oweinfo
);
1308 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1313 rdev_probe_mesh_link(struct cfg80211_registered_device
*rdev
,
1314 struct net_device
*dev
, const u8
*dest
,
1315 const void *buf
, size_t len
)
1319 trace_rdev_probe_mesh_link(&rdev
->wiphy
, dev
, dest
, buf
, len
);
1320 ret
= rdev
->ops
->probe_mesh_link(&rdev
->wiphy
, dev
, buf
, len
);
1321 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1325 static inline int rdev_set_tid_config(struct cfg80211_registered_device
*rdev
,
1326 struct net_device
*dev
,
1327 struct cfg80211_tid_config
*tid_conf
)
1331 trace_rdev_set_tid_config(&rdev
->wiphy
, dev
, tid_conf
);
1332 ret
= rdev
->ops
->set_tid_config(&rdev
->wiphy
, dev
, tid_conf
);
1333 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1337 static inline int rdev_reset_tid_config(struct cfg80211_registered_device
*rdev
,
1338 struct net_device
*dev
, const u8
*peer
,
1343 trace_rdev_reset_tid_config(&rdev
->wiphy
, dev
, peer
, tids
);
1344 ret
= rdev
->ops
->reset_tid_config(&rdev
->wiphy
, dev
, peer
, tids
);
1345 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1349 static inline int rdev_set_sar_specs(struct cfg80211_registered_device
*rdev
,
1350 struct cfg80211_sar_specs
*sar
)
1354 trace_rdev_set_sar_specs(&rdev
->wiphy
, sar
);
1355 ret
= rdev
->ops
->set_sar_specs(&rdev
->wiphy
, sar
);
1356 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1361 #endif /* __CFG80211_RDEV_OPS */