iwpriv工具通过ioctl动态获取相应无线网卡驱动的(2)

发布时间:2021-06-11

dex = cmd - SIOCIWFIRSTPRIV;//

if (index < dev->wireless_handlers->num_private)
return dev->wireless_handlers->private[index];//该private命令的handler.
/* Not found */
return NULL;
}


下面wlan_private_args为本wifi网卡驱动的所能支持的所有命令,也就是iwpriv命令所能支持的所有命令

struct iw_handler_def wlan_handler_def = {
num_standard:sizeof(wlan_handler) / sizeof(iw_handler),
num_private:sizeof(wlan_private_handler) / sizeof(iw_handler),
num_private_args:sizeof(wlan_private_args) / sizeof(struct iw_priv_args),
standard:(iw_handler *) wlan_handler,
private:(iw_handler *) wlan_private_handler,
private_args:(struct iw_priv_args *) wlan_private_args,
#if WIRELESS_EXT > 20
get_wireless_stats:wlan_get_wireless_stats,
#endif
};

以下为示意代码,我们的wifi网卡驱动支持如下iwpriv命令.


static const struct iw_priv_args wlan_private_args[] = {
"extscan"
"hostcmd"
"arpfilter"
"regrdwr"
"sdcmd52rw"
"sdcmd53rw"
"setgetconf"
"getcis"
"scantype"
"deauth"
"getNF"
"getRSSI"
"bgscan"
"enable11d"
"adhocgrate"
"sdioclock"
"wmm"
"uapsdnullgen"
"setcoalescing"
"adhocgprot"
"setpowercons"
"wmm_qosinfo"
"lolisteninter"
"fwwakeupmethod"
"psnullinterval"
"bcnmisto"
"adhocawakepd"
"moduletype"
"autodeepsleep"
"enhanceps"
"wakeupmt"
"setrxant"
"settxant"
"authalgs"
"encryptionmode"
"setregioncode"
"setlisteninter"
"setmultipledtim"
"setbcnavg"
"setdataavg
"associate"
"getregioncode"
"getlisteninter"
"getmultipledtim"
"gettxrate"
"getbcnavg"
"getdataavg"
"getrxant"
"gettxant"
"gettsf"
"wpssession"
"deepsleep"
"adhocstop"
"radioon"
"radiooff"
"rmaeskey"
"crypto_test"
"reasso-on"
"reasso-off"
"wlanidle-on"
"wlanidle-off"
"sleepparams"
"requesttpc"
"powercap"
"measreq"
"bca-ts"
"scanmode"
"getadhocstatus"
"setgenie"
"getgenie"
"qstatus"
"ts_status"
"setaeskey"
"getaeskey"
"version"
"verext"
"setwpaie"
"setband"
"setadhocch"
"chanswann"
"getband"
"getadhocch"
"getlog"
"tpccfg"
"scanprobes"
"ledgpio"
"sleeppd"
"rateadapt"
"getSNR"
"getrate"
"getrxinfo"
"atimwindow"
"bcninterval"
"sdiopullctrl"
"scantime"
"sysclock"
"txcontrol"
"hscfg"
"hssetpara"
"inactoext"
"dbgscfg"
"drvdbg"
"drvdelaymax"
"intfctrl"
"setquietie"
""
"setusersc
an"
"getscantable"
"setmrvltlv"
"getassocrsp"
"addts"
"delts"
"qconfig"

精彩图片

热门精选

大家正在看