1 #ifndef __MAC80211_DRIVER_OPS
2 #define __MAC80211_DRIVER_OPS
11 "%s: Failed check-sdata-in-driver check, flags: 0x%x\n",
29 local->
ops->tx(&local->
hw, control, skb);
36 if (local->
ops->get_et_strings) {
37 trace_drv_get_et_strings(local, sset);
38 local->
ops->get_et_strings(&local->
hw, &sdata->
vif, sset, data);
39 trace_drv_return_void(local);
48 if (local->
ops->get_et_stats) {
49 trace_drv_get_et_stats(local);
50 local->
ops->get_et_stats(&local->
hw, &sdata->
vif, stats, data);
51 trace_drv_return_void(local);
60 if (local->
ops->get_et_sset_count) {
61 trace_drv_get_et_sset_count(local, sset);
62 rv = local->
ops->get_et_sset_count(&local->
hw, &sdata->
vif,
64 trace_drv_return_int(local, rv);
75 trace_drv_start(local);
78 ret = local->
ops->start(&local->
hw);
79 trace_drv_return_int(local, ret);
87 trace_drv_stop(local);
88 local->
ops->stop(&local->
hw);
89 trace_drv_return_void(local);
92 tasklet_disable(&local->
tasklet);
93 tasklet_enable(&local->
tasklet);
108 trace_drv_suspend(local);
109 ret = local->
ops->suspend(&local->
hw, wowlan);
110 trace_drv_return_int(local, ret);
120 trace_drv_resume(local);
121 ret = local->
ops->resume(&local->
hw);
122 trace_drv_return_int(local, ret);
131 if (!local->
ops->set_wakeup)
134 trace_drv_set_wakeup(local, enabled);
135 local->
ops->set_wakeup(&local->
hw, enabled);
136 trace_drv_return_void(local);
152 trace_drv_add_interface(local, sdata);
153 ret = local->
ops->add_interface(&local->
hw, &sdata->
vif);
154 trace_drv_return_int(local, ret);
170 check_sdata_in_driver(sdata);
172 trace_drv_change_interface(local, sdata, type, p2p);
173 ret = local->
ops->change_interface(&local->
hw, &sdata->
vif, type, p2p);
174 trace_drv_return_int(local, ret);
183 check_sdata_in_driver(sdata);
185 trace_drv_remove_interface(local, sdata);
186 local->
ops->remove_interface(&local->
hw, &sdata->
vif);
188 trace_drv_return_void(local);
197 trace_drv_config(local, changed);
198 ret = local->
ops->config(&local->
hw, changed);
199 trace_drv_return_int(local, ret);
210 check_sdata_in_driver(sdata);
212 trace_drv_bss_info_changed(local, sdata, info, changed);
213 if (local->
ops->bss_info_changed)
214 local->
ops->bss_info_changed(&local->
hw, &sdata->
vif, info, changed);
215 trace_drv_return_void(local);
223 trace_drv_prepare_multicast(local, mc_list->
count);
225 if (local->
ops->prepare_multicast)
226 ret = local->
ops->prepare_multicast(&local->
hw, mc_list);
228 trace_drv_return_u64(local, ret);
234 unsigned int changed_flags,
235 unsigned int *total_flags,
240 trace_drv_configure_filter(local, changed_flags, total_flags,
242 local->
ops->configure_filter(&local->
hw, changed_flags, total_flags,
244 trace_drv_return_void(local);
251 trace_drv_set_tim(local, sta,
set);
252 if (local->
ops->set_tim)
253 ret = local->
ops->set_tim(&local->
hw, sta,
set);
254 trace_drv_return_int(local, ret);
268 sdata = get_bss_sdata(sdata);
269 check_sdata_in_driver(sdata);
271 trace_drv_set_key(local, cmd, sdata, sta, key);
272 ret = local->
ops->set_key(&local->
hw, cmd, &sdata->
vif, sta, key);
273 trace_drv_return_int(local, ret);
288 sdata = get_bss_sdata(sdata);
289 check_sdata_in_driver(sdata);
291 trace_drv_update_tkip_key(local, sdata, conf, ista, iv32);
292 if (local->
ops->update_tkip_key)
293 local->
ops->update_tkip_key(&local->
hw, &sdata->
vif, conf,
294 ista, iv32, phase1key);
295 trace_drv_return_void(local);
306 check_sdata_in_driver(sdata);
308 trace_drv_hw_scan(local, sdata);
309 ret = local->
ops->hw_scan(&local->
hw, &sdata->
vif, req);
310 trace_drv_return_int(local, ret);
319 check_sdata_in_driver(sdata);
321 trace_drv_cancel_hw_scan(local, sdata);
322 local->
ops->cancel_hw_scan(&local->
hw, &sdata->
vif);
323 trace_drv_return_void(local);
336 check_sdata_in_driver(sdata);
338 trace_drv_sched_scan_start(local, sdata);
339 ret = local->
ops->sched_scan_start(&local->
hw, &sdata->
vif,
341 trace_drv_return_int(local, ret);
350 check_sdata_in_driver(sdata);
352 trace_drv_sched_scan_stop(local, sdata);
353 local->
ops->sched_scan_stop(&local->
hw, &sdata->
vif);
354 trace_drv_return_void(local);
361 trace_drv_sw_scan_start(local);
362 if (local->
ops->sw_scan_start)
363 local->
ops->sw_scan_start(&local->
hw);
364 trace_drv_return_void(local);
371 trace_drv_sw_scan_complete(local);
372 if (local->
ops->sw_scan_complete)
373 local->
ops->sw_scan_complete(&local->
hw);
374 trace_drv_return_void(local);
384 if (local->
ops->get_stats)
385 ret = local->
ops->get_stats(&local->
hw, stats);
386 trace_drv_get_stats(local, stats, ret);
392 u8 hw_key_idx,
u32 *iv32,
u16 *iv16)
394 if (local->
ops->get_tkip_seq)
395 local->
ops->get_tkip_seq(&local->
hw, hw_key_idx, iv32, iv16);
396 trace_drv_get_tkip_seq(local, hw_key_idx, iv32, iv16);
399 static inline int drv_set_frag_threshold(
struct ieee80211_local *local,
406 trace_drv_set_frag_threshold(local, value);
407 if (local->
ops->set_frag_threshold)
408 ret = local->
ops->set_frag_threshold(&local->
hw, value);
409 trace_drv_return_int(local, ret);
420 trace_drv_set_rts_threshold(local, value);
421 if (local->
ops->set_rts_threshold)
422 ret = local->
ops->set_rts_threshold(&local->
hw, value);
423 trace_drv_return_int(local, ret);
427 static inline int drv_set_coverage_class(
struct ieee80211_local *local,
433 trace_drv_set_coverage_class(local, value);
434 if (local->
ops->set_coverage_class)
435 local->
ops->set_coverage_class(&local->
hw, value);
439 trace_drv_return_int(local, ret);
448 sdata = get_bss_sdata(sdata);
449 check_sdata_in_driver(sdata);
451 trace_drv_sta_notify(local, sdata, cmd, sta);
452 if (local->
ops->sta_notify)
453 local->
ops->sta_notify(&local->
hw, &sdata->
vif, cmd, sta);
454 trace_drv_return_void(local);
465 sdata = get_bss_sdata(sdata);
466 check_sdata_in_driver(sdata);
468 trace_drv_sta_add(local, sdata, sta);
469 if (local->
ops->sta_add)
470 ret = local->
ops->sta_add(&local->
hw, &sdata->
vif, sta);
472 trace_drv_return_int(local, ret);
483 sdata = get_bss_sdata(sdata);
484 check_sdata_in_driver(sdata);
486 trace_drv_sta_remove(local, sdata, sta);
487 if (local->
ops->sta_remove)
488 local->
ops->sta_remove(&local->
hw, &sdata->
vif, sta);
490 trace_drv_return_void(local);
504 sdata = get_bss_sdata(sdata);
505 check_sdata_in_driver(sdata);
507 trace_drv_sta_state(local, sdata, &sta->
sta, old_state, new_state);
508 if (local->
ops->sta_state) {
509 ret = local->
ops->sta_state(&local->
hw, &sdata->
vif, &sta->
sta,
510 old_state, new_state);
513 ret = drv_sta_add(local, sdata, &sta->
sta);
518 drv_sta_remove(local, sdata, &sta->
sta);
520 trace_drv_return_int(local, ret);
528 sdata = get_bss_sdata(sdata);
529 check_sdata_in_driver(sdata);
534 trace_drv_sta_rc_update(local, sdata, sta, changed);
535 if (local->
ops->sta_rc_update)
536 local->
ops->sta_rc_update(&local->
hw, &sdata->
vif,
539 trace_drv_return_void(local);
550 check_sdata_in_driver(sdata);
552 trace_drv_conf_tx(local, sdata, ac, params);
553 if (local->
ops->conf_tx)
554 ret = local->
ops->conf_tx(&local->
hw, &sdata->
vif,
556 trace_drv_return_int(local, ret);
567 check_sdata_in_driver(sdata);
569 trace_drv_get_tsf(local, sdata);
570 if (local->
ops->get_tsf)
571 ret = local->
ops->get_tsf(&local->
hw, &sdata->
vif);
572 trace_drv_return_u64(local, ret);
582 check_sdata_in_driver(sdata);
584 trace_drv_set_tsf(local, sdata, tsf);
585 if (local->
ops->set_tsf)
586 local->
ops->set_tsf(&local->
hw, &sdata->
vif, tsf);
587 trace_drv_return_void(local);
595 check_sdata_in_driver(sdata);
597 trace_drv_reset_tsf(local, sdata);
598 if (local->
ops->reset_tsf)
599 local->
ops->reset_tsf(&local->
hw, &sdata->
vif);
600 trace_drv_return_void(local);
609 trace_drv_tx_last_beacon(local);
610 if (local->
ops->tx_last_beacon)
611 ret = local->
ops->tx_last_beacon(&local->
hw);
612 trace_drv_return_int(local, ret);
626 sdata = get_bss_sdata(sdata);
627 check_sdata_in_driver(sdata);
629 trace_drv_ampdu_action(local, sdata, action, sta, tid, ssn, buf_size);
631 if (local->
ops->ampdu_action)
632 ret = local->
ops->ampdu_action(&local->
hw, &sdata->
vif, action,
633 sta, tid, ssn, buf_size);
635 trace_drv_return_int(local, ret);
645 trace_drv_get_survey(local, idx, survey);
647 if (local->
ops->get_survey)
648 ret = local->
ops->get_survey(&local->
hw, idx, survey);
650 trace_drv_return_int(local, ret);
659 if (local->
ops->rfkill_poll)
660 local->
ops->rfkill_poll(&local->
hw);
667 trace_drv_flush(local, drop);
668 if (local->
ops->flush)
669 local->
ops->flush(&local->
hw, drop);
670 trace_drv_return_void(local);
678 trace_drv_channel_switch(local, ch_switch);
679 local->
ops->channel_switch(&local->
hw, ch_switch);
680 trace_drv_return_void(local);
689 if (local->
ops->set_antenna)
690 ret = local->
ops->set_antenna(&local->
hw, tx_ant, rx_ant);
691 trace_drv_set_antenna(local, tx_ant, rx_ant, ret);
700 if (local->
ops->get_antenna)
701 ret = local->
ops->get_antenna(&local->
hw, tx_ant, rx_ant);
702 trace_drv_get_antenna(local, *tx_ant, *rx_ant, ret);
715 trace_drv_remain_on_channel(local, chan, chantype, duration);
716 ret = local->
ops->remain_on_channel(&local->
hw, chan, chantype,
718 trace_drv_return_int(local, ret);
723 static inline int drv_cancel_remain_on_channel(
struct ieee80211_local *local)
729 trace_drv_cancel_remain_on_channel(local);
730 ret = local->
ops->cancel_remain_on_channel(&local->
hw);
731 trace_drv_return_int(local, ret);
743 trace_drv_set_ringparam(local, tx, rx);
744 if (local->
ops->set_ringparam)
745 ret = local->
ops->set_ringparam(&local->
hw, tx, rx);
746 trace_drv_return_int(local, ret);
756 trace_drv_get_ringparam(local, tx, tx_max, rx, rx_max);
757 if (local->
ops->get_ringparam)
758 local->
ops->get_ringparam(&local->
hw, tx, tx_max, rx, rx_max);
759 trace_drv_return_void(local);
762 static inline bool drv_tx_frames_pending(
struct ieee80211_local *local)
768 trace_drv_tx_frames_pending(local);
769 if (local->
ops->tx_frames_pending)
770 ret = local->
ops->tx_frames_pending(&local->
hw);
771 trace_drv_return_bool(local, ret);
784 check_sdata_in_driver(sdata);
786 trace_drv_set_bitrate_mask(local, sdata, mask);
787 if (local->
ops->set_bitrate_mask)
788 ret = local->
ops->set_bitrate_mask(&local->
hw,
790 trace_drv_return_int(local, ret);
799 check_sdata_in_driver(sdata);
801 trace_drv_set_rekey_data(local, sdata, data);
802 if (local->
ops->set_rekey_data)
803 local->
ops->set_rekey_data(&local->
hw, &sdata->
vif, data);
804 trace_drv_return_void(local);
810 trace_drv_rssi_callback(local, event);
811 if (local->
ops->rssi_callback)
812 local->
ops->rssi_callback(&local->
hw, event);
813 trace_drv_return_void(local);
822 trace_drv_release_buffered_frames(local, &sta->
sta, tids, num_frames,
824 if (local->
ops->release_buffered_frames)
825 local->
ops->release_buffered_frames(&local->
hw, &sta->
sta, tids,
828 trace_drv_return_void(local);
837 trace_drv_allow_buffered_frames(local, &sta->
sta, tids, num_frames,
839 if (local->
ops->allow_buffered_frames)
840 local->
ops->allow_buffered_frames(&local->
hw, &sta->
sta,
841 tids, num_frames, reason,
843 trace_drv_return_void(local);
855 ret = local->
ops->get_rssi(&local->
hw, &sdata->
vif, sta, rssi_dbm);
856 trace_drv_get_rssi(local, sta, *rssi_dbm, ret);
866 check_sdata_in_driver(sdata);
869 trace_drv_mgd_prepare_tx(local, sdata);
870 if (local->
ops->mgd_prepare_tx)
871 local->
ops->mgd_prepare_tx(&local->
hw, &sdata->
vif);
872 trace_drv_return_void(local);