1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Portions of this file
4 * Copyright(c) 2016-2017 Intel Deutschland GmbH
5 * Copyright (C) 2018, 2021-2023 Intel Corporation
7 #ifndef __CFG80211_RDEV_OPS
8 #define __CFG80211_RDEV_OPS
10 #include <linux/rtnetlink.h>
11 #include <net/cfg80211.h>
15 static inline int rdev_suspend(struct cfg80211_registered_device *rdev,
16 struct cfg80211_wowlan *wowlan)
19 trace_rdev_suspend(&rdev->wiphy, wowlan);
20 ret = rdev->ops->suspend(&rdev->wiphy, wowlan);
21 trace_rdev_return_int(&rdev->wiphy, ret);
25 static inline int rdev_resume(struct cfg80211_registered_device *rdev)
28 trace_rdev_resume(&rdev->wiphy);
29 ret = rdev->ops->resume(&rdev->wiphy);
30 trace_rdev_return_int(&rdev->wiphy, ret);
34 static inline void rdev_set_wakeup(struct cfg80211_registered_device *rdev,
37 trace_rdev_set_wakeup(&rdev->wiphy, enabled);
38 rdev->ops->set_wakeup(&rdev->wiphy, enabled);
39 trace_rdev_return_void(&rdev->wiphy);
42 static inline struct wireless_dev
43 *rdev_add_virtual_intf(struct cfg80211_registered_device *rdev, char *name,
44 unsigned char name_assign_type,
45 enum nl80211_iftype type,
46 struct vif_params *params)
48 struct wireless_dev *ret;
49 trace_rdev_add_virtual_intf(&rdev->wiphy, name, type);
50 ret = rdev->ops->add_virtual_intf(&rdev->wiphy, name, name_assign_type,
52 trace_rdev_return_wdev(&rdev->wiphy, ret);
57 rdev_del_virtual_intf(struct cfg80211_registered_device *rdev,
58 struct wireless_dev *wdev)
61 trace_rdev_del_virtual_intf(&rdev->wiphy, wdev);
62 ret = rdev->ops->del_virtual_intf(&rdev->wiphy, wdev);
63 trace_rdev_return_int(&rdev->wiphy, ret);
68 rdev_change_virtual_intf(struct cfg80211_registered_device *rdev,
69 struct net_device *dev, enum nl80211_iftype type,
70 struct vif_params *params)
73 trace_rdev_change_virtual_intf(&rdev->wiphy, dev, type);
74 ret = rdev->ops->change_virtual_intf(&rdev->wiphy, dev, type, params);
75 trace_rdev_return_int(&rdev->wiphy, ret);
79 static inline int rdev_add_key(struct cfg80211_registered_device *rdev,
80 struct net_device *netdev, int link_id,
81 u8 key_index, bool pairwise, const u8 *mac_addr,
82 struct key_params *params)
85 trace_rdev_add_key(&rdev->wiphy, netdev, link_id, key_index, pairwise,
86 mac_addr, params->mode);
87 ret = rdev->ops->add_key(&rdev->wiphy, netdev, link_id, key_index,
88 pairwise, mac_addr, params);
89 trace_rdev_return_int(&rdev->wiphy, ret);
94 rdev_get_key(struct cfg80211_registered_device *rdev, struct net_device *netdev,
95 int link_id, u8 key_index, bool pairwise, const u8 *mac_addr,
97 void (*callback)(void *cookie, struct key_params*))
100 trace_rdev_get_key(&rdev->wiphy, netdev, link_id, key_index, pairwise,
102 ret = rdev->ops->get_key(&rdev->wiphy, netdev, link_id, key_index,
103 pairwise, mac_addr, cookie, callback);
104 trace_rdev_return_int(&rdev->wiphy, ret);
108 static inline int rdev_del_key(struct cfg80211_registered_device *rdev,
109 struct net_device *netdev, int link_id,
110 u8 key_index, bool pairwise, const u8 *mac_addr)
113 trace_rdev_del_key(&rdev->wiphy, netdev, link_id, key_index, pairwise,
115 ret = rdev->ops->del_key(&rdev->wiphy, netdev, link_id, key_index,
117 trace_rdev_return_int(&rdev->wiphy, ret);
122 rdev_set_default_key(struct cfg80211_registered_device *rdev,
123 struct net_device *netdev, int link_id, u8 key_index,
124 bool unicast, bool multicast)
127 trace_rdev_set_default_key(&rdev->wiphy, netdev, link_id, key_index,
129 ret = rdev->ops->set_default_key(&rdev->wiphy, netdev, link_id,
130 key_index, unicast, multicast);
131 trace_rdev_return_int(&rdev->wiphy, ret);
136 rdev_set_default_mgmt_key(struct cfg80211_registered_device *rdev,
137 struct net_device *netdev, int link_id, u8 key_index)
140 trace_rdev_set_default_mgmt_key(&rdev->wiphy, netdev, link_id,
142 ret = rdev->ops->set_default_mgmt_key(&rdev->wiphy, netdev, link_id,
144 trace_rdev_return_int(&rdev->wiphy, ret);
149 rdev_set_default_beacon_key(struct cfg80211_registered_device *rdev,
150 struct net_device *netdev, int link_id,
155 trace_rdev_set_default_beacon_key(&rdev->wiphy, netdev, link_id,
157 ret = rdev->ops->set_default_beacon_key(&rdev->wiphy, netdev, link_id,
159 trace_rdev_return_int(&rdev->wiphy, ret);
163 static inline int rdev_start_ap(struct cfg80211_registered_device *rdev,
164 struct net_device *dev,
165 struct cfg80211_ap_settings *settings)
168 trace_rdev_start_ap(&rdev->wiphy, dev, settings);
169 ret = rdev->ops->start_ap(&rdev->wiphy, dev, settings);
170 trace_rdev_return_int(&rdev->wiphy, ret);
174 static inline int rdev_change_beacon(struct cfg80211_registered_device *rdev,
175 struct net_device *dev,
176 struct cfg80211_beacon_data *info)
179 trace_rdev_change_beacon(&rdev->wiphy, dev, info);
180 ret = rdev->ops->change_beacon(&rdev->wiphy, dev, info);
181 trace_rdev_return_int(&rdev->wiphy, ret);
185 static inline int rdev_stop_ap(struct cfg80211_registered_device *rdev,
186 struct net_device *dev, unsigned int link_id)
189 trace_rdev_stop_ap(&rdev->wiphy, dev, link_id);
190 ret = rdev->ops->stop_ap(&rdev->wiphy, dev, link_id);
191 trace_rdev_return_int(&rdev->wiphy, ret);
195 static inline int rdev_add_station(struct cfg80211_registered_device *rdev,
196 struct net_device *dev, u8 *mac,
197 struct station_parameters *params)
200 trace_rdev_add_station(&rdev->wiphy, dev, mac, params);
201 ret = rdev->ops->add_station(&rdev->wiphy, dev, mac, params);
202 trace_rdev_return_int(&rdev->wiphy, ret);
206 static inline int rdev_del_station(struct cfg80211_registered_device *rdev,
207 struct net_device *dev,
208 struct station_del_parameters *params)
211 trace_rdev_del_station(&rdev->wiphy, dev, params);
212 ret = rdev->ops->del_station(&rdev->wiphy, dev, params);
213 trace_rdev_return_int(&rdev->wiphy, ret);
217 static inline int rdev_change_station(struct cfg80211_registered_device *rdev,
218 struct net_device *dev, u8 *mac,
219 struct station_parameters *params)
222 trace_rdev_change_station(&rdev->wiphy, dev, mac, params);
223 ret = rdev->ops->change_station(&rdev->wiphy, dev, mac, params);
224 trace_rdev_return_int(&rdev->wiphy, ret);
228 static inline int rdev_get_station(struct cfg80211_registered_device *rdev,
229 struct net_device *dev, const u8 *mac,
230 struct station_info *sinfo)
233 trace_rdev_get_station(&rdev->wiphy, dev, mac);
234 ret = rdev->ops->get_station(&rdev->wiphy, dev, mac, sinfo);
235 trace_rdev_return_int_station_info(&rdev->wiphy, ret, sinfo);
239 static inline int rdev_dump_station(struct cfg80211_registered_device *rdev,
240 struct net_device *dev, int idx, u8 *mac,
241 struct station_info *sinfo)
244 trace_rdev_dump_station(&rdev->wiphy, dev, idx, mac);
245 ret = rdev->ops->dump_station(&rdev->wiphy, dev, idx, mac, sinfo);
246 trace_rdev_return_int_station_info(&rdev->wiphy, ret, sinfo);
250 static inline int rdev_add_mpath(struct cfg80211_registered_device *rdev,
251 struct net_device *dev, u8 *dst, u8 *next_hop)
254 trace_rdev_add_mpath(&rdev->wiphy, dev, dst, next_hop);
255 ret = rdev->ops->add_mpath(&rdev->wiphy, dev, dst, next_hop);
256 trace_rdev_return_int(&rdev->wiphy, ret);
260 static inline int rdev_del_mpath(struct cfg80211_registered_device *rdev,
261 struct net_device *dev, u8 *dst)
264 trace_rdev_del_mpath(&rdev->wiphy, dev, dst);
265 ret = rdev->ops->del_mpath(&rdev->wiphy, dev, dst);
266 trace_rdev_return_int(&rdev->wiphy, ret);
270 static inline int rdev_change_mpath(struct cfg80211_registered_device *rdev,
271 struct net_device *dev, u8 *dst,
275 trace_rdev_change_mpath(&rdev->wiphy, dev, dst, next_hop);
276 ret = rdev->ops->change_mpath(&rdev->wiphy, dev, dst, next_hop);
277 trace_rdev_return_int(&rdev->wiphy, ret);
281 static inline int rdev_get_mpath(struct cfg80211_registered_device *rdev,
282 struct net_device *dev, u8 *dst, u8 *next_hop,
283 struct mpath_info *pinfo)
286 trace_rdev_get_mpath(&rdev->wiphy, dev, dst, next_hop);
287 ret = rdev->ops->get_mpath(&rdev->wiphy, dev, dst, next_hop, pinfo);
288 trace_rdev_return_int_mpath_info(&rdev->wiphy, ret, pinfo);
293 static inline int rdev_get_mpp(struct cfg80211_registered_device *rdev,
294 struct net_device *dev, u8 *dst, u8 *mpp,
295 struct mpath_info *pinfo)
299 trace_rdev_get_mpp(&rdev->wiphy, dev, dst, mpp);
300 ret = rdev->ops->get_mpp(&rdev->wiphy, dev, dst, mpp, pinfo);
301 trace_rdev_return_int_mpath_info(&rdev->wiphy, ret, pinfo);
305 static inline int rdev_dump_mpath(struct cfg80211_registered_device *rdev,
306 struct net_device *dev, int idx, u8 *dst,
307 u8 *next_hop, struct mpath_info *pinfo)
311 trace_rdev_dump_mpath(&rdev->wiphy, dev, idx, dst, next_hop);
312 ret = rdev->ops->dump_mpath(&rdev->wiphy, dev, idx, dst, next_hop,
314 trace_rdev_return_int_mpath_info(&rdev->wiphy, ret, pinfo);
318 static inline int rdev_dump_mpp(struct cfg80211_registered_device *rdev,
319 struct net_device *dev, int idx, u8 *dst,
320 u8 *mpp, struct mpath_info *pinfo)
325 trace_rdev_dump_mpp(&rdev->wiphy, dev, idx, dst, mpp);
326 ret = rdev->ops->dump_mpp(&rdev->wiphy, dev, idx, dst, mpp, pinfo);
327 trace_rdev_return_int_mpath_info(&rdev->wiphy, ret, pinfo);
332 rdev_get_mesh_config(struct cfg80211_registered_device *rdev,
333 struct net_device *dev, struct mesh_config *conf)
336 trace_rdev_get_mesh_config(&rdev->wiphy, dev);
337 ret = rdev->ops->get_mesh_config(&rdev->wiphy, dev, conf);
338 trace_rdev_return_int_mesh_config(&rdev->wiphy, ret, conf);
343 rdev_update_mesh_config(struct cfg80211_registered_device *rdev,
344 struct net_device *dev, u32 mask,
345 const struct mesh_config *nconf)
348 trace_rdev_update_mesh_config(&rdev->wiphy, dev, mask, nconf);
349 ret = rdev->ops->update_mesh_config(&rdev->wiphy, dev, mask, nconf);
350 trace_rdev_return_int(&rdev->wiphy, ret);
354 static inline int rdev_join_mesh(struct cfg80211_registered_device *rdev,
355 struct net_device *dev,
356 const struct mesh_config *conf,
357 const struct mesh_setup *setup)
360 trace_rdev_join_mesh(&rdev->wiphy, dev, conf, setup);
361 ret = rdev->ops->join_mesh(&rdev->wiphy, dev, conf, setup);
362 trace_rdev_return_int(&rdev->wiphy, ret);
367 static inline int rdev_leave_mesh(struct cfg80211_registered_device *rdev,
368 struct net_device *dev)
371 trace_rdev_leave_mesh(&rdev->wiphy, dev);
372 ret = rdev->ops->leave_mesh(&rdev->wiphy, dev);
373 trace_rdev_return_int(&rdev->wiphy, ret);
377 static inline int rdev_join_ocb(struct cfg80211_registered_device *rdev,
378 struct net_device *dev,
379 struct ocb_setup *setup)
382 trace_rdev_join_ocb(&rdev->wiphy, dev, setup);
383 ret = rdev->ops->join_ocb(&rdev->wiphy, dev, setup);
384 trace_rdev_return_int(&rdev->wiphy, ret);
388 static inline int rdev_leave_ocb(struct cfg80211_registered_device *rdev,
389 struct net_device *dev)
392 trace_rdev_leave_ocb(&rdev->wiphy, dev);
393 ret = rdev->ops->leave_ocb(&rdev->wiphy, dev);
394 trace_rdev_return_int(&rdev->wiphy, ret);
398 static inline int rdev_change_bss(struct cfg80211_registered_device *rdev,
399 struct net_device *dev,
400 struct bss_parameters *params)
404 trace_rdev_change_bss(&rdev->wiphy, dev, params);
405 ret = rdev->ops->change_bss(&rdev->wiphy, dev, params);
406 trace_rdev_return_int(&rdev->wiphy, ret);
410 static inline void rdev_inform_bss(struct cfg80211_registered_device *rdev,
411 struct cfg80211_bss *bss,
412 const struct cfg80211_bss_ies *ies,
416 trace_rdev_inform_bss(&rdev->wiphy, bss);
417 if (rdev->ops->inform_bss)
418 rdev->ops->inform_bss(&rdev->wiphy, bss, ies, drv_data);
419 trace_rdev_return_void(&rdev->wiphy);
422 static inline int rdev_set_txq_params(struct cfg80211_registered_device *rdev,
423 struct net_device *dev,
424 struct ieee80211_txq_params *params)
428 trace_rdev_set_txq_params(&rdev->wiphy, dev, params);
429 ret = rdev->ops->set_txq_params(&rdev->wiphy, dev, params);
430 trace_rdev_return_int(&rdev->wiphy, ret);
435 rdev_libertas_set_mesh_channel(struct cfg80211_registered_device *rdev,
436 struct net_device *dev,
437 struct ieee80211_channel *chan)
440 trace_rdev_libertas_set_mesh_channel(&rdev->wiphy, dev, chan);
441 ret = rdev->ops->libertas_set_mesh_channel(&rdev->wiphy, dev, chan);
442 trace_rdev_return_int(&rdev->wiphy, ret);
447 rdev_set_monitor_channel(struct cfg80211_registered_device *rdev,
448 struct cfg80211_chan_def *chandef)
451 trace_rdev_set_monitor_channel(&rdev->wiphy, chandef);
452 ret = rdev->ops->set_monitor_channel(&rdev->wiphy, chandef);
453 trace_rdev_return_int(&rdev->wiphy, ret);
457 static inline int rdev_scan(struct cfg80211_registered_device *rdev,
458 struct cfg80211_scan_request *request)
461 trace_rdev_scan(&rdev->wiphy, request);
462 ret = rdev->ops->scan(&rdev->wiphy, request);
463 trace_rdev_return_int(&rdev->wiphy, ret);
467 static inline void rdev_abort_scan(struct cfg80211_registered_device *rdev,
468 struct wireless_dev *wdev)
470 trace_rdev_abort_scan(&rdev->wiphy, wdev);
471 rdev->ops->abort_scan(&rdev->wiphy, wdev);
472 trace_rdev_return_void(&rdev->wiphy);
475 static inline int rdev_auth(struct cfg80211_registered_device *rdev,
476 struct net_device *dev,
477 struct cfg80211_auth_request *req)
480 trace_rdev_auth(&rdev->wiphy, dev, req);
481 ret = rdev->ops->auth(&rdev->wiphy, dev, req);
482 trace_rdev_return_int(&rdev->wiphy, ret);
486 static inline int rdev_assoc(struct cfg80211_registered_device *rdev,
487 struct net_device *dev,
488 struct cfg80211_assoc_request *req)
492 trace_rdev_assoc(&rdev->wiphy, dev, req);
493 ret = rdev->ops->assoc(&rdev->wiphy, dev, req);
494 trace_rdev_return_int(&rdev->wiphy, ret);
498 static inline int rdev_deauth(struct cfg80211_registered_device *rdev,
499 struct net_device *dev,
500 struct cfg80211_deauth_request *req)
503 trace_rdev_deauth(&rdev->wiphy, dev, req);
504 ret = rdev->ops->deauth(&rdev->wiphy, dev, req);
505 trace_rdev_return_int(&rdev->wiphy, ret);
509 static inline int rdev_disassoc(struct cfg80211_registered_device *rdev,
510 struct net_device *dev,
511 struct cfg80211_disassoc_request *req)
514 trace_rdev_disassoc(&rdev->wiphy, dev, req);
515 ret = rdev->ops->disassoc(&rdev->wiphy, dev, req);
516 trace_rdev_return_int(&rdev->wiphy, ret);
520 static inline int rdev_connect(struct cfg80211_registered_device *rdev,
521 struct net_device *dev,
522 struct cfg80211_connect_params *sme)
525 trace_rdev_connect(&rdev->wiphy, dev, sme);
526 ret = rdev->ops->connect(&rdev->wiphy, dev, sme);
527 trace_rdev_return_int(&rdev->wiphy, ret);
532 rdev_update_connect_params(struct cfg80211_registered_device *rdev,
533 struct net_device *dev,
534 struct cfg80211_connect_params *sme, u32 changed)
537 trace_rdev_update_connect_params(&rdev->wiphy, dev, sme, changed);
538 ret = rdev->ops->update_connect_params(&rdev->wiphy, dev, sme, changed);
539 trace_rdev_return_int(&rdev->wiphy, ret);
543 static inline int rdev_disconnect(struct cfg80211_registered_device *rdev,
544 struct net_device *dev, u16 reason_code)
547 trace_rdev_disconnect(&rdev->wiphy, dev, reason_code);
548 ret = rdev->ops->disconnect(&rdev->wiphy, dev, reason_code);
549 trace_rdev_return_int(&rdev->wiphy, ret);
553 static inline int rdev_join_ibss(struct cfg80211_registered_device *rdev,
554 struct net_device *dev,
555 struct cfg80211_ibss_params *params)
558 trace_rdev_join_ibss(&rdev->wiphy, dev, params);
559 ret = rdev->ops->join_ibss(&rdev->wiphy, dev, params);
560 trace_rdev_return_int(&rdev->wiphy, ret);
564 static inline int rdev_leave_ibss(struct cfg80211_registered_device *rdev,
565 struct net_device *dev)
568 trace_rdev_leave_ibss(&rdev->wiphy, dev);
569 ret = rdev->ops->leave_ibss(&rdev->wiphy, dev);
570 trace_rdev_return_int(&rdev->wiphy, ret);
575 rdev_set_wiphy_params(struct cfg80211_registered_device *rdev, u32 changed)
579 if (!rdev->ops->set_wiphy_params)
582 trace_rdev_set_wiphy_params(&rdev->wiphy, changed);
583 ret = rdev->ops->set_wiphy_params(&rdev->wiphy, changed);
584 trace_rdev_return_int(&rdev->wiphy, ret);
588 static inline int rdev_set_tx_power(struct cfg80211_registered_device *rdev,
589 struct wireless_dev *wdev,
590 enum nl80211_tx_power_setting type, int mbm)
593 trace_rdev_set_tx_power(&rdev->wiphy, wdev, type, mbm);
594 ret = rdev->ops->set_tx_power(&rdev->wiphy, wdev, type, mbm);
595 trace_rdev_return_int(&rdev->wiphy, ret);
599 static inline int rdev_get_tx_power(struct cfg80211_registered_device *rdev,
600 struct wireless_dev *wdev, int *dbm)
603 trace_rdev_get_tx_power(&rdev->wiphy, wdev);
604 ret = rdev->ops->get_tx_power(&rdev->wiphy, wdev, dbm);
605 trace_rdev_return_int_int(&rdev->wiphy, ret, *dbm);
610 rdev_set_multicast_to_unicast(struct cfg80211_registered_device *rdev,
611 struct net_device *dev,
615 trace_rdev_set_multicast_to_unicast(&rdev->wiphy, dev, enabled);
616 ret = rdev->ops->set_multicast_to_unicast(&rdev->wiphy, dev, enabled);
617 trace_rdev_return_int(&rdev->wiphy, ret);
622 rdev_get_txq_stats(struct cfg80211_registered_device *rdev,
623 struct wireless_dev *wdev,
624 struct cfg80211_txq_stats *txqstats)
627 trace_rdev_get_txq_stats(&rdev->wiphy, wdev);
628 ret = rdev->ops->get_txq_stats(&rdev->wiphy, wdev, txqstats);
629 trace_rdev_return_int(&rdev->wiphy, ret);
633 static inline void rdev_rfkill_poll(struct cfg80211_registered_device *rdev)
635 trace_rdev_rfkill_poll(&rdev->wiphy);
636 rdev->ops->rfkill_poll(&rdev->wiphy);
637 trace_rdev_return_void(&rdev->wiphy);
641 #ifdef CONFIG_NL80211_TESTMODE
642 static inline int rdev_testmode_cmd(struct cfg80211_registered_device *rdev,
643 struct wireless_dev *wdev,
647 trace_rdev_testmode_cmd(&rdev->wiphy, wdev);
648 ret = rdev->ops->testmode_cmd(&rdev->wiphy, wdev, data, len);
649 trace_rdev_return_int(&rdev->wiphy, ret);
653 static inline int rdev_testmode_dump(struct cfg80211_registered_device *rdev,
655 struct netlink_callback *cb, void *data,
659 trace_rdev_testmode_dump(&rdev->wiphy);
660 ret = rdev->ops->testmode_dump(&rdev->wiphy, skb, cb, data, len);
661 trace_rdev_return_int(&rdev->wiphy, ret);
667 rdev_set_bitrate_mask(struct cfg80211_registered_device *rdev,
668 struct net_device *dev, unsigned int link_id,
670 const struct cfg80211_bitrate_mask *mask)
673 trace_rdev_set_bitrate_mask(&rdev->wiphy, dev, link_id, peer, mask);
674 ret = rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, link_id,
676 trace_rdev_return_int(&rdev->wiphy, ret);
680 static inline int rdev_dump_survey(struct cfg80211_registered_device *rdev,
681 struct net_device *netdev, int idx,
682 struct survey_info *info)
685 trace_rdev_dump_survey(&rdev->wiphy, netdev, idx);
686 ret = rdev->ops->dump_survey(&rdev->wiphy, netdev, idx, info);
688 trace_rdev_return_int(&rdev->wiphy, ret);
690 trace_rdev_return_int_survey_info(&rdev->wiphy, ret, info);
694 static inline int rdev_set_pmksa(struct cfg80211_registered_device *rdev,
695 struct net_device *netdev,
696 struct cfg80211_pmksa *pmksa)
699 trace_rdev_set_pmksa(&rdev->wiphy, netdev, pmksa);
700 ret = rdev->ops->set_pmksa(&rdev->wiphy, netdev, pmksa);
701 trace_rdev_return_int(&rdev->wiphy, ret);
705 static inline int rdev_del_pmksa(struct cfg80211_registered_device *rdev,
706 struct net_device *netdev,
707 struct cfg80211_pmksa *pmksa)
710 trace_rdev_del_pmksa(&rdev->wiphy, netdev, pmksa);
711 ret = rdev->ops->del_pmksa(&rdev->wiphy, netdev, pmksa);
712 trace_rdev_return_int(&rdev->wiphy, ret);
716 static inline int rdev_flush_pmksa(struct cfg80211_registered_device *rdev,
717 struct net_device *netdev)
720 trace_rdev_flush_pmksa(&rdev->wiphy, netdev);
721 ret = rdev->ops->flush_pmksa(&rdev->wiphy, netdev);
722 trace_rdev_return_int(&rdev->wiphy, ret);
727 rdev_remain_on_channel(struct cfg80211_registered_device *rdev,
728 struct wireless_dev *wdev,
729 struct ieee80211_channel *chan,
730 unsigned int duration, u64 *cookie)
733 trace_rdev_remain_on_channel(&rdev->wiphy, wdev, chan, duration);
734 ret = rdev->ops->remain_on_channel(&rdev->wiphy, wdev, chan,
736 trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie);
741 rdev_cancel_remain_on_channel(struct cfg80211_registered_device *rdev,
742 struct wireless_dev *wdev, u64 cookie)
745 trace_rdev_cancel_remain_on_channel(&rdev->wiphy, wdev, cookie);
746 ret = rdev->ops->cancel_remain_on_channel(&rdev->wiphy, wdev, cookie);
747 trace_rdev_return_int(&rdev->wiphy, ret);
751 static inline int rdev_mgmt_tx(struct cfg80211_registered_device *rdev,
752 struct wireless_dev *wdev,
753 struct cfg80211_mgmt_tx_params *params,
757 trace_rdev_mgmt_tx(&rdev->wiphy, wdev, params);
758 ret = rdev->ops->mgmt_tx(&rdev->wiphy, wdev, params, cookie);
759 trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie);
763 static inline int rdev_tx_control_port(struct cfg80211_registered_device *rdev,
764 struct net_device *dev,
765 const void *buf, size_t len,
766 const u8 *dest, __be16 proto,
767 const bool noencrypt, int link,
771 trace_rdev_tx_control_port(&rdev->wiphy, dev, buf, len,
772 dest, proto, noencrypt, link);
773 ret = rdev->ops->tx_control_port(&rdev->wiphy, dev, buf, len,
774 dest, proto, noencrypt, link, cookie);
776 trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie);
778 trace_rdev_return_int(&rdev->wiphy, ret);
783 rdev_mgmt_tx_cancel_wait(struct cfg80211_registered_device *rdev,
784 struct wireless_dev *wdev, u64 cookie)
787 trace_rdev_mgmt_tx_cancel_wait(&rdev->wiphy, wdev, cookie);
788 ret = rdev->ops->mgmt_tx_cancel_wait(&rdev->wiphy, wdev, cookie);
789 trace_rdev_return_int(&rdev->wiphy, ret);
793 static inline int rdev_set_power_mgmt(struct cfg80211_registered_device *rdev,
794 struct net_device *dev, bool enabled,
798 trace_rdev_set_power_mgmt(&rdev->wiphy, dev, enabled, timeout);
799 ret = rdev->ops->set_power_mgmt(&rdev->wiphy, dev, enabled, timeout);
800 trace_rdev_return_int(&rdev->wiphy, ret);
805 rdev_set_cqm_rssi_config(struct cfg80211_registered_device *rdev,
806 struct net_device *dev, s32 rssi_thold, u32 rssi_hyst)
809 trace_rdev_set_cqm_rssi_config(&rdev->wiphy, dev, rssi_thold,
811 ret = rdev->ops->set_cqm_rssi_config(&rdev->wiphy, dev, rssi_thold,
813 trace_rdev_return_int(&rdev->wiphy, ret);
818 rdev_set_cqm_rssi_range_config(struct cfg80211_registered_device *rdev,
819 struct net_device *dev, s32 low, s32 high)
822 trace_rdev_set_cqm_rssi_range_config(&rdev->wiphy, dev, low, high);
823 ret = rdev->ops->set_cqm_rssi_range_config(&rdev->wiphy, dev,
825 trace_rdev_return_int(&rdev->wiphy, ret);
830 rdev_set_cqm_txe_config(struct cfg80211_registered_device *rdev,
831 struct net_device *dev, u32 rate, u32 pkts, u32 intvl)
834 trace_rdev_set_cqm_txe_config(&rdev->wiphy, dev, rate, pkts, intvl);
835 ret = rdev->ops->set_cqm_txe_config(&rdev->wiphy, dev, rate, pkts,
837 trace_rdev_return_int(&rdev->wiphy, ret);
842 rdev_update_mgmt_frame_registrations(struct cfg80211_registered_device *rdev,
843 struct wireless_dev *wdev,
844 struct mgmt_frame_regs *upd)
848 trace_rdev_update_mgmt_frame_registrations(&rdev->wiphy, wdev, upd);
849 if (rdev->ops->update_mgmt_frame_registrations)
850 rdev->ops->update_mgmt_frame_registrations(&rdev->wiphy, wdev,
852 trace_rdev_return_void(&rdev->wiphy);
855 static inline int rdev_set_antenna(struct cfg80211_registered_device *rdev,
856 u32 tx_ant, u32 rx_ant)
859 trace_rdev_set_antenna(&rdev->wiphy, tx_ant, rx_ant);
860 ret = rdev->ops->set_antenna(&rdev->wiphy, tx_ant, rx_ant);
861 trace_rdev_return_int(&rdev->wiphy, ret);
865 static inline int rdev_get_antenna(struct cfg80211_registered_device *rdev,
866 u32 *tx_ant, u32 *rx_ant)
869 trace_rdev_get_antenna(&rdev->wiphy);
870 ret = rdev->ops->get_antenna(&rdev->wiphy, tx_ant, rx_ant);
872 trace_rdev_return_int(&rdev->wiphy, ret);
874 trace_rdev_return_int_tx_rx(&rdev->wiphy, ret, *tx_ant,
880 rdev_sched_scan_start(struct cfg80211_registered_device *rdev,
881 struct net_device *dev,
882 struct cfg80211_sched_scan_request *request)
885 trace_rdev_sched_scan_start(&rdev->wiphy, dev, request->reqid);
886 ret = rdev->ops->sched_scan_start(&rdev->wiphy, dev, request);
887 trace_rdev_return_int(&rdev->wiphy, ret);
891 static inline int rdev_sched_scan_stop(struct cfg80211_registered_device *rdev,
892 struct net_device *dev, u64 reqid)
895 trace_rdev_sched_scan_stop(&rdev->wiphy, dev, reqid);
896 ret = rdev->ops->sched_scan_stop(&rdev->wiphy, dev, reqid);
897 trace_rdev_return_int(&rdev->wiphy, ret);
901 static inline int rdev_set_rekey_data(struct cfg80211_registered_device *rdev,
902 struct net_device *dev,
903 struct cfg80211_gtk_rekey_data *data)
906 trace_rdev_set_rekey_data(&rdev->wiphy, dev);
907 ret = rdev->ops->set_rekey_data(&rdev->wiphy, dev, data);
908 trace_rdev_return_int(&rdev->wiphy, ret);
912 static inline int rdev_tdls_mgmt(struct cfg80211_registered_device *rdev,
913 struct net_device *dev, u8 *peer,
914 int link_id, u8 action_code,
915 u8 dialog_token, u16 status_code,
916 u32 peer_capability, bool initiator,
917 const u8 *buf, size_t len)
920 trace_rdev_tdls_mgmt(&rdev->wiphy, dev, peer, link_id, action_code,
921 dialog_token, status_code, peer_capability,
922 initiator, buf, len);
923 ret = rdev->ops->tdls_mgmt(&rdev->wiphy, dev, peer, link_id,
924 action_code, dialog_token, status_code,
925 peer_capability, initiator, buf, len);
926 trace_rdev_return_int(&rdev->wiphy, ret);
930 static inline int rdev_tdls_oper(struct cfg80211_registered_device *rdev,
931 struct net_device *dev, u8 *peer,
932 enum nl80211_tdls_operation oper)
935 trace_rdev_tdls_oper(&rdev->wiphy, dev, peer, oper);
936 ret = rdev->ops->tdls_oper(&rdev->wiphy, dev, peer, oper);
937 trace_rdev_return_int(&rdev->wiphy, ret);
941 static inline int rdev_probe_client(struct cfg80211_registered_device *rdev,
942 struct net_device *dev, const u8 *peer,
946 trace_rdev_probe_client(&rdev->wiphy, dev, peer);
947 ret = rdev->ops->probe_client(&rdev->wiphy, dev, peer, cookie);
948 trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie);
952 static inline int rdev_set_noack_map(struct cfg80211_registered_device *rdev,
953 struct net_device *dev, u16 noack_map)
956 trace_rdev_set_noack_map(&rdev->wiphy, dev, noack_map);
957 ret = rdev->ops->set_noack_map(&rdev->wiphy, dev, noack_map);
958 trace_rdev_return_int(&rdev->wiphy, ret);
963 rdev_get_channel(struct cfg80211_registered_device *rdev,
964 struct wireless_dev *wdev,
965 unsigned int link_id,
966 struct cfg80211_chan_def *chandef)
970 trace_rdev_get_channel(&rdev->wiphy, wdev, link_id);
971 ret = rdev->ops->get_channel(&rdev->wiphy, wdev, link_id, chandef);
972 trace_rdev_return_chandef(&rdev->wiphy, ret, chandef);
977 static inline int rdev_start_p2p_device(struct cfg80211_registered_device *rdev,
978 struct wireless_dev *wdev)
982 trace_rdev_start_p2p_device(&rdev->wiphy, wdev);
983 ret = rdev->ops->start_p2p_device(&rdev->wiphy, wdev);
984 trace_rdev_return_int(&rdev->wiphy, ret);
988 static inline void rdev_stop_p2p_device(struct cfg80211_registered_device *rdev,
989 struct wireless_dev *wdev)
991 trace_rdev_stop_p2p_device(&rdev->wiphy, wdev);
992 rdev->ops->stop_p2p_device(&rdev->wiphy, wdev);
993 trace_rdev_return_void(&rdev->wiphy);
996 static inline int rdev_start_nan(struct cfg80211_registered_device *rdev,
997 struct wireless_dev *wdev,
998 struct cfg80211_nan_conf *conf)
1002 trace_rdev_start_nan(&rdev->wiphy, wdev, conf);
1003 ret = rdev->ops->start_nan(&rdev->wiphy, wdev, conf);
1004 trace_rdev_return_int(&rdev->wiphy, ret);
1008 static inline void rdev_stop_nan(struct cfg80211_registered_device *rdev,
1009 struct wireless_dev *wdev)
1011 trace_rdev_stop_nan(&rdev->wiphy, wdev);
1012 rdev->ops->stop_nan(&rdev->wiphy, wdev);
1013 trace_rdev_return_void(&rdev->wiphy);
1017 rdev_add_nan_func(struct cfg80211_registered_device *rdev,
1018 struct wireless_dev *wdev,
1019 struct cfg80211_nan_func *nan_func)
1023 trace_rdev_add_nan_func(&rdev->wiphy, wdev, nan_func);
1024 ret = rdev->ops->add_nan_func(&rdev->wiphy, wdev, nan_func);
1025 trace_rdev_return_int(&rdev->wiphy, ret);
1029 static inline void rdev_del_nan_func(struct cfg80211_registered_device *rdev,
1030 struct wireless_dev *wdev, u64 cookie)
1032 trace_rdev_del_nan_func(&rdev->wiphy, wdev, cookie);
1033 rdev->ops->del_nan_func(&rdev->wiphy, wdev, cookie);
1034 trace_rdev_return_void(&rdev->wiphy);
1038 rdev_nan_change_conf(struct cfg80211_registered_device *rdev,
1039 struct wireless_dev *wdev,
1040 struct cfg80211_nan_conf *conf, u32 changes)
1044 trace_rdev_nan_change_conf(&rdev->wiphy, wdev, conf, changes);
1045 if (rdev->ops->nan_change_conf)
1046 ret = rdev->ops->nan_change_conf(&rdev->wiphy, wdev, conf,
1050 trace_rdev_return_int(&rdev->wiphy, ret);
1054 static inline int rdev_set_mac_acl(struct cfg80211_registered_device *rdev,
1055 struct net_device *dev,
1056 struct cfg80211_acl_data *params)
1060 trace_rdev_set_mac_acl(&rdev->wiphy, dev, params);
1061 ret = rdev->ops->set_mac_acl(&rdev->wiphy, dev, params);
1062 trace_rdev_return_int(&rdev->wiphy, ret);
1066 static inline int rdev_update_ft_ies(struct cfg80211_registered_device *rdev,
1067 struct net_device *dev,
1068 struct cfg80211_update_ft_ies_params *ftie)
1072 trace_rdev_update_ft_ies(&rdev->wiphy, dev, ftie);
1073 ret = rdev->ops->update_ft_ies(&rdev->wiphy, dev, ftie);
1074 trace_rdev_return_int(&rdev->wiphy, ret);
1078 static inline int rdev_crit_proto_start(struct cfg80211_registered_device *rdev,
1079 struct wireless_dev *wdev,
1080 enum nl80211_crit_proto_id protocol,
1085 trace_rdev_crit_proto_start(&rdev->wiphy, wdev, protocol, duration);
1086 ret = rdev->ops->crit_proto_start(&rdev->wiphy, wdev,
1087 protocol, duration);
1088 trace_rdev_return_int(&rdev->wiphy, ret);
1092 static inline void rdev_crit_proto_stop(struct cfg80211_registered_device *rdev,
1093 struct wireless_dev *wdev)
1095 trace_rdev_crit_proto_stop(&rdev->wiphy, wdev);
1096 rdev->ops->crit_proto_stop(&rdev->wiphy, wdev);
1097 trace_rdev_return_void(&rdev->wiphy);
1100 static inline int rdev_channel_switch(struct cfg80211_registered_device *rdev,
1101 struct net_device *dev,
1102 struct cfg80211_csa_settings *params)
1106 trace_rdev_channel_switch(&rdev->wiphy, dev, params);
1107 ret = rdev->ops->channel_switch(&rdev->wiphy, dev, params);
1108 trace_rdev_return_int(&rdev->wiphy, ret);
1112 static inline int rdev_set_qos_map(struct cfg80211_registered_device *rdev,
1113 struct net_device *dev,
1114 struct cfg80211_qos_map *qos_map)
1116 int ret = -EOPNOTSUPP;
1118 if (rdev->ops->set_qos_map) {
1119 trace_rdev_set_qos_map(&rdev->wiphy, dev, qos_map);
1120 ret = rdev->ops->set_qos_map(&rdev->wiphy, dev, qos_map);
1121 trace_rdev_return_int(&rdev->wiphy, ret);
1128 rdev_set_ap_chanwidth(struct cfg80211_registered_device *rdev,
1129 struct net_device *dev,
1130 unsigned int link_id,
1131 struct cfg80211_chan_def *chandef)
1135 trace_rdev_set_ap_chanwidth(&rdev->wiphy, dev, link_id, chandef);
1136 ret = rdev->ops->set_ap_chanwidth(&rdev->wiphy, dev, link_id, chandef);
1137 trace_rdev_return_int(&rdev->wiphy, ret);
1143 rdev_add_tx_ts(struct cfg80211_registered_device *rdev,
1144 struct net_device *dev, u8 tsid, const u8 *peer,
1145 u8 user_prio, u16 admitted_time)
1147 int ret = -EOPNOTSUPP;
1149 trace_rdev_add_tx_ts(&rdev->wiphy, dev, tsid, peer,
1150 user_prio, admitted_time);
1151 if (rdev->ops->add_tx_ts)
1152 ret = rdev->ops->add_tx_ts(&rdev->wiphy, dev, tsid, peer,
1153 user_prio, admitted_time);
1154 trace_rdev_return_int(&rdev->wiphy, ret);
1160 rdev_del_tx_ts(struct cfg80211_registered_device *rdev,
1161 struct net_device *dev, u8 tsid, const u8 *peer)
1163 int ret = -EOPNOTSUPP;
1165 trace_rdev_del_tx_ts(&rdev->wiphy, dev, tsid, peer);
1166 if (rdev->ops->del_tx_ts)
1167 ret = rdev->ops->del_tx_ts(&rdev->wiphy, dev, tsid, peer);
1168 trace_rdev_return_int(&rdev->wiphy, ret);
1174 rdev_tdls_channel_switch(struct cfg80211_registered_device *rdev,
1175 struct net_device *dev, const u8 *addr,
1176 u8 oper_class, struct cfg80211_chan_def *chandef)
1180 trace_rdev_tdls_channel_switch(&rdev->wiphy, dev, addr, oper_class,
1182 ret = rdev->ops->tdls_channel_switch(&rdev->wiphy, dev, addr,
1183 oper_class, chandef);
1184 trace_rdev_return_int(&rdev->wiphy, ret);
1189 rdev_tdls_cancel_channel_switch(struct cfg80211_registered_device *rdev,
1190 struct net_device *dev, const u8 *addr)
1192 trace_rdev_tdls_cancel_channel_switch(&rdev->wiphy, dev, addr);
1193 rdev->ops->tdls_cancel_channel_switch(&rdev->wiphy, dev, addr);
1194 trace_rdev_return_void(&rdev->wiphy);
1198 rdev_start_radar_detection(struct cfg80211_registered_device *rdev,
1199 struct net_device *dev,
1200 struct cfg80211_chan_def *chandef,
1203 int ret = -ENOTSUPP;
1205 trace_rdev_start_radar_detection(&rdev->wiphy, dev, chandef,
1207 if (rdev->ops->start_radar_detection)
1208 ret = rdev->ops->start_radar_detection(&rdev->wiphy, dev,
1209 chandef, cac_time_ms);
1210 trace_rdev_return_int(&rdev->wiphy, ret);
1215 rdev_end_cac(struct cfg80211_registered_device *rdev,
1216 struct net_device *dev)
1218 trace_rdev_end_cac(&rdev->wiphy, dev);
1219 if (rdev->ops->end_cac)
1220 rdev->ops->end_cac(&rdev->wiphy, dev);
1221 trace_rdev_return_void(&rdev->wiphy);
1225 rdev_set_mcast_rate(struct cfg80211_registered_device *rdev,
1226 struct net_device *dev,
1227 int mcast_rate[NUM_NL80211_BANDS])
1229 int ret = -ENOTSUPP;
1231 trace_rdev_set_mcast_rate(&rdev->wiphy, dev, mcast_rate);
1232 if (rdev->ops->set_mcast_rate)
1233 ret = rdev->ops->set_mcast_rate(&rdev->wiphy, dev, mcast_rate);
1234 trace_rdev_return_int(&rdev->wiphy, ret);
1239 rdev_set_coalesce(struct cfg80211_registered_device *rdev,
1240 struct cfg80211_coalesce *coalesce)
1242 int ret = -ENOTSUPP;
1244 trace_rdev_set_coalesce(&rdev->wiphy, coalesce);
1245 if (rdev->ops->set_coalesce)
1246 ret = rdev->ops->set_coalesce(&rdev->wiphy, coalesce);
1247 trace_rdev_return_int(&rdev->wiphy, ret);
1251 static inline int rdev_set_pmk(struct cfg80211_registered_device *rdev,
1252 struct net_device *dev,
1253 struct cfg80211_pmk_conf *pmk_conf)
1255 int ret = -EOPNOTSUPP;
1257 trace_rdev_set_pmk(&rdev->wiphy, dev, pmk_conf);
1258 if (rdev->ops->set_pmk)
1259 ret = rdev->ops->set_pmk(&rdev->wiphy, dev, pmk_conf);
1260 trace_rdev_return_int(&rdev->wiphy, ret);
1264 static inline int rdev_del_pmk(struct cfg80211_registered_device *rdev,
1265 struct net_device *dev, const u8 *aa)
1267 int ret = -EOPNOTSUPP;
1269 trace_rdev_del_pmk(&rdev->wiphy, dev, aa);
1270 if (rdev->ops->del_pmk)
1271 ret = rdev->ops->del_pmk(&rdev->wiphy, dev, aa);
1272 trace_rdev_return_int(&rdev->wiphy, ret);
1277 rdev_external_auth(struct cfg80211_registered_device *rdev,
1278 struct net_device *dev,
1279 struct cfg80211_external_auth_params *params)
1281 int ret = -EOPNOTSUPP;
1283 trace_rdev_external_auth(&rdev->wiphy, dev, params);
1284 if (rdev->ops->external_auth)
1285 ret = rdev->ops->external_auth(&rdev->wiphy, dev, params);
1286 trace_rdev_return_int(&rdev->wiphy, ret);
1291 rdev_get_ftm_responder_stats(struct cfg80211_registered_device *rdev,
1292 struct net_device *dev,
1293 struct cfg80211_ftm_responder_stats *ftm_stats)
1295 int ret = -EOPNOTSUPP;
1297 trace_rdev_get_ftm_responder_stats(&rdev->wiphy, dev, ftm_stats);
1298 if (rdev->ops->get_ftm_responder_stats)
1299 ret = rdev->ops->get_ftm_responder_stats(&rdev->wiphy, dev,
1301 trace_rdev_return_int(&rdev->wiphy, ret);
1306 rdev_start_pmsr(struct cfg80211_registered_device *rdev,
1307 struct wireless_dev *wdev,
1308 struct cfg80211_pmsr_request *request)
1310 int ret = -EOPNOTSUPP;
1312 trace_rdev_start_pmsr(&rdev->wiphy, wdev, request->cookie);
1313 if (rdev->ops->start_pmsr)
1314 ret = rdev->ops->start_pmsr(&rdev->wiphy, wdev, request);
1315 trace_rdev_return_int(&rdev->wiphy, ret);
1320 rdev_abort_pmsr(struct cfg80211_registered_device *rdev,
1321 struct wireless_dev *wdev,
1322 struct cfg80211_pmsr_request *request)
1324 trace_rdev_abort_pmsr(&rdev->wiphy, wdev, request->cookie);
1325 if (rdev->ops->abort_pmsr)
1326 rdev->ops->abort_pmsr(&rdev->wiphy, wdev, request);
1327 trace_rdev_return_void(&rdev->wiphy);
1330 static inline int rdev_update_owe_info(struct cfg80211_registered_device *rdev,
1331 struct net_device *dev,
1332 struct cfg80211_update_owe_info *oweinfo)
1334 int ret = -EOPNOTSUPP;
1336 trace_rdev_update_owe_info(&rdev->wiphy, dev, oweinfo);
1337 if (rdev->ops->update_owe_info)
1338 ret = rdev->ops->update_owe_info(&rdev->wiphy, dev, oweinfo);
1339 trace_rdev_return_int(&rdev->wiphy, ret);
1344 rdev_probe_mesh_link(struct cfg80211_registered_device *rdev,
1345 struct net_device *dev, const u8 *dest,
1346 const void *buf, size_t len)
1350 trace_rdev_probe_mesh_link(&rdev->wiphy, dev, dest, buf, len);
1351 ret = rdev->ops->probe_mesh_link(&rdev->wiphy, dev, buf, len);
1352 trace_rdev_return_int(&rdev->wiphy, ret);
1356 static inline int rdev_set_tid_config(struct cfg80211_registered_device *rdev,
1357 struct net_device *dev,
1358 struct cfg80211_tid_config *tid_conf)
1362 trace_rdev_set_tid_config(&rdev->wiphy, dev, tid_conf);
1363 ret = rdev->ops->set_tid_config(&rdev->wiphy, dev, tid_conf);
1364 trace_rdev_return_int(&rdev->wiphy, ret);
1368 static inline int rdev_reset_tid_config(struct cfg80211_registered_device *rdev,
1369 struct net_device *dev, const u8 *peer,
1374 trace_rdev_reset_tid_config(&rdev->wiphy, dev, peer, tids);
1375 ret = rdev->ops->reset_tid_config(&rdev->wiphy, dev, peer, tids);
1376 trace_rdev_return_int(&rdev->wiphy, ret);
1380 static inline int rdev_set_sar_specs(struct cfg80211_registered_device *rdev,
1381 struct cfg80211_sar_specs *sar)
1385 trace_rdev_set_sar_specs(&rdev->wiphy, sar);
1386 ret = rdev->ops->set_sar_specs(&rdev->wiphy, sar);
1387 trace_rdev_return_int(&rdev->wiphy, ret);
1392 static inline int rdev_color_change(struct cfg80211_registered_device *rdev,
1393 struct net_device *dev,
1394 struct cfg80211_color_change_settings *params)
1398 trace_rdev_color_change(&rdev->wiphy, dev, params);
1399 ret = rdev->ops->color_change(&rdev->wiphy, dev, params);
1400 trace_rdev_return_int(&rdev->wiphy, ret);
1406 rdev_set_fils_aad(struct cfg80211_registered_device *rdev,
1407 struct net_device *dev, struct cfg80211_fils_aad *fils_aad)
1409 int ret = -EOPNOTSUPP;
1411 trace_rdev_set_fils_aad(&rdev->wiphy, dev, fils_aad);
1412 if (rdev->ops->set_fils_aad)
1413 ret = rdev->ops->set_fils_aad(&rdev->wiphy, dev, fils_aad);
1414 trace_rdev_return_int(&rdev->wiphy, ret);
1420 rdev_set_radar_background(struct cfg80211_registered_device *rdev,
1421 struct cfg80211_chan_def *chandef)
1423 struct wiphy *wiphy = &rdev->wiphy;
1426 if (!rdev->ops->set_radar_background)
1429 trace_rdev_set_radar_background(wiphy, chandef);
1430 ret = rdev->ops->set_radar_background(wiphy, chandef);
1431 trace_rdev_return_int(wiphy, ret);
1437 rdev_add_intf_link(struct cfg80211_registered_device *rdev,
1438 struct wireless_dev *wdev,
1439 unsigned int link_id)
1443 trace_rdev_add_intf_link(&rdev->wiphy, wdev, link_id);
1444 if (rdev->ops->add_intf_link)
1445 ret = rdev->ops->add_intf_link(&rdev->wiphy, wdev, link_id);
1446 trace_rdev_return_int(&rdev->wiphy, ret);
1452 rdev_del_intf_link(struct cfg80211_registered_device *rdev,
1453 struct wireless_dev *wdev,
1454 unsigned int link_id)
1456 trace_rdev_del_intf_link(&rdev->wiphy, wdev, link_id);
1457 if (rdev->ops->del_intf_link)
1458 rdev->ops->del_intf_link(&rdev->wiphy, wdev, link_id);
1459 trace_rdev_return_void(&rdev->wiphy);
1463 rdev_add_link_station(struct cfg80211_registered_device *rdev,
1464 struct net_device *dev,
1465 struct link_station_parameters *params)
1469 if (!rdev->ops->add_link_station)
1472 trace_rdev_add_link_station(&rdev->wiphy, dev, params);
1473 ret = rdev->ops->add_link_station(&rdev->wiphy, dev, params);
1474 trace_rdev_return_int(&rdev->wiphy, ret);
1479 rdev_mod_link_station(struct cfg80211_registered_device *rdev,
1480 struct net_device *dev,
1481 struct link_station_parameters *params)
1485 if (!rdev->ops->mod_link_station)
1488 trace_rdev_mod_link_station(&rdev->wiphy, dev, params);
1489 ret = rdev->ops->mod_link_station(&rdev->wiphy, dev, params);
1490 trace_rdev_return_int(&rdev->wiphy, ret);
1495 rdev_del_link_station(struct cfg80211_registered_device *rdev,
1496 struct net_device *dev,
1497 struct link_station_del_parameters *params)
1501 if (!rdev->ops->del_link_station)
1504 trace_rdev_del_link_station(&rdev->wiphy, dev, params);
1505 ret = rdev->ops->del_link_station(&rdev->wiphy, dev, params);
1506 trace_rdev_return_int(&rdev->wiphy, ret);
1511 rdev_set_hw_timestamp(struct cfg80211_registered_device *rdev,
1512 struct net_device *dev,
1513 struct cfg80211_set_hw_timestamp *hwts)
1515 struct wiphy *wiphy = &rdev->wiphy;
1518 if (!rdev->ops->set_hw_timestamp)
1521 trace_rdev_set_hw_timestamp(wiphy, dev, hwts);
1522 ret = rdev->ops->set_hw_timestamp(wiphy, dev, hwts);
1523 trace_rdev_return_int(wiphy, ret);
1527 #endif /* __CFG80211_RDEV_OPS */