cfg80211/mac80211: add netdev param to set_txq_params()
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / net / mac80211 / driver-ops.h
CommitLineData
24487981
JB
1#ifndef __MAC80211_DRIVER_OPS
2#define __MAC80211_DRIVER_OPS
3
4#include <net/mac80211.h>
5#include "ieee80211_i.h"
0a2b8bb2 6#include "driver-trace.h"
24487981 7
7bb45683 8static inline void drv_tx(struct ieee80211_local *local, struct sk_buff *skb)
24487981 9{
7bb45683 10 local->ops->tx(&local->hw, skb);
24487981
JB
11}
12
13static inline int drv_start(struct ieee80211_local *local)
14{
ea77f12f
JB
15 int ret;
16
e1781ed3
KV
17 might_sleep();
18
4efc76bd 19 trace_drv_start(local);
ea77f12f
JB
20 local->started = true;
21 smp_mb();
22 ret = local->ops->start(&local->hw);
4efc76bd 23 trace_drv_return_int(local, ret);
0a2b8bb2 24 return ret;
24487981
JB
25}
26
27static inline void drv_stop(struct ieee80211_local *local)
28{
e1781ed3
KV
29 might_sleep();
30
0a2b8bb2 31 trace_drv_stop(local);
4efc76bd
JB
32 local->ops->stop(&local->hw);
33 trace_drv_return_void(local);
ea77f12f
JB
34
35 /* sync away all work on the tasklet before clearing started */
36 tasklet_disable(&local->tasklet);
37 tasklet_enable(&local->tasklet);
38
39 barrier();
40
41 local->started = false;
24487981
JB
42}
43
eecc4800
JB
44#ifdef CONFIG_PM
45static inline int drv_suspend(struct ieee80211_local *local,
46 struct cfg80211_wowlan *wowlan)
47{
48 int ret;
49
50 might_sleep();
51
52 trace_drv_suspend(local);
53 ret = local->ops->suspend(&local->hw, wowlan);
54 trace_drv_return_int(local, ret);
55 return ret;
56}
57
58static inline int drv_resume(struct ieee80211_local *local)
59{
60 int ret;
61
62 might_sleep();
63
64 trace_drv_resume(local);
65 ret = local->ops->resume(&local->hw);
66 trace_drv_return_int(local, ret);
67 return ret;
68}
69#endif
70
24487981 71static inline int drv_add_interface(struct ieee80211_local *local,
1ed32e4f 72 struct ieee80211_vif *vif)
24487981 73{
e1781ed3
KV
74 int ret;
75
76 might_sleep();
77
4efc76bd 78 trace_drv_add_interface(local, vif_to_sdata(vif));
e1781ed3 79 ret = local->ops->add_interface(&local->hw, vif);
4efc76bd 80 trace_drv_return_int(local, ret);
0a2b8bb2 81 return ret;
24487981
JB
82}
83
34d4bc4d
JB
84static inline int drv_change_interface(struct ieee80211_local *local,
85 struct ieee80211_sub_if_data *sdata,
2ca27bcf 86 enum nl80211_iftype type, bool p2p)
34d4bc4d
JB
87{
88 int ret;
89
90 might_sleep();
91
2ca27bcf
JB
92 trace_drv_change_interface(local, sdata, type, p2p);
93 ret = local->ops->change_interface(&local->hw, &sdata->vif, type, p2p);
34d4bc4d
JB
94 trace_drv_return_int(local, ret);
95 return ret;
96}
97
24487981 98static inline void drv_remove_interface(struct ieee80211_local *local,
1ed32e4f 99 struct ieee80211_vif *vif)
24487981 100{
e1781ed3
KV
101 might_sleep();
102
1ed32e4f 103 trace_drv_remove_interface(local, vif_to_sdata(vif));
4efc76bd
JB
104 local->ops->remove_interface(&local->hw, vif);
105 trace_drv_return_void(local);
24487981
JB
106}
107
108static inline int drv_config(struct ieee80211_local *local, u32 changed)
109{
e1781ed3
KV
110 int ret;
111
112 might_sleep();
113
4efc76bd 114 trace_drv_config(local, changed);
e1781ed3 115 ret = local->ops->config(&local->hw, changed);
4efc76bd 116 trace_drv_return_int(local, ret);
0a2b8bb2 117 return ret;
24487981
JB
118}
119
120static inline void drv_bss_info_changed(struct ieee80211_local *local,
12375ef9 121 struct ieee80211_sub_if_data *sdata,
24487981
JB
122 struct ieee80211_bss_conf *info,
123 u32 changed)
124{
e1781ed3
KV
125 might_sleep();
126
4efc76bd 127 trace_drv_bss_info_changed(local, sdata, info, changed);
24487981 128 if (local->ops->bss_info_changed)
12375ef9 129 local->ops->bss_info_changed(&local->hw, &sdata->vif, info, changed);
4efc76bd 130 trace_drv_return_void(local);
24487981
JB
131}
132
b2abb6e2
JB
133static inline int drv_tx_sync(struct ieee80211_local *local,
134 struct ieee80211_sub_if_data *sdata,
135 const u8 *bssid,
136 enum ieee80211_tx_sync_type type)
137{
138 int ret = 0;
139
140 might_sleep();
141
142 trace_drv_tx_sync(local, sdata, bssid, type);
143 if (local->ops->tx_sync)
144 ret = local->ops->tx_sync(&local->hw, &sdata->vif,
145 bssid, type);
146 trace_drv_return_int(local, ret);
147 return ret;
148}
149
150static inline void drv_finish_tx_sync(struct ieee80211_local *local,
151 struct ieee80211_sub_if_data *sdata,
152 const u8 *bssid,
153 enum ieee80211_tx_sync_type type)
154{
155 might_sleep();
156
157 trace_drv_finish_tx_sync(local, sdata, bssid, type);
158 if (local->ops->finish_tx_sync)
159 local->ops->finish_tx_sync(&local->hw, &sdata->vif,
160 bssid, type);
161 trace_drv_return_void(local);
162}
163
3ac64bee 164static inline u64 drv_prepare_multicast(struct ieee80211_local *local,
22bedad3 165 struct netdev_hw_addr_list *mc_list)
3ac64bee
JB
166{
167 u64 ret = 0;
168
4efc76bd
JB
169 trace_drv_prepare_multicast(local, mc_list->count);
170
3ac64bee 171 if (local->ops->prepare_multicast)
22bedad3 172 ret = local->ops->prepare_multicast(&local->hw, mc_list);
3ac64bee 173
4efc76bd 174 trace_drv_return_u64(local, ret);
3ac64bee
JB
175
176 return ret;
177}
178
24487981
JB
179static inline void drv_configure_filter(struct ieee80211_local *local,
180 unsigned int changed_flags,
181 unsigned int *total_flags,
3ac64bee 182 u64 multicast)
24487981 183{
3ac64bee
JB
184 might_sleep();
185
0a2b8bb2 186 trace_drv_configure_filter(local, changed_flags, total_flags,
3ac64bee 187 multicast);
4efc76bd
JB
188 local->ops->configure_filter(&local->hw, changed_flags, total_flags,
189 multicast);
190 trace_drv_return_void(local);
24487981
JB
191}
192
193static inline int drv_set_tim(struct ieee80211_local *local,
194 struct ieee80211_sta *sta, bool set)
195{
0a2b8bb2 196 int ret = 0;
4efc76bd 197 trace_drv_set_tim(local, sta, set);
24487981 198 if (local->ops->set_tim)
0a2b8bb2 199 ret = local->ops->set_tim(&local->hw, sta, set);
4efc76bd 200 trace_drv_return_int(local, ret);
0a2b8bb2 201 return ret;
24487981
JB
202}
203
204static inline int drv_set_key(struct ieee80211_local *local,
12375ef9
JB
205 enum set_key_cmd cmd,
206 struct ieee80211_sub_if_data *sdata,
24487981
JB
207 struct ieee80211_sta *sta,
208 struct ieee80211_key_conf *key)
209{
e1781ed3
KV
210 int ret;
211
212 might_sleep();
213
4efc76bd 214 trace_drv_set_key(local, cmd, sdata, sta, key);
e1781ed3 215 ret = local->ops->set_key(&local->hw, cmd, &sdata->vif, sta, key);
4efc76bd 216 trace_drv_return_int(local, ret);
0a2b8bb2 217 return ret;
24487981
JB
218}
219
220static inline void drv_update_tkip_key(struct ieee80211_local *local,
b3fbdcf4 221 struct ieee80211_sub_if_data *sdata,
24487981 222 struct ieee80211_key_conf *conf,
b3fbdcf4 223 struct sta_info *sta, u32 iv32,
24487981
JB
224 u16 *phase1key)
225{
b3fbdcf4
JB
226 struct ieee80211_sta *ista = NULL;
227
b3fbdcf4
JB
228 if (sta)
229 ista = &sta->sta;
230
4efc76bd 231 trace_drv_update_tkip_key(local, sdata, conf, ista, iv32);
24487981 232 if (local->ops->update_tkip_key)
b3fbdcf4
JB
233 local->ops->update_tkip_key(&local->hw, &sdata->vif, conf,
234 ista, iv32, phase1key);
4efc76bd 235 trace_drv_return_void(local);
24487981
JB
236}
237
238static inline int drv_hw_scan(struct ieee80211_local *local,
a060bbfe 239 struct ieee80211_sub_if_data *sdata,
24487981
JB
240 struct cfg80211_scan_request *req)
241{
e1781ed3
KV
242 int ret;
243
244 might_sleep();
245
79f460ca 246 trace_drv_hw_scan(local, sdata);
a060bbfe 247 ret = local->ops->hw_scan(&local->hw, &sdata->vif, req);
4efc76bd 248 trace_drv_return_int(local, ret);
0a2b8bb2 249 return ret;
24487981
JB
250}
251
b856439b
EP
252static inline void drv_cancel_hw_scan(struct ieee80211_local *local,
253 struct ieee80211_sub_if_data *sdata)
254{
255 might_sleep();
256
257 trace_drv_cancel_hw_scan(local, sdata);
258 local->ops->cancel_hw_scan(&local->hw, &sdata->vif);
259 trace_drv_return_void(local);
260}
261
79f460ca
LC
262static inline int
263drv_sched_scan_start(struct ieee80211_local *local,
264 struct ieee80211_sub_if_data *sdata,
265 struct cfg80211_sched_scan_request *req,
266 struct ieee80211_sched_scan_ies *ies)
267{
268 int ret;
269
270 might_sleep();
271
272 trace_drv_sched_scan_start(local, sdata);
273 ret = local->ops->sched_scan_start(&local->hw, &sdata->vif,
274 req, ies);
275 trace_drv_return_int(local, ret);
276 return ret;
277}
278
279static inline void drv_sched_scan_stop(struct ieee80211_local *local,
280 struct ieee80211_sub_if_data *sdata)
281{
282 might_sleep();
283
284 trace_drv_sched_scan_stop(local, sdata);
285 local->ops->sched_scan_stop(&local->hw, &sdata->vif);
286 trace_drv_return_void(local);
287}
288
24487981
JB
289static inline void drv_sw_scan_start(struct ieee80211_local *local)
290{
e1781ed3
KV
291 might_sleep();
292
4efc76bd 293 trace_drv_sw_scan_start(local);
24487981
JB
294 if (local->ops->sw_scan_start)
295 local->ops->sw_scan_start(&local->hw);
4efc76bd 296 trace_drv_return_void(local);
24487981
JB
297}
298
299static inline void drv_sw_scan_complete(struct ieee80211_local *local)
300{
e1781ed3
KV
301 might_sleep();
302
4efc76bd 303 trace_drv_sw_scan_complete(local);
24487981
JB
304 if (local->ops->sw_scan_complete)
305 local->ops->sw_scan_complete(&local->hw);
4efc76bd 306 trace_drv_return_void(local);
24487981
JB
307}
308
309static inline int drv_get_stats(struct ieee80211_local *local,
310 struct ieee80211_low_level_stats *stats)
311{
0a2b8bb2
JB
312 int ret = -EOPNOTSUPP;
313
e1781ed3
KV
314 might_sleep();
315
0a2b8bb2
JB
316 if (local->ops->get_stats)
317 ret = local->ops->get_stats(&local->hw, stats);
318 trace_drv_get_stats(local, stats, ret);
319
320 return ret;
24487981
JB
321}
322
323static inline void drv_get_tkip_seq(struct ieee80211_local *local,
324 u8 hw_key_idx, u32 *iv32, u16 *iv16)
325{
326 if (local->ops->get_tkip_seq)
327 local->ops->get_tkip_seq(&local->hw, hw_key_idx, iv32, iv16);
0a2b8bb2 328 trace_drv_get_tkip_seq(local, hw_key_idx, iv32, iv16);
24487981
JB
329}
330
f23a4780
AN
331static inline int drv_set_frag_threshold(struct ieee80211_local *local,
332 u32 value)
333{
334 int ret = 0;
335
336 might_sleep();
337
338 trace_drv_set_frag_threshold(local, value);
339 if (local->ops->set_frag_threshold)
340 ret = local->ops->set_frag_threshold(&local->hw, value);
341 trace_drv_return_int(local, ret);
342 return ret;
343}
344
24487981
JB
345static inline int drv_set_rts_threshold(struct ieee80211_local *local,
346 u32 value)
347{
0a2b8bb2 348 int ret = 0;
e1781ed3
KV
349
350 might_sleep();
351
4efc76bd 352 trace_drv_set_rts_threshold(local, value);
24487981 353 if (local->ops->set_rts_threshold)
0a2b8bb2 354 ret = local->ops->set_rts_threshold(&local->hw, value);
4efc76bd 355 trace_drv_return_int(local, ret);
0a2b8bb2 356 return ret;
24487981
JB
357}
358
310bc676
LT
359static inline int drv_set_coverage_class(struct ieee80211_local *local,
360 u8 value)
361{
362 int ret = 0;
363 might_sleep();
364
4efc76bd 365 trace_drv_set_coverage_class(local, value);
310bc676
LT
366 if (local->ops->set_coverage_class)
367 local->ops->set_coverage_class(&local->hw, value);
368 else
369 ret = -EOPNOTSUPP;
370
4efc76bd 371 trace_drv_return_int(local, ret);
310bc676
LT
372 return ret;
373}
374
24487981 375static inline void drv_sta_notify(struct ieee80211_local *local,
12375ef9 376 struct ieee80211_sub_if_data *sdata,
24487981
JB
377 enum sta_notify_cmd cmd,
378 struct ieee80211_sta *sta)
379{
4efc76bd 380 trace_drv_sta_notify(local, sdata, cmd, sta);
24487981 381 if (local->ops->sta_notify)
12375ef9 382 local->ops->sta_notify(&local->hw, &sdata->vif, cmd, sta);
4efc76bd 383 trace_drv_return_void(local);
24487981
JB
384}
385
34e89507
JB
386static inline int drv_sta_add(struct ieee80211_local *local,
387 struct ieee80211_sub_if_data *sdata,
388 struct ieee80211_sta *sta)
389{
390 int ret = 0;
391
392 might_sleep();
393
4efc76bd 394 trace_drv_sta_add(local, sdata, sta);
34e89507
JB
395 if (local->ops->sta_add)
396 ret = local->ops->sta_add(&local->hw, &sdata->vif, sta);
34e89507 397
4efc76bd 398 trace_drv_return_int(local, ret);
34e89507
JB
399
400 return ret;
401}
402
403static inline void drv_sta_remove(struct ieee80211_local *local,
404 struct ieee80211_sub_if_data *sdata,
405 struct ieee80211_sta *sta)
406{
407 might_sleep();
408
4efc76bd 409 trace_drv_sta_remove(local, sdata, sta);
34e89507
JB
410 if (local->ops->sta_remove)
411 local->ops->sta_remove(&local->hw, &sdata->vif, sta);
34e89507 412
4efc76bd 413 trace_drv_return_void(local);
34e89507
JB
414}
415
24487981
JB
416static inline int drv_conf_tx(struct ieee80211_local *local, u16 queue,
417 const struct ieee80211_tx_queue_params *params)
418{
0a2b8bb2 419 int ret = -EOPNOTSUPP;
e1781ed3
KV
420
421 might_sleep();
422
4efc76bd 423 trace_drv_conf_tx(local, queue, params);
24487981 424 if (local->ops->conf_tx)
0a2b8bb2 425 ret = local->ops->conf_tx(&local->hw, queue, params);
4efc76bd 426 trace_drv_return_int(local, ret);
0a2b8bb2 427 return ret;
24487981
JB
428}
429
37a41b4a
EP
430static inline u64 drv_get_tsf(struct ieee80211_local *local,
431 struct ieee80211_sub_if_data *sdata)
24487981 432{
0a2b8bb2 433 u64 ret = -1ULL;
e1781ed3
KV
434
435 might_sleep();
436
37a41b4a 437 trace_drv_get_tsf(local, sdata);
24487981 438 if (local->ops->get_tsf)
37a41b4a 439 ret = local->ops->get_tsf(&local->hw, &sdata->vif);
4efc76bd 440 trace_drv_return_u64(local, ret);
0a2b8bb2 441 return ret;
24487981
JB
442}
443
37a41b4a
EP
444static inline void drv_set_tsf(struct ieee80211_local *local,
445 struct ieee80211_sub_if_data *sdata,
446 u64 tsf)
24487981 447{
e1781ed3
KV
448 might_sleep();
449
37a41b4a 450 trace_drv_set_tsf(local, sdata, tsf);
24487981 451 if (local->ops->set_tsf)
37a41b4a 452 local->ops->set_tsf(&local->hw, &sdata->vif, tsf);
4efc76bd 453 trace_drv_return_void(local);
24487981
JB
454}
455
37a41b4a
EP
456static inline void drv_reset_tsf(struct ieee80211_local *local,
457 struct ieee80211_sub_if_data *sdata)
24487981 458{
e1781ed3
KV
459 might_sleep();
460
37a41b4a 461 trace_drv_reset_tsf(local, sdata);
24487981 462 if (local->ops->reset_tsf)
37a41b4a 463 local->ops->reset_tsf(&local->hw, &sdata->vif);
4efc76bd 464 trace_drv_return_void(local);
24487981
JB
465}
466
467static inline int drv_tx_last_beacon(struct ieee80211_local *local)
468{
91f44b02 469 int ret = 0; /* default unsuported op for less congestion */
e1781ed3
KV
470
471 might_sleep();
472
4efc76bd 473 trace_drv_tx_last_beacon(local);
24487981 474 if (local->ops->tx_last_beacon)
0a2b8bb2 475 ret = local->ops->tx_last_beacon(&local->hw);
4efc76bd 476 trace_drv_return_int(local, ret);
0a2b8bb2 477 return ret;
24487981
JB
478}
479
480static inline int drv_ampdu_action(struct ieee80211_local *local,
12375ef9 481 struct ieee80211_sub_if_data *sdata,
24487981
JB
482 enum ieee80211_ampdu_mlme_action action,
483 struct ieee80211_sta *sta, u16 tid,
0b01f030 484 u16 *ssn, u8 buf_size)
24487981 485{
0a2b8bb2 486 int ret = -EOPNOTSUPP;
cfcdbde3
JB
487
488 might_sleep();
489
0b01f030 490 trace_drv_ampdu_action(local, sdata, action, sta, tid, ssn, buf_size);
4efc76bd 491
24487981 492 if (local->ops->ampdu_action)
12375ef9 493 ret = local->ops->ampdu_action(&local->hw, &sdata->vif, action,
0b01f030 494 sta, tid, ssn, buf_size);
85ad181e 495
4efc76bd
JB
496 trace_drv_return_int(local, ret);
497
0a2b8bb2 498 return ret;
24487981 499}
1f87f7d3 500
1289723e
HS
501static inline int drv_get_survey(struct ieee80211_local *local, int idx,
502 struct survey_info *survey)
503{
504 int ret = -EOPNOTSUPP;
c466d4ef
JL
505
506 trace_drv_get_survey(local, idx, survey);
507
35dd0509 508 if (local->ops->get_survey)
1289723e 509 ret = local->ops->get_survey(&local->hw, idx, survey);
c466d4ef
JL
510
511 trace_drv_return_int(local, ret);
512
1289723e
HS
513 return ret;
514}
1f87f7d3
JB
515
516static inline void drv_rfkill_poll(struct ieee80211_local *local)
517{
e1781ed3
KV
518 might_sleep();
519
1f87f7d3
JB
520 if (local->ops->rfkill_poll)
521 local->ops->rfkill_poll(&local->hw);
522}
a80f7c0b
JB
523
524static inline void drv_flush(struct ieee80211_local *local, bool drop)
525{
e1781ed3
KV
526 might_sleep();
527
a80f7c0b
JB
528 trace_drv_flush(local, drop);
529 if (local->ops->flush)
530 local->ops->flush(&local->hw, drop);
4efc76bd 531 trace_drv_return_void(local);
a80f7c0b 532}
5ce6e438
JB
533
534static inline void drv_channel_switch(struct ieee80211_local *local,
535 struct ieee80211_channel_switch *ch_switch)
536{
537 might_sleep();
538
5ce6e438 539 trace_drv_channel_switch(local, ch_switch);
4efc76bd
JB
540 local->ops->channel_switch(&local->hw, ch_switch);
541 trace_drv_return_void(local);
5ce6e438
JB
542}
543
15d96753
BR
544
545static inline int drv_set_antenna(struct ieee80211_local *local,
546 u32 tx_ant, u32 rx_ant)
547{
548 int ret = -EOPNOTSUPP;
549 might_sleep();
550 if (local->ops->set_antenna)
551 ret = local->ops->set_antenna(&local->hw, tx_ant, rx_ant);
552 trace_drv_set_antenna(local, tx_ant, rx_ant, ret);
553 return ret;
554}
555
556static inline int drv_get_antenna(struct ieee80211_local *local,
557 u32 *tx_ant, u32 *rx_ant)
558{
559 int ret = -EOPNOTSUPP;
560 might_sleep();
561 if (local->ops->get_antenna)
562 ret = local->ops->get_antenna(&local->hw, tx_ant, rx_ant);
563 trace_drv_get_antenna(local, *tx_ant, *rx_ant, ret);
564 return ret;
565}
566
21f83589
JB
567static inline int drv_remain_on_channel(struct ieee80211_local *local,
568 struct ieee80211_channel *chan,
569 enum nl80211_channel_type chantype,
570 unsigned int duration)
571{
572 int ret;
573
574 might_sleep();
575
576 trace_drv_remain_on_channel(local, chan, chantype, duration);
577 ret = local->ops->remain_on_channel(&local->hw, chan, chantype,
578 duration);
579 trace_drv_return_int(local, ret);
580
581 return ret;
582}
583
584static inline int drv_cancel_remain_on_channel(struct ieee80211_local *local)
585{
586 int ret;
587
588 might_sleep();
589
590 trace_drv_cancel_remain_on_channel(local);
591 ret = local->ops->cancel_remain_on_channel(&local->hw);
592 trace_drv_return_int(local, ret);
5f16a436
JB
593
594 return ret;
595}
596
38c09159
JL
597static inline int drv_set_ringparam(struct ieee80211_local *local,
598 u32 tx, u32 rx)
599{
600 int ret = -ENOTSUPP;
601
602 might_sleep();
603
604 trace_drv_set_ringparam(local, tx, rx);
605 if (local->ops->set_ringparam)
606 ret = local->ops->set_ringparam(&local->hw, tx, rx);
607 trace_drv_return_int(local, ret);
608
609 return ret;
610}
611
612static inline void drv_get_ringparam(struct ieee80211_local *local,
613 u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max)
614{
615 might_sleep();
616
617 trace_drv_get_ringparam(local, tx, tx_max, rx, rx_max);
618 if (local->ops->get_ringparam)
619 local->ops->get_ringparam(&local->hw, tx, tx_max, rx, rx_max);
620 trace_drv_return_void(local);
621}
622
e8306f98
VN
623static inline bool drv_tx_frames_pending(struct ieee80211_local *local)
624{
625 bool ret = false;
626
627 might_sleep();
628
629 trace_drv_tx_frames_pending(local);
630 if (local->ops->tx_frames_pending)
631 ret = local->ops->tx_frames_pending(&local->hw);
632 trace_drv_return_bool(local, ret);
633
634 return ret;
635}
bdbfd6b5
SM
636
637static inline int drv_set_bitrate_mask(struct ieee80211_local *local,
638 struct ieee80211_sub_if_data *sdata,
639 const struct cfg80211_bitrate_mask *mask)
640{
641 int ret = -EOPNOTSUPP;
642
643 might_sleep();
644
645 trace_drv_set_bitrate_mask(local, sdata, mask);
646 if (local->ops->set_bitrate_mask)
647 ret = local->ops->set_bitrate_mask(&local->hw,
648 &sdata->vif, mask);
649 trace_drv_return_int(local, ret);
650
651 return ret;
652}
653
c68f4b89
JB
654static inline void drv_set_rekey_data(struct ieee80211_local *local,
655 struct ieee80211_sub_if_data *sdata,
656 struct cfg80211_gtk_rekey_data *data)
657{
658 trace_drv_set_rekey_data(local, sdata, data);
659 if (local->ops->set_rekey_data)
660 local->ops->set_rekey_data(&local->hw, &sdata->vif, data);
661 trace_drv_return_void(local);
662}
663
615f7b9b
MV
664static inline void drv_rssi_callback(struct ieee80211_local *local,
665 const enum ieee80211_rssi_event event)
666{
667 trace_drv_rssi_callback(local, event);
668 if (local->ops->rssi_callback)
669 local->ops->rssi_callback(&local->hw, event);
670 trace_drv_return_void(local);
671}
24487981 672#endif /* __MAC80211_DRIVER_OPS */