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 enum nl80211_iftype type
, u32
*flags
,
39 struct vif_params
*params
)
41 struct wireless_dev
*ret
;
42 trace_rdev_add_virtual_intf(&rdev
->wiphy
, name
, type
);
43 ret
= rdev
->ops
->add_virtual_intf(&rdev
->wiphy
, name
, type
, flags
,
45 trace_rdev_return_wdev(&rdev
->wiphy
, ret
);
50 rdev_del_virtual_intf(struct cfg80211_registered_device
*rdev
,
51 struct wireless_dev
*wdev
)
54 trace_rdev_del_virtual_intf(&rdev
->wiphy
, wdev
);
55 ret
= rdev
->ops
->del_virtual_intf(&rdev
->wiphy
, wdev
);
56 trace_rdev_return_int(&rdev
->wiphy
, ret
);
61 rdev_change_virtual_intf(struct cfg80211_registered_device
*rdev
,
62 struct net_device
*dev
, enum nl80211_iftype type
,
63 u32
*flags
, struct vif_params
*params
)
66 trace_rdev_change_virtual_intf(&rdev
->wiphy
, dev
, type
);
67 ret
= rdev
->ops
->change_virtual_intf(&rdev
->wiphy
, dev
, type
, flags
,
69 trace_rdev_return_int(&rdev
->wiphy
, ret
);
73 static inline int rdev_add_key(struct cfg80211_registered_device
*rdev
,
74 struct net_device
*netdev
, u8 key_index
,
75 bool pairwise
, const u8
*mac_addr
,
76 struct key_params
*params
)
79 trace_rdev_add_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
, mac_addr
);
80 ret
= rdev
->ops
->add_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
,
82 trace_rdev_return_int(&rdev
->wiphy
, ret
);
87 rdev_get_key(struct cfg80211_registered_device
*rdev
, struct net_device
*netdev
,
88 u8 key_index
, bool pairwise
, const u8
*mac_addr
, void *cookie
,
89 void (*callback
)(void *cookie
, struct key_params
*))
92 trace_rdev_get_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
, mac_addr
);
93 ret
= rdev
->ops
->get_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
,
94 mac_addr
, cookie
, callback
);
95 trace_rdev_return_int(&rdev
->wiphy
, ret
);
99 static inline int rdev_del_key(struct cfg80211_registered_device
*rdev
,
100 struct net_device
*netdev
, u8 key_index
,
101 bool pairwise
, const u8
*mac_addr
)
104 trace_rdev_del_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
, mac_addr
);
105 ret
= rdev
->ops
->del_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
,
107 trace_rdev_return_int(&rdev
->wiphy
, ret
);
112 rdev_set_default_key(struct cfg80211_registered_device
*rdev
,
113 struct net_device
*netdev
, u8 key_index
, bool unicast
,
117 trace_rdev_set_default_key(&rdev
->wiphy
, netdev
, key_index
,
119 ret
= rdev
->ops
->set_default_key(&rdev
->wiphy
, netdev
, key_index
,
121 trace_rdev_return_int(&rdev
->wiphy
, ret
);
126 rdev_set_default_mgmt_key(struct cfg80211_registered_device
*rdev
,
127 struct net_device
*netdev
, u8 key_index
)
130 trace_rdev_set_default_mgmt_key(&rdev
->wiphy
, netdev
, key_index
);
131 ret
= rdev
->ops
->set_default_mgmt_key(&rdev
->wiphy
, netdev
,
133 trace_rdev_return_int(&rdev
->wiphy
, ret
);
137 static inline int rdev_start_ap(struct cfg80211_registered_device
*rdev
,
138 struct net_device
*dev
,
139 struct cfg80211_ap_settings
*settings
)
142 trace_rdev_start_ap(&rdev
->wiphy
, dev
, settings
);
143 ret
= rdev
->ops
->start_ap(&rdev
->wiphy
, dev
, settings
);
144 trace_rdev_return_int(&rdev
->wiphy
, ret
);
148 static inline int rdev_change_beacon(struct cfg80211_registered_device
*rdev
,
149 struct net_device
*dev
,
150 struct cfg80211_beacon_data
*info
)
153 trace_rdev_change_beacon(&rdev
->wiphy
, dev
, info
);
154 ret
= rdev
->ops
->change_beacon(&rdev
->wiphy
, dev
, info
);
155 trace_rdev_return_int(&rdev
->wiphy
, ret
);
159 static inline int rdev_stop_ap(struct cfg80211_registered_device
*rdev
,
160 struct net_device
*dev
)
163 trace_rdev_stop_ap(&rdev
->wiphy
, dev
);
164 ret
= rdev
->ops
->stop_ap(&rdev
->wiphy
, dev
);
165 trace_rdev_return_int(&rdev
->wiphy
, ret
);
169 static inline int rdev_add_station(struct cfg80211_registered_device
*rdev
,
170 struct net_device
*dev
, u8
*mac
,
171 struct station_parameters
*params
)
174 trace_rdev_add_station(&rdev
->wiphy
, dev
, mac
, params
);
175 ret
= rdev
->ops
->add_station(&rdev
->wiphy
, dev
, mac
, params
);
176 trace_rdev_return_int(&rdev
->wiphy
, ret
);
180 static inline int rdev_del_station(struct cfg80211_registered_device
*rdev
,
181 struct net_device
*dev
, u8
*mac
)
184 trace_rdev_del_station(&rdev
->wiphy
, dev
, mac
);
185 ret
= rdev
->ops
->del_station(&rdev
->wiphy
, dev
, mac
);
186 trace_rdev_return_int(&rdev
->wiphy
, ret
);
190 static inline int rdev_change_station(struct cfg80211_registered_device
*rdev
,
191 struct net_device
*dev
, u8
*mac
,
192 struct station_parameters
*params
)
195 trace_rdev_change_station(&rdev
->wiphy
, dev
, mac
, params
);
196 ret
= rdev
->ops
->change_station(&rdev
->wiphy
, dev
, mac
, params
);
197 trace_rdev_return_int(&rdev
->wiphy
, ret
);
201 static inline int rdev_get_station(struct cfg80211_registered_device
*rdev
,
202 struct net_device
*dev
, const u8
*mac
,
203 struct station_info
*sinfo
)
206 trace_rdev_get_station(&rdev
->wiphy
, dev
, mac
);
207 ret
= rdev
->ops
->get_station(&rdev
->wiphy
, dev
, mac
, sinfo
);
208 trace_rdev_return_int_station_info(&rdev
->wiphy
, ret
, sinfo
);
212 static inline int rdev_dump_station(struct cfg80211_registered_device
*rdev
,
213 struct net_device
*dev
, int idx
, u8
*mac
,
214 struct station_info
*sinfo
)
217 trace_rdev_dump_station(&rdev
->wiphy
, dev
, idx
, mac
);
218 ret
= rdev
->ops
->dump_station(&rdev
->wiphy
, dev
, idx
, mac
, sinfo
);
219 trace_rdev_return_int_station_info(&rdev
->wiphy
, ret
, sinfo
);
223 static inline int rdev_add_mpath(struct cfg80211_registered_device
*rdev
,
224 struct net_device
*dev
, u8
*dst
, u8
*next_hop
)
227 trace_rdev_add_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
);
228 ret
= rdev
->ops
->add_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
);
229 trace_rdev_return_int(&rdev
->wiphy
, ret
);
233 static inline int rdev_del_mpath(struct cfg80211_registered_device
*rdev
,
234 struct net_device
*dev
, u8
*dst
)
237 trace_rdev_del_mpath(&rdev
->wiphy
, dev
, dst
);
238 ret
= rdev
->ops
->del_mpath(&rdev
->wiphy
, dev
, dst
);
239 trace_rdev_return_int(&rdev
->wiphy
, ret
);
243 static inline int rdev_change_mpath(struct cfg80211_registered_device
*rdev
,
244 struct net_device
*dev
, u8
*dst
,
248 trace_rdev_change_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
);
249 ret
= rdev
->ops
->change_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
);
250 trace_rdev_return_int(&rdev
->wiphy
, ret
);
254 static inline int rdev_get_mpath(struct cfg80211_registered_device
*rdev
,
255 struct net_device
*dev
, u8
*dst
, u8
*next_hop
,
256 struct mpath_info
*pinfo
)
259 trace_rdev_get_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
);
260 ret
= rdev
->ops
->get_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
, pinfo
);
261 trace_rdev_return_int_mpath_info(&rdev
->wiphy
, ret
, pinfo
);
266 static inline int rdev_dump_mpath(struct cfg80211_registered_device
*rdev
,
267 struct net_device
*dev
, int idx
, u8
*dst
,
268 u8
*next_hop
, struct mpath_info
*pinfo
)
272 trace_rdev_dump_mpath(&rdev
->wiphy
, dev
, idx
, dst
, next_hop
);
273 ret
= rdev
->ops
->dump_mpath(&rdev
->wiphy
, dev
, idx
, dst
, next_hop
,
275 trace_rdev_return_int_mpath_info(&rdev
->wiphy
, ret
, pinfo
);
280 rdev_get_mesh_config(struct cfg80211_registered_device
*rdev
,
281 struct net_device
*dev
, struct mesh_config
*conf
)
284 trace_rdev_get_mesh_config(&rdev
->wiphy
, dev
);
285 ret
= rdev
->ops
->get_mesh_config(&rdev
->wiphy
, dev
, conf
);
286 trace_rdev_return_int_mesh_config(&rdev
->wiphy
, ret
, conf
);
291 rdev_update_mesh_config(struct cfg80211_registered_device
*rdev
,
292 struct net_device
*dev
, u32 mask
,
293 const struct mesh_config
*nconf
)
296 trace_rdev_update_mesh_config(&rdev
->wiphy
, dev
, mask
, nconf
);
297 ret
= rdev
->ops
->update_mesh_config(&rdev
->wiphy
, dev
, mask
, nconf
);
298 trace_rdev_return_int(&rdev
->wiphy
, ret
);
302 static inline int rdev_join_mesh(struct cfg80211_registered_device
*rdev
,
303 struct net_device
*dev
,
304 const struct mesh_config
*conf
,
305 const struct mesh_setup
*setup
)
308 trace_rdev_join_mesh(&rdev
->wiphy
, dev
, conf
, setup
);
309 ret
= rdev
->ops
->join_mesh(&rdev
->wiphy
, dev
, conf
, setup
);
310 trace_rdev_return_int(&rdev
->wiphy
, ret
);
315 static inline int rdev_leave_mesh(struct cfg80211_registered_device
*rdev
,
316 struct net_device
*dev
)
319 trace_rdev_leave_mesh(&rdev
->wiphy
, dev
);
320 ret
= rdev
->ops
->leave_mesh(&rdev
->wiphy
, dev
);
321 trace_rdev_return_int(&rdev
->wiphy
, ret
);
325 static inline int rdev_change_bss(struct cfg80211_registered_device
*rdev
,
326 struct net_device
*dev
,
327 struct bss_parameters
*params
)
331 trace_rdev_change_bss(&rdev
->wiphy
, dev
, params
);
332 ret
= rdev
->ops
->change_bss(&rdev
->wiphy
, dev
, params
);
333 trace_rdev_return_int(&rdev
->wiphy
, ret
);
337 static inline int rdev_set_txq_params(struct cfg80211_registered_device
*rdev
,
338 struct net_device
*dev
,
339 struct ieee80211_txq_params
*params
)
343 trace_rdev_set_txq_params(&rdev
->wiphy
, dev
, params
);
344 ret
= rdev
->ops
->set_txq_params(&rdev
->wiphy
, dev
, params
);
345 trace_rdev_return_int(&rdev
->wiphy
, ret
);
350 rdev_libertas_set_mesh_channel(struct cfg80211_registered_device
*rdev
,
351 struct net_device
*dev
,
352 struct ieee80211_channel
*chan
)
355 trace_rdev_libertas_set_mesh_channel(&rdev
->wiphy
, dev
, chan
);
356 ret
= rdev
->ops
->libertas_set_mesh_channel(&rdev
->wiphy
, dev
, chan
);
357 trace_rdev_return_int(&rdev
->wiphy
, ret
);
362 rdev_set_monitor_channel(struct cfg80211_registered_device
*rdev
,
363 struct cfg80211_chan_def
*chandef
)
366 trace_rdev_set_monitor_channel(&rdev
->wiphy
, chandef
);
367 ret
= rdev
->ops
->set_monitor_channel(&rdev
->wiphy
, chandef
);
368 trace_rdev_return_int(&rdev
->wiphy
, ret
);
372 static inline int rdev_scan(struct cfg80211_registered_device
*rdev
,
373 struct cfg80211_scan_request
*request
)
376 trace_rdev_scan(&rdev
->wiphy
, request
);
377 ret
= rdev
->ops
->scan(&rdev
->wiphy
, request
);
378 trace_rdev_return_int(&rdev
->wiphy
, ret
);
382 static inline int rdev_auth(struct cfg80211_registered_device
*rdev
,
383 struct net_device
*dev
,
384 struct cfg80211_auth_request
*req
)
387 trace_rdev_auth(&rdev
->wiphy
, dev
, req
);
388 ret
= rdev
->ops
->auth(&rdev
->wiphy
, dev
, req
);
389 trace_rdev_return_int(&rdev
->wiphy
, ret
);
393 static inline int rdev_assoc(struct cfg80211_registered_device
*rdev
,
394 struct net_device
*dev
,
395 struct cfg80211_assoc_request
*req
)
398 trace_rdev_assoc(&rdev
->wiphy
, dev
, req
);
399 ret
= rdev
->ops
->assoc(&rdev
->wiphy
, dev
, req
);
400 trace_rdev_return_int(&rdev
->wiphy
, ret
);
404 static inline int rdev_deauth(struct cfg80211_registered_device
*rdev
,
405 struct net_device
*dev
,
406 struct cfg80211_deauth_request
*req
)
409 trace_rdev_deauth(&rdev
->wiphy
, dev
, req
);
410 ret
= rdev
->ops
->deauth(&rdev
->wiphy
, dev
, req
);
411 trace_rdev_return_int(&rdev
->wiphy
, ret
);
415 static inline int rdev_disassoc(struct cfg80211_registered_device
*rdev
,
416 struct net_device
*dev
,
417 struct cfg80211_disassoc_request
*req
)
420 trace_rdev_disassoc(&rdev
->wiphy
, dev
, req
);
421 ret
= rdev
->ops
->disassoc(&rdev
->wiphy
, dev
, req
);
422 trace_rdev_return_int(&rdev
->wiphy
, ret
);
426 static inline int rdev_connect(struct cfg80211_registered_device
*rdev
,
427 struct net_device
*dev
,
428 struct cfg80211_connect_params
*sme
)
431 trace_rdev_connect(&rdev
->wiphy
, dev
, sme
);
432 ret
= rdev
->ops
->connect(&rdev
->wiphy
, dev
, sme
);
433 trace_rdev_return_int(&rdev
->wiphy
, ret
);
437 static inline int rdev_disconnect(struct cfg80211_registered_device
*rdev
,
438 struct net_device
*dev
, u16 reason_code
)
441 trace_rdev_disconnect(&rdev
->wiphy
, dev
, reason_code
);
442 ret
= rdev
->ops
->disconnect(&rdev
->wiphy
, dev
, reason_code
);
443 trace_rdev_return_int(&rdev
->wiphy
, ret
);
447 static inline int rdev_join_ibss(struct cfg80211_registered_device
*rdev
,
448 struct net_device
*dev
,
449 struct cfg80211_ibss_params
*params
)
452 trace_rdev_join_ibss(&rdev
->wiphy
, dev
, params
);
453 ret
= rdev
->ops
->join_ibss(&rdev
->wiphy
, dev
, params
);
454 trace_rdev_return_int(&rdev
->wiphy
, ret
);
458 static inline int rdev_leave_ibss(struct cfg80211_registered_device
*rdev
,
459 struct net_device
*dev
)
462 trace_rdev_leave_ibss(&rdev
->wiphy
, dev
);
463 ret
= rdev
->ops
->leave_ibss(&rdev
->wiphy
, dev
);
464 trace_rdev_return_int(&rdev
->wiphy
, ret
);
469 rdev_set_wiphy_params(struct cfg80211_registered_device
*rdev
, u32 changed
)
472 trace_rdev_set_wiphy_params(&rdev
->wiphy
, changed
);
473 ret
= rdev
->ops
->set_wiphy_params(&rdev
->wiphy
, changed
);
474 trace_rdev_return_int(&rdev
->wiphy
, ret
);
478 static inline int rdev_set_tx_power(struct cfg80211_registered_device
*rdev
,
479 struct wireless_dev
*wdev
,
480 enum nl80211_tx_power_setting type
, int mbm
)
483 trace_rdev_set_tx_power(&rdev
->wiphy
, wdev
, type
, mbm
);
484 ret
= rdev
->ops
->set_tx_power(&rdev
->wiphy
, wdev
, type
, mbm
);
485 trace_rdev_return_int(&rdev
->wiphy
, ret
);
489 static inline int rdev_get_tx_power(struct cfg80211_registered_device
*rdev
,
490 struct wireless_dev
*wdev
, int *dbm
)
493 trace_rdev_get_tx_power(&rdev
->wiphy
, wdev
);
494 ret
= rdev
->ops
->get_tx_power(&rdev
->wiphy
, wdev
, dbm
);
495 trace_rdev_return_int_int(&rdev
->wiphy
, ret
, *dbm
);
499 static inline int rdev_set_wds_peer(struct cfg80211_registered_device
*rdev
,
500 struct net_device
*dev
, const u8
*addr
)
503 trace_rdev_set_wds_peer(&rdev
->wiphy
, dev
, addr
);
504 ret
= rdev
->ops
->set_wds_peer(&rdev
->wiphy
, dev
, addr
);
505 trace_rdev_return_int(&rdev
->wiphy
, ret
);
509 static inline void rdev_rfkill_poll(struct cfg80211_registered_device
*rdev
)
511 trace_rdev_rfkill_poll(&rdev
->wiphy
);
512 rdev
->ops
->rfkill_poll(&rdev
->wiphy
);
513 trace_rdev_return_void(&rdev
->wiphy
);
517 #ifdef CONFIG_NL80211_TESTMODE
518 static inline int rdev_testmode_cmd(struct cfg80211_registered_device
*rdev
,
519 struct wireless_dev
*wdev
,
523 trace_rdev_testmode_cmd(&rdev
->wiphy
, wdev
);
524 ret
= rdev
->ops
->testmode_cmd(&rdev
->wiphy
, wdev
, data
, len
);
525 trace_rdev_return_int(&rdev
->wiphy
, ret
);
529 static inline int rdev_testmode_dump(struct cfg80211_registered_device
*rdev
,
531 struct netlink_callback
*cb
, void *data
,
535 trace_rdev_testmode_dump(&rdev
->wiphy
);
536 ret
= rdev
->ops
->testmode_dump(&rdev
->wiphy
, skb
, cb
, data
, len
);
537 trace_rdev_return_int(&rdev
->wiphy
, ret
);
543 rdev_set_bitrate_mask(struct cfg80211_registered_device
*rdev
,
544 struct net_device
*dev
, const u8
*peer
,
545 const struct cfg80211_bitrate_mask
*mask
)
548 trace_rdev_set_bitrate_mask(&rdev
->wiphy
, dev
, peer
, mask
);
549 ret
= rdev
->ops
->set_bitrate_mask(&rdev
->wiphy
, dev
, peer
, mask
);
550 trace_rdev_return_int(&rdev
->wiphy
, ret
);
554 static inline int rdev_dump_survey(struct cfg80211_registered_device
*rdev
,
555 struct net_device
*netdev
, int idx
,
556 struct survey_info
*info
)
559 trace_rdev_dump_survey(&rdev
->wiphy
, netdev
, idx
);
560 ret
= rdev
->ops
->dump_survey(&rdev
->wiphy
, netdev
, idx
, info
);
562 trace_rdev_return_int(&rdev
->wiphy
, ret
);
564 trace_rdev_return_int_survey_info(&rdev
->wiphy
, ret
, info
);
568 static inline int rdev_set_pmksa(struct cfg80211_registered_device
*rdev
,
569 struct net_device
*netdev
,
570 struct cfg80211_pmksa
*pmksa
)
573 trace_rdev_set_pmksa(&rdev
->wiphy
, netdev
, pmksa
);
574 ret
= rdev
->ops
->set_pmksa(&rdev
->wiphy
, netdev
, pmksa
);
575 trace_rdev_return_int(&rdev
->wiphy
, ret
);
579 static inline int rdev_del_pmksa(struct cfg80211_registered_device
*rdev
,
580 struct net_device
*netdev
,
581 struct cfg80211_pmksa
*pmksa
)
584 trace_rdev_del_pmksa(&rdev
->wiphy
, netdev
, pmksa
);
585 ret
= rdev
->ops
->del_pmksa(&rdev
->wiphy
, netdev
, pmksa
);
586 trace_rdev_return_int(&rdev
->wiphy
, ret
);
590 static inline int rdev_flush_pmksa(struct cfg80211_registered_device
*rdev
,
591 struct net_device
*netdev
)
594 trace_rdev_flush_pmksa(&rdev
->wiphy
, netdev
);
595 ret
= rdev
->ops
->flush_pmksa(&rdev
->wiphy
, netdev
);
596 trace_rdev_return_int(&rdev
->wiphy
, ret
);
601 rdev_remain_on_channel(struct cfg80211_registered_device
*rdev
,
602 struct wireless_dev
*wdev
,
603 struct ieee80211_channel
*chan
,
604 unsigned int duration
, u64
*cookie
)
607 trace_rdev_remain_on_channel(&rdev
->wiphy
, wdev
, chan
, duration
);
608 ret
= rdev
->ops
->remain_on_channel(&rdev
->wiphy
, wdev
, chan
,
610 trace_rdev_return_int_cookie(&rdev
->wiphy
, ret
, *cookie
);
615 rdev_cancel_remain_on_channel(struct cfg80211_registered_device
*rdev
,
616 struct wireless_dev
*wdev
, u64 cookie
)
619 trace_rdev_cancel_remain_on_channel(&rdev
->wiphy
, wdev
, cookie
);
620 ret
= rdev
->ops
->cancel_remain_on_channel(&rdev
->wiphy
, wdev
, cookie
);
621 trace_rdev_return_int(&rdev
->wiphy
, ret
);
625 static inline int rdev_mgmt_tx(struct cfg80211_registered_device
*rdev
,
626 struct wireless_dev
*wdev
,
627 struct cfg80211_mgmt_tx_params
*params
,
631 trace_rdev_mgmt_tx(&rdev
->wiphy
, wdev
, params
);
632 ret
= rdev
->ops
->mgmt_tx(&rdev
->wiphy
, wdev
, params
, cookie
);
633 trace_rdev_return_int_cookie(&rdev
->wiphy
, ret
, *cookie
);
638 rdev_mgmt_tx_cancel_wait(struct cfg80211_registered_device
*rdev
,
639 struct wireless_dev
*wdev
, u64 cookie
)
642 trace_rdev_mgmt_tx_cancel_wait(&rdev
->wiphy
, wdev
, cookie
);
643 ret
= rdev
->ops
->mgmt_tx_cancel_wait(&rdev
->wiphy
, wdev
, cookie
);
644 trace_rdev_return_int(&rdev
->wiphy
, ret
);
648 static inline int rdev_set_power_mgmt(struct cfg80211_registered_device
*rdev
,
649 struct net_device
*dev
, bool enabled
,
653 trace_rdev_set_power_mgmt(&rdev
->wiphy
, dev
, enabled
, timeout
);
654 ret
= rdev
->ops
->set_power_mgmt(&rdev
->wiphy
, dev
, enabled
, timeout
);
655 trace_rdev_return_int(&rdev
->wiphy
, ret
);
660 rdev_set_cqm_rssi_config(struct cfg80211_registered_device
*rdev
,
661 struct net_device
*dev
, s32 rssi_thold
, u32 rssi_hyst
)
664 trace_rdev_set_cqm_rssi_config(&rdev
->wiphy
, dev
, rssi_thold
,
666 ret
= rdev
->ops
->set_cqm_rssi_config(&rdev
->wiphy
, dev
, rssi_thold
,
668 trace_rdev_return_int(&rdev
->wiphy
, ret
);
673 rdev_set_cqm_txe_config(struct cfg80211_registered_device
*rdev
,
674 struct net_device
*dev
, u32 rate
, u32 pkts
, u32 intvl
)
677 trace_rdev_set_cqm_txe_config(&rdev
->wiphy
, dev
, rate
, pkts
, intvl
);
678 ret
= rdev
->ops
->set_cqm_txe_config(&rdev
->wiphy
, dev
, rate
, pkts
,
680 trace_rdev_return_int(&rdev
->wiphy
, ret
);
685 rdev_mgmt_frame_register(struct cfg80211_registered_device
*rdev
,
686 struct wireless_dev
*wdev
, u16 frame_type
, bool reg
)
688 trace_rdev_mgmt_frame_register(&rdev
->wiphy
, wdev
, frame_type
, reg
);
689 rdev
->ops
->mgmt_frame_register(&rdev
->wiphy
, wdev
, frame_type
, reg
);
690 trace_rdev_return_void(&rdev
->wiphy
);
693 static inline int rdev_set_antenna(struct cfg80211_registered_device
*rdev
,
694 u32 tx_ant
, u32 rx_ant
)
697 trace_rdev_set_antenna(&rdev
->wiphy
, tx_ant
, rx_ant
);
698 ret
= rdev
->ops
->set_antenna(&rdev
->wiphy
, tx_ant
, rx_ant
);
699 trace_rdev_return_int(&rdev
->wiphy
, ret
);
703 static inline int rdev_get_antenna(struct cfg80211_registered_device
*rdev
,
704 u32
*tx_ant
, u32
*rx_ant
)
707 trace_rdev_get_antenna(&rdev
->wiphy
);
708 ret
= rdev
->ops
->get_antenna(&rdev
->wiphy
, tx_ant
, rx_ant
);
710 trace_rdev_return_int(&rdev
->wiphy
, ret
);
712 trace_rdev_return_int_tx_rx(&rdev
->wiphy
, ret
, *tx_ant
,
717 static inline int rdev_set_ringparam(struct cfg80211_registered_device
*rdev
,
721 trace_rdev_set_ringparam(&rdev
->wiphy
, tx
, rx
);
722 ret
= rdev
->ops
->set_ringparam(&rdev
->wiphy
, tx
, rx
);
723 trace_rdev_return_int(&rdev
->wiphy
, ret
);
727 static inline void rdev_get_ringparam(struct cfg80211_registered_device
*rdev
,
728 u32
*tx
, u32
*tx_max
, u32
*rx
,
731 trace_rdev_get_ringparam(&rdev
->wiphy
);
732 rdev
->ops
->get_ringparam(&rdev
->wiphy
, tx
, tx_max
, rx
, rx_max
);
733 trace_rdev_return_void_tx_rx(&rdev
->wiphy
, *tx
, *tx_max
, *rx
, *rx_max
);
737 rdev_sched_scan_start(struct cfg80211_registered_device
*rdev
,
738 struct net_device
*dev
,
739 struct cfg80211_sched_scan_request
*request
)
742 trace_rdev_sched_scan_start(&rdev
->wiphy
, dev
, request
);
743 ret
= rdev
->ops
->sched_scan_start(&rdev
->wiphy
, dev
, request
);
744 trace_rdev_return_int(&rdev
->wiphy
, ret
);
748 static inline int rdev_sched_scan_stop(struct cfg80211_registered_device
*rdev
,
749 struct net_device
*dev
)
752 trace_rdev_sched_scan_stop(&rdev
->wiphy
, dev
);
753 ret
= rdev
->ops
->sched_scan_stop(&rdev
->wiphy
, dev
);
754 trace_rdev_return_int(&rdev
->wiphy
, ret
);
758 static inline int rdev_set_rekey_data(struct cfg80211_registered_device
*rdev
,
759 struct net_device
*dev
,
760 struct cfg80211_gtk_rekey_data
*data
)
763 trace_rdev_set_rekey_data(&rdev
->wiphy
, dev
);
764 ret
= rdev
->ops
->set_rekey_data(&rdev
->wiphy
, dev
, data
);
765 trace_rdev_return_int(&rdev
->wiphy
, ret
);
769 static inline int rdev_tdls_mgmt(struct cfg80211_registered_device
*rdev
,
770 struct net_device
*dev
, u8
*peer
,
771 u8 action_code
, u8 dialog_token
,
772 u16 status_code
, u32 peer_capability
,
773 const u8
*buf
, size_t len
)
776 trace_rdev_tdls_mgmt(&rdev
->wiphy
, dev
, peer
, action_code
,
777 dialog_token
, status_code
, peer_capability
,
779 ret
= rdev
->ops
->tdls_mgmt(&rdev
->wiphy
, dev
, peer
, action_code
,
780 dialog_token
, status_code
, peer_capability
,
782 trace_rdev_return_int(&rdev
->wiphy
, ret
);
786 static inline int rdev_tdls_oper(struct cfg80211_registered_device
*rdev
,
787 struct net_device
*dev
, u8
*peer
,
788 enum nl80211_tdls_operation oper
)
791 trace_rdev_tdls_oper(&rdev
->wiphy
, dev
, peer
, oper
);
792 ret
= rdev
->ops
->tdls_oper(&rdev
->wiphy
, dev
, peer
, oper
);
793 trace_rdev_return_int(&rdev
->wiphy
, ret
);
797 static inline int rdev_probe_client(struct cfg80211_registered_device
*rdev
,
798 struct net_device
*dev
, const u8
*peer
,
802 trace_rdev_probe_client(&rdev
->wiphy
, dev
, peer
);
803 ret
= rdev
->ops
->probe_client(&rdev
->wiphy
, dev
, peer
, cookie
);
804 trace_rdev_return_int_cookie(&rdev
->wiphy
, ret
, *cookie
);
808 static inline int rdev_set_noack_map(struct cfg80211_registered_device
*rdev
,
809 struct net_device
*dev
, u16 noack_map
)
812 trace_rdev_set_noack_map(&rdev
->wiphy
, dev
, noack_map
);
813 ret
= rdev
->ops
->set_noack_map(&rdev
->wiphy
, dev
, noack_map
);
814 trace_rdev_return_int(&rdev
->wiphy
, ret
);
819 rdev_get_et_sset_count(struct cfg80211_registered_device
*rdev
,
820 struct net_device
*dev
, int sset
)
823 trace_rdev_get_et_sset_count(&rdev
->wiphy
, dev
, sset
);
824 ret
= rdev
->ops
->get_et_sset_count(&rdev
->wiphy
, dev
, sset
);
825 trace_rdev_return_int(&rdev
->wiphy
, ret
);
829 static inline void rdev_get_et_stats(struct cfg80211_registered_device
*rdev
,
830 struct net_device
*dev
,
831 struct ethtool_stats
*stats
, u64
*data
)
833 trace_rdev_get_et_stats(&rdev
->wiphy
, dev
);
834 rdev
->ops
->get_et_stats(&rdev
->wiphy
, dev
, stats
, data
);
835 trace_rdev_return_void(&rdev
->wiphy
);
838 static inline void rdev_get_et_strings(struct cfg80211_registered_device
*rdev
,
839 struct net_device
*dev
, u32 sset
,
842 trace_rdev_get_et_strings(&rdev
->wiphy
, dev
, sset
);
843 rdev
->ops
->get_et_strings(&rdev
->wiphy
, dev
, sset
, data
);
844 trace_rdev_return_void(&rdev
->wiphy
);
848 rdev_get_channel(struct cfg80211_registered_device
*rdev
,
849 struct wireless_dev
*wdev
,
850 struct cfg80211_chan_def
*chandef
)
854 trace_rdev_get_channel(&rdev
->wiphy
, wdev
);
855 ret
= rdev
->ops
->get_channel(&rdev
->wiphy
, wdev
, chandef
);
856 trace_rdev_return_chandef(&rdev
->wiphy
, ret
, chandef
);
861 static inline int rdev_start_p2p_device(struct cfg80211_registered_device
*rdev
,
862 struct wireless_dev
*wdev
)
866 trace_rdev_start_p2p_device(&rdev
->wiphy
, wdev
);
867 ret
= rdev
->ops
->start_p2p_device(&rdev
->wiphy
, wdev
);
868 trace_rdev_return_int(&rdev
->wiphy
, ret
);
872 static inline void rdev_stop_p2p_device(struct cfg80211_registered_device
*rdev
,
873 struct wireless_dev
*wdev
)
875 trace_rdev_stop_p2p_device(&rdev
->wiphy
, wdev
);
876 rdev
->ops
->stop_p2p_device(&rdev
->wiphy
, wdev
);
877 trace_rdev_return_void(&rdev
->wiphy
);
880 static inline int rdev_set_mac_acl(struct cfg80211_registered_device
*rdev
,
881 struct net_device
*dev
,
882 struct cfg80211_acl_data
*params
)
886 trace_rdev_set_mac_acl(&rdev
->wiphy
, dev
, params
);
887 ret
= rdev
->ops
->set_mac_acl(&rdev
->wiphy
, dev
, params
);
888 trace_rdev_return_int(&rdev
->wiphy
, ret
);
892 static inline int rdev_update_ft_ies(struct cfg80211_registered_device
*rdev
,
893 struct net_device
*dev
,
894 struct cfg80211_update_ft_ies_params
*ftie
)
898 trace_rdev_update_ft_ies(&rdev
->wiphy
, dev
, ftie
);
899 ret
= rdev
->ops
->update_ft_ies(&rdev
->wiphy
, dev
, ftie
);
900 trace_rdev_return_int(&rdev
->wiphy
, ret
);
904 static inline int rdev_crit_proto_start(struct cfg80211_registered_device
*rdev
,
905 struct wireless_dev
*wdev
,
906 enum nl80211_crit_proto_id protocol
,
911 trace_rdev_crit_proto_start(&rdev
->wiphy
, wdev
, protocol
, duration
);
912 ret
= rdev
->ops
->crit_proto_start(&rdev
->wiphy
, wdev
,
914 trace_rdev_return_int(&rdev
->wiphy
, ret
);
918 static inline void rdev_crit_proto_stop(struct cfg80211_registered_device
*rdev
,
919 struct wireless_dev
*wdev
)
921 trace_rdev_crit_proto_stop(&rdev
->wiphy
, wdev
);
922 rdev
->ops
->crit_proto_stop(&rdev
->wiphy
, wdev
);
923 trace_rdev_return_void(&rdev
->wiphy
);
926 static inline int rdev_channel_switch(struct cfg80211_registered_device
*rdev
,
927 struct net_device
*dev
,
928 struct cfg80211_csa_settings
*params
)
932 trace_rdev_channel_switch(&rdev
->wiphy
, dev
, params
);
933 ret
= rdev
->ops
->channel_switch(&rdev
->wiphy
, dev
, params
);
934 trace_rdev_return_int(&rdev
->wiphy
, ret
);
938 static inline int rdev_set_qos_map(struct cfg80211_registered_device
*rdev
,
939 struct net_device
*dev
,
940 struct cfg80211_qos_map
*qos_map
)
942 int ret
= -EOPNOTSUPP
;
944 if (rdev
->ops
->set_qos_map
) {
945 trace_rdev_set_qos_map(&rdev
->wiphy
, dev
, qos_map
);
946 ret
= rdev
->ops
->set_qos_map(&rdev
->wiphy
, dev
, qos_map
);
947 trace_rdev_return_int(&rdev
->wiphy
, ret
);
954 rdev_set_ap_chanwidth(struct cfg80211_registered_device
*rdev
,
955 struct net_device
*dev
, struct cfg80211_chan_def
*chandef
)
959 trace_rdev_set_ap_chanwidth(&rdev
->wiphy
, dev
, chandef
);
960 ret
= rdev
->ops
->set_ap_chanwidth(&rdev
->wiphy
, dev
, chandef
);
961 trace_rdev_return_int(&rdev
->wiphy
, ret
);
966 #endif /* __CFG80211_RDEV_OPS */