/*
* Common code for wl command-line swiss-army-knife utility
*
* $Copyright (C) 2002-2005 Broadcom Corporation$
*
* $Id: wlu.c 404565 2013-05-28 08:08:21Z cylee $
*/
#ifdef BCMINTERNAL
/*
* Policy notes:
* This source file generates both the "wl" command and the
* more restricted "wl-tool" manufacturing test command (-DWL_TOOL).
* - wl driver wlc_ioctl() commands which are enclosed within #ifdef BCMINTERNAL
* should be enclosed within #ifdef BCMINTERNAL in wlu.c .
* - exposing any new commands in wl-tool requires an "ok" from romanb.
*/
#endif /* BCMINTERNAL */
#ifdef WIN32
#include <windows.h>
#endif
#if !defined(WLNINTENDO) && !defined(TARGETOS_nucleus)
#define CLMDOWNLOAD
#endif
#if defined(_HNDRTE_)
#include <typedefs.h>
#include <osl.h>
#endif
#if defined(__NetBSD__)
#include <typedefs.h>
#endif
/* Because IL_BIGENDIAN was removed there are few warnings that need
* to be fixed. Windows was not compiled earlier with IL_BIGENDIAN.
* Hence these warnings were not seen earlier.
* For now ignore the following warnings
*/
#ifdef WIN32
#pragma warning(push)
#pragma warning(disable : 4244)
#pragma warning(disable : 4761)
#endif
#include <typedefs.h>
#include <epivers.h>
#include <proto/ethernet.h>
#include <proto/802.11.h>
#include <proto/802.1d.h>
#include <proto/802.11e.h>
#include <proto/wpa.h>
#include <proto/bcmip.h>
#include <proto/wps.h>
#include <bcmwifi_rates.h>
#include "wlu_rates_matrix.h"
#ifdef BCMCCX
#include <proto/802.11_ccx.h>
#endif
#ifdef WLBTAMP
#include <proto/bt_amp_hci.h>
#endif
#ifdef BCMSDIO
#include <sdiovar.h>
#endif
#include <bcmutils.h>
#include <bcmendian.h>
#include <bcmwifi_channels.h>
#include <bcmsrom_fmt.h>
#include <bcmsrom_tbl.h>
#include "wlu_common.h"
#include "wlu.h"
#include <bcmcdc.h>
#if defined(WLPFN) && defined(linux)
#ifndef TARGETENV_android
#include <unistd.h>
#endif
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <net/if.h>
#include <linux/if_packet.h>
#endif /* WLPFN */
#ifdef WLEXTLOG
#include <wlc_extlog_idstr.h>
#endif
#ifdef LINUX
#include <inttypes.h>
#endif
#include <miniopt.h>
#include <errno.h>
#if defined SERDOWNLOAD || defined CLMDOWNLOAD
#include <sys/stat.h>
#include <trxhdr.h>
#ifdef SERDOWNLOAD
#include <usbrdl.h>
#endif
#include <stdio.h>
#include <errno.h>
#ifndef WIN32
#include <fcntl.h>
#endif /* WIN32 */
#endif /* SERDOWNLOAD || defined CLMDOWNLOAD */
/* XXX HACK!! Should read this from target */
#if LCNCONF || SSLPNCONF
#define MAX_CHUNK_LEN 1456 /* 8 * 7 * 26 */
#else
#define MAX_CHUNK_LEN 1408 /* 8 * 8 * 22 */
#endif
#include <bcm_mpool_pub.h>
#include <proto/bcmipv6.h>
#include <wlc_ppr.h>
/* For backwards compatibility, the absense of the define 'NO_FILESYSTEM_SUPPORT'
* implies that a filesystem is supported.
*/
#if !defined(BWL_NO_FILESYSTEM_SUPPORT)
#define BWL_FILESYSTEM_SUPPORT
#endif
cmd_func_t wl_int;
const ofdm_rates_t ofdm_rates[] = { /* 6b, 9, 12b, 18, 24b, 36, 48, 54 Mbps */
0x8c, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6c };
#ifdef ATE_BUILD
/* These are the only functions being used from this file by the ATE firmware */
static cmd_func_t wl_channel, wl_version, wl_void, wl_rate_mrate, wl_nrate;
static cmd_func_t wl_pkteng, wl_pkteng_stats, wl_phy_txpwrindex, wl_reg, wl_band;
int wl_seq_batch_in_client(bool enable);
int wlu_get(void *wl, int cmd, void *buf, int len);
int wlu_set(void *wl, int cmd, void *buf, int len);
static void wl_printrate(int val);
static int rate_string2int(char *s);
static char *rate_int2string(char *buf, int val);
int wlu_var_getbuf(void *wl, const char *iovar, void *param, int param_len, void **bufptr);
int wlu_var_getbuf_sm(void *wl, const char *iovar, void *param, int param_len, void **bufptr);
int wlu_var_getbuf_med(void *wl, const char *iovar, void *param, int param_len, void **bufptr);
int wlu_var_setbuf(void *wl, const char *iovar, void *param, int param_len);
int wlu_iovar_get(void *wl, const char *iovar, void *outbuf, int len);
int wlu_iovar_set(void *wl, const char *iovar, void *param, int paramlen);
int wlu_iovar_getint(void *wl, const char *iovar, int *pval);
int wlu_iovar_setint(void *wl, const char *iovar, int val);
static cmd_func_t wl_gpioout;
#else /* ATE_BUILD */
static cmd_func_t wl_print_deprecate;
static cmd_func_t wl_void, wl_rssi, wl_rssi_event, wl_phy_rssi_ant, wl_gmode;
static cmd_func_t wlu_dump, wlu_mempool, wlu_srdump, wlu_srwrite, wlu_srvar, wl_nvsource;
static cmd_func_t wlu_ciswrite, wlu_cisupdate, wlu_cisdump, wlu_offloads_stats;
#ifdef D11AC_IOTYPES
static cmd_func_t wl_rate, wl_rate_mrate, wl_phy_rate, wl_bss_max;
#else
static cmd_func_t wl_rate_mrate, wl_phy_rate, wl_bss_max;
#endif
static cmd_func_t wl_channel, wl_chanspec, wl_chanim_state, wl_chanim_mode;
static cmd_func_t wl_radio, wl_version, wl_list, wl_band, wl_bandlist, wl_phylist;
static cmd_func_t wl_join, wl_tssi, wl_txpwr, wl_atten, wl_evm, wl_country;
static cmd_func_t wl_out, wl_txpwr1, wl_country_ie_override;
static cmd_func_t wl_maclist, wl_get_pktcnt, wl_upgrade;
static cmd_func_t wl_maclist_1;
static cmd_func_t wl_rateset, wl_txbf_rateset, wl_interfere, wl_interfere_override;
static cmd_func_t wl_radar_args, wl_radar_thrs, wl_dfs_status;
static cmd_func_t wl_radar_status, wl_clear_radar_status;
static cmd_func_t wl_get_txpwr_limit, wl_get_current_power, wl_get_instant_power;
static cmd_func_t wl_get_current_txppr;
static cmd_func_t wl_var_get, wl_var_getint, wl_var_getinthex, wl_var_getandprintstr;
static cmd_func_t wl_var_setint, wl_addwep, wl_rmwep;
static cmd_func_t wl_nvdump, wl_nvget, wl_nvset, wl_sta_info, wl_chan_info;
static cmd_func_t wl_wme_ac_req, wl_add_ie, wl_del_ie, _wl_list_ie;
static cmd_func_t wl_wme_apsd_sta, wl_wme_dp, wl_lifetime;
static cmd_func_t wl_rand, wl_otpw, wl_otpraw, wl_counters, wl_delta_stats;
static cmd_func_t wl_assoc_info, wl_wme_counters, wl_devpath;
static cmd_func_t wl_management_info;
static cmd_func_t wl_event_bitvec, wl_diag, wl_var_void;
static cmd_func_t wl_auto_channel_sel;
static cmd_func_t wl_bsscfg_int, wl_bsscfg_enable, wl_ap_bsscfg;
static cmd_func_t wl_msglevel, wl_plcphdr, wl_reg, wl_macreg, wl_band_elm;
static cmd_func_t wl_phymsglevel;
static cmd_func_t wl_rateparam, wl_wepstatus, wl_status, wl_spect;
static cmd_func_t wl_sup_rateset, wl_scan, wl_send_csa, wl_iscan, wl_escan, wl_scanol;
#ifdef BCMINTERNAL
static cmd_func_t wl_sendprb;
#endif /* BCMINTERNAL */
#ifdef EXTENDED_SCAN
static cmd_func_t wl_extdscan;
#endif
static cmd_func_t wl_dump_chanlist, wl_primary_key, wl_measure_req, wl_send_quiet;
static cmd_func_t wl_dump_chanspecs, wl_cur_mcsset;
static cmd_func_t wl_wsec, wl_keys, wl_wsec_test;
static cmd_func_t wl_channels_in_country;
static cmd_func_t wl_wpa_auth, wl_tsc, wl_deauth_rc, wl_ssid, wl_bssid, wl_smfstats;
static cmd_func_t wl_wds_wpa_role_old, wl_wds_wpa_role, wl_set_pmk;
static cmd_func_t wl_rm_request, wl_rm_report;
static cmd_func_t wl_join_pref, wl_assoc_pref;
static cmd_func_t wl_dump_networks, wl_mac, wl_revinfo, wl_iov_mac, wl_iov_mac_params;
static cmd_func_t wl_cac, wl_tslist, wl_tspec, wl_tslist_ea, wl_tspec_ea, wl_cac_delts_ea;
static cmd_func_t wl_varstr, wl_var_setintandprintstr;
#if defined(BCMINTERNAL) || defined(BCMDBG)
static cmd_func_t wl_phy_debug_cmd;
#endif
static cmd_func_t wl_rifs;
static cmd_func_t wl_rifs_advert;
static cmd_func_t wl_test_tssi, wl_test_tssi_offs, wl_phy_rssiant, wl_rxiq;
static cmd_func_t wl_obss_scan, wl_obss_coex_action;
static cmd_func_t wl_dump_lq;
static cmd_func_t wl_monitor_lq;
static cmd_func_t wl_test_idletssi;
#ifdef WLPFN
static cmd_func_t wl_pfn_set;
static cmd_func_t wl_pfn_add;
static cmd_func_t wl_pfn_add_bssid;
static cmd_func_t wl_pfn_cfg;
static cmd_func_t wl_pfn;
static cmd_func_t wl_pfnbest;
static cmd_func_t wl_pfn_suspend;
#if defined(linux)
static cmd_func_t wl_pfn_event_check;
static cmd_func_t wl_escan_event_check;
static cmd_func_t wl_escanresults;
#e
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
linux安装wl工具,broadcom博通wl驱动 (147个子文件)
wlu.c 988KB
bcmutils.c 81KB
wlm.c 77KB
dhdu.c 71KB
wlc_ppr.c 61KB
wlu_client_shared.c 35KB
wlu_client_shared.c 35KB
wlu_pipe.c 34KB
wlu_pipe.c 34KB
bcmwifi_channels.c 30KB
wlu_server_shared.c 29KB
wlu_iov.c 29KB
wlu_cmd.c 28KB
wlu_linux.c 24KB
shellproc_linux.c 19KB
wlu_rates_matrix.c 17KB
dhdu_linux.c 14KB
wlu_pipe_linux.c 13KB
wlu_pipe_linux.c 13KB
wlu_server_linux.c 7KB
wlu_common.c 7KB
wlu_common.c 7KB
ucode_download.c 7KB
bcm_app_utils.c 7KB
bcmwifi.c 5KB
miniopt.c 3KB
wlioctl.h 238KB
802.11.h 146KB
sbchipc.h 79KB
bcmsrom_tbl.h 60KB
bcmdevs.h 45KB
bcmutils.h 35KB
wlm.h 33KB
bcmevent.h 22KB
sdio.h 22KB
wlu_rates_matrix.h 21KB
p2p.h 20KB
linux_osl.h 19KB
bcmwifi_channels.h 17KB
bcmsrom_fmt.h 17KB
dbus.h 16KB
wps.h 15KB
sdioh.h 15KB
sbpcmcia.h 14KB
linuxver.h 14KB
bt_amp_hci.h 13KB
wlc_ppr.h 13KB
wlc_ppr.h 13KB
hnddma.h 13KB
siutils.h 13KB
sbsdioh.h 12KB
bcmwifi_rates.h 12KB
sbsdpcmdev.h 11KB
hndsoc.h 11KB
bcm_mpool_pub.h 11KB
bcmdefs.h 11KB
pcicfg.h 11KB
bcmsdpcm.h 10KB
wlu_remote.h 10KB
wlu_remote.h 10KB
typedefs.h 9KB
bcmendian.h 9KB
bcmsdstd.h 8KB
sbhnddma.h 8KB
wlfc_proto.h 8KB
aidmp.h 8KB
event_log.h 8KB
bcmpcispi.h 8KB
usbrdl.h 8KB
bcmsdh.h 8KB
bcmnvram.h 8KB
bcmip.h 7KB
ethernet.h 7KB
sbsdio.h 7KB
wpa.h 6KB
sbsprom.h 6KB
spid.h 6KB
sbconfig.h 5KB
802.11e.h 5KB
bcmsdh_fd.h 5KB
eapol.h 5KB
wlc_clm_rates.h 5KB
wlu_common.h 5KB
wlu_common.h 5KB
bcmspibrcm.h 5KB
bcmcdc.h 5KB
bcmwifi.h 4KB
bcmsdbus.h 4KB
bcmsdh_sdmmc.h 4KB
wlu.h 4KB
bcmsdspi.h 4KB
sbsocram.h 4KB
wlu_cmd.h 4KB
wlc_extlog_idstr.h 4KB
bcmipv6.h 3KB
dhdioctl.h 3KB
rwl_wifi.h 3KB
bcmsdbrcm.h 3KB
saverestore.h 3KB
trxhdr.h 3KB
共 147 条
- 1
- 2
资源评论
- u0101678002024-03-25资源内容总结地很全面,值得借鉴,对我来说很有用,解决了我的燃眉之急。
- eutron_hunan2024-03-26资源不错,内容挺好的,有一定的使用价值,值得借鉴,感谢分享。
ShiLianXin
- 粉丝: 120
- 资源: 38
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功