1 #ifndef __ECRNX_DEBUGFS_FUNC_H_
2 #define __ECRNX_DEBUGFS_FUNC_H_
4 #include "ecrnx_defs.h"
5 #include "ecrnx_utils.h"
6 #include "eswin_utils.h"
7 #include "fw_head_check.h"
9 #include <linux/etherdevice.h>
13 #define HOST_DRIVER_VERSION "1.0.0"
15 #define NX_VIRT_STA_MAX (NX_VIRT_DEV_MAX + NX_REMOTE_STA_MAX)
34 struct ecrnx_debugfs_survey_info_tbl
36 struct list_head list;
37 u8 ssid[IEEE80211_MAX_SSID_LEN];
47 struct ecrnx_debugfs_sta
49 u8 mac_addr[ETH_ALEN];
50 u16 aid; /* association ID */
51 u8 sta_idx; /* Identifier of the station */
52 enum nl80211_chan_width width; /* Channel width */
53 u8 ch_idx; /* Identifier of the channel
54 context the station belongs to */
55 bool qos; /* Flag indicating if the station
57 bool ht; /* Flag indicating if the station
59 bool vht; /* Flag indicating if the station
65 u8 ampdu_enable;/* for enable Tx A-MPDU */
67 /* for processing Tx A-MPDU */
69 /* u8 ADDBA_retry_count; */
70 u8 candidate_tid_bitmap;
79 typedef int (*_cmd_func)(uint32_t index, uint8_t *param);
84 }ECRNX_CLI_PARAM_RANGE_ST;
90 ECRNX_CLI_PARAM_RANGE_ST param_range[MAX_ARGV];
94 extern ECRNX_CLI_TABLE_ST ecrnx_cli_tab[];
107 SLAVE_WOW_WLAN_GOPI_INFO,
116 uint32_t debugfs_type;
122 uint32_t debug_level;
146 uint8_t func_and_param[56];
147 }slave_cli_func_info_t;
154 uint32_t debugfs_type;
155 unsigned char rxdata[ECRNX_RXSIZE];
157 wait_queue_head_t rxdataq;
161 extern debugfs_info_t debugfs_info;
162 extern debugfs_resp_t debugfs_resp;
164 extern u32 reg_buf[512];
166 void ecrnx_debug_param_send(dbg_req_t *req);
168 struct ring_buffer *usb_dbg_buf_get(void);
170 int ecrnx_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *dev,
171 int idx, u8 *mac, struct station_info *sinfo);
172 int ecrnx_cfg80211_get_channel(struct wiphy *wiphy,
173 struct wireless_dev *wdev,
174 struct cfg80211_chan_def *chandef);
175 int ecrnx_log_level_get(LOG_CTL_ST *log);
176 int ecrnx_fw_log_level_set(u32 level, u32 dir);
177 bool ecrnx_log_host_enable(void);
178 int ecrnx_host_ver_get(u8 *ver);
179 int ecrnx_fw_ver_get(u8 *ver);
180 int ecrnx_build_time_get(u8 *build_time);
181 int ecrnx_rf_info_get(struct seq_file *seq, IF_TYPE_EN iftype,RF_INFO_ST *cur, RF_INFO_ST *oper);
182 int ecrnx_country_code_get(struct seq_file *seq, char *alpha2);
183 int ecrnx_mac_addr_get(struct seq_file *seq, IF_TYPE_EN iftype, u8 *mac_addr);
184 int ecrnx_mac_addr_get_ex(struct seq_file *seq, u8 *mac_addr_info);
185 int ecrnx_channel_get(struct seq_file *seq, IF_TYPE_EN iftype, struct cfg80211_chan_def *chandef);
186 int ecrnx_p2p_role_get(struct seq_file *seq, IF_TYPE_EN iftype);
187 int ecrnx_bssid_get(struct seq_file *seq, IF_TYPE_EN iftype, u8 *bssid);
188 int ecrnx_signal_level_get(struct seq_file *seq, IF_TYPE_EN iftype, s8 *noise_dbm);
189 int ecrnx_flags_get(struct seq_file *seq, IF_TYPE_EN iftype, u32 *flags);
190 int ecrnx_ssid_get(struct seq_file *seq, IF_TYPE_EN iftype, char *ssid);
191 int ecrnx_sta_mac_get(struct seq_file *seq, IF_TYPE_EN iftype, u8 sta_mac[][ETH_ALEN+1]);
192 int ecrnx_mac_reg_dump(struct seq_file *seq);
193 int ecrnx_rf_reg_dump(struct seq_file *seq);
194 int ecrnx_bb_reg_dump(struct seq_file *seq);
195 int ecrnx_efuse_map_dump(struct seq_file *seq);
196 int ecrnx_slave_reg_read(u32 addr, u32 *data, u32 len);
197 int ecrnx_slave_reg_write(u32 addr, u32 data, u32 len);
198 int ecrnx_slave_cli_send(u8 *cli, u8 *resp);
199 void ecrnx_debugfs_survey_info_update(struct ecrnx_hw *ecrnx_hw, struct cfg80211_bss *bss);
200 void ecrnx_debugfs_noise_of_survey_info_update(struct ecrnx_hw *ecrnx_hw,
201 struct ecrnx_survey_info *ecrnx_survey, int chan_no);
202 void ecrnx_debugfs_add_station_in_ap_mode(struct ecrnx_hw *ecrnx_hw,
203 struct ecrnx_sta *sta, struct station_parameters *params);
204 int cli_macbyp_start(uint32_t index, uint8_t *param);
205 int cli_macbyp_stop(uint32_t index, uint8_t *param);
206 int cli_rf_txgain(uint32_t index, uint8_t *param);
207 int cli_rf_rxgain(uint32_t index, uint8_t *param);
208 int cli_rf_chan(uint32_t index, uint8_t *param);
209 int cli_cmd_parse(uint8_t *cmd);