2 ****************************************************************************************
6 * @brief TX function declarations
8 * Copyright (C) ESWIN 2015-2020
10 ****************************************************************************************
13 #ifndef _ECRNX_MSG_TX_H_
14 #define _ECRNX_MSG_TX_H_
16 #include "ecrnx_defs.h"
18 int ecrnx_send_reset(struct ecrnx_hw *ecrnx_hw);
19 int ecrnx_send_start(struct ecrnx_hw *ecrnx_hw);
20 int ecrnx_send_version_req(struct ecrnx_hw *ecrnx_hw, struct mm_version_cfm *cfm);
21 int ecrnx_send_add_if(struct ecrnx_hw *ecrnx_hw, const unsigned char *mac,
22 enum nl80211_iftype iftype, bool p2p, struct mm_add_if_cfm *cfm);
23 int ecrnx_send_remove_if(struct ecrnx_hw *ecrnx_hw, u8 vif_index);
24 int ecrnx_send_set_channel(struct ecrnx_hw *ecrnx_hw, int phy_idx,
25 struct mm_set_channel_cfm *cfm);
26 int ecrnx_send_key_add(struct ecrnx_hw *ecrnx_hw, u8 vif_idx, u8 sta_idx, bool pairwise,
27 u8 *key, u8 key_len, u8 key_idx, u8 cipher_suite,
28 struct mm_key_add_cfm *cfm);
29 int ecrnx_send_key_del(struct ecrnx_hw *ecrnx_hw, uint8_t hw_key_idx);
30 int ecrnx_send_bcn_change(struct ecrnx_hw *ecrnx_hw, u8 vif_idx, dma_addr_t bcn_addr,
31 u16 bcn_len, u16 tim_oft, u16 tim_len, u16 *csa_oft);
32 int ecrnx_send_tim_update(struct ecrnx_hw *ecrnx_hw, u8 vif_idx, u16 aid,
34 int ecrnx_send_roc(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *vif,
35 struct ieee80211_channel *chan, unsigned int duration);
36 int ecrnx_send_cancel_roc(struct ecrnx_hw *ecrnx_hw);
37 int ecrnx_send_set_power(struct ecrnx_hw *ecrnx_hw, u8 vif_idx, s8 pwr,
38 struct mm_set_power_cfm *cfm);
39 int ecrnx_send_set_edca(struct ecrnx_hw *ecrnx_hw, u8 hw_queue, u32 param,
40 bool uapsd, u8 inst_nbr);
41 int ecrnx_send_tdls_chan_switch_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *ecrnx_vif,
42 struct ecrnx_sta *ecrnx_sta, bool sta_initiator,
43 u8 oper_class, struct cfg80211_chan_def *chandef,
44 struct tdls_chan_switch_cfm *cfm);
45 int ecrnx_send_tdls_cancel_chan_switch_req(struct ecrnx_hw *ecrnx_hw,
46 struct ecrnx_vif *ecrnx_vif,
47 struct ecrnx_sta *ecrnx_sta,
48 struct tdls_cancel_chan_switch_cfm *cfm);
50 #ifdef CONFIG_ECRNX_P2P_DEBUGFS
51 int ecrnx_send_p2p_oppps_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *ecrnx_vif,
52 u8 ctw, struct mm_set_p2p_oppps_cfm *cfm);
53 int ecrnx_send_p2p_noa_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *ecrnx_vif,
54 int count, int interval, int duration,
55 bool dyn_noa, struct mm_set_p2p_noa_cfm *cfm);
56 #endif /* CONFIG_ECRNX_P2P_DEBUGFS */
58 #ifdef CONFIG_ECRNX_SOFTMAC
59 int ecrnx_send_sta_add(struct ecrnx_hw *ecrnx_hw, struct ieee80211_sta *sta,
60 u8 inst_nbr, struct mm_sta_add_cfm *cfm);
61 int ecrnx_send_sta_del(struct ecrnx_hw *ecrnx_hw, u8 sta_idx);
62 int ecrnx_send_set_filter(struct ecrnx_hw *ecrnx_hw, uint32_t filter);
63 int ecrnx_send_add_chanctx(struct ecrnx_hw *ecrnx_hw,
64 struct ieee80211_chanctx_conf *ctx,
65 struct mm_chan_ctxt_add_cfm *cfm);
66 int ecrnx_send_del_chanctx(struct ecrnx_hw *ecrnx_hw, u8 index);
67 int ecrnx_send_link_chanctx(struct ecrnx_hw *ecrnx_hw, u8 vif_idx, u8 chan_idx,
69 int ecrnx_send_unlink_chanctx(struct ecrnx_hw *ecrnx_hw, u8 vif_idx);
70 int ecrnx_send_update_chanctx(struct ecrnx_hw *ecrnx_hw,
71 struct ieee80211_chanctx_conf *ctx);
72 int ecrnx_send_sched_chanctx(struct ecrnx_hw *ecrnx_hw, u8 vif_idx, u8 chan_idx,
75 int ecrnx_send_dtim_req(struct ecrnx_hw *ecrnx_hw, u8 dtim_period);
76 int ecrnx_send_set_br(struct ecrnx_hw *ecrnx_hw, u32 basic_rates, u8 vif_idx, u8 band);
77 int ecrnx_send_set_beacon_int(struct ecrnx_hw *ecrnx_hw, u16 beacon_int, u8 vif_idx);
78 int ecrnx_send_set_bssid(struct ecrnx_hw *ecrnx_hw, const u8 *bssid, u8 vif_idx);
79 int ecrnx_send_set_vif_state(struct ecrnx_hw *ecrnx_hw, bool active,
81 int ecrnx_send_set_mode(struct ecrnx_hw *ecrnx_hw, u8 abgmode);
82 int ecrnx_send_set_idle(struct ecrnx_hw *ecrnx_hw, int idle);
83 int ecrnx_send_set_ps_mode(struct ecrnx_hw *ecrnx_hw, u8 ps_mode);
84 int ecrnx_send_set_ps_options(struct ecrnx_hw *ecrnx_hw, bool listen_bcmc,
85 u16 listen_interval, u8 vif_idx);
86 int ecrnx_send_set_slottime(struct ecrnx_hw *ecrnx_hw, int use_short_slot);
87 int ecrnx_send_ba_add(struct ecrnx_hw *ecrnx_hw, uint8_t type, uint8_t sta_idx,
88 u16 tid, uint8_t bufsz, uint16_t ssn,
89 struct mm_ba_add_cfm *cfm);
90 int ecrnx_send_ba_del(struct ecrnx_hw *ecrnx_hw, uint8_t sta_idx, u16 tid,
91 struct mm_ba_del_cfm *cfm);
92 int ecrnx_send_scan_req(struct ecrnx_hw *ecrnx_hw, struct ieee80211_vif *vif,
93 struct cfg80211_scan_request *param,
94 struct scan_start_cfm *cfm);
95 int ecrnx_send_scan_cancel_req(struct ecrnx_hw *ecrnx_hw,
96 struct scan_cancel_cfm *cfm);
97 void ecrnx_send_tdls_ps(struct ecrnx_hw *ecrnx_hw, bool ps_mode);
98 #endif /* CONFIG_ECRNX_SOFTMAC */
100 #ifdef CONFIG_ECRNX_FULLMAC
101 int ecrnx_send_me_config_req(struct ecrnx_hw *ecrnx_hw);
102 int ecrnx_send_me_chan_config_req(struct ecrnx_hw *ecrnx_hw);
103 int ecrnx_send_me_set_control_port_req(struct ecrnx_hw *ecrnx_hw, bool opened,
105 int ecrnx_send_me_sta_add(struct ecrnx_hw *ecrnx_hw, struct station_parameters *params,
106 const u8 *mac, u8 inst_nbr, struct me_sta_add_cfm *cfm);
107 int ecrnx_send_me_sta_del(struct ecrnx_hw *ecrnx_hw, u8 sta_idx, bool tdls_sta);
108 int ecrnx_send_me_traffic_ind(struct ecrnx_hw *ecrnx_hw, u8 sta_idx, bool uapsd, u8 tx_status);
109 int ecrnx_send_twt_request(struct ecrnx_hw *ecrnx_hw,
110 u8 setup_type, u8 vif_idx,
111 struct twt_conf_tag *conf,
112 struct twt_setup_cfm *cfm);
113 int ecrnx_send_twt_teardown(struct ecrnx_hw *ecrnx_hw,
114 struct twt_teardown_req *twt_teardown,
115 struct twt_teardown_cfm *cfm);
116 int ecrnx_send_me_rc_stats(struct ecrnx_hw *ecrnx_hw, u8 sta_idx,
117 struct me_rc_stats_cfm *cfm);
118 int ecrnx_send_me_rc_set_rate(struct ecrnx_hw *ecrnx_hw,
121 int ecrnx_send_me_set_ps_mode(struct ecrnx_hw *ecrnx_hw, u8 ps_mode);
122 int ecrnx_send_sm_connect_req(struct ecrnx_hw *ecrnx_hw,
123 struct ecrnx_vif *ecrnx_vif,
124 struct cfg80211_connect_params *sme,
125 struct sm_connect_cfm *cfm);
126 int ecrnx_send_sm_disconnect_req(struct ecrnx_hw *ecrnx_hw,
127 struct ecrnx_vif *ecrnx_vif,
129 int ecrnx_send_sm_external_auth_required_rsp(struct ecrnx_hw *ecrnx_hw,
130 struct ecrnx_vif *ecrnx_vif,
132 int ecrnx_send_sm_ft_auth_rsp(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *ecrnx_vif,
133 uint8_t *ie, int ie_len);
134 int ecrnx_send_apm_start_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *vif,
135 struct cfg80211_ap_settings *settings,
136 struct apm_start_cfm *cfm,
137 struct ecrnx_ipc_elem_var *elem);
138 int ecrnx_send_apm_stop_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *vif);
139 int ecrnx_send_apm_probe_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *vif,
140 struct ecrnx_sta *sta, struct apm_probe_client_cfm *cfm);
141 int ecrnx_send_scanu_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *ecrnx_vif,
142 struct cfg80211_scan_request *param);
143 int ecrnx_send_scanu_cancel_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *ecrnx_vif);
144 int ecrnx_send_apm_start_cac_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *vif,
145 struct cfg80211_chan_def *chandef,
146 struct apm_start_cac_cfm *cfm);
147 int ecrnx_send_apm_stop_cac_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *vif);
148 int ecrnx_send_tdls_peer_traffic_ind_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *ecrnx_vif);
149 int ecrnx_send_config_monitor_req(struct ecrnx_hw *ecrnx_hw,
150 struct cfg80211_chan_def *chandef,
151 struct me_config_monitor_cfm *cfm);
152 int ecrnx_send_mesh_start_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *vif,
153 const struct mesh_config *conf, const struct mesh_setup *setup,
154 struct mesh_start_cfm *cfm);
155 int ecrnx_send_mesh_stop_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *vif,
156 struct mesh_stop_cfm *cfm);
157 int ecrnx_send_mesh_update_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *vif,
158 u32 mask, const struct mesh_config *p_mconf, struct mesh_update_cfm *cfm);
159 int ecrnx_send_mesh_peer_info_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *vif,
160 u8 sta_idx, struct mesh_peer_info_cfm *cfm);
161 void ecrnx_send_mesh_peer_update_ntf(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *vif,
162 u8 sta_idx, u8 mlink_state);
163 void ecrnx_send_mesh_path_create_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *vif, u8 *tgt_addr);
164 int ecrnx_send_mesh_path_update_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *vif, const u8 *tgt_addr,
165 const u8 *p_nhop_addr, struct mesh_path_update_cfm *cfm);
166 void ecrnx_send_mesh_proxy_add_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *vif, u8 *ext_addr);
167 #if defined(CONFIG_ECRNX_P2P)
168 int ecrnx_send_p2p_start_listen_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *ecrnx_vif, unsigned int duration);
169 int ecrnx_send_p2p_cancel_listen_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_vif *ecrnx_vif);
171 #endif /* CONFIG_ECRNX_FULLMAC */
173 #ifdef CONFIG_ECRNX_BFMER
174 #ifdef CONFIG_ECRNX_SOFTMAC
175 void ecrnx_send_bfmer_enable(struct ecrnx_hw *ecrnx_hw, struct ieee80211_sta *sta);
177 void ecrnx_send_bfmer_enable(struct ecrnx_hw *ecrnx_hw, struct ecrnx_sta *ecrnx_sta,
178 const struct ieee80211_vht_cap *vht_cap);
179 #endif /* CONFIG_ECRNX_SOFTMAC*/
180 #ifdef CONFIG_ECRNX_MUMIMO_TX
181 int ecrnx_send_mu_group_update_req(struct ecrnx_hw *ecrnx_hw, struct ecrnx_sta *ecrnx_sta);
182 #endif /* CONFIG_ECRNX_MUMIMO_TX */
183 #endif /* CONFIG_ECRNX_BFMER */
186 int ecrnx_send_dbg_trigger_req(struct ecrnx_hw *ecrnx_hw, char *msg);
187 int ecrnx_send_dbg_mem_read_req(struct ecrnx_hw *ecrnx_hw, u32 mem_addr,
188 struct dbg_mem_read_cfm *cfm);
189 int ecrnx_send_dbg_mem_write_req(struct ecrnx_hw *ecrnx_hw, u32 mem_addr,
191 int ecrnx_send_dbg_set_mod_filter_req(struct ecrnx_hw *ecrnx_hw, u32 filter);
192 int ecrnx_send_dbg_set_sev_filter_req(struct ecrnx_hw *ecrnx_hw, u32 filter);
193 int ecrnx_send_dbg_get_sys_stat_req(struct ecrnx_hw *ecrnx_hw,
194 struct dbg_get_sys_stat_cfm *cfm);
195 int ecrnx_send_cfg_rssi_req(struct ecrnx_hw *ecrnx_hw, u8 vif_index, int rssi_thold, u32 rssi_hyst);
196 int ecrnx_send_set_gain_delta_req(struct ecrnx_hw *ecrnx_hw);
197 int ecrnx_send_cal_result_get_req(struct ecrnx_hw *ecrnx_hw, void *cfm);
198 #endif /* _ECRNX_MSG_TX_H_ */