blob: 9f15f0ac824dbb8c73ac88e2ce83f8505ea9a142 [file] [log] [blame]
Hila Gonene35e4d22012-06-27 17:19:42 +03001#ifndef __CFG80211_RDEV_OPS
2#define __CFG80211_RDEV_OPS
3
4#include <linux/rtnetlink.h>
5#include <net/cfg80211.h>
6#include "core.h"
Beni Lev14e8a3c2012-07-31 18:48:27 +03007#include "trace.h"
Hila Gonene35e4d22012-06-27 17:19:42 +03008
Stanislaw Gruszka81256962013-02-28 10:55:25 +01009static inline int rdev_suspend(struct cfg80211_registered_device *rdev,
10 struct cfg80211_wowlan *wowlan)
Hila Gonene35e4d22012-06-27 17:19:42 +030011{
Beni Lev14e8a3c2012-07-31 18:48:27 +030012 int ret;
Stanislaw Gruszka81256962013-02-28 10:55:25 +010013 trace_rdev_suspend(&rdev->wiphy, wowlan);
14 ret = rdev->ops->suspend(&rdev->wiphy, wowlan);
Beni Lev14e8a3c2012-07-31 18:48:27 +030015 trace_rdev_return_int(&rdev->wiphy, ret);
16 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +030017}
18
19static inline int rdev_resume(struct cfg80211_registered_device *rdev)
20{
Beni Lev14e8a3c2012-07-31 18:48:27 +030021 int ret;
22 trace_rdev_resume(&rdev->wiphy);
23 ret = rdev->ops->resume(&rdev->wiphy);
24 trace_rdev_return_int(&rdev->wiphy, ret);
25 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +030026}
27
28static inline void rdev_set_wakeup(struct cfg80211_registered_device *rdev,
29 bool enabled)
30{
Beni Lev14e8a3c2012-07-31 18:48:27 +030031 trace_rdev_set_wakeup(&rdev->wiphy, enabled);
Hila Gonene35e4d22012-06-27 17:19:42 +030032 rdev->ops->set_wakeup(&rdev->wiphy, enabled);
Beni Lev14e8a3c2012-07-31 18:48:27 +030033 trace_rdev_return_void(&rdev->wiphy);
Hila Gonene35e4d22012-06-27 17:19:42 +030034}
35
36static 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)
40{
Beni Lev14e8a3c2012-07-31 18:48:27 +030041 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,
44 params);
45 trace_rdev_return_wdev(&rdev->wiphy, ret);
46 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +030047}
48
49static inline int
50rdev_del_virtual_intf(struct cfg80211_registered_device *rdev,
51 struct wireless_dev *wdev)
52{
Beni Lev14e8a3c2012-07-31 18:48:27 +030053 int ret;
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);
57 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +030058}
59
60static inline int
61rdev_change_virtual_intf(struct cfg80211_registered_device *rdev,
62 struct net_device *dev, enum nl80211_iftype type,
63 u32 *flags, struct vif_params *params)
64{
Beni Lev14e8a3c2012-07-31 18:48:27 +030065 int ret;
66 trace_rdev_change_virtual_intf(&rdev->wiphy, dev, type);
67 ret = rdev->ops->change_virtual_intf(&rdev->wiphy, dev, type, flags,
68 params);
69 trace_rdev_return_int(&rdev->wiphy, ret);
70 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +030071}
72
73static 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)
77{
Beni Lev14e8a3c2012-07-31 18:48:27 +030078 int ret;
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,
Hila Gonene35e4d22012-06-27 17:19:42 +030081 mac_addr, params);
Beni Lev14e8a3c2012-07-31 18:48:27 +030082 trace_rdev_return_int(&rdev->wiphy, ret);
83 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +030084}
85
86static inline int
87rdev_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*))
90{
Beni Lev14e8a3c2012-07-31 18:48:27 +030091 int ret;
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,
Hila Gonene35e4d22012-06-27 17:19:42 +030094 mac_addr, cookie, callback);
Beni Lev14e8a3c2012-07-31 18:48:27 +030095 trace_rdev_return_int(&rdev->wiphy, ret);
96 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +030097}
98
99static 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)
102{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300103 int ret;
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,
Hila Gonene35e4d22012-06-27 17:19:42 +0300106 mac_addr);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300107 trace_rdev_return_int(&rdev->wiphy, ret);
108 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300109}
110
111static inline int
112rdev_set_default_key(struct cfg80211_registered_device *rdev,
113 struct net_device *netdev, u8 key_index, bool unicast,
114 bool multicast)
115{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300116 int ret;
117 trace_rdev_set_default_key(&rdev->wiphy, netdev, key_index,
118 unicast, multicast);
119 ret = rdev->ops->set_default_key(&rdev->wiphy, netdev, key_index,
Hila Gonene35e4d22012-06-27 17:19:42 +0300120 unicast, multicast);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300121 trace_rdev_return_int(&rdev->wiphy, ret);
122 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300123}
124
125static inline int
126rdev_set_default_mgmt_key(struct cfg80211_registered_device *rdev,
127 struct net_device *netdev, u8 key_index)
128{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300129 int ret;
130 trace_rdev_set_default_mgmt_key(&rdev->wiphy, netdev, key_index);
131 ret = rdev->ops->set_default_mgmt_key(&rdev->wiphy, netdev,
Hila Gonene35e4d22012-06-27 17:19:42 +0300132 key_index);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300133 trace_rdev_return_int(&rdev->wiphy, ret);
134 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300135}
136
137static inline int rdev_start_ap(struct cfg80211_registered_device *rdev,
138 struct net_device *dev,
139 struct cfg80211_ap_settings *settings)
140{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300141 int ret;
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);
145 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300146}
147
148static inline int rdev_change_beacon(struct cfg80211_registered_device *rdev,
149 struct net_device *dev,
150 struct cfg80211_beacon_data *info)
151{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300152 int ret;
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);
156 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300157}
158
159static inline int rdev_stop_ap(struct cfg80211_registered_device *rdev,
160 struct net_device *dev)
161{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300162 int ret;
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);
166 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300167}
168
169static inline int rdev_add_station(struct cfg80211_registered_device *rdev,
170 struct net_device *dev, u8 *mac,
171 struct station_parameters *params)
172{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300173 int ret;
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);
177 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300178}
179
180static inline int rdev_del_station(struct cfg80211_registered_device *rdev,
181 struct net_device *dev, u8 *mac)
182{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300183 int ret;
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);
187 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300188}
189
190static inline int rdev_change_station(struct cfg80211_registered_device *rdev,
191 struct net_device *dev, u8 *mac,
192 struct station_parameters *params)
193{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300194 int ret;
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);
198 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300199}
200
201static inline int rdev_get_station(struct cfg80211_registered_device *rdev,
202 struct net_device *dev, u8 *mac,
203 struct station_info *sinfo)
204{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300205 int ret;
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);
209 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300210}
211
212static inline int rdev_dump_station(struct cfg80211_registered_device *rdev,
213 struct net_device *dev, int idx, u8 *mac,
214 struct station_info *sinfo)
215{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300216 int ret;
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);
220 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300221}
222
223static inline int rdev_add_mpath(struct cfg80211_registered_device *rdev,
224 struct net_device *dev, u8 *dst, u8 *next_hop)
225{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300226 int ret;
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);
230 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300231}
232
233static inline int rdev_del_mpath(struct cfg80211_registered_device *rdev,
234 struct net_device *dev, u8 *dst)
235{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300236 int ret;
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);
240 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300241}
242
243static inline int rdev_change_mpath(struct cfg80211_registered_device *rdev,
244 struct net_device *dev, u8 *dst,
245 u8 *next_hop)
246{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300247 int ret;
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);
251 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300252}
253
254static 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)
257{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300258 int ret;
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);
262 return ret;
263
Hila Gonene35e4d22012-06-27 17:19:42 +0300264}
265
266static 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)
269
270{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300271 int ret;
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,
Hila Gonene35e4d22012-06-27 17:19:42 +0300274 pinfo);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300275 trace_rdev_return_int_mpath_info(&rdev->wiphy, ret, pinfo);
276 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300277}
278
279static inline int
280rdev_get_mesh_config(struct cfg80211_registered_device *rdev,
281 struct net_device *dev, struct mesh_config *conf)
282{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300283 int ret;
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);
287 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300288}
289
290static inline int
291rdev_update_mesh_config(struct cfg80211_registered_device *rdev,
292 struct net_device *dev, u32 mask,
293 const struct mesh_config *nconf)
294{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300295 int ret;
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);
299 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300300}
301
302static 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)
306{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300307 int ret;
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);
311 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300312}
313
314
315static inline int rdev_leave_mesh(struct cfg80211_registered_device *rdev,
316 struct net_device *dev)
317{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300318 int ret;
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);
322 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300323}
324
325static inline int rdev_change_bss(struct cfg80211_registered_device *rdev,
326 struct net_device *dev,
327 struct bss_parameters *params)
328
329{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300330 int ret;
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);
334 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300335}
336
337static inline int rdev_set_txq_params(struct cfg80211_registered_device *rdev,
338 struct net_device *dev,
339 struct ieee80211_txq_params *params)
340
341{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300342 int ret;
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);
346 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300347}
348
349static inline int
350rdev_libertas_set_mesh_channel(struct cfg80211_registered_device *rdev,
351 struct net_device *dev,
352 struct ieee80211_channel *chan)
353{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300354 int ret;
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);
358 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300359}
360
361static inline int
362rdev_set_monitor_channel(struct cfg80211_registered_device *rdev,
Johannes Berg683b6d32012-11-08 21:25:48 +0100363 struct cfg80211_chan_def *chandef)
Hila Gonene35e4d22012-06-27 17:19:42 +0300364{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300365 int ret;
Johannes Berg683b6d32012-11-08 21:25:48 +0100366 trace_rdev_set_monitor_channel(&rdev->wiphy, chandef);
367 ret = rdev->ops->set_monitor_channel(&rdev->wiphy, chandef);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300368 trace_rdev_return_int(&rdev->wiphy, ret);
369 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300370}
371
372static inline int rdev_scan(struct cfg80211_registered_device *rdev,
373 struct cfg80211_scan_request *request)
374{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300375 int ret;
376 trace_rdev_scan(&rdev->wiphy, request);
377 ret = rdev->ops->scan(&rdev->wiphy, request);
378 trace_rdev_return_int(&rdev->wiphy, ret);
379 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300380}
381
382static inline int rdev_auth(struct cfg80211_registered_device *rdev,
383 struct net_device *dev,
384 struct cfg80211_auth_request *req)
385{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300386 int ret;
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);
390 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300391}
392
393static inline int rdev_assoc(struct cfg80211_registered_device *rdev,
394 struct net_device *dev,
395 struct cfg80211_assoc_request *req)
396{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300397 int ret;
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);
401 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300402}
403
404static inline int rdev_deauth(struct cfg80211_registered_device *rdev,
405 struct net_device *dev,
406 struct cfg80211_deauth_request *req)
407{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300408 int ret;
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);
412 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300413}
414
415static inline int rdev_disassoc(struct cfg80211_registered_device *rdev,
416 struct net_device *dev,
417 struct cfg80211_disassoc_request *req)
418{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300419 int ret;
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);
423 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300424}
425
426static inline int rdev_connect(struct cfg80211_registered_device *rdev,
427 struct net_device *dev,
428 struct cfg80211_connect_params *sme)
429{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300430 int ret;
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);
434 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300435}
436
437static inline int rdev_disconnect(struct cfg80211_registered_device *rdev,
438 struct net_device *dev, u16 reason_code)
439{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300440 int ret;
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);
444 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300445}
446
447static inline int rdev_join_ibss(struct cfg80211_registered_device *rdev,
448 struct net_device *dev,
449 struct cfg80211_ibss_params *params)
450{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300451 int ret;
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);
455 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300456}
457
458static inline int rdev_leave_ibss(struct cfg80211_registered_device *rdev,
459 struct net_device *dev)
460{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300461 int ret;
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);
465 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300466}
467
468static inline int
469rdev_set_wiphy_params(struct cfg80211_registered_device *rdev, u32 changed)
470{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300471 int ret;
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);
475 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300476}
477
478static inline int rdev_set_tx_power(struct cfg80211_registered_device *rdev,
Johannes Bergc8442112012-10-24 10:17:18 +0200479 struct wireless_dev *wdev,
Hila Gonene35e4d22012-06-27 17:19:42 +0300480 enum nl80211_tx_power_setting type, int mbm)
481{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300482 int ret;
Johannes Bergc8442112012-10-24 10:17:18 +0200483 trace_rdev_set_tx_power(&rdev->wiphy, wdev, type, mbm);
484 ret = rdev->ops->set_tx_power(&rdev->wiphy, wdev, type, mbm);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300485 trace_rdev_return_int(&rdev->wiphy, ret);
486 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300487}
488
489static inline int rdev_get_tx_power(struct cfg80211_registered_device *rdev,
Johannes Bergc8442112012-10-24 10:17:18 +0200490 struct wireless_dev *wdev, int *dbm)
Hila Gonene35e4d22012-06-27 17:19:42 +0300491{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300492 int ret;
Johannes Bergc8442112012-10-24 10:17:18 +0200493 trace_rdev_get_tx_power(&rdev->wiphy, wdev);
494 ret = rdev->ops->get_tx_power(&rdev->wiphy, wdev, dbm);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300495 trace_rdev_return_int_int(&rdev->wiphy, ret, *dbm);
496 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300497}
498
499static inline int rdev_set_wds_peer(struct cfg80211_registered_device *rdev,
500 struct net_device *dev, const u8 *addr)
501{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300502 int ret;
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);
506 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300507}
508
509static inline void rdev_rfkill_poll(struct cfg80211_registered_device *rdev)
510{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300511 trace_rdev_rfkill_poll(&rdev->wiphy);
Hila Gonene35e4d22012-06-27 17:19:42 +0300512 rdev->ops->rfkill_poll(&rdev->wiphy);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300513 trace_rdev_return_void(&rdev->wiphy);
Hila Gonene35e4d22012-06-27 17:19:42 +0300514}
515
516
517#ifdef CONFIG_NL80211_TESTMODE
518static inline int rdev_testmode_cmd(struct cfg80211_registered_device *rdev,
519 void *data, int len)
520{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300521 int ret;
522 trace_rdev_testmode_cmd(&rdev->wiphy);
523 ret = rdev->ops->testmode_cmd(&rdev->wiphy, data, len);
524 trace_rdev_return_int(&rdev->wiphy, ret);
525 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300526}
527
528static inline int rdev_testmode_dump(struct cfg80211_registered_device *rdev,
529 struct sk_buff *skb,
530 struct netlink_callback *cb, void *data,
531 int len)
532{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300533 int ret;
534 trace_rdev_testmode_dump(&rdev->wiphy);
535 ret = rdev->ops->testmode_dump(&rdev->wiphy, skb, cb, data, len);
536 trace_rdev_return_int(&rdev->wiphy, ret);
537 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300538}
539#endif
540
541static inline int
542rdev_set_bitrate_mask(struct cfg80211_registered_device *rdev,
543 struct net_device *dev, const u8 *peer,
544 const struct cfg80211_bitrate_mask *mask)
545{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300546 int ret;
547 trace_rdev_set_bitrate_mask(&rdev->wiphy, dev, peer, mask);
548 ret = rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, peer, mask);
549 trace_rdev_return_int(&rdev->wiphy, ret);
550 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300551}
552
553static inline int rdev_dump_survey(struct cfg80211_registered_device *rdev,
554 struct net_device *netdev, int idx,
555 struct survey_info *info)
556{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300557 int ret;
558 trace_rdev_dump_survey(&rdev->wiphy, netdev, idx);
559 ret = rdev->ops->dump_survey(&rdev->wiphy, netdev, idx, info);
560 if (ret < 0)
561 trace_rdev_return_int(&rdev->wiphy, ret);
562 else
563 trace_rdev_return_int_survey_info(&rdev->wiphy, ret, info);
564 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300565}
566
567static inline int rdev_set_pmksa(struct cfg80211_registered_device *rdev,
568 struct net_device *netdev,
569 struct cfg80211_pmksa *pmksa)
570{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300571 int ret;
572 trace_rdev_set_pmksa(&rdev->wiphy, netdev, pmksa);
573 ret = rdev->ops->set_pmksa(&rdev->wiphy, netdev, pmksa);
574 trace_rdev_return_int(&rdev->wiphy, ret);
575 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300576}
577
578static inline int rdev_del_pmksa(struct cfg80211_registered_device *rdev,
579 struct net_device *netdev,
580 struct cfg80211_pmksa *pmksa)
581{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300582 int ret;
583 trace_rdev_del_pmksa(&rdev->wiphy, netdev, pmksa);
584 ret = rdev->ops->del_pmksa(&rdev->wiphy, netdev, pmksa);
585 trace_rdev_return_int(&rdev->wiphy, ret);
586 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300587}
588
589static inline int rdev_flush_pmksa(struct cfg80211_registered_device *rdev,
590 struct net_device *netdev)
591{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300592 int ret;
593 trace_rdev_flush_pmksa(&rdev->wiphy, netdev);
594 ret = rdev->ops->flush_pmksa(&rdev->wiphy, netdev);
595 trace_rdev_return_int(&rdev->wiphy, ret);
596 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300597}
598
599static inline int
600rdev_remain_on_channel(struct cfg80211_registered_device *rdev,
601 struct wireless_dev *wdev,
602 struct ieee80211_channel *chan,
Hila Gonene35e4d22012-06-27 17:19:42 +0300603 unsigned int duration, u64 *cookie)
604{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300605 int ret;
Johannes Berg42d97a52012-11-08 18:31:02 +0100606 trace_rdev_remain_on_channel(&rdev->wiphy, wdev, chan, duration);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300607 ret = rdev->ops->remain_on_channel(&rdev->wiphy, wdev, chan,
Johannes Berg42d97a52012-11-08 18:31:02 +0100608 duration, cookie);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300609 trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie);
610 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300611}
612
613static inline int
614rdev_cancel_remain_on_channel(struct cfg80211_registered_device *rdev,
615 struct wireless_dev *wdev, u64 cookie)
616{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300617 int ret;
618 trace_rdev_cancel_remain_on_channel(&rdev->wiphy, wdev, cookie);
619 ret = rdev->ops->cancel_remain_on_channel(&rdev->wiphy, wdev, cookie);
620 trace_rdev_return_int(&rdev->wiphy, ret);
621 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300622}
623
624static inline int rdev_mgmt_tx(struct cfg80211_registered_device *rdev,
625 struct wireless_dev *wdev,
626 struct ieee80211_channel *chan, bool offchan,
Johannes Berg42d97a52012-11-08 18:31:02 +0100627 unsigned int wait, const u8 *buf, size_t len,
628 bool no_cck, bool dont_wait_for_ack, u64 *cookie)
Hila Gonene35e4d22012-06-27 17:19:42 +0300629{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300630 int ret;
Johannes Berg42d97a52012-11-08 18:31:02 +0100631 trace_rdev_mgmt_tx(&rdev->wiphy, wdev, chan, offchan,
632 wait, no_cck, dont_wait_for_ack);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300633 ret = rdev->ops->mgmt_tx(&rdev->wiphy, wdev, chan, offchan,
Johannes Berg42d97a52012-11-08 18:31:02 +0100634 wait, buf, len, no_cck,
635 dont_wait_for_ack, cookie);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300636 trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie);
637 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300638}
639
640static inline int
641rdev_mgmt_tx_cancel_wait(struct cfg80211_registered_device *rdev,
642 struct wireless_dev *wdev, u64 cookie)
643{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300644 int ret;
645 trace_rdev_mgmt_tx_cancel_wait(&rdev->wiphy, wdev, cookie);
646 ret = rdev->ops->mgmt_tx_cancel_wait(&rdev->wiphy, wdev, cookie);
647 trace_rdev_return_int(&rdev->wiphy, ret);
648 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300649}
650
651static inline int rdev_set_power_mgmt(struct cfg80211_registered_device *rdev,
652 struct net_device *dev, bool enabled,
653 int timeout)
654{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300655 int ret;
656 trace_rdev_set_power_mgmt(&rdev->wiphy, dev, enabled, timeout);
657 ret = rdev->ops->set_power_mgmt(&rdev->wiphy, dev, enabled, timeout);
658 trace_rdev_return_int(&rdev->wiphy, ret);
659 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300660}
661
662static inline int
663rdev_set_cqm_rssi_config(struct cfg80211_registered_device *rdev,
664 struct net_device *dev, s32 rssi_thold, u32 rssi_hyst)
665{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300666 int ret;
667 trace_rdev_set_cqm_rssi_config(&rdev->wiphy, dev, rssi_thold,
668 rssi_hyst);
669 ret = rdev->ops->set_cqm_rssi_config(&rdev->wiphy, dev, rssi_thold,
670 rssi_hyst);
671 trace_rdev_return_int(&rdev->wiphy, ret);
672 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300673}
674
675static inline int
676rdev_set_cqm_txe_config(struct cfg80211_registered_device *rdev,
677 struct net_device *dev, u32 rate, u32 pkts, u32 intvl)
678{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300679 int ret;
680 trace_rdev_set_cqm_txe_config(&rdev->wiphy, dev, rate, pkts, intvl);
681 ret = rdev->ops->set_cqm_txe_config(&rdev->wiphy, dev, rate, pkts,
Hila Gonene35e4d22012-06-27 17:19:42 +0300682 intvl);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300683 trace_rdev_return_int(&rdev->wiphy, ret);
684 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300685}
686
687static inline void
688rdev_mgmt_frame_register(struct cfg80211_registered_device *rdev,
689 struct wireless_dev *wdev, u16 frame_type, bool reg)
690{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300691 trace_rdev_mgmt_frame_register(&rdev->wiphy, wdev , frame_type, reg);
692 rdev->ops->mgmt_frame_register(&rdev->wiphy, wdev , frame_type, reg);
693 trace_rdev_return_void(&rdev->wiphy);
Hila Gonene35e4d22012-06-27 17:19:42 +0300694}
695
696static inline int rdev_set_antenna(struct cfg80211_registered_device *rdev,
697 u32 tx_ant, u32 rx_ant)
698{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300699 int ret;
700 trace_rdev_set_antenna(&rdev->wiphy, tx_ant, rx_ant);
701 ret = rdev->ops->set_antenna(&rdev->wiphy, tx_ant, rx_ant);
702 trace_rdev_return_int(&rdev->wiphy, ret);
703 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300704}
705
706static inline int rdev_get_antenna(struct cfg80211_registered_device *rdev,
707 u32 *tx_ant, u32 *rx_ant)
708{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300709 int ret;
710 trace_rdev_get_antenna(&rdev->wiphy);
711 ret = rdev->ops->get_antenna(&rdev->wiphy, tx_ant, rx_ant);
712 if (ret)
713 trace_rdev_return_int(&rdev->wiphy, ret);
714 else
715 trace_rdev_return_int_tx_rx(&rdev->wiphy, ret, *tx_ant,
716 *rx_ant);
717 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300718}
719
720static inline int rdev_set_ringparam(struct cfg80211_registered_device *rdev,
721 u32 tx, u32 rx)
722{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300723 int ret;
724 trace_rdev_set_ringparam(&rdev->wiphy, tx, rx);
725 ret = rdev->ops->set_ringparam(&rdev->wiphy, tx, rx);
726 trace_rdev_return_int(&rdev->wiphy, ret);
727 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300728}
729
730static inline void rdev_get_ringparam(struct cfg80211_registered_device *rdev,
731 u32 *tx, u32 *tx_max, u32 *rx,
732 u32 *rx_max)
733{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300734 trace_rdev_get_ringparam(&rdev->wiphy);
Hila Gonene35e4d22012-06-27 17:19:42 +0300735 rdev->ops->get_ringparam(&rdev->wiphy, tx, tx_max, rx, rx_max);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300736 trace_rdev_return_void_tx_rx(&rdev->wiphy, *tx, *tx_max, *rx, *rx_max);
Hila Gonene35e4d22012-06-27 17:19:42 +0300737}
738
739static inline int
740rdev_sched_scan_start(struct cfg80211_registered_device *rdev,
741 struct net_device *dev,
742 struct cfg80211_sched_scan_request *request)
743{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300744 int ret;
745 trace_rdev_sched_scan_start(&rdev->wiphy, dev, request);
746 ret = rdev->ops->sched_scan_start(&rdev->wiphy, dev, request);
747 trace_rdev_return_int(&rdev->wiphy, ret);
748 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300749}
750
751static inline int rdev_sched_scan_stop(struct cfg80211_registered_device *rdev,
752 struct net_device *dev)
753{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300754 int ret;
755 trace_rdev_sched_scan_stop(&rdev->wiphy, dev);
756 ret = rdev->ops->sched_scan_stop(&rdev->wiphy, dev);
757 trace_rdev_return_int(&rdev->wiphy, ret);
758 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300759}
760
761static inline int rdev_set_rekey_data(struct cfg80211_registered_device *rdev,
762 struct net_device *dev,
763 struct cfg80211_gtk_rekey_data *data)
764{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300765 int ret;
766 trace_rdev_set_rekey_data(&rdev->wiphy, dev);
767 ret = rdev->ops->set_rekey_data(&rdev->wiphy, dev, data);
768 trace_rdev_return_int(&rdev->wiphy, ret);
769 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300770}
771
772static inline int rdev_tdls_mgmt(struct cfg80211_registered_device *rdev,
773 struct net_device *dev, u8 *peer,
774 u8 action_code, u8 dialog_token,
775 u16 status_code, const u8 *buf, size_t len)
776{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300777 int ret;
778 trace_rdev_tdls_mgmt(&rdev->wiphy, dev, peer, action_code,
779 dialog_token, status_code, buf, len);
780 ret = rdev->ops->tdls_mgmt(&rdev->wiphy, dev, peer, action_code,
781 dialog_token, status_code, buf, len);
782 trace_rdev_return_int(&rdev->wiphy, ret);
783 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300784}
785
786static inline int rdev_tdls_oper(struct cfg80211_registered_device *rdev,
787 struct net_device *dev, u8 *peer,
788 enum nl80211_tdls_operation oper)
789{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300790 int ret;
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);
794 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300795}
796
797static inline int rdev_probe_client(struct cfg80211_registered_device *rdev,
798 struct net_device *dev, const u8 *peer,
799 u64 *cookie)
800{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300801 int ret;
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);
805 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300806}
807
808static inline int rdev_set_noack_map(struct cfg80211_registered_device *rdev,
809 struct net_device *dev, u16 noack_map)
810{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300811 int ret;
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);
815 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300816}
817
818static inline int
819rdev_get_et_sset_count(struct cfg80211_registered_device *rdev,
820 struct net_device *dev, int sset)
821{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300822 int ret;
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);
826 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300827}
828
829static inline void rdev_get_et_stats(struct cfg80211_registered_device *rdev,
830 struct net_device *dev,
831 struct ethtool_stats *stats, u64 *data)
832{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300833 trace_rdev_get_et_stats(&rdev->wiphy, dev);
Hila Gonene35e4d22012-06-27 17:19:42 +0300834 rdev->ops->get_et_stats(&rdev->wiphy, dev, stats, data);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300835 trace_rdev_return_void(&rdev->wiphy);
Hila Gonene35e4d22012-06-27 17:19:42 +0300836}
837
838static inline void rdev_get_et_strings(struct cfg80211_registered_device *rdev,
839 struct net_device *dev, u32 sset,
840 u8 *data)
841{
Beni Lev14e8a3c2012-07-31 18:48:27 +0300842 trace_rdev_get_et_strings(&rdev->wiphy, dev, sset);
Hila Gonene35e4d22012-06-27 17:19:42 +0300843 rdev->ops->get_et_strings(&rdev->wiphy, dev, sset, data);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300844 trace_rdev_return_void(&rdev->wiphy);
Hila Gonene35e4d22012-06-27 17:19:42 +0300845}
846
Johannes Berg683b6d32012-11-08 21:25:48 +0100847static inline int
848rdev_get_channel(struct cfg80211_registered_device *rdev,
849 struct wireless_dev *wdev,
850 struct cfg80211_chan_def *chandef)
Hila Gonene35e4d22012-06-27 17:19:42 +0300851{
Johannes Berg683b6d32012-11-08 21:25:48 +0100852 int ret;
853
Beni Lev14e8a3c2012-07-31 18:48:27 +0300854 trace_rdev_get_channel(&rdev->wiphy, wdev);
Johannes Berg683b6d32012-11-08 21:25:48 +0100855 ret = rdev->ops->get_channel(&rdev->wiphy, wdev, chandef);
856 trace_rdev_return_chandef(&rdev->wiphy, ret, chandef);
857
Beni Lev14e8a3c2012-07-31 18:48:27 +0300858 return ret;
Hila Gonene35e4d22012-06-27 17:19:42 +0300859}
860
Johannes Bergeeb126e2012-10-23 15:16:50 +0200861static inline int rdev_start_p2p_device(struct cfg80211_registered_device *rdev,
862 struct wireless_dev *wdev)
863{
864 int ret;
865
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);
869 return ret;
870}
871
872static inline void rdev_stop_p2p_device(struct cfg80211_registered_device *rdev,
873 struct wireless_dev *wdev)
874{
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);
Arend van Spriel5de17982013-04-18 15:49:00 +0200878}
Vasanthakumar Thiagarajan77765ea2013-01-18 11:18:45 +0530879
880static inline int rdev_set_mac_acl(struct cfg80211_registered_device *rdev,
881 struct net_device *dev,
882 struct cfg80211_acl_data *params)
883{
884 int ret;
885
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);
889 return ret;
890}
Jouni Malinen355199e2013-02-27 17:14:27 +0200891
892static inline int rdev_update_ft_ies(struct cfg80211_registered_device *rdev,
893 struct net_device *dev,
894 struct cfg80211_update_ft_ies_params *ftie)
895{
896 int ret;
897
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);
901 return ret;
902}
903
Arend van Spriel5de17982013-04-18 15:49:00 +0200904static inline int rdev_crit_proto_start(struct cfg80211_registered_device *rdev,
905 struct wireless_dev *wdev,
906 enum nl80211_crit_proto_id protocol,
907 u16 duration)
908{
909 int ret;
910
911 trace_rdev_crit_proto_start(&rdev->wiphy, wdev, protocol, duration);
912 ret = rdev->ops->crit_proto_start(&rdev->wiphy, wdev,
913 protocol, duration);
914 trace_rdev_return_int(&rdev->wiphy, ret);
915 return ret;
916}
917
918static inline void rdev_crit_proto_stop(struct cfg80211_registered_device *rdev,
919 struct wireless_dev *wdev)
920{
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);
924}
925
Hila Gonene35e4d22012-06-27 17:19:42 +0300926#endif /* __CFG80211_RDEV_OPS */