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
)
12 trace_rdev_suspend(&rdev
->wiphy
, rdev
->wowlan
);
13 ret
= rdev
->ops
->suspend(&rdev
->wiphy
, rdev
->wowlan
);
14 trace_rdev_return_int(&rdev
->wiphy
, ret
);
18 static inline int rdev_resume(struct cfg80211_registered_device
*rdev
)
21 trace_rdev_resume(&rdev
->wiphy
);
22 ret
= rdev
->ops
->resume(&rdev
->wiphy
);
23 trace_rdev_return_int(&rdev
->wiphy
, ret
);
27 static inline void rdev_set_wakeup(struct cfg80211_registered_device
*rdev
,
30 trace_rdev_set_wakeup(&rdev
->wiphy
, enabled
);
31 rdev
->ops
->set_wakeup(&rdev
->wiphy
, enabled
);
32 trace_rdev_return_void(&rdev
->wiphy
);
35 static inline struct wireless_dev
36 *rdev_add_virtual_intf(struct cfg80211_registered_device
*rdev
, char *name
,
37 enum nl80211_iftype type
, u32
*flags
,
38 struct vif_params
*params
)
40 struct wireless_dev
*ret
;
41 trace_rdev_add_virtual_intf(&rdev
->wiphy
, name
, type
);
42 ret
= rdev
->ops
->add_virtual_intf(&rdev
->wiphy
, name
, type
, flags
,
44 trace_rdev_return_wdev(&rdev
->wiphy
, ret
);
49 rdev_del_virtual_intf(struct cfg80211_registered_device
*rdev
,
50 struct wireless_dev
*wdev
)
53 trace_rdev_del_virtual_intf(&rdev
->wiphy
, wdev
);
54 ret
= rdev
->ops
->del_virtual_intf(&rdev
->wiphy
, wdev
);
55 trace_rdev_return_int(&rdev
->wiphy
, ret
);
60 rdev_change_virtual_intf(struct cfg80211_registered_device
*rdev
,
61 struct net_device
*dev
, enum nl80211_iftype type
,
62 u32
*flags
, struct vif_params
*params
)
65 trace_rdev_change_virtual_intf(&rdev
->wiphy
, dev
, type
);
66 ret
= rdev
->ops
->change_virtual_intf(&rdev
->wiphy
, dev
, type
, flags
,
68 trace_rdev_return_int(&rdev
->wiphy
, ret
);
72 static inline int rdev_add_key(struct cfg80211_registered_device
*rdev
,
73 struct net_device
*netdev
, u8 key_index
,
74 bool pairwise
, const u8
*mac_addr
,
75 struct key_params
*params
)
78 trace_rdev_add_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
, mac_addr
);
79 ret
= rdev
->ops
->add_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
,
81 trace_rdev_return_int(&rdev
->wiphy
, ret
);
86 rdev_get_key(struct cfg80211_registered_device
*rdev
, struct net_device
*netdev
,
87 u8 key_index
, bool pairwise
, const u8
*mac_addr
, void *cookie
,
88 void (*callback
)(void *cookie
, struct key_params
*))
91 trace_rdev_get_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
, mac_addr
);
92 ret
= rdev
->ops
->get_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
,
93 mac_addr
, cookie
, callback
);
94 trace_rdev_return_int(&rdev
->wiphy
, ret
);
98 static inline int rdev_del_key(struct cfg80211_registered_device
*rdev
,
99 struct net_device
*netdev
, u8 key_index
,
100 bool pairwise
, const u8
*mac_addr
)
103 trace_rdev_del_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
, mac_addr
);
104 ret
= rdev
->ops
->del_key(&rdev
->wiphy
, netdev
, key_index
, pairwise
,
106 trace_rdev_return_int(&rdev
->wiphy
, ret
);
111 rdev_set_default_key(struct cfg80211_registered_device
*rdev
,
112 struct net_device
*netdev
, u8 key_index
, bool unicast
,
116 trace_rdev_set_default_key(&rdev
->wiphy
, netdev
, key_index
,
118 ret
= rdev
->ops
->set_default_key(&rdev
->wiphy
, netdev
, key_index
,
120 trace_rdev_return_int(&rdev
->wiphy
, ret
);
125 rdev_set_default_mgmt_key(struct cfg80211_registered_device
*rdev
,
126 struct net_device
*netdev
, u8 key_index
)
129 trace_rdev_set_default_mgmt_key(&rdev
->wiphy
, netdev
, key_index
);
130 ret
= rdev
->ops
->set_default_mgmt_key(&rdev
->wiphy
, netdev
,
132 trace_rdev_return_int(&rdev
->wiphy
, ret
);
136 static inline int rdev_start_ap(struct cfg80211_registered_device
*rdev
,
137 struct net_device
*dev
,
138 struct cfg80211_ap_settings
*settings
)
141 trace_rdev_start_ap(&rdev
->wiphy
, dev
, settings
);
142 ret
= rdev
->ops
->start_ap(&rdev
->wiphy
, dev
, settings
);
143 trace_rdev_return_int(&rdev
->wiphy
, ret
);
147 static inline int rdev_change_beacon(struct cfg80211_registered_device
*rdev
,
148 struct net_device
*dev
,
149 struct cfg80211_beacon_data
*info
)
152 trace_rdev_change_beacon(&rdev
->wiphy
, dev
, info
);
153 ret
= rdev
->ops
->change_beacon(&rdev
->wiphy
, dev
, info
);
154 trace_rdev_return_int(&rdev
->wiphy
, ret
);
158 static inline int rdev_stop_ap(struct cfg80211_registered_device
*rdev
,
159 struct net_device
*dev
)
162 trace_rdev_stop_ap(&rdev
->wiphy
, dev
);
163 ret
= rdev
->ops
->stop_ap(&rdev
->wiphy
, dev
);
164 trace_rdev_return_int(&rdev
->wiphy
, ret
);
168 static inline int rdev_add_station(struct cfg80211_registered_device
*rdev
,
169 struct net_device
*dev
, u8
*mac
,
170 struct station_parameters
*params
)
173 trace_rdev_add_station(&rdev
->wiphy
, dev
, mac
, params
);
174 ret
= rdev
->ops
->add_station(&rdev
->wiphy
, dev
, mac
, params
);
175 trace_rdev_return_int(&rdev
->wiphy
, ret
);
179 static inline int rdev_del_station(struct cfg80211_registered_device
*rdev
,
180 struct net_device
*dev
, u8
*mac
)
183 trace_rdev_del_station(&rdev
->wiphy
, dev
, mac
);
184 ret
= rdev
->ops
->del_station(&rdev
->wiphy
, dev
, mac
);
185 trace_rdev_return_int(&rdev
->wiphy
, ret
);
189 static inline int rdev_change_station(struct cfg80211_registered_device
*rdev
,
190 struct net_device
*dev
, u8
*mac
,
191 struct station_parameters
*params
)
194 trace_rdev_change_station(&rdev
->wiphy
, dev
, mac
, params
);
195 ret
= rdev
->ops
->change_station(&rdev
->wiphy
, dev
, mac
, params
);
196 trace_rdev_return_int(&rdev
->wiphy
, ret
);
200 static inline int rdev_get_station(struct cfg80211_registered_device
*rdev
,
201 struct net_device
*dev
, u8
*mac
,
202 struct station_info
*sinfo
)
205 trace_rdev_get_station(&rdev
->wiphy
, dev
, mac
);
206 ret
= rdev
->ops
->get_station(&rdev
->wiphy
, dev
, mac
, sinfo
);
207 trace_rdev_return_int_station_info(&rdev
->wiphy
, ret
, sinfo
);
211 static inline int rdev_dump_station(struct cfg80211_registered_device
*rdev
,
212 struct net_device
*dev
, int idx
, u8
*mac
,
213 struct station_info
*sinfo
)
216 trace_rdev_dump_station(&rdev
->wiphy
, dev
, idx
, mac
);
217 ret
= rdev
->ops
->dump_station(&rdev
->wiphy
, dev
, idx
, mac
, sinfo
);
218 trace_rdev_return_int_station_info(&rdev
->wiphy
, ret
, sinfo
);
222 static inline int rdev_add_mpath(struct cfg80211_registered_device
*rdev
,
223 struct net_device
*dev
, u8
*dst
, u8
*next_hop
)
226 trace_rdev_add_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
);
227 ret
= rdev
->ops
->add_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
);
228 trace_rdev_return_int(&rdev
->wiphy
, ret
);
232 static inline int rdev_del_mpath(struct cfg80211_registered_device
*rdev
,
233 struct net_device
*dev
, u8
*dst
)
236 trace_rdev_del_mpath(&rdev
->wiphy
, dev
, dst
);
237 ret
= rdev
->ops
->del_mpath(&rdev
->wiphy
, dev
, dst
);
238 trace_rdev_return_int(&rdev
->wiphy
, ret
);
242 static inline int rdev_change_mpath(struct cfg80211_registered_device
*rdev
,
243 struct net_device
*dev
, u8
*dst
,
247 trace_rdev_change_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
);
248 ret
= rdev
->ops
->change_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
);
249 trace_rdev_return_int(&rdev
->wiphy
, ret
);
253 static inline int rdev_get_mpath(struct cfg80211_registered_device
*rdev
,
254 struct net_device
*dev
, u8
*dst
, u8
*next_hop
,
255 struct mpath_info
*pinfo
)
258 trace_rdev_get_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
);
259 ret
= rdev
->ops
->get_mpath(&rdev
->wiphy
, dev
, dst
, next_hop
, pinfo
);
260 trace_rdev_return_int_mpath_info(&rdev
->wiphy
, ret
, pinfo
);
265 static inline int rdev_dump_mpath(struct cfg80211_registered_device
*rdev
,
266 struct net_device
*dev
, int idx
, u8
*dst
,
267 u8
*next_hop
, struct mpath_info
*pinfo
)
271 trace_rdev_dump_mpath(&rdev
->wiphy
, dev
, idx
, dst
, next_hop
);
272 ret
= rdev
->ops
->dump_mpath(&rdev
->wiphy
, dev
, idx
, dst
, next_hop
,
274 trace_rdev_return_int_mpath_info(&rdev
->wiphy
, ret
, pinfo
);
279 rdev_get_mesh_config(struct cfg80211_registered_device
*rdev
,
280 struct net_device
*dev
, struct mesh_config
*conf
)
283 trace_rdev_get_mesh_config(&rdev
->wiphy
, dev
);
284 ret
= rdev
->ops
->get_mesh_config(&rdev
->wiphy
, dev
, conf
);
285 trace_rdev_return_int_mesh_config(&rdev
->wiphy
, ret
, conf
);
290 rdev_update_mesh_config(struct cfg80211_registered_device
*rdev
,
291 struct net_device
*dev
, u32 mask
,
292 const struct mesh_config
*nconf
)
295 trace_rdev_update_mesh_config(&rdev
->wiphy
, dev
, mask
, nconf
);
296 ret
= rdev
->ops
->update_mesh_config(&rdev
->wiphy
, dev
, mask
, nconf
);
297 trace_rdev_return_int(&rdev
->wiphy
, ret
);
301 static inline int rdev_join_mesh(struct cfg80211_registered_device
*rdev
,
302 struct net_device
*dev
,
303 const struct mesh_config
*conf
,
304 const struct mesh_setup
*setup
)
307 trace_rdev_join_mesh(&rdev
->wiphy
, dev
, conf
, setup
);
308 ret
= rdev
->ops
->join_mesh(&rdev
->wiphy
, dev
, conf
, setup
);
309 trace_rdev_return_int(&rdev
->wiphy
, ret
);
314 static inline int rdev_leave_mesh(struct cfg80211_registered_device
*rdev
,
315 struct net_device
*dev
)
318 trace_rdev_leave_mesh(&rdev
->wiphy
, dev
);
319 ret
= rdev
->ops
->leave_mesh(&rdev
->wiphy
, dev
);
320 trace_rdev_return_int(&rdev
->wiphy
, ret
);
324 static inline int rdev_change_bss(struct cfg80211_registered_device
*rdev
,
325 struct net_device
*dev
,
326 struct bss_parameters
*params
)
330 trace_rdev_change_bss(&rdev
->wiphy
, dev
, params
);
331 ret
= rdev
->ops
->change_bss(&rdev
->wiphy
, dev
, params
);
332 trace_rdev_return_int(&rdev
->wiphy
, ret
);
336 static inline int rdev_set_txq_params(struct cfg80211_registered_device
*rdev
,
337 struct net_device
*dev
,
338 struct ieee80211_txq_params
*params
)
342 trace_rdev_set_txq_params(&rdev
->wiphy
, dev
, params
);
343 ret
= rdev
->ops
->set_txq_params(&rdev
->wiphy
, dev
, params
);
344 trace_rdev_return_int(&rdev
->wiphy
, ret
);
349 rdev_libertas_set_mesh_channel(struct cfg80211_registered_device
*rdev
,
350 struct net_device
*dev
,
351 struct ieee80211_channel
*chan
)
354 trace_rdev_libertas_set_mesh_channel(&rdev
->wiphy
, dev
, chan
);
355 ret
= rdev
->ops
->libertas_set_mesh_channel(&rdev
->wiphy
, dev
, chan
);
356 trace_rdev_return_int(&rdev
->wiphy
, ret
);
361 rdev_set_monitor_channel(struct cfg80211_registered_device
*rdev
,
362 struct cfg80211_chan_def
*chandef
)
365 trace_rdev_set_monitor_channel(&rdev
->wiphy
, chandef
);
366 ret
= rdev
->ops
->set_monitor_channel(&rdev
->wiphy
, chandef
);
367 trace_rdev_return_int(&rdev
->wiphy
, ret
);
371 static inline int rdev_scan(struct cfg80211_registered_device
*rdev
,
372 struct cfg80211_scan_request
*request
)
375 trace_rdev_scan(&rdev
->wiphy
, request
);
376 ret
= rdev
->ops
->scan(&rdev
->wiphy
, request
);
377 trace_rdev_return_int(&rdev
->wiphy
, ret
);
381 static inline int rdev_auth(struct cfg80211_registered_device
*rdev
,
382 struct net_device
*dev
,
383 struct cfg80211_auth_request
*req
)
386 trace_rdev_auth(&rdev
->wiphy
, dev
, req
);
387 ret
= rdev
->ops
->auth(&rdev
->wiphy
, dev
, req
);
388 trace_rdev_return_int(&rdev
->wiphy
, ret
);
392 static inline int rdev_assoc(struct cfg80211_registered_device
*rdev
,
393 struct net_device
*dev
,
394 struct cfg80211_assoc_request
*req
)
397 trace_rdev_assoc(&rdev
->wiphy
, dev
, req
);
398 ret
= rdev
->ops
->assoc(&rdev
->wiphy
, dev
, req
);
399 trace_rdev_return_int(&rdev
->wiphy
, ret
);
403 static inline int rdev_deauth(struct cfg80211_registered_device
*rdev
,
404 struct net_device
*dev
,
405 struct cfg80211_deauth_request
*req
)
408 trace_rdev_deauth(&rdev
->wiphy
, dev
, req
);
409 ret
= rdev
->ops
->deauth(&rdev
->wiphy
, dev
, req
);
410 trace_rdev_return_int(&rdev
->wiphy
, ret
);
414 static inline int rdev_disassoc(struct cfg80211_registered_device
*rdev
,
415 struct net_device
*dev
,
416 struct cfg80211_disassoc_request
*req
)
419 trace_rdev_disassoc(&rdev
->wiphy
, dev
, req
);
420 ret
= rdev
->ops
->disassoc(&rdev
->wiphy
, dev
, req
);
421 trace_rdev_return_int(&rdev
->wiphy
, ret
);
425 static inline int rdev_connect(struct cfg80211_registered_device
*rdev
,
426 struct net_device
*dev
,
427 struct cfg80211_connect_params
*sme
)
430 trace_rdev_connect(&rdev
->wiphy
, dev
, sme
);
431 ret
= rdev
->ops
->connect(&rdev
->wiphy
, dev
, sme
);
432 trace_rdev_return_int(&rdev
->wiphy
, ret
);
436 static inline int rdev_disconnect(struct cfg80211_registered_device
*rdev
,
437 struct net_device
*dev
, u16 reason_code
)
440 trace_rdev_disconnect(&rdev
->wiphy
, dev
, reason_code
);
441 ret
= rdev
->ops
->disconnect(&rdev
->wiphy
, dev
, reason_code
);
442 trace_rdev_return_int(&rdev
->wiphy
, ret
);
446 static inline int rdev_join_ibss(struct cfg80211_registered_device
*rdev
,
447 struct net_device
*dev
,
448 struct cfg80211_ibss_params
*params
)
451 trace_rdev_join_ibss(&rdev
->wiphy
, dev
, params
);
452 ret
= rdev
->ops
->join_ibss(&rdev
->wiphy
, dev
, params
);
453 trace_rdev_return_int(&rdev
->wiphy
, ret
);
457 static inline int rdev_leave_ibss(struct cfg80211_registered_device
*rdev
,
458 struct net_device
*dev
)
461 trace_rdev_leave_ibss(&rdev
->wiphy
, dev
);
462 ret
= rdev
->ops
->leave_ibss(&rdev
->wiphy
, dev
);
463 trace_rdev_return_int(&rdev
->wiphy
, ret
);
468 rdev_set_wiphy_params(struct cfg80211_registered_device
*rdev
, u32 changed
)
471 trace_rdev_set_wiphy_params(&rdev
->wiphy
, changed
);
472 ret
= rdev
->ops
->set_wiphy_params(&rdev
->wiphy
, changed
);
473 trace_rdev_return_int(&rdev
->wiphy
, ret
);
477 static inline int rdev_set_tx_power(struct cfg80211_registered_device
*rdev
,
478 struct wireless_dev
*wdev
,
479 enum nl80211_tx_power_setting type
, int mbm
)
482 trace_rdev_set_tx_power(&rdev
->wiphy
, wdev
, type
, mbm
);
483 ret
= rdev
->ops
->set_tx_power(&rdev
->wiphy
, wdev
, type
, mbm
);
484 trace_rdev_return_int(&rdev
->wiphy
, ret
);
488 static inline int rdev_get_tx_power(struct cfg80211_registered_device
*rdev
,
489 struct wireless_dev
*wdev
, int *dbm
)
492 trace_rdev_get_tx_power(&rdev
->wiphy
, wdev
);
493 ret
= rdev
->ops
->get_tx_power(&rdev
->wiphy
, wdev
, dbm
);
494 trace_rdev_return_int_int(&rdev
->wiphy
, ret
, *dbm
);
498 static inline int rdev_set_wds_peer(struct cfg80211_registered_device
*rdev
,
499 struct net_device
*dev
, const u8
*addr
)
502 trace_rdev_set_wds_peer(&rdev
->wiphy
, dev
, addr
);
503 ret
= rdev
->ops
->set_wds_peer(&rdev
->wiphy
, dev
, addr
);
504 trace_rdev_return_int(&rdev
->wiphy
, ret
);
508 static inline void rdev_rfkill_poll(struct cfg80211_registered_device
*rdev
)
510 trace_rdev_rfkill_poll(&rdev
->wiphy
);
511 rdev
->ops
->rfkill_poll(&rdev
->wiphy
);
512 trace_rdev_return_void(&rdev
->wiphy
);
516 #ifdef CONFIG_NL80211_TESTMODE
517 static inline int rdev_testmode_cmd(struct cfg80211_registered_device
*rdev
,
521 trace_rdev_testmode_cmd(&rdev
->wiphy
);
522 ret
= rdev
->ops
->testmode_cmd(&rdev
->wiphy
, data
, len
);
523 trace_rdev_return_int(&rdev
->wiphy
, ret
);
527 static inline int rdev_testmode_dump(struct cfg80211_registered_device
*rdev
,
529 struct netlink_callback
*cb
, void *data
,
533 trace_rdev_testmode_dump(&rdev
->wiphy
);
534 ret
= rdev
->ops
->testmode_dump(&rdev
->wiphy
, skb
, cb
, data
, len
);
535 trace_rdev_return_int(&rdev
->wiphy
, ret
);
541 rdev_set_bitrate_mask(struct cfg80211_registered_device
*rdev
,
542 struct net_device
*dev
, const u8
*peer
,
543 const struct cfg80211_bitrate_mask
*mask
)
546 trace_rdev_set_bitrate_mask(&rdev
->wiphy
, dev
, peer
, mask
);
547 ret
= rdev
->ops
->set_bitrate_mask(&rdev
->wiphy
, dev
, peer
, mask
);
548 trace_rdev_return_int(&rdev
->wiphy
, ret
);
552 static inline int rdev_dump_survey(struct cfg80211_registered_device
*rdev
,
553 struct net_device
*netdev
, int idx
,
554 struct survey_info
*info
)
557 trace_rdev_dump_survey(&rdev
->wiphy
, netdev
, idx
);
558 ret
= rdev
->ops
->dump_survey(&rdev
->wiphy
, netdev
, idx
, info
);
560 trace_rdev_return_int(&rdev
->wiphy
, ret
);
562 trace_rdev_return_int_survey_info(&rdev
->wiphy
, ret
, info
);
566 static inline int rdev_set_pmksa(struct cfg80211_registered_device
*rdev
,
567 struct net_device
*netdev
,
568 struct cfg80211_pmksa
*pmksa
)
571 trace_rdev_set_pmksa(&rdev
->wiphy
, netdev
, pmksa
);
572 ret
= rdev
->ops
->set_pmksa(&rdev
->wiphy
, netdev
, pmksa
);
573 trace_rdev_return_int(&rdev
->wiphy
, ret
);
577 static inline int rdev_del_pmksa(struct cfg80211_registered_device
*rdev
,
578 struct net_device
*netdev
,
579 struct cfg80211_pmksa
*pmksa
)
582 trace_rdev_del_pmksa(&rdev
->wiphy
, netdev
, pmksa
);
583 ret
= rdev
->ops
->del_pmksa(&rdev
->wiphy
, netdev
, pmksa
);
584 trace_rdev_return_int(&rdev
->wiphy
, ret
);
588 static inline int rdev_flush_pmksa(struct cfg80211_registered_device
*rdev
,
589 struct net_device
*netdev
)
592 trace_rdev_flush_pmksa(&rdev
->wiphy
, netdev
);
593 ret
= rdev
->ops
->flush_pmksa(&rdev
->wiphy
, netdev
);
594 trace_rdev_return_int(&rdev
->wiphy
, ret
);
599 rdev_remain_on_channel(struct cfg80211_registered_device
*rdev
,
600 struct wireless_dev
*wdev
,
601 struct ieee80211_channel
*chan
,
602 unsigned int duration
, u64
*cookie
)
605 trace_rdev_remain_on_channel(&rdev
->wiphy
, wdev
, chan
, duration
);
606 ret
= rdev
->ops
->remain_on_channel(&rdev
->wiphy
, wdev
, chan
,
608 trace_rdev_return_int_cookie(&rdev
->wiphy
, ret
, *cookie
);
613 rdev_cancel_remain_on_channel(struct cfg80211_registered_device
*rdev
,
614 struct wireless_dev
*wdev
, u64 cookie
)
617 trace_rdev_cancel_remain_on_channel(&rdev
->wiphy
, wdev
, cookie
);
618 ret
= rdev
->ops
->cancel_remain_on_channel(&rdev
->wiphy
, wdev
, cookie
);
619 trace_rdev_return_int(&rdev
->wiphy
, ret
);
623 static inline int rdev_mgmt_tx(struct cfg80211_registered_device
*rdev
,
624 struct wireless_dev
*wdev
,
625 struct ieee80211_channel
*chan
, bool offchan
,
626 unsigned int wait
, const u8
*buf
, size_t len
,
627 bool no_cck
, bool dont_wait_for_ack
, u64
*cookie
)
630 trace_rdev_mgmt_tx(&rdev
->wiphy
, wdev
, chan
, offchan
,
631 wait
, no_cck
, dont_wait_for_ack
);
632 ret
= rdev
->ops
->mgmt_tx(&rdev
->wiphy
, wdev
, chan
, offchan
,
633 wait
, buf
, len
, no_cck
,
634 dont_wait_for_ack
, cookie
);
635 trace_rdev_return_int_cookie(&rdev
->wiphy
, ret
, *cookie
);
640 rdev_mgmt_tx_cancel_wait(struct cfg80211_registered_device
*rdev
,
641 struct wireless_dev
*wdev
, u64 cookie
)
644 trace_rdev_mgmt_tx_cancel_wait(&rdev
->wiphy
, wdev
, cookie
);
645 ret
= rdev
->ops
->mgmt_tx_cancel_wait(&rdev
->wiphy
, wdev
, cookie
);
646 trace_rdev_return_int(&rdev
->wiphy
, ret
);
650 static inline int rdev_set_power_mgmt(struct cfg80211_registered_device
*rdev
,
651 struct net_device
*dev
, bool enabled
,
655 trace_rdev_set_power_mgmt(&rdev
->wiphy
, dev
, enabled
, timeout
);
656 ret
= rdev
->ops
->set_power_mgmt(&rdev
->wiphy
, dev
, enabled
, timeout
);
657 trace_rdev_return_int(&rdev
->wiphy
, ret
);
662 rdev_set_cqm_rssi_config(struct cfg80211_registered_device
*rdev
,
663 struct net_device
*dev
, s32 rssi_thold
, u32 rssi_hyst
)
666 trace_rdev_set_cqm_rssi_config(&rdev
->wiphy
, dev
, rssi_thold
,
668 ret
= rdev
->ops
->set_cqm_rssi_config(&rdev
->wiphy
, dev
, rssi_thold
,
670 trace_rdev_return_int(&rdev
->wiphy
, ret
);
675 rdev_set_cqm_txe_config(struct cfg80211_registered_device
*rdev
,
676 struct net_device
*dev
, u32 rate
, u32 pkts
, u32 intvl
)
679 trace_rdev_set_cqm_txe_config(&rdev
->wiphy
, dev
, rate
, pkts
, intvl
);
680 ret
= rdev
->ops
->set_cqm_txe_config(&rdev
->wiphy
, dev
, rate
, pkts
,
682 trace_rdev_return_int(&rdev
->wiphy
, ret
);
687 rdev_mgmt_frame_register(struct cfg80211_registered_device
*rdev
,
688 struct wireless_dev
*wdev
, u16 frame_type
, bool reg
)
690 trace_rdev_mgmt_frame_register(&rdev
->wiphy
, wdev
, frame_type
, reg
);
691 rdev
->ops
->mgmt_frame_register(&rdev
->wiphy
, wdev
, frame_type
, reg
);
692 trace_rdev_return_void(&rdev
->wiphy
);
695 static inline int rdev_set_antenna(struct cfg80211_registered_device
*rdev
,
696 u32 tx_ant
, u32 rx_ant
)
699 trace_rdev_set_antenna(&rdev
->wiphy
, tx_ant
, rx_ant
);
700 ret
= rdev
->ops
->set_antenna(&rdev
->wiphy
, tx_ant
, rx_ant
);
701 trace_rdev_return_int(&rdev
->wiphy
, ret
);
705 static inline int rdev_get_antenna(struct cfg80211_registered_device
*rdev
,
706 u32
*tx_ant
, u32
*rx_ant
)
709 trace_rdev_get_antenna(&rdev
->wiphy
);
710 ret
= rdev
->ops
->get_antenna(&rdev
->wiphy
, tx_ant
, rx_ant
);
712 trace_rdev_return_int(&rdev
->wiphy
, ret
);
714 trace_rdev_return_int_tx_rx(&rdev
->wiphy
, ret
, *tx_ant
,
719 static inline int rdev_set_ringparam(struct cfg80211_registered_device
*rdev
,
723 trace_rdev_set_ringparam(&rdev
->wiphy
, tx
, rx
);
724 ret
= rdev
->ops
->set_ringparam(&rdev
->wiphy
, tx
, rx
);
725 trace_rdev_return_int(&rdev
->wiphy
, ret
);
729 static inline void rdev_get_ringparam(struct cfg80211_registered_device
*rdev
,
730 u32
*tx
, u32
*tx_max
, u32
*rx
,
733 trace_rdev_get_ringparam(&rdev
->wiphy
);
734 rdev
->ops
->get_ringparam(&rdev
->wiphy
, tx
, tx_max
, rx
, rx_max
);
735 trace_rdev_return_void_tx_rx(&rdev
->wiphy
, *tx
, *tx_max
, *rx
, *rx_max
);
739 rdev_sched_scan_start(struct cfg80211_registered_device
*rdev
,
740 struct net_device
*dev
,
741 struct cfg80211_sched_scan_request
*request
)
744 trace_rdev_sched_scan_start(&rdev
->wiphy
, dev
, request
);
745 ret
= rdev
->ops
->sched_scan_start(&rdev
->wiphy
, dev
, request
);
746 trace_rdev_return_int(&rdev
->wiphy
, ret
);
750 static inline int rdev_sched_scan_stop(struct cfg80211_registered_device
*rdev
,
751 struct net_device
*dev
)
754 trace_rdev_sched_scan_stop(&rdev
->wiphy
, dev
);
755 ret
= rdev
->ops
->sched_scan_stop(&rdev
->wiphy
, dev
);
756 trace_rdev_return_int(&rdev
->wiphy
, ret
);
760 static inline int rdev_set_rekey_data(struct cfg80211_registered_device
*rdev
,
761 struct net_device
*dev
,
762 struct cfg80211_gtk_rekey_data
*data
)
765 trace_rdev_set_rekey_data(&rdev
->wiphy
, dev
);
766 ret
= rdev
->ops
->set_rekey_data(&rdev
->wiphy
, dev
, data
);
767 trace_rdev_return_int(&rdev
->wiphy
, ret
);
771 static inline int rdev_tdls_mgmt(struct cfg80211_registered_device
*rdev
,
772 struct net_device
*dev
, u8
*peer
,
773 u8 action_code
, u8 dialog_token
,
774 u16 status_code
, const u8
*buf
, size_t len
)
777 trace_rdev_tdls_mgmt(&rdev
->wiphy
, dev
, peer
, action_code
,
778 dialog_token
, status_code
, buf
, len
);
779 ret
= rdev
->ops
->tdls_mgmt(&rdev
->wiphy
, dev
, peer
, action_code
,
780 dialog_token
, status_code
, buf
, len
);
781 trace_rdev_return_int(&rdev
->wiphy
, ret
);
785 static inline int rdev_tdls_oper(struct cfg80211_registered_device
*rdev
,
786 struct net_device
*dev
, u8
*peer
,
787 enum nl80211_tdls_operation oper
)
790 trace_rdev_tdls_oper(&rdev
->wiphy
, dev
, peer
, oper
);
791 ret
= rdev
->ops
->tdls_oper(&rdev
->wiphy
, dev
, peer
, oper
);
792 trace_rdev_return_int(&rdev
->wiphy
, ret
);
796 static inline int rdev_probe_client(struct cfg80211_registered_device
*rdev
,
797 struct net_device
*dev
, const u8
*peer
,
801 trace_rdev_probe_client(&rdev
->wiphy
, dev
, peer
);
802 ret
= rdev
->ops
->probe_client(&rdev
->wiphy
, dev
, peer
, cookie
);
803 trace_rdev_return_int_cookie(&rdev
->wiphy
, ret
, *cookie
);
807 static inline int rdev_set_noack_map(struct cfg80211_registered_device
*rdev
,
808 struct net_device
*dev
, u16 noack_map
)
811 trace_rdev_set_noack_map(&rdev
->wiphy
, dev
, noack_map
);
812 ret
= rdev
->ops
->set_noack_map(&rdev
->wiphy
, dev
, noack_map
);
813 trace_rdev_return_int(&rdev
->wiphy
, ret
);
818 rdev_get_et_sset_count(struct cfg80211_registered_device
*rdev
,
819 struct net_device
*dev
, int sset
)
822 trace_rdev_get_et_sset_count(&rdev
->wiphy
, dev
, sset
);
823 ret
= rdev
->ops
->get_et_sset_count(&rdev
->wiphy
, dev
, sset
);
824 trace_rdev_return_int(&rdev
->wiphy
, ret
);
828 static inline void rdev_get_et_stats(struct cfg80211_registered_device
*rdev
,
829 struct net_device
*dev
,
830 struct ethtool_stats
*stats
, u64
*data
)
832 trace_rdev_get_et_stats(&rdev
->wiphy
, dev
);
833 rdev
->ops
->get_et_stats(&rdev
->wiphy
, dev
, stats
, data
);
834 trace_rdev_return_void(&rdev
->wiphy
);
837 static inline void rdev_get_et_strings(struct cfg80211_registered_device
*rdev
,
838 struct net_device
*dev
, u32 sset
,
841 trace_rdev_get_et_strings(&rdev
->wiphy
, dev
, sset
);
842 rdev
->ops
->get_et_strings(&rdev
->wiphy
, dev
, sset
, data
);
843 trace_rdev_return_void(&rdev
->wiphy
);
847 rdev_get_channel(struct cfg80211_registered_device
*rdev
,
848 struct wireless_dev
*wdev
,
849 struct cfg80211_chan_def
*chandef
)
853 trace_rdev_get_channel(&rdev
->wiphy
, wdev
);
854 ret
= rdev
->ops
->get_channel(&rdev
->wiphy
, wdev
, chandef
);
855 trace_rdev_return_chandef(&rdev
->wiphy
, ret
, chandef
);
860 static inline int rdev_start_p2p_device(struct cfg80211_registered_device
*rdev
,
861 struct wireless_dev
*wdev
)
865 trace_rdev_start_p2p_device(&rdev
->wiphy
, wdev
);
866 ret
= rdev
->ops
->start_p2p_device(&rdev
->wiphy
, wdev
);
867 trace_rdev_return_int(&rdev
->wiphy
, ret
);
871 static inline void rdev_stop_p2p_device(struct cfg80211_registered_device
*rdev
,
872 struct wireless_dev
*wdev
)
874 trace_rdev_stop_p2p_device(&rdev
->wiphy
, wdev
);
875 rdev
->ops
->stop_p2p_device(&rdev
->wiphy
, wdev
);
876 trace_rdev_return_void(&rdev
->wiphy
);
878 #endif /* __CFG80211_RDEV_OPS */