hif_tx.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Implementation of host-to-chip commands (aka request/confirmation) of WFxxx
  4. * Split Mac (WSM) API.
  5. *
  6. * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  7. * Copyright (c) 2010, ST-Ericsson
  8. * Copyright (C) 2010, ST-Ericsson SA
  9. */
  10. #ifndef WFX_HIF_TX_H
  11. #define WFX_HIF_TX_H
  12. struct ieee80211_channel;
  13. struct ieee80211_bss_conf;
  14. struct ieee80211_tx_queue_params;
  15. struct cfg80211_scan_request;
  16. struct hif_req_add_key;
  17. struct wfx_dev;
  18. struct wfx_vif;
  19. struct wfx_hif_cmd {
  20. struct mutex lock;
  21. struct completion ready;
  22. struct completion done;
  23. struct hif_msg *buf_send;
  24. void *buf_recv;
  25. size_t len_recv;
  26. int ret;
  27. };
  28. void wfx_init_hif_cmd(struct wfx_hif_cmd *wfx_hif_cmd);
  29. int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request,
  30. void *reply, size_t reply_len, bool async);
  31. int hif_shutdown(struct wfx_dev *wdev);
  32. int hif_configuration(struct wfx_dev *wdev, const u8 *conf, size_t len);
  33. int hif_reset(struct wfx_vif *wvif, bool reset_stat);
  34. int hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id,
  35. void *buf, size_t buf_size);
  36. int hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id,
  37. void *buf, size_t buf_size);
  38. int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req80211,
  39. int chan_start, int chan_num, int *timeout);
  40. int hif_stop_scan(struct wfx_vif *wvif);
  41. int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
  42. struct ieee80211_channel *channel, const u8 *ssid, int ssidlen);
  43. int hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout);
  44. int hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count);
  45. int hif_add_key(struct wfx_dev *wdev, const struct hif_req_add_key *arg);
  46. int hif_remove_key(struct wfx_dev *wdev, int idx);
  47. int hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue,
  48. const struct ieee80211_tx_queue_params *arg);
  49. int hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
  50. const struct ieee80211_channel *channel);
  51. int hif_beacon_transmit(struct wfx_vif *wvif, bool enable);
  52. int hif_map_link(struct wfx_vif *wvif,
  53. bool unmap, u8 *mac_addr, int sta_id, bool mfp);
  54. int hif_update_ie_beacon(struct wfx_vif *wvif, const u8 *ies, size_t ies_len);
  55. #endif