1 #ifndef __CFG80211_RDEV_OPS
2 #define __CFG80211_RDEV_OPS
4 #include <linux/rtnetlink.h>
5 #include <net/cfg80211.h>
9 static inline int rdev_suspend(struct cfg80211_registered_device
*rdev
,
10 struct cfg80211_wowlan
*wowlan
)
13 trace_rdev_suspend(&rdev
->wiphy
, wowlan
);
14 ret
= rdev
->ops
->suspend(&rdev
->wiphy
, wowlan
);
15 trace_rdev_return_int(&rdev
->wiphy
, ret
);
19 static inline int rdev_resume(struct cfg80211_registered_device
*rdev
)
22 trace_rdev_resume(&rdev
->wiphy
);
23 ret
= rdev
->ops
->resume(&rdev
->wiphy
);
24 trace_rdev_return_int(&rdev
->wiphy
, ret
);
28 static inline void rdev_set_wakeup(struct cfg80211_registered_device
*rdev
,
31 trace_rdev_set_wakeup(&rdev
->wiphy
, enabled
);
32 rdev
->ops
->set_wakeup(&rdev
->wiphy
, enabled
);
33 trace_rdev_return_void(&rdev
->wiphy
);
36 static inline struct wireless_dev
37 *rdev_add_virtual_intf(struct cfg80211_registered_device
*rdev
, char *name
,
38 unsigned char name_assign_type
,
39 enum nl80211_iftype type
, u32
*flags
,
40 struct vif_params
*params
)
42 struct wireless_dev
*ret
;
43 trace_rdev_add_virtual_intf(&rdev
->wiphy
, name
, type
);
44 ret
= rdev
->ops
->add_virtual_intf(&rdev
->wiphy
, name
, name_assign_type
,
46 trace_rdev_return_wdev(&rdev
->wiphy
, ret
);
51 rdev_del_virtual_intf(struct cfg80211_registered_device
*rdev
,
52 struct wireless_dev
*wdev
)
55 trace_rdev_del_virtual_intf(&rdev
->wiphy
, wdev
);
56 ret
= rdev
->ops
->del_virtual_intf(&rdev
->wiphy
, wdev
);
57 trace_rdev_return_int(&rdev
->wiphy
, ret
);
62 rdev_change_virtual_intf(struct cfg80211_registered_device
*rdev
,
63 struct net_device
*dev
, enum nl80211_iftype type
,
64 u32
*flags
, struct vif_params
*params
)
67 trace_rdev_change_virtual_intf(&rdev
->wiphy
, dev
, type
);
68 ret
= rdev
->ops
->change_virtual_intf(&rdev
->wiphy
, dev
, type
, flags
,
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
, mac_addr
);
81 ret
= rdev
->ops
->add_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
,
83 trace_rdev_return_int(&rdev
->wiphy
, ret
);
88 rdev_get_key(struct cfg80211_registered_device
*rdev
, struct net_device
*netdev
,
89 u8 key_index
, bool pairwise
, const u8
*mac_addr
, void *cookie
,
90 void (*callback
)(void *cookie
, struct key_params
*))
93 trace_rdev_get_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
, mac_addr
);
94 ret
= rdev
->ops
->get_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
,
95 mac_addr
, cookie
, callback
);
96 trace_rdev_return_int(&rdev
->wiphy
, ret
);
100 static inline int rdev_del_key(struct cfg80211_registered_device
*rdev
,
101 struct net_device
*netdev
, u8 key_index
,
102 bool pairwise
, const u8
*mac_addr
)
105 trace_rdev_del_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
, mac_addr
);
106 ret
= rdev
->ops
->del_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
,
108 trace_rdev_return_int(&rdev
->wiphy
, ret
);
113 rdev_set_default_key(struct cfg80211_registered_device
*rdev
,
114 struct net_device
*netdev
, u8 key_index
, bool unicast
,
118 trace_rdev_set_default_key(&rdev
->wiphy
, netdev
, key_index
,
120 ret
= rdev
->ops
->set_default_key(&rdev
->wiphy
, netdev
, key_index
,
122 trace_rdev_return_int(&rdev
->wiphy
, ret
);
127 rdev_set_default_mgmt_key(struct cfg80211_registered_device
*rdev
,
128 struct net_device
*netdev
, u8 key_index
)
131 trace_rdev_set_default_mgmt_key(&rdev
->wiphy
, netdev
, key_index
);
132 ret
= rdev
->ops
->set_default_mgmt_key(&rdev
->wiphy
, netdev
,
134 trace_rdev_return_int(&rdev
->wiphy
, ret
);
138 static inline int rdev_start_ap(struct cfg80211_registered_device
*rdev
,
139 struct net_device
*dev
,
140 struct cfg80211_ap_settings
*settings
)
143 trace_rdev_start_ap(&rdev
->wiphy
, dev
, settings
);
144 ret
= rdev
->ops
->start_ap(&rdev
->wiphy
, dev
, settings
);
145 trace_rdev_return_int(&rdev
->wiphy
, ret
);
149 static inline int rdev_change_beacon(struct cfg80211_registered_device
*rdev
,
150 struct net_device
*dev
,
151 struct cfg80211_beacon_data
*info
)
154 trace_rdev_change_beacon(&rdev
->wiphy
, dev
, info
);
155 ret
= rdev
->ops
->change_beacon(&rdev
->wiphy
, dev
, info
);
156 trace_rdev_return_int(&rdev
->wiphy
, ret
);
160 static inline int rdev_stop_ap(struct cfg80211_registered_device
*rdev
,
161 struct net_device
*dev
)
164 trace_rdev_stop_ap(&rdev
->wiphy
, dev
);
165 ret
= rdev
->ops
->stop_ap(&rdev
->wiphy
, dev
);
166 trace_rdev_return_int(&rdev
->wiphy
, ret
);
170 static inline int rdev_add_station(struct cfg80211_registered_device
*rdev
,
171 struct net_device
*dev
, u8
*mac
,
172 struct station_parameters
*params
)
175 trace_rdev_add_station(&rdev
->wiphy
, dev
, mac
, params
);
176 ret
= rdev
->ops
->add_station(&rdev
->wiphy
, dev
, mac
, params
);
177 trace_rdev_return_int(&rdev
->wiphy
, ret
);
181 static inline int rdev_del_station(struct cfg80211_registered_device
*rdev
,
182 struct net_device
*dev
,
183 struct station_del_parameters
*params
)
186 trace_rdev_del_station(&rdev
->wiphy
, dev
, params
);
187 ret
= rdev
->ops
->del_station(&rdev
->wiphy
, dev
, params
);
188 trace_rdev_return_int(&rdev
->wiphy
, ret
);
192 static inline int rdev_change_station(struct cfg80211_registered_device
*rdev
,
193 struct net_device
*dev
, u8
*mac
,
194 struct station_parameters
*params
)
197 trace_rdev_change_station(&rdev
->wiphy
, dev
, mac
, params
);
198 ret
= rdev
->ops
->change_station(&rdev
->wiphy
, dev
, mac
, params
);
199 trace_rdev_return_int(&rdev
->wiphy
, ret
);
203 static inline int rdev_get_station(struct cfg80211_registered_device
*rdev
,
204 struct net_device
*dev
, const u8
*mac
,
205 struct station_info
*sinfo
)
208 trace_rdev_get_station(&rdev
->wiphy
, dev
, mac
);
209 ret
= rdev
->ops
->get_station(&rdev
->wiphy
, dev
, mac
, sinfo
);
210 trace_rdev_return_int_station_info(&rdev
->wiphy
, ret
, sinfo
);
214 static inline int rdev_dump_station(struct cfg80211_registered_device
*rdev
,
215 struct net_device
*dev
, int idx
, u8
*mac
,
216 struct station_info
*sinfo
)
219 trace_rdev_dump_station(&rdev
->wiphy
, dev
, idx
, mac
);
220 ret
= rdev
->ops
->dump_station(&rdev
->wiphy
, dev
, idx
, mac
, sinfo
);
221 trace_rdev_return_int_station_info(&rdev
->wiphy
, ret
, sinfo
);
225 static inline int rdev_add_mpath(struct cfg80211_registered_device
*rdev
,
226 struct net_device
*dev
, u8
*dst
, u8
*next_hop
)
229 trace_rdev_add_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
);
230 ret
= rdev
->ops
->add_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
);
231 trace_rdev_return_int(&rdev
->wiphy
, ret
);
235 static inline int rdev_del_mpath(struct cfg80211_registered_device
*rdev
,
236 struct net_device
*dev
, u8
*dst
)
239 trace_rdev_del_mpath(&rdev
->wiphy
, dev
, dst
);
240 ret
= rdev
->ops
->del_mpath(&rdev
->wiphy
, dev
, dst
);
241 trace_rdev_return_int(&rdev
->wiphy
, ret
);
245 static inline int rdev_change_mpath(struct cfg80211_registered_device
*rdev
,
246 struct net_device
*dev
, u8
*dst
,
250 trace_rdev_change_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
);
251 ret
= rdev
->ops
->change_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
);
252 trace_rdev_return_int(&rdev
->wiphy
, ret
);
256 static inline int rdev_get_mpath(struct cfg80211_registered_device
*rdev
,
257 struct net_device
*dev
, u8
*dst
, u8
*next_hop
,
258 struct mpath_info
*pinfo
)
261 trace_rdev_get_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
);
262 ret
= rdev
->ops
->get_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
, pinfo
);
263 trace_rdev_return_int_mpath_info(&rdev
->wiphy
, ret
, pinfo
);
268 static inline int rdev_get_mpp(struct cfg80211_registered_device
*rdev
,
269 struct net_device
*dev
, u8
*dst
, u8
*mpp
,
270 struct mpath_info
*pinfo
)
274 trace_rdev_get_mpp(&rdev
->wiphy
, dev
, dst
, mpp
);
275 ret
= rdev
->ops
->get_mpp(&rdev
->wiphy
, dev
, dst
, mpp
, pinfo
);
276 trace_rdev_return_int_mpath_info(&rdev
->wiphy
, ret
, pinfo
);
280 static inline int rdev_dump_mpath(struct cfg80211_registered_device
*rdev
,
281 struct net_device
*dev
, int idx
, u8
*dst
,
282 u8
*next_hop
, struct mpath_info
*pinfo
)
286 trace_rdev_dump_mpath(&rdev
->wiphy
, dev
, idx
, dst
, next_hop
);
287 ret
= rdev
->ops
->dump_mpath(&rdev
->wiphy
, dev
, idx
, dst
, next_hop
,
289 trace_rdev_return_int_mpath_info(&rdev
->wiphy
, ret
, pinfo
);
293 static inline int rdev_dump_mpp(struct cfg80211_registered_device
*rdev
,
294 struct net_device
*dev
, int idx
, u8
*dst
,
295 u8
*mpp
, struct mpath_info
*pinfo
)
300 trace_rdev_dump_mpp(&rdev
->wiphy
, dev
, idx
, dst
, mpp
);
301 ret
= rdev
->ops
->dump_mpp(&rdev
->wiphy
, dev
, idx
, dst
, mpp
, pinfo
);
302 trace_rdev_return_int_mpath_info(&rdev
->wiphy
, ret
, pinfo
);
307 rdev_get_mesh_config(struct cfg80211_registered_device
*rdev
,
308 struct net_device
*dev
, struct mesh_config
*conf
)
311 trace_rdev_get_mesh_config(&rdev
->wiphy
, dev
);
312 ret
= rdev
->ops
->get_mesh_config(&rdev
->wiphy
, dev
, conf
);
313 trace_rdev_return_int_mesh_config(&rdev
->wiphy
, ret
, conf
);
318 rdev_update_mesh_config(struct cfg80211_registered_device
*rdev
,
319 struct net_device
*dev
, u32 mask
,
320 const struct mesh_config
*nconf
)
323 trace_rdev_update_mesh_config(&rdev
->wiphy
, dev
, mask
, nconf
);
324 ret
= rdev
->ops
->update_mesh_config(&rdev
->wiphy
, dev
, mask
, nconf
);
325 trace_rdev_return_int(&rdev
->wiphy
, ret
);
329 static inline int rdev_join_mesh(struct cfg80211_registered_device
*rdev
,
330 struct net_device
*dev
,
331 const struct mesh_config
*conf
,
332 const struct mesh_setup
*setup
)
335 trace_rdev_join_mesh(&rdev
->wiphy
, dev
, conf
, setup
);
336 ret
= rdev
->ops
->join_mesh(&rdev
->wiphy
, dev
, conf
, setup
);
337 trace_rdev_return_int(&rdev
->wiphy
, ret
);
342 static inline int rdev_leave_mesh(struct cfg80211_registered_device
*rdev
,
343 struct net_device
*dev
)
346 trace_rdev_leave_mesh(&rdev
->wiphy
, dev
);
347 ret
= rdev
->ops
->leave_mesh(&rdev
->wiphy
, dev
);
348 trace_rdev_return_int(&rdev
->wiphy
, ret
);
352 static inline int rdev_join_ocb(struct cfg80211_registered_device
*rdev
,
353 struct net_device
*dev
,
354 struct ocb_setup
*setup
)
357 trace_rdev_join_ocb(&rdev
->wiphy
, dev
, setup
);
358 ret
= rdev
->ops
->join_ocb(&rdev
->wiphy
, dev
, setup
);
359 trace_rdev_return_int(&rdev
->wiphy
, ret
);
363 static inline int rdev_leave_ocb(struct cfg80211_registered_device
*rdev
,
364 struct net_device
*dev
)
367 trace_rdev_leave_ocb(&rdev
->wiphy
, dev
);
368 ret
= rdev
->ops
->leave_ocb(&rdev
->wiphy
, dev
);
369 trace_rdev_return_int(&rdev
->wiphy
, ret
);
373 static inline int rdev_change_bss(struct cfg80211_registered_device
*rdev
,
374 struct net_device
*dev
,
375 struct bss_parameters
*params
)
379 trace_rdev_change_bss(&rdev
->wiphy
, dev
, params
);
380 ret
= rdev
->ops
->change_bss(&rdev
->wiphy
, dev
, params
);
381 trace_rdev_return_int(&rdev
->wiphy
, ret
);
385 static inline int rdev_set_txq_params(struct cfg80211_registered_device
*rdev
,
386 struct net_device
*dev
,
387 struct ieee80211_txq_params
*params
)
391 trace_rdev_set_txq_params(&rdev
->wiphy
, dev
, params
);
392 ret
= rdev
->ops
->set_txq_params(&rdev
->wiphy
, dev
, params
);
393 trace_rdev_return_int(&rdev
->wiphy
, ret
);
398 rdev_libertas_set_mesh_channel(struct cfg80211_registered_device
*rdev
,
399 struct net_device
*dev
,
400 struct ieee80211_channel
*chan
)
403 trace_rdev_libertas_set_mesh_channel(&rdev
->wiphy
, dev
, chan
);
404 ret
= rdev
->ops
->libertas_set_mesh_channel(&rdev
->wiphy
, dev
, chan
);
405 trace_rdev_return_int(&rdev
->wiphy
, ret
);
410 rdev_set_monitor_channel(struct cfg80211_registered_device
*rdev
,
411 struct cfg80211_chan_def
*chandef
)
414 trace_rdev_set_monitor_channel(&rdev
->wiphy
, chandef
);
415 ret
= rdev
->ops
->set_monitor_channel(&rdev
->wiphy
, chandef
);
416 trace_rdev_return_int(&rdev
->wiphy
, ret
);
420 static inline int rdev_scan(struct cfg80211_registered_device
*rdev
,
421 struct cfg80211_scan_request
*request
)
424 trace_rdev_scan(&rdev
->wiphy
, request
);
425 ret
= rdev
->ops
->scan(&rdev
->wiphy
, request
);
426 trace_rdev_return_int(&rdev
->wiphy
, ret
);
430 static inline void rdev_abort_scan(struct cfg80211_registered_device
*rdev
,
431 struct wireless_dev
*wdev
)
433 trace_rdev_abort_scan(&rdev
->wiphy
, wdev
);
434 rdev
->ops
->abort_scan(&rdev
->wiphy
, wdev
);
435 trace_rdev_return_void(&rdev
->wiphy
);
438 static inline int rdev_auth(struct cfg80211_registered_device
*rdev
,
439 struct net_device
*dev
,
440 struct cfg80211_auth_request
*req
)
443 trace_rdev_auth(&rdev
->wiphy
, dev
, req
);
444 ret
= rdev
->ops
->auth(&rdev
->wiphy
, dev
, req
);
445 trace_rdev_return_int(&rdev
->wiphy
, ret
);
449 static inline int rdev_assoc(struct cfg80211_registered_device
*rdev
,
450 struct net_device
*dev
,
451 struct cfg80211_assoc_request
*req
)
454 trace_rdev_assoc(&rdev
->wiphy
, dev
, req
);
455 ret
= rdev
->ops
->assoc(&rdev
->wiphy
, dev
, req
);
456 trace_rdev_return_int(&rdev
->wiphy
, ret
);
460 static inline int rdev_deauth(struct cfg80211_registered_device
*rdev
,
461 struct net_device
*dev
,
462 struct cfg80211_deauth_request
*req
)
465 trace_rdev_deauth(&rdev
->wiphy
, dev
, req
);
466 ret
= rdev
->ops
->deauth(&rdev
->wiphy
, dev
, req
);
467 trace_rdev_return_int(&rdev
->wiphy
, ret
);
471 static inline int rdev_disassoc(struct cfg80211_registered_device
*rdev
,
472 struct net_device
*dev
,
473 struct cfg80211_disassoc_request
*req
)
476 trace_rdev_disassoc(&rdev
->wiphy
, dev
, req
);
477 ret
= rdev
->ops
->disassoc(&rdev
->wiphy
, dev
, req
);
478 trace_rdev_return_int(&rdev
->wiphy
, ret
);
482 static inline int rdev_connect(struct cfg80211_registered_device
*rdev
,
483 struct net_device
*dev
,
484 struct cfg80211_connect_params
*sme
)
487 trace_rdev_connect(&rdev
->wiphy
, dev
, sme
);
488 ret
= rdev
->ops
->connect(&rdev
->wiphy
, dev
, sme
);
489 trace_rdev_return_int(&rdev
->wiphy
, ret
);
493 static inline int rdev_disconnect(struct cfg80211_registered_device
*rdev
,
494 struct net_device
*dev
, u16 reason_code
)
497 trace_rdev_disconnect(&rdev
->wiphy
, dev
, reason_code
);
498 ret
= rdev
->ops
->disconnect(&rdev
->wiphy
, dev
, reason_code
);
499 trace_rdev_return_int(&rdev
->wiphy
, ret
);
503 static inline int rdev_join_ibss(struct cfg80211_registered_device
*rdev
,
504 struct net_device
*dev
,
505 struct cfg80211_ibss_params
*params
)
508 trace_rdev_join_ibss(&rdev
->wiphy
, dev
, params
);
509 ret
= rdev
->ops
->join_ibss(&rdev
->wiphy
, dev
, params
);
510 trace_rdev_return_int(&rdev
->wiphy
, ret
);
514 static inline int rdev_leave_ibss(struct cfg80211_registered_device
*rdev
,
515 struct net_device
*dev
)
518 trace_rdev_leave_ibss(&rdev
->wiphy
, dev
);
519 ret
= rdev
->ops
->leave_ibss(&rdev
->wiphy
, dev
);
520 trace_rdev_return_int(&rdev
->wiphy
, ret
);
525 rdev_set_wiphy_params(struct cfg80211_registered_device
*rdev
, u32 changed
)
528 trace_rdev_set_wiphy_params(&rdev
->wiphy
, changed
);
529 ret
= rdev
->ops
->set_wiphy_params(&rdev
->wiphy
, changed
);
530 trace_rdev_return_int(&rdev
->wiphy
, ret
);
534 static inline int rdev_set_tx_power(struct cfg80211_registered_device
*rdev
,
535 struct wireless_dev
*wdev
,
536 enum nl80211_tx_power_setting type
, int mbm
)
539 trace_rdev_set_tx_power(&rdev
->wiphy
, wdev
, type
, mbm
);
540 ret
= rdev
->ops
->set_tx_power(&rdev
->wiphy
, wdev
, type
, mbm
);
541 trace_rdev_return_int(&rdev
->wiphy
, ret
);
545 static inline int rdev_get_tx_power(struct cfg80211_registered_device
*rdev
,
546 struct wireless_dev
*wdev
, int *dbm
)
549 trace_rdev_get_tx_power(&rdev
->wiphy
, wdev
);
550 ret
= rdev
->ops
->get_tx_power(&rdev
->wiphy
, wdev
, dbm
);
551 trace_rdev_return_int_int(&rdev
->wiphy
, ret
, *dbm
);
555 static inline int rdev_set_wds_peer(struct cfg80211_registered_device
*rdev
,
556 struct net_device
*dev
, const u8
*addr
)
559 trace_rdev_set_wds_peer(&rdev
->wiphy
, dev
, addr
);
560 ret
= rdev
->ops
->set_wds_peer(&rdev
->wiphy
, dev
, addr
);
561 trace_rdev_return_int(&rdev
->wiphy
, ret
);
565 static inline void rdev_rfkill_poll(struct cfg80211_registered_device
*rdev
)
567 trace_rdev_rfkill_poll(&rdev
->wiphy
);
568 rdev
->ops
->rfkill_poll(&rdev
->wiphy
);
569 trace_rdev_return_void(&rdev
->wiphy
);
573 #ifdef CONFIG_NL80211_TESTMODE
574 static inline int rdev_testmode_cmd(struct cfg80211_registered_device
*rdev
,
575 struct wireless_dev
*wdev
,
579 trace_rdev_testmode_cmd(&rdev
->wiphy
, wdev
);
580 ret
= rdev
->ops
->testmode_cmd(&rdev
->wiphy
, wdev
, data
, len
);
581 trace_rdev_return_int(&rdev
->wiphy
, ret
);
585 static inline int rdev_testmode_dump(struct cfg80211_registered_device
*rdev
,
587 struct netlink_callback
*cb
, void *data
,
591 trace_rdev_testmode_dump(&rdev
->wiphy
);
592 ret
= rdev
->ops
->testmode_dump(&rdev
->wiphy
, skb
, cb
, data
, len
);
593 trace_rdev_return_int(&rdev
->wiphy
, ret
);
599 rdev_set_bitrate_mask(struct cfg80211_registered_device
*rdev
,
600 struct net_device
*dev
, const u8
*peer
,
601 const struct cfg80211_bitrate_mask
*mask
)
604 trace_rdev_set_bitrate_mask(&rdev
->wiphy
, dev
, peer
, mask
);
605 ret
= rdev
->ops
->set_bitrate_mask(&rdev
->wiphy
, dev
, peer
, mask
);
606 trace_rdev_return_int(&rdev
->wiphy
, ret
);
610 static inline int rdev_dump_survey(struct cfg80211_registered_device
*rdev
,
611 struct net_device
*netdev
, int idx
,
612 struct survey_info
*info
)
615 trace_rdev_dump_survey(&rdev
->wiphy
, netdev
, idx
);
616 ret
= rdev
->ops
->dump_survey(&rdev
->wiphy
, netdev
, idx
, info
);
618 trace_rdev_return_int(&rdev
->wiphy
, ret
);
620 trace_rdev_return_int_survey_info(&rdev
->wiphy
, ret
, info
);
624 static inline int rdev_set_pmksa(struct cfg80211_registered_device
*rdev
,
625 struct net_device
*netdev
,
626 struct cfg80211_pmksa
*pmksa
)
629 trace_rdev_set_pmksa(&rdev
->wiphy
, netdev
, pmksa
);
630 ret
= rdev
->ops
->set_pmksa(&rdev
->wiphy
, netdev
, pmksa
);
631 trace_rdev_return_int(&rdev
->wiphy
, ret
);
635 static inline int rdev_del_pmksa(struct cfg80211_registered_device
*rdev
,
636 struct net_device
*netdev
,
637 struct cfg80211_pmksa
*pmksa
)
640 trace_rdev_del_pmksa(&rdev
->wiphy
, netdev
, pmksa
);
641 ret
= rdev
->ops
->del_pmksa(&rdev
->wiphy
, netdev
, pmksa
);
642 trace_rdev_return_int(&rdev
->wiphy
, ret
);
646 static inline int rdev_flush_pmksa(struct cfg80211_registered_device
*rdev
,
647 struct net_device
*netdev
)
650 trace_rdev_flush_pmksa(&rdev
->wiphy
, netdev
);
651 ret
= rdev
->ops
->flush_pmksa(&rdev
->wiphy
, netdev
);
652 trace_rdev_return_int(&rdev
->wiphy
, ret
);
657 rdev_remain_on_channel(struct cfg80211_registered_device
*rdev
,
658 struct wireless_dev
*wdev
,
659 struct ieee80211_channel
*chan
,
660 unsigned int duration
, u64
*cookie
)
663 trace_rdev_remain_on_channel(&rdev
->wiphy
, wdev
, chan
, duration
);
664 ret
= rdev
->ops
->remain_on_channel(&rdev
->wiphy
, wdev
, chan
,
666 trace_rdev_return_int_cookie(&rdev
->wiphy
, ret
, *cookie
);
671 rdev_cancel_remain_on_channel(struct cfg80211_registered_device
*rdev
,
672 struct wireless_dev
*wdev
, u64 cookie
)
675 trace_rdev_cancel_remain_on_channel(&rdev
->wiphy
, wdev
, cookie
);
676 ret
= rdev
->ops
->cancel_remain_on_channel(&rdev
->wiphy
, wdev
, cookie
);
677 trace_rdev_return_int(&rdev
->wiphy
, ret
);
681 static inline int rdev_mgmt_tx(struct cfg80211_registered_device
*rdev
,
682 struct wireless_dev
*wdev
,
683 struct cfg80211_mgmt_tx_params
*params
,
687 trace_rdev_mgmt_tx(&rdev
->wiphy
, wdev
, params
);
688 ret
= rdev
->ops
->mgmt_tx(&rdev
->wiphy
, wdev
, params
, cookie
);
689 trace_rdev_return_int_cookie(&rdev
->wiphy
, ret
, *cookie
);
694 rdev_mgmt_tx_cancel_wait(struct cfg80211_registered_device
*rdev
,
695 struct wireless_dev
*wdev
, u64 cookie
)
698 trace_rdev_mgmt_tx_cancel_wait(&rdev
->wiphy
, wdev
, cookie
);
699 ret
= rdev
->ops
->mgmt_tx_cancel_wait(&rdev
->wiphy
, wdev
, cookie
);
700 trace_rdev_return_int(&rdev
->wiphy
, ret
);
704 static inline int rdev_set_power_mgmt(struct cfg80211_registered_device
*rdev
,
705 struct net_device
*dev
, bool enabled
,
709 trace_rdev_set_power_mgmt(&rdev
->wiphy
, dev
, enabled
, timeout
);
710 ret
= rdev
->ops
->set_power_mgmt(&rdev
->wiphy
, dev
, enabled
, timeout
);
711 trace_rdev_return_int(&rdev
->wiphy
, ret
);
716 rdev_set_cqm_rssi_config(struct cfg80211_registered_device
*rdev
,
717 struct net_device
*dev
, s32 rssi_thold
, u32 rssi_hyst
)
720 trace_rdev_set_cqm_rssi_config(&rdev
->wiphy
, dev
, rssi_thold
,
722 ret
= rdev
->ops
->set_cqm_rssi_config(&rdev
->wiphy
, dev
, rssi_thold
,
724 trace_rdev_return_int(&rdev
->wiphy
, ret
);
729 rdev_set_cqm_txe_config(struct cfg80211_registered_device
*rdev
,
730 struct net_device
*dev
, u32 rate
, u32 pkts
, u32 intvl
)
733 trace_rdev_set_cqm_txe_config(&rdev
->wiphy
, dev
, rate
, pkts
, intvl
);
734 ret
= rdev
->ops
->set_cqm_txe_config(&rdev
->wiphy
, dev
, rate
, pkts
,
736 trace_rdev_return_int(&rdev
->wiphy
, ret
);
741 rdev_mgmt_frame_register(struct cfg80211_registered_device
*rdev
,
742 struct wireless_dev
*wdev
, u16 frame_type
, bool reg
)
746 trace_rdev_mgmt_frame_register(&rdev
->wiphy
, wdev
, frame_type
, reg
);
747 rdev
->ops
->mgmt_frame_register(&rdev
->wiphy
, wdev
, frame_type
, reg
);
748 trace_rdev_return_void(&rdev
->wiphy
);
751 static inline int rdev_set_antenna(struct cfg80211_registered_device
*rdev
,
752 u32 tx_ant
, u32 rx_ant
)
755 trace_rdev_set_antenna(&rdev
->wiphy
, tx_ant
, rx_ant
);
756 ret
= rdev
->ops
->set_antenna(&rdev
->wiphy
, tx_ant
, rx_ant
);
757 trace_rdev_return_int(&rdev
->wiphy
, ret
);
761 static inline int rdev_get_antenna(struct cfg80211_registered_device
*rdev
,
762 u32
*tx_ant
, u32
*rx_ant
)
765 trace_rdev_get_antenna(&rdev
->wiphy
);
766 ret
= rdev
->ops
->get_antenna(&rdev
->wiphy
, tx_ant
, rx_ant
);
768 trace_rdev_return_int(&rdev
->wiphy
, ret
);
770 trace_rdev_return_int_tx_rx(&rdev
->wiphy
, ret
, *tx_ant
,
776 rdev_sched_scan_start(struct cfg80211_registered_device
*rdev
,
777 struct net_device
*dev
,
778 struct cfg80211_sched_scan_request
*request
)
781 trace_rdev_sched_scan_start(&rdev
->wiphy
, dev
, request
);
782 ret
= rdev
->ops
->sched_scan_start(&rdev
->wiphy
, dev
, request
);
783 trace_rdev_return_int(&rdev
->wiphy
, ret
);
787 static inline int rdev_sched_scan_stop(struct cfg80211_registered_device
*rdev
,
788 struct net_device
*dev
)
791 trace_rdev_sched_scan_stop(&rdev
->wiphy
, dev
);
792 ret
= rdev
->ops
->sched_scan_stop(&rdev
->wiphy
, dev
);
793 trace_rdev_return_int(&rdev
->wiphy
, ret
);
797 static inline int rdev_set_rekey_data(struct cfg80211_registered_device
*rdev
,
798 struct net_device
*dev
,
799 struct cfg80211_gtk_rekey_data
*data
)
802 trace_rdev_set_rekey_data(&rdev
->wiphy
, dev
);
803 ret
= rdev
->ops
->set_rekey_data(&rdev
->wiphy
, dev
, data
);
804 trace_rdev_return_int(&rdev
->wiphy
, ret
);
808 static inline int rdev_tdls_mgmt(struct cfg80211_registered_device
*rdev
,
809 struct net_device
*dev
, u8
*peer
,
810 u8 action_code
, u8 dialog_token
,
811 u16 status_code
, u32 peer_capability
,
812 bool initiator
, const u8
*buf
, size_t len
)
815 trace_rdev_tdls_mgmt(&rdev
->wiphy
, dev
, peer
, action_code
,
816 dialog_token
, status_code
, peer_capability
,
817 initiator
, buf
, len
);
818 ret
= rdev
->ops
->tdls_mgmt(&rdev
->wiphy
, dev
, peer
, action_code
,
819 dialog_token
, status_code
, peer_capability
,
820 initiator
, buf
, len
);
821 trace_rdev_return_int(&rdev
->wiphy
, ret
);
825 static inline int rdev_tdls_oper(struct cfg80211_registered_device
*rdev
,
826 struct net_device
*dev
, u8
*peer
,
827 enum nl80211_tdls_operation oper
)
830 trace_rdev_tdls_oper(&rdev
->wiphy
, dev
, peer
, oper
);
831 ret
= rdev
->ops
->tdls_oper(&rdev
->wiphy
, dev
, peer
, oper
);
832 trace_rdev_return_int(&rdev
->wiphy
, ret
);
836 static inline int rdev_probe_client(struct cfg80211_registered_device
*rdev
,
837 struct net_device
*dev
, const u8
*peer
,
841 trace_rdev_probe_client(&rdev
->wiphy
, dev
, peer
);
842 ret
= rdev
->ops
->probe_client(&rdev
->wiphy
, dev
, peer
, cookie
);
843 trace_rdev_return_int_cookie(&rdev
->wiphy
, ret
, *cookie
);
847 static inline int rdev_set_noack_map(struct cfg80211_registered_device
*rdev
,
848 struct net_device
*dev
, u16 noack_map
)
851 trace_rdev_set_noack_map(&rdev
->wiphy
, dev
, noack_map
);
852 ret
= rdev
->ops
->set_noack_map(&rdev
->wiphy
, dev
, noack_map
);
853 trace_rdev_return_int(&rdev
->wiphy
, ret
);
858 rdev_get_channel(struct cfg80211_registered_device
*rdev
,
859 struct wireless_dev
*wdev
,
860 struct cfg80211_chan_def
*chandef
)
864 trace_rdev_get_channel(&rdev
->wiphy
, wdev
);
865 ret
= rdev
->ops
->get_channel(&rdev
->wiphy
, wdev
, chandef
);
866 trace_rdev_return_chandef(&rdev
->wiphy
, ret
, chandef
);
871 static inline int rdev_start_p2p_device(struct cfg80211_registered_device
*rdev
,
872 struct wireless_dev
*wdev
)
876 trace_rdev_start_p2p_device(&rdev
->wiphy
, wdev
);
877 ret
= rdev
->ops
->start_p2p_device(&rdev
->wiphy
, wdev
);
878 trace_rdev_return_int(&rdev
->wiphy
, ret
);
882 static inline void rdev_stop_p2p_device(struct cfg80211_registered_device
*rdev
,
883 struct wireless_dev
*wdev
)
885 trace_rdev_stop_p2p_device(&rdev
->wiphy
, wdev
);
886 rdev
->ops
->stop_p2p_device(&rdev
->wiphy
, wdev
);
887 trace_rdev_return_void(&rdev
->wiphy
);
890 static inline int rdev_set_mac_acl(struct cfg80211_registered_device
*rdev
,
891 struct net_device
*dev
,
892 struct cfg80211_acl_data
*params
)
896 trace_rdev_set_mac_acl(&rdev
->wiphy
, dev
, params
);
897 ret
= rdev
->ops
->set_mac_acl(&rdev
->wiphy
, dev
, params
);
898 trace_rdev_return_int(&rdev
->wiphy
, ret
);
902 static inline int rdev_update_ft_ies(struct cfg80211_registered_device
*rdev
,
903 struct net_device
*dev
,
904 struct cfg80211_update_ft_ies_params
*ftie
)
908 trace_rdev_update_ft_ies(&rdev
->wiphy
, dev
, ftie
);
909 ret
= rdev
->ops
->update_ft_ies(&rdev
->wiphy
, dev
, ftie
);
910 trace_rdev_return_int(&rdev
->wiphy
, ret
);
914 static inline int rdev_crit_proto_start(struct cfg80211_registered_device
*rdev
,
915 struct wireless_dev
*wdev
,
916 enum nl80211_crit_proto_id protocol
,
921 trace_rdev_crit_proto_start(&rdev
->wiphy
, wdev
, protocol
, duration
);
922 ret
= rdev
->ops
->crit_proto_start(&rdev
->wiphy
, wdev
,
924 trace_rdev_return_int(&rdev
->wiphy
, ret
);
928 static inline void rdev_crit_proto_stop(struct cfg80211_registered_device
*rdev
,
929 struct wireless_dev
*wdev
)
931 trace_rdev_crit_proto_stop(&rdev
->wiphy
, wdev
);
932 rdev
->ops
->crit_proto_stop(&rdev
->wiphy
, wdev
);
933 trace_rdev_return_void(&rdev
->wiphy
);
936 static inline int rdev_channel_switch(struct cfg80211_registered_device
*rdev
,
937 struct net_device
*dev
,
938 struct cfg80211_csa_settings
*params
)
942 trace_rdev_channel_switch(&rdev
->wiphy
, dev
, params
);
943 ret
= rdev
->ops
->channel_switch(&rdev
->wiphy
, dev
, params
);
944 trace_rdev_return_int(&rdev
->wiphy
, ret
);
948 static inline int rdev_set_qos_map(struct cfg80211_registered_device
*rdev
,
949 struct net_device
*dev
,
950 struct cfg80211_qos_map
*qos_map
)
952 int ret
= -EOPNOTSUPP
;
954 if (rdev
->ops
->set_qos_map
) {
955 trace_rdev_set_qos_map(&rdev
->wiphy
, dev
, qos_map
);
956 ret
= rdev
->ops
->set_qos_map(&rdev
->wiphy
, dev
, qos_map
);
957 trace_rdev_return_int(&rdev
->wiphy
, ret
);
964 rdev_set_ap_chanwidth(struct cfg80211_registered_device
*rdev
,
965 struct net_device
*dev
, struct cfg80211_chan_def
*chandef
)
969 trace_rdev_set_ap_chanwidth(&rdev
->wiphy
, dev
, chandef
);
970 ret
= rdev
->ops
->set_ap_chanwidth(&rdev
->wiphy
, dev
, chandef
);
971 trace_rdev_return_int(&rdev
->wiphy
, ret
);
977 rdev_add_tx_ts(struct cfg80211_registered_device
*rdev
,
978 struct net_device
*dev
, u8 tsid
, const u8
*peer
,
979 u8 user_prio
, u16 admitted_time
)
981 int ret
= -EOPNOTSUPP
;
983 trace_rdev_add_tx_ts(&rdev
->wiphy
, dev
, tsid
, peer
,
984 user_prio
, admitted_time
);
985 if (rdev
->ops
->add_tx_ts
)
986 ret
= rdev
->ops
->add_tx_ts(&rdev
->wiphy
, dev
, tsid
, peer
,
987 user_prio
, admitted_time
);
988 trace_rdev_return_int(&rdev
->wiphy
, ret
);
994 rdev_del_tx_ts(struct cfg80211_registered_device
*rdev
,
995 struct net_device
*dev
, u8 tsid
, const u8
*peer
)
997 int ret
= -EOPNOTSUPP
;
999 trace_rdev_del_tx_ts(&rdev
->wiphy
, dev
, tsid
, peer
);
1000 if (rdev
->ops
->del_tx_ts
)
1001 ret
= rdev
->ops
->del_tx_ts(&rdev
->wiphy
, dev
, tsid
, peer
);
1002 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1008 rdev_tdls_channel_switch(struct cfg80211_registered_device
*rdev
,
1009 struct net_device
*dev
, const u8
*addr
,
1010 u8 oper_class
, struct cfg80211_chan_def
*chandef
)
1014 trace_rdev_tdls_channel_switch(&rdev
->wiphy
, dev
, addr
, oper_class
,
1016 ret
= rdev
->ops
->tdls_channel_switch(&rdev
->wiphy
, dev
, addr
,
1017 oper_class
, chandef
);
1018 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1023 rdev_tdls_cancel_channel_switch(struct cfg80211_registered_device
*rdev
,
1024 struct net_device
*dev
, const u8
*addr
)
1026 trace_rdev_tdls_cancel_channel_switch(&rdev
->wiphy
, dev
, addr
);
1027 rdev
->ops
->tdls_cancel_channel_switch(&rdev
->wiphy
, dev
, addr
);
1028 trace_rdev_return_void(&rdev
->wiphy
);
1032 rdev_start_radar_detection(struct cfg80211_registered_device
*rdev
,
1033 struct net_device
*dev
,
1034 struct cfg80211_chan_def
*chandef
,
1037 int ret
= -ENOTSUPP
;
1039 trace_rdev_start_radar_detection(&rdev
->wiphy
, dev
, chandef
,
1041 if (rdev
->ops
->start_radar_detection
)
1042 ret
= rdev
->ops
->start_radar_detection(&rdev
->wiphy
, dev
,
1043 chandef
, cac_time_ms
);
1044 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1049 rdev_set_mcast_rate(struct cfg80211_registered_device
*rdev
,
1050 struct net_device
*dev
,
1051 int mcast_rate
[IEEE80211_NUM_BANDS
])
1053 int ret
= -ENOTSUPP
;
1055 trace_rdev_set_mcast_rate(&rdev
->wiphy
, dev
, mcast_rate
);
1056 if (rdev
->ops
->set_mcast_rate
)
1057 ret
= rdev
->ops
->set_mcast_rate(&rdev
->wiphy
, dev
, mcast_rate
);
1058 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1063 rdev_set_coalesce(struct cfg80211_registered_device
*rdev
,
1064 struct cfg80211_coalesce
*coalesce
)
1066 int ret
= -ENOTSUPP
;
1068 trace_rdev_set_coalesce(&rdev
->wiphy
, coalesce
);
1069 if (rdev
->ops
->set_coalesce
)
1070 ret
= rdev
->ops
->set_coalesce(&rdev
->wiphy
, coalesce
);
1071 trace_rdev_return_int(&rdev
->wiphy
, ret
);
1074 #endif /* __CFG80211_RDEV_OPS */