Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[deliverable/linux.git] / net / mac80211 / driver-ops.h
1 #ifndef __MAC80211_DRIVER_OPS
2 #define __MAC80211_DRIVER_OPS
3
4 #include <net/mac80211.h>
5 #include "ieee80211_i.h"
6 #include "driver-trace.h"
7
8 static inline void check_sdata_in_driver(struct ieee80211_sub_if_data *sdata)
9 {
10 WARN_ON(!(sdata->flags & IEEE80211_SDATA_IN_DRIVER));
11 }
12
13 static inline struct ieee80211_sub_if_data *
14 get_bss_sdata(struct ieee80211_sub_if_data *sdata)
15 {
16 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
17 sdata = container_of(sdata->bss, struct ieee80211_sub_if_data,
18 u.ap);
19
20 return sdata;
21 }
22
23 static inline void drv_tx(struct ieee80211_local *local, struct sk_buff *skb)
24 {
25 local->ops->tx(&local->hw, skb);
26 }
27
28 static inline void drv_tx_frags(struct ieee80211_local *local,
29 struct ieee80211_vif *vif,
30 struct ieee80211_sta *sta,
31 struct sk_buff_head *skbs)
32 {
33 local->ops->tx_frags(&local->hw, vif, sta, skbs);
34 }
35
36 static inline int drv_start(struct ieee80211_local *local)
37 {
38 int ret;
39
40 might_sleep();
41
42 trace_drv_start(local);
43 local->started = true;
44 smp_mb();
45 ret = local->ops->start(&local->hw);
46 trace_drv_return_int(local, ret);
47 return ret;
48 }
49
50 static inline void drv_stop(struct ieee80211_local *local)
51 {
52 might_sleep();
53
54 trace_drv_stop(local);
55 local->ops->stop(&local->hw);
56 trace_drv_return_void(local);
57
58 /* sync away all work on the tasklet before clearing started */
59 tasklet_disable(&local->tasklet);
60 tasklet_enable(&local->tasklet);
61
62 barrier();
63
64 local->started = false;
65 }
66
67 #ifdef CONFIG_PM
68 static inline int drv_suspend(struct ieee80211_local *local,
69 struct cfg80211_wowlan *wowlan)
70 {
71 int ret;
72
73 might_sleep();
74
75 trace_drv_suspend(local);
76 ret = local->ops->suspend(&local->hw, wowlan);
77 trace_drv_return_int(local, ret);
78 return ret;
79 }
80
81 static inline int drv_resume(struct ieee80211_local *local)
82 {
83 int ret;
84
85 might_sleep();
86
87 trace_drv_resume(local);
88 ret = local->ops->resume(&local->hw);
89 trace_drv_return_int(local, ret);
90 return ret;
91 }
92 #endif
93
94 static inline int drv_add_interface(struct ieee80211_local *local,
95 struct ieee80211_sub_if_data *sdata)
96 {
97 int ret;
98
99 might_sleep();
100
101 if (WARN_ON(sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
102 sdata->vif.type == NL80211_IFTYPE_MONITOR))
103 return -EINVAL;
104
105 trace_drv_add_interface(local, sdata);
106 ret = local->ops->add_interface(&local->hw, &sdata->vif);
107 trace_drv_return_int(local, ret);
108
109 if (ret == 0)
110 sdata->flags |= IEEE80211_SDATA_IN_DRIVER;
111
112 return ret;
113 }
114
115 static inline int drv_change_interface(struct ieee80211_local *local,
116 struct ieee80211_sub_if_data *sdata,
117 enum nl80211_iftype type, bool p2p)
118 {
119 int ret;
120
121 might_sleep();
122
123 check_sdata_in_driver(sdata);
124
125 trace_drv_change_interface(local, sdata, type, p2p);
126 ret = local->ops->change_interface(&local->hw, &sdata->vif, type, p2p);
127 trace_drv_return_int(local, ret);
128 return ret;
129 }
130
131 static inline void drv_remove_interface(struct ieee80211_local *local,
132 struct ieee80211_sub_if_data *sdata)
133 {
134 might_sleep();
135
136 check_sdata_in_driver(sdata);
137
138 trace_drv_remove_interface(local, sdata);
139 local->ops->remove_interface(&local->hw, &sdata->vif);
140 sdata->flags &= ~IEEE80211_SDATA_IN_DRIVER;
141 trace_drv_return_void(local);
142 }
143
144 static inline int drv_config(struct ieee80211_local *local, u32 changed)
145 {
146 int ret;
147
148 might_sleep();
149
150 trace_drv_config(local, changed);
151 ret = local->ops->config(&local->hw, changed);
152 trace_drv_return_int(local, ret);
153 return ret;
154 }
155
156 static inline void drv_bss_info_changed(struct ieee80211_local *local,
157 struct ieee80211_sub_if_data *sdata,
158 struct ieee80211_bss_conf *info,
159 u32 changed)
160 {
161 might_sleep();
162
163 check_sdata_in_driver(sdata);
164
165 trace_drv_bss_info_changed(local, sdata, info, changed);
166 if (local->ops->bss_info_changed)
167 local->ops->bss_info_changed(&local->hw, &sdata->vif, info, changed);
168 trace_drv_return_void(local);
169 }
170
171 static inline int drv_tx_sync(struct ieee80211_local *local,
172 struct ieee80211_sub_if_data *sdata,
173 const u8 *bssid,
174 enum ieee80211_tx_sync_type type)
175 {
176 int ret = 0;
177
178 might_sleep();
179
180 check_sdata_in_driver(sdata);
181
182 trace_drv_tx_sync(local, sdata, bssid, type);
183 if (local->ops->tx_sync)
184 ret = local->ops->tx_sync(&local->hw, &sdata->vif,
185 bssid, type);
186 trace_drv_return_int(local, ret);
187 return ret;
188 }
189
190 static inline void drv_finish_tx_sync(struct ieee80211_local *local,
191 struct ieee80211_sub_if_data *sdata,
192 const u8 *bssid,
193 enum ieee80211_tx_sync_type type)
194 {
195 might_sleep();
196
197 check_sdata_in_driver(sdata);
198
199 trace_drv_finish_tx_sync(local, sdata, bssid, type);
200 if (local->ops->finish_tx_sync)
201 local->ops->finish_tx_sync(&local->hw, &sdata->vif,
202 bssid, type);
203 trace_drv_return_void(local);
204 }
205
206 static inline u64 drv_prepare_multicast(struct ieee80211_local *local,
207 struct netdev_hw_addr_list *mc_list)
208 {
209 u64 ret = 0;
210
211 trace_drv_prepare_multicast(local, mc_list->count);
212
213 if (local->ops->prepare_multicast)
214 ret = local->ops->prepare_multicast(&local->hw, mc_list);
215
216 trace_drv_return_u64(local, ret);
217
218 return ret;
219 }
220
221 static inline void drv_configure_filter(struct ieee80211_local *local,
222 unsigned int changed_flags,
223 unsigned int *total_flags,
224 u64 multicast)
225 {
226 might_sleep();
227
228 trace_drv_configure_filter(local, changed_flags, total_flags,
229 multicast);
230 local->ops->configure_filter(&local->hw, changed_flags, total_flags,
231 multicast);
232 trace_drv_return_void(local);
233 }
234
235 static inline int drv_set_tim(struct ieee80211_local *local,
236 struct ieee80211_sta *sta, bool set)
237 {
238 int ret = 0;
239 trace_drv_set_tim(local, sta, set);
240 if (local->ops->set_tim)
241 ret = local->ops->set_tim(&local->hw, sta, set);
242 trace_drv_return_int(local, ret);
243 return ret;
244 }
245
246 static inline int drv_set_key(struct ieee80211_local *local,
247 enum set_key_cmd cmd,
248 struct ieee80211_sub_if_data *sdata,
249 struct ieee80211_sta *sta,
250 struct ieee80211_key_conf *key)
251 {
252 int ret;
253
254 might_sleep();
255
256 sdata = get_bss_sdata(sdata);
257 check_sdata_in_driver(sdata);
258
259 trace_drv_set_key(local, cmd, sdata, sta, key);
260 ret = local->ops->set_key(&local->hw, cmd, &sdata->vif, sta, key);
261 trace_drv_return_int(local, ret);
262 return ret;
263 }
264
265 static inline void drv_update_tkip_key(struct ieee80211_local *local,
266 struct ieee80211_sub_if_data *sdata,
267 struct ieee80211_key_conf *conf,
268 struct sta_info *sta, u32 iv32,
269 u16 *phase1key)
270 {
271 struct ieee80211_sta *ista = NULL;
272
273 if (sta)
274 ista = &sta->sta;
275
276 sdata = get_bss_sdata(sdata);
277 check_sdata_in_driver(sdata);
278
279 trace_drv_update_tkip_key(local, sdata, conf, ista, iv32);
280 if (local->ops->update_tkip_key)
281 local->ops->update_tkip_key(&local->hw, &sdata->vif, conf,
282 ista, iv32, phase1key);
283 trace_drv_return_void(local);
284 }
285
286 static inline int drv_hw_scan(struct ieee80211_local *local,
287 struct ieee80211_sub_if_data *sdata,
288 struct cfg80211_scan_request *req)
289 {
290 int ret;
291
292 might_sleep();
293
294 check_sdata_in_driver(sdata);
295
296 trace_drv_hw_scan(local, sdata);
297 ret = local->ops->hw_scan(&local->hw, &sdata->vif, req);
298 trace_drv_return_int(local, ret);
299 return ret;
300 }
301
302 static inline void drv_cancel_hw_scan(struct ieee80211_local *local,
303 struct ieee80211_sub_if_data *sdata)
304 {
305 might_sleep();
306
307 check_sdata_in_driver(sdata);
308
309 trace_drv_cancel_hw_scan(local, sdata);
310 local->ops->cancel_hw_scan(&local->hw, &sdata->vif);
311 trace_drv_return_void(local);
312 }
313
314 static inline int
315 drv_sched_scan_start(struct ieee80211_local *local,
316 struct ieee80211_sub_if_data *sdata,
317 struct cfg80211_sched_scan_request *req,
318 struct ieee80211_sched_scan_ies *ies)
319 {
320 int ret;
321
322 might_sleep();
323
324 check_sdata_in_driver(sdata);
325
326 trace_drv_sched_scan_start(local, sdata);
327 ret = local->ops->sched_scan_start(&local->hw, &sdata->vif,
328 req, ies);
329 trace_drv_return_int(local, ret);
330 return ret;
331 }
332
333 static inline void drv_sched_scan_stop(struct ieee80211_local *local,
334 struct ieee80211_sub_if_data *sdata)
335 {
336 might_sleep();
337
338 check_sdata_in_driver(sdata);
339
340 trace_drv_sched_scan_stop(local, sdata);
341 local->ops->sched_scan_stop(&local->hw, &sdata->vif);
342 trace_drv_return_void(local);
343 }
344
345 static inline void drv_sw_scan_start(struct ieee80211_local *local)
346 {
347 might_sleep();
348
349 trace_drv_sw_scan_start(local);
350 if (local->ops->sw_scan_start)
351 local->ops->sw_scan_start(&local->hw);
352 trace_drv_return_void(local);
353 }
354
355 static inline void drv_sw_scan_complete(struct ieee80211_local *local)
356 {
357 might_sleep();
358
359 trace_drv_sw_scan_complete(local);
360 if (local->ops->sw_scan_complete)
361 local->ops->sw_scan_complete(&local->hw);
362 trace_drv_return_void(local);
363 }
364
365 static inline int drv_get_stats(struct ieee80211_local *local,
366 struct ieee80211_low_level_stats *stats)
367 {
368 int ret = -EOPNOTSUPP;
369
370 might_sleep();
371
372 if (local->ops->get_stats)
373 ret = local->ops->get_stats(&local->hw, stats);
374 trace_drv_get_stats(local, stats, ret);
375
376 return ret;
377 }
378
379 static inline void drv_get_tkip_seq(struct ieee80211_local *local,
380 u8 hw_key_idx, u32 *iv32, u16 *iv16)
381 {
382 if (local->ops->get_tkip_seq)
383 local->ops->get_tkip_seq(&local->hw, hw_key_idx, iv32, iv16);
384 trace_drv_get_tkip_seq(local, hw_key_idx, iv32, iv16);
385 }
386
387 static inline int drv_set_frag_threshold(struct ieee80211_local *local,
388 u32 value)
389 {
390 int ret = 0;
391
392 might_sleep();
393
394 trace_drv_set_frag_threshold(local, value);
395 if (local->ops->set_frag_threshold)
396 ret = local->ops->set_frag_threshold(&local->hw, value);
397 trace_drv_return_int(local, ret);
398 return ret;
399 }
400
401 static inline int drv_set_rts_threshold(struct ieee80211_local *local,
402 u32 value)
403 {
404 int ret = 0;
405
406 might_sleep();
407
408 trace_drv_set_rts_threshold(local, value);
409 if (local->ops->set_rts_threshold)
410 ret = local->ops->set_rts_threshold(&local->hw, value);
411 trace_drv_return_int(local, ret);
412 return ret;
413 }
414
415 static inline int drv_set_coverage_class(struct ieee80211_local *local,
416 u8 value)
417 {
418 int ret = 0;
419 might_sleep();
420
421 trace_drv_set_coverage_class(local, value);
422 if (local->ops->set_coverage_class)
423 local->ops->set_coverage_class(&local->hw, value);
424 else
425 ret = -EOPNOTSUPP;
426
427 trace_drv_return_int(local, ret);
428 return ret;
429 }
430
431 static inline void drv_sta_notify(struct ieee80211_local *local,
432 struct ieee80211_sub_if_data *sdata,
433 enum sta_notify_cmd cmd,
434 struct ieee80211_sta *sta)
435 {
436 sdata = get_bss_sdata(sdata);
437 check_sdata_in_driver(sdata);
438
439 trace_drv_sta_notify(local, sdata, cmd, sta);
440 if (local->ops->sta_notify)
441 local->ops->sta_notify(&local->hw, &sdata->vif, cmd, sta);
442 trace_drv_return_void(local);
443 }
444
445 static inline int drv_sta_add(struct ieee80211_local *local,
446 struct ieee80211_sub_if_data *sdata,
447 struct ieee80211_sta *sta)
448 {
449 int ret = 0;
450
451 might_sleep();
452
453 sdata = get_bss_sdata(sdata);
454 check_sdata_in_driver(sdata);
455
456 trace_drv_sta_add(local, sdata, sta);
457 if (local->ops->sta_add)
458 ret = local->ops->sta_add(&local->hw, &sdata->vif, sta);
459
460 trace_drv_return_int(local, ret);
461
462 return ret;
463 }
464
465 static inline void drv_sta_remove(struct ieee80211_local *local,
466 struct ieee80211_sub_if_data *sdata,
467 struct ieee80211_sta *sta)
468 {
469 might_sleep();
470
471 sdata = get_bss_sdata(sdata);
472 check_sdata_in_driver(sdata);
473
474 trace_drv_sta_remove(local, sdata, sta);
475 if (local->ops->sta_remove)
476 local->ops->sta_remove(&local->hw, &sdata->vif, sta);
477
478 trace_drv_return_void(local);
479 }
480
481 static inline __must_check
482 int drv_sta_state(struct ieee80211_local *local,
483 struct ieee80211_sub_if_data *sdata,
484 struct sta_info *sta,
485 enum ieee80211_sta_state old_state,
486 enum ieee80211_sta_state new_state)
487 {
488 int ret = 0;
489
490 might_sleep();
491
492 sdata = get_bss_sdata(sdata);
493 check_sdata_in_driver(sdata);
494
495 trace_drv_sta_state(local, sdata, &sta->sta, old_state, new_state);
496 if (local->ops->sta_state) {
497 ret = local->ops->sta_state(&local->hw, &sdata->vif, &sta->sta,
498 old_state, new_state);
499 } else if (old_state == IEEE80211_STA_AUTH &&
500 new_state == IEEE80211_STA_ASSOC) {
501 ret = drv_sta_add(local, sdata, &sta->sta);
502 if (ret == 0)
503 sta->uploaded = true;
504 } else if (old_state == IEEE80211_STA_ASSOC &&
505 new_state == IEEE80211_STA_AUTH) {
506 drv_sta_remove(local, sdata, &sta->sta);
507 }
508 trace_drv_return_int(local, ret);
509 return ret;
510 }
511
512 static inline int drv_conf_tx(struct ieee80211_local *local,
513 struct ieee80211_sub_if_data *sdata, u16 queue,
514 const struct ieee80211_tx_queue_params *params)
515 {
516 int ret = -EOPNOTSUPP;
517
518 might_sleep();
519
520 check_sdata_in_driver(sdata);
521
522 trace_drv_conf_tx(local, sdata, queue, params);
523 if (local->ops->conf_tx)
524 ret = local->ops->conf_tx(&local->hw, &sdata->vif,
525 queue, params);
526 trace_drv_return_int(local, ret);
527 return ret;
528 }
529
530 static inline u64 drv_get_tsf(struct ieee80211_local *local,
531 struct ieee80211_sub_if_data *sdata)
532 {
533 u64 ret = -1ULL;
534
535 might_sleep();
536
537 check_sdata_in_driver(sdata);
538
539 trace_drv_get_tsf(local, sdata);
540 if (local->ops->get_tsf)
541 ret = local->ops->get_tsf(&local->hw, &sdata->vif);
542 trace_drv_return_u64(local, ret);
543 return ret;
544 }
545
546 static inline void drv_set_tsf(struct ieee80211_local *local,
547 struct ieee80211_sub_if_data *sdata,
548 u64 tsf)
549 {
550 might_sleep();
551
552 check_sdata_in_driver(sdata);
553
554 trace_drv_set_tsf(local, sdata, tsf);
555 if (local->ops->set_tsf)
556 local->ops->set_tsf(&local->hw, &sdata->vif, tsf);
557 trace_drv_return_void(local);
558 }
559
560 static inline void drv_reset_tsf(struct ieee80211_local *local,
561 struct ieee80211_sub_if_data *sdata)
562 {
563 might_sleep();
564
565 check_sdata_in_driver(sdata);
566
567 trace_drv_reset_tsf(local, sdata);
568 if (local->ops->reset_tsf)
569 local->ops->reset_tsf(&local->hw, &sdata->vif);
570 trace_drv_return_void(local);
571 }
572
573 static inline int drv_tx_last_beacon(struct ieee80211_local *local)
574 {
575 int ret = 0; /* default unsuported op for less congestion */
576
577 might_sleep();
578
579 trace_drv_tx_last_beacon(local);
580 if (local->ops->tx_last_beacon)
581 ret = local->ops->tx_last_beacon(&local->hw);
582 trace_drv_return_int(local, ret);
583 return ret;
584 }
585
586 static inline int drv_ampdu_action(struct ieee80211_local *local,
587 struct ieee80211_sub_if_data *sdata,
588 enum ieee80211_ampdu_mlme_action action,
589 struct ieee80211_sta *sta, u16 tid,
590 u16 *ssn, u8 buf_size)
591 {
592 int ret = -EOPNOTSUPP;
593
594 might_sleep();
595
596 sdata = get_bss_sdata(sdata);
597 check_sdata_in_driver(sdata);
598
599 trace_drv_ampdu_action(local, sdata, action, sta, tid, ssn, buf_size);
600
601 if (local->ops->ampdu_action)
602 ret = local->ops->ampdu_action(&local->hw, &sdata->vif, action,
603 sta, tid, ssn, buf_size);
604
605 trace_drv_return_int(local, ret);
606
607 return ret;
608 }
609
610 static inline int drv_get_survey(struct ieee80211_local *local, int idx,
611 struct survey_info *survey)
612 {
613 int ret = -EOPNOTSUPP;
614
615 trace_drv_get_survey(local, idx, survey);
616
617 if (local->ops->get_survey)
618 ret = local->ops->get_survey(&local->hw, idx, survey);
619
620 trace_drv_return_int(local, ret);
621
622 return ret;
623 }
624
625 static inline void drv_rfkill_poll(struct ieee80211_local *local)
626 {
627 might_sleep();
628
629 if (local->ops->rfkill_poll)
630 local->ops->rfkill_poll(&local->hw);
631 }
632
633 static inline void drv_flush(struct ieee80211_local *local, bool drop)
634 {
635 might_sleep();
636
637 trace_drv_flush(local, drop);
638 if (local->ops->flush)
639 local->ops->flush(&local->hw, drop);
640 trace_drv_return_void(local);
641 }
642
643 static inline void drv_channel_switch(struct ieee80211_local *local,
644 struct ieee80211_channel_switch *ch_switch)
645 {
646 might_sleep();
647
648 trace_drv_channel_switch(local, ch_switch);
649 local->ops->channel_switch(&local->hw, ch_switch);
650 trace_drv_return_void(local);
651 }
652
653
654 static inline int drv_set_antenna(struct ieee80211_local *local,
655 u32 tx_ant, u32 rx_ant)
656 {
657 int ret = -EOPNOTSUPP;
658 might_sleep();
659 if (local->ops->set_antenna)
660 ret = local->ops->set_antenna(&local->hw, tx_ant, rx_ant);
661 trace_drv_set_antenna(local, tx_ant, rx_ant, ret);
662 return ret;
663 }
664
665 static inline int drv_get_antenna(struct ieee80211_local *local,
666 u32 *tx_ant, u32 *rx_ant)
667 {
668 int ret = -EOPNOTSUPP;
669 might_sleep();
670 if (local->ops->get_antenna)
671 ret = local->ops->get_antenna(&local->hw, tx_ant, rx_ant);
672 trace_drv_get_antenna(local, *tx_ant, *rx_ant, ret);
673 return ret;
674 }
675
676 static inline int drv_remain_on_channel(struct ieee80211_local *local,
677 struct ieee80211_channel *chan,
678 enum nl80211_channel_type chantype,
679 unsigned int duration)
680 {
681 int ret;
682
683 might_sleep();
684
685 trace_drv_remain_on_channel(local, chan, chantype, duration);
686 ret = local->ops->remain_on_channel(&local->hw, chan, chantype,
687 duration);
688 trace_drv_return_int(local, ret);
689
690 return ret;
691 }
692
693 static inline int drv_cancel_remain_on_channel(struct ieee80211_local *local)
694 {
695 int ret;
696
697 might_sleep();
698
699 trace_drv_cancel_remain_on_channel(local);
700 ret = local->ops->cancel_remain_on_channel(&local->hw);
701 trace_drv_return_int(local, ret);
702
703 return ret;
704 }
705
706 static inline int drv_set_ringparam(struct ieee80211_local *local,
707 u32 tx, u32 rx)
708 {
709 int ret = -ENOTSUPP;
710
711 might_sleep();
712
713 trace_drv_set_ringparam(local, tx, rx);
714 if (local->ops->set_ringparam)
715 ret = local->ops->set_ringparam(&local->hw, tx, rx);
716 trace_drv_return_int(local, ret);
717
718 return ret;
719 }
720
721 static inline void drv_get_ringparam(struct ieee80211_local *local,
722 u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max)
723 {
724 might_sleep();
725
726 trace_drv_get_ringparam(local, tx, tx_max, rx, rx_max);
727 if (local->ops->get_ringparam)
728 local->ops->get_ringparam(&local->hw, tx, tx_max, rx, rx_max);
729 trace_drv_return_void(local);
730 }
731
732 static inline bool drv_tx_frames_pending(struct ieee80211_local *local)
733 {
734 bool ret = false;
735
736 might_sleep();
737
738 trace_drv_tx_frames_pending(local);
739 if (local->ops->tx_frames_pending)
740 ret = local->ops->tx_frames_pending(&local->hw);
741 trace_drv_return_bool(local, ret);
742
743 return ret;
744 }
745
746 static inline int drv_set_bitrate_mask(struct ieee80211_local *local,
747 struct ieee80211_sub_if_data *sdata,
748 const struct cfg80211_bitrate_mask *mask)
749 {
750 int ret = -EOPNOTSUPP;
751
752 might_sleep();
753
754 check_sdata_in_driver(sdata);
755
756 trace_drv_set_bitrate_mask(local, sdata, mask);
757 if (local->ops->set_bitrate_mask)
758 ret = local->ops->set_bitrate_mask(&local->hw,
759 &sdata->vif, mask);
760 trace_drv_return_int(local, ret);
761
762 return ret;
763 }
764
765 static inline void drv_set_rekey_data(struct ieee80211_local *local,
766 struct ieee80211_sub_if_data *sdata,
767 struct cfg80211_gtk_rekey_data *data)
768 {
769 check_sdata_in_driver(sdata);
770
771 trace_drv_set_rekey_data(local, sdata, data);
772 if (local->ops->set_rekey_data)
773 local->ops->set_rekey_data(&local->hw, &sdata->vif, data);
774 trace_drv_return_void(local);
775 }
776
777 static inline void drv_rssi_callback(struct ieee80211_local *local,
778 const enum ieee80211_rssi_event event)
779 {
780 trace_drv_rssi_callback(local, event);
781 if (local->ops->rssi_callback)
782 local->ops->rssi_callback(&local->hw, event);
783 trace_drv_return_void(local);
784 }
785
786 static inline void
787 drv_release_buffered_frames(struct ieee80211_local *local,
788 struct sta_info *sta, u16 tids, int num_frames,
789 enum ieee80211_frame_release_type reason,
790 bool more_data)
791 {
792 trace_drv_release_buffered_frames(local, &sta->sta, tids, num_frames,
793 reason, more_data);
794 if (local->ops->release_buffered_frames)
795 local->ops->release_buffered_frames(&local->hw, &sta->sta, tids,
796 num_frames, reason,
797 more_data);
798 trace_drv_return_void(local);
799 }
800
801 static inline void
802 drv_allow_buffered_frames(struct ieee80211_local *local,
803 struct sta_info *sta, u16 tids, int num_frames,
804 enum ieee80211_frame_release_type reason,
805 bool more_data)
806 {
807 trace_drv_allow_buffered_frames(local, &sta->sta, tids, num_frames,
808 reason, more_data);
809 if (local->ops->allow_buffered_frames)
810 local->ops->allow_buffered_frames(&local->hw, &sta->sta,
811 tids, num_frames, reason,
812 more_data);
813 trace_drv_return_void(local);
814 }
815 #endif /* __MAC80211_DRIVER_OPS */
This page took 0.048584 seconds and 6 git commands to generate.