Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Implementation of the host-to-chip commands (aka request/confirmation) of the
0004  * hardware API.
0005  *
0006  * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
0007  * Copyright (c) 2010, ST-Ericsson
0008  * Copyright (C) 2010, ST-Ericsson SA
0009  */
0010 #ifndef WFX_HIF_TX_H
0011 #define WFX_HIF_TX_H
0012 
0013 #include <linux/types.h>
0014 #include <linux/mutex.h>
0015 #include <linux/completion.h>
0016 
0017 struct ieee80211_channel;
0018 struct ieee80211_bss_conf;
0019 struct ieee80211_tx_queue_params;
0020 struct cfg80211_scan_request;
0021 struct wfx_hif_req_add_key;
0022 struct wfx_dev;
0023 struct wfx_vif;
0024 
0025 struct wfx_hif_cmd {
0026     struct mutex       lock;
0027     struct completion  ready;
0028     struct completion  done;
0029     struct wfx_hif_msg *buf_send;
0030     void               *buf_recv;
0031     size_t             len_recv;
0032     int                ret;
0033 };
0034 
0035 void wfx_init_hif_cmd(struct wfx_hif_cmd *wfx_hif_cmd);
0036 int wfx_cmd_send(struct wfx_dev *wdev, struct wfx_hif_msg *request,
0037          void *reply, size_t reply_len, bool async);
0038 
0039 int wfx_hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, void *buf, size_t buf_size);
0040 int wfx_hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, void *buf, size_t buf_size);
0041 int wfx_hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
0042           const struct ieee80211_channel *channel);
0043 int wfx_hif_reset(struct wfx_vif *wvif, bool reset_stat);
0044 int wfx_hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
0045          struct ieee80211_channel *channel, const u8 *ssid, int ssidlen);
0046 int wfx_hif_map_link(struct wfx_vif *wvif, bool unmap, u8 *mac_addr, int sta_id, bool mfp);
0047 int wfx_hif_add_key(struct wfx_dev *wdev, const struct wfx_hif_req_add_key *arg);
0048 int wfx_hif_remove_key(struct wfx_dev *wdev, int idx);
0049 int wfx_hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout);
0050 int wfx_hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count);
0051 int wfx_hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue,
0052                   const struct ieee80211_tx_queue_params *arg);
0053 int wfx_hif_beacon_transmit(struct wfx_vif *wvif, bool enable);
0054 int wfx_hif_update_ie_beacon(struct wfx_vif *wvif, const u8 *ies, size_t ies_len);
0055 int wfx_hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req80211,
0056          int chan_start, int chan_num);
0057 int wfx_hif_stop_scan(struct wfx_vif *wvif);
0058 int wfx_hif_configuration(struct wfx_dev *wdev, const u8 *conf, size_t len);
0059 int wfx_hif_shutdown(struct wfx_dev *wdev);
0060 
0061 #endif