pinctrl: qcom: Handle broken/missing PDC dual edge IRQs on sc7180
[linux-2.6-microblaze.git] / drivers / staging / wfx / hif_tx.h
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-2019, 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
13 struct ieee80211_channel;
14 struct ieee80211_bss_conf;
15 struct ieee80211_tx_queue_params;
16 struct cfg80211_scan_request;
17 struct hif_req_add_key;
18 struct wfx_dev;
19 struct wfx_vif;
20
21 struct wfx_hif_cmd {
22         struct mutex      lock;
23         struct mutex      key_renew_lock;
24         struct completion ready;
25         struct completion done;
26         bool              async;
27         struct hif_msg    *buf_send;
28         void              *buf_recv;
29         size_t            len_recv;
30         int               ret;
31 };
32
33 void wfx_init_hif_cmd(struct wfx_hif_cmd *wfx_hif_cmd);
34 int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request,
35                  void *reply, size_t reply_len, bool async);
36
37 int hif_shutdown(struct wfx_dev *wdev);
38 int hif_configuration(struct wfx_dev *wdev, const u8 *conf, size_t len);
39 int hif_reset(struct wfx_vif *wvif, bool reset_stat);
40 int hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id,
41                  void *buf, size_t buf_size);
42 int hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id,
43                   void *buf, size_t buf_size);
44 int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req80211,
45              int chan_start, int chan_num);
46 int hif_stop_scan(struct wfx_vif *wvif);
47 int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
48              struct ieee80211_channel *channel, const u8 *ssid, int ssidlen);
49 int hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout);
50 int hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count);
51 int hif_add_key(struct wfx_dev *wdev, const struct hif_req_add_key *arg);
52 int hif_remove_key(struct wfx_dev *wdev, int idx);
53 int hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue,
54                               const struct ieee80211_tx_queue_params *arg);
55 int hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
56               const struct ieee80211_channel *channel);
57 int hif_beacon_transmit(struct wfx_vif *wvif, bool enable);
58 int hif_map_link(struct wfx_vif *wvif, u8 *mac_addr, int flags, int sta_id);
59 int hif_update_ie_beacon(struct wfx_vif *wvif, const u8 *ies, size_t ies_len);
60 int hif_sl_set_mac_key(struct wfx_dev *wdev,
61                        const u8 *slk_key, int destination);
62 int hif_sl_config(struct wfx_dev *wdev, const unsigned long *bitmap);
63 int hif_sl_send_pub_keys(struct wfx_dev *wdev,
64                          const u8 *pubkey, const u8 *pubkey_hmac);
65
66 #endif