sta.h 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Implementation of mac80211 API.
  4. *
  5. * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  6. * Copyright (c) 2010, ST-Ericsson
  7. */
  8. #ifndef WFX_STA_H
  9. #define WFX_STA_H
  10. #include <net/mac80211.h>
  11. struct wfx_dev;
  12. struct wfx_vif;
  13. struct wfx_sta_priv {
  14. int link_id;
  15. int vif_id;
  16. };
  17. /* mac80211 interface */
  18. int wfx_start(struct ieee80211_hw *hw);
  19. void wfx_stop(struct ieee80211_hw *hw);
  20. int wfx_config(struct ieee80211_hw *hw, u32 changed);
  21. int wfx_set_rts_threshold(struct ieee80211_hw *hw, u32 value);
  22. void wfx_set_default_unicast_key(struct ieee80211_hw *hw, struct ieee80211_vif *vif, int idx);
  23. void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags,
  24. unsigned int *total_flags, u64 unused);
  25. int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
  26. void wfx_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
  27. int wfx_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  28. struct ieee80211_bss_conf *link_conf);
  29. void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  30. struct ieee80211_bss_conf *link_conf);
  31. int wfx_join_ibss(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
  32. void wfx_leave_ibss(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
  33. int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  34. unsigned int link_id, u16 queue,
  35. const struct ieee80211_tx_queue_params *params);
  36. void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  37. struct ieee80211_bss_conf *info, u64 changed);
  38. int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta);
  39. int wfx_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta);
  40. void wfx_sta_notify(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  41. enum sta_notify_cmd cmd, struct ieee80211_sta *sta);
  42. int wfx_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, bool set);
  43. int wfx_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  44. struct ieee80211_ampdu_params *params);
  45. int wfx_add_chanctx(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf *conf);
  46. void wfx_remove_chanctx(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf *conf);
  47. void wfx_change_chanctx(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf *conf, u32 changed);
  48. int wfx_assign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  49. struct ieee80211_bss_conf *link_conf,
  50. struct ieee80211_chanctx_conf *conf);
  51. void wfx_unassign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  52. struct ieee80211_bss_conf *link_conf,
  53. struct ieee80211_chanctx_conf *conf);
  54. /* Hardware API Callbacks */
  55. void wfx_cooling_timeout_work(struct work_struct *work);
  56. void wfx_suspend_hot_dev(struct wfx_dev *wdev, enum sta_notify_cmd cmd);
  57. void wfx_suspend_resume_mc(struct wfx_vif *wvif, enum sta_notify_cmd cmd);
  58. void wfx_event_report_rssi(struct wfx_vif *wvif, u8 raw_rcpi_rssi);
  59. int wfx_update_pm(struct wfx_vif *wvif);
  60. /* Other Helpers */
  61. void wfx_reset(struct wfx_vif *wvif);
  62. u32 wfx_rate_mask_to_hw(struct wfx_dev *wdev, u32 rates);
  63. #endif