iwpriv命令

使用iwpriv命令时,尽量往radio层设置,即wifiN接口上


强制HT40

iwpriv ath0 disablecoext0
0 = 强制
1 = 关闭
查看
~ # iwpriv ath0 get_disablecoext
ath0     get_disablecoext:0

 

设置国家码

iwpriv wifi0setCountry CN
iwpriv wifi0setCountryID 156
iwpriv wifi0setCountry US
iwpriv wifi0setCountryID 840
查看
~ # iwpriv ath0 get_countrycode
ath0     get_countrycode:840

 

设置MAC过滤

iwpriv ath0 maccmd1
0 = 关闭ACL
1 = 允许列表
2 = 拒绝列表
3 = 清空ACL列表
4 = 暂停过滤
查看
~ # iwpriv ath0 get_maccmd 
ath0
     get_maccmd:1

 

终端隔离

iwpriv ath0 ap_bridge1
0 = 不隔离
1 = 隔离
查看
~ # iwpriv ath0 get_ap_bridge
ath0     get_ap_bridge:1

 

更改接口模式

iwpriv ath0 mode11G
11A = 802.11a(5GHz)
11B = 802.11b(2.4GHz)
11G = 802.11g
11NAHT20 = 802.11n A-band 20 MHz channels
11NGHT20 = 802.11n G-band 20 MHz channels
11NAHT40PLUS = 选大于主信道的频率做为扩展信道
11NAHT40MINUS = 选小于...
11NGHT40PLUS 
11NGHT40MINUS
查看
~ # iwpriv ath0 get_mode 
ath0
     get_mode:11G

 

设置为纯G模式

iwpriv ath0 pureg1
0 = 关闭
1 = 设置
查看
~ # iwpriv ath0 get_pureg
ath0     get_pureg:1

 

设置认证模式

iwpriv ath0 authmode1
1 = open
2 = shared
3 = wpa1
4 = wpa1-psk
5 = wpa2
6 = wpa2-psk
7 = wpa1-wpa2
8 = wpa1-wpa2-psk
9 = wapi
10 = wapi-psk

查看认证模式
~ # iwpriv ath0 get_authmode
ath0     get_authmode:1

 

清除app、opt的IE信息

iwpriv ath0 clrappoptie1

hostapd中会设置WPA或RSN的IE信息

认证模式改为open后

使用该命令清除IE信息

 

设置rsn能力

iwpriv ath0 rsncaps0x01
查看
~ # iwpriv ath0 get_rsncaps
ath0     get_rsncaps:1

 

设置wpa模式

iwpriv ath0 wpa3
0 = no wpa
1 = wpa
2 = wpa2
3 = both wpa and wpa2

 

使能ampdu

iwpriv ath0 ampdu1
查看
~ # iwpriv ath0 get_ampdu 
ath0
     get_ampdu:1

 

使能shortgi

iwpriv ath0 shortgi1
查看
~ # iwpriv ath0 get_shortgi 
ath0
     get_shortgi:1

 

radio接口

~ # iwpriv wifi0
wifi0    Available private ioctls :
         setHALparam     (8BE0) : set   2int   &get       
         getHALparam     (8BE1) : set   1int   &get   1int  
         DMABcnRespT     (0000) : set   1int   &get       
         GetDMABcnRespT   (0000) :set       & get   1int  
         SWBcnRespT      (0001) : set   1int   &get       
         GetSWBcnRespT   (0001) : set       & get   1int  
         AddSWBbo        (0002) : set   1int   &get       
         GetAddSWBAbo    (0002) : set       & get   1int  
         6MBAck          (0003) : set   1int   &get       
         Get5MBAck       (0003) : set       & get   1int  
         CWMIgnExCCA     (0004) : set   1int   &get       
         GetCWMIgnExCCA   (0004) :set       & get   1int  
         ForceBias       (0005) : set   1int   &get       
         GetForceBias    (0005) : set       & get   1int  
         ForBiasAuto     (0006) : set   1int   &get       
         GetForBiasAuto   (0006) :set       & get   1int  
         PCIEPwrSvEn     (0007) : set   1int   &get       
         GetPCIEPwrSvEn   (0007) :set       & get   1int  
         PCIEL1SKPEn     (0008) : set   1int   &get       
         GetPCIEL1SKPEn   (0008) :set       & get   1int  
         PCIEClkReq      (0009) : set   1int   &get       
         GetPCIEClkReq   (0009) : set       & get   1int  
         PCIEWAEN        (000A) : set   1int   &get       
         GetPCIEWAEN     (000A) : set       & get   1int  
         PCIEDETACH      (000B) : set   1int   &get       
         GetPCIEDETACH   (000B) : set       & get   1int  
         PCIEPwRset      (000C) : set   1int   &get       
         GetPCIEPwRset   (000C) : set       & get   1int  
         PCIERestore     (000D) : set   1int   &get       
         GetPCIERestore   (000D) :set       & get   1int  
         HTEna           (000F) : set   1int   &get       
         GetHTEna        (000F) : set       & get   1int  
         DisTurboG       (0010) : set   1int   &get       
         GetDisTurboG    (0010) : set       & get   1int  
         OFDMTrgLow      (0011) : set   1int   &get       
         GetOFDMTrgLow   (0011) : set       & get   1int  
         OFDMTrgHi       (0012) : set   1int   &get       
         GetOFDMTrgHi    (0012) : set       & get   1int  
         CCKTrgHi        (0013) : set   1int   &get       
         GetCCKTrgHi     (0013) : set       & get   1int  
         CCKTrgLow       (0014) : set   1int   &get       
         GetCCKTrgLow    (0014) : set       & get   1int  
         ANIEna          (0015) : set   1int   &get       
         GetANIEna       (0015) : set       & get   1int  
         NoiseImmLvl     (0016) : set   1int   &get       
         GetNoiseImmLvl   (0016) :set       & get   1int  
         OFDMWeakDet     (0017) : set   1int   &get       
         GetOFDMWeakDet   (0017) :set       & get   1int  
         CCKWeakThr      (0018) : set   1int   &get       
         GetCCKWeakThr   (0018) : set       & get   1int  
         SpurImmLvl      (0019) : set   1int   &get       
         GetSpurImmLvl   (0019) : set       & get   1int  
         FIRStepLvl      (001A) : set   1int   &get       
         GetFIRStepLvl   (001A) : set       & get   1int  
         RSSIThrHi       (001B) : set   1int   &get       
         GetRSSIThrHi    (001B) : set       & get   1int  
         RSSIThrLow      (001C) : set   1int   &get       
         GetRSSIThrLow   (001C) : set       & get   1int  
         DivtyCtl        (001D) : set   1int   &get       
         GetDivtyCtl     (001D) : set       & get   1int  
         AntSwap         (001E) : set   1int   &get       
         GetAntSwap      (001E) : set       & get   1int  
         DisPACal        (0020) : set   1int   &get       
         GetDisPACal     (0020) : set       & get   1int  
         HALDbg          (0021) : set   1int   &get       
         GetHALDbg       (0021) : set       & get   1int  
         RegRead_base    (0024) : set   1int   &get       
         GetRegReads     (0024) : set       & get   1int  
         keycache        (002C) : set   1int   &get       
         get_keycache    (002C) : set       & get   1int  
         TxBFCTL         (0025) : set   1int   &get       
         GetTxBFCTL      (0025) : set       & get   1int  
         printBBDebug    (002D) : set   1int   &get       
         get_printBBDebug (002D) : set       & get   1int  
         txchainmask     (1001) : set   1int   &get       
         get_txchainmask  (1001) :set       & get   1int  
         rxchainmask     (1002) : set   1int   &get       
         get_rxchainmask  (1002) :set       & get   1int  
         txchmaskleg     (1003) : set   1int   &get       
         get_txchmaskleg  (1003) :set       & get   1int  
         rxchmaskleg     (1004) : set   1int   &get       
         get_rxchmaskleg  (1004) :set       & get   1int  
         chainmasksel    (1005) : set   1int   &get       
         get_chainmasksel (1005) : set       & get   1int  
         AMPDU           (1006) : set   1int   &get       
         getAMPDU        (1006) : set       & get   1int  
         AMPDULim        (1007) : set   1int   &get       
         getAMPDULim     (1007) : set       & get   1int  
         AMPDUFrames     (1008) : set   1int   &get       
         getAMPDUFrames   (1008) :set       & get   1int  
         AMPDURxBsize    (105A) : set   1int   &get       
         getAMPDURxBsize  (105A) :set       & get   1int  
         LDPC            (1020) : set   1int   &get       
         getLDPC         (1020) : set       & get   1int  
         burst           (104D) : set   1int   &get       
         get_burst       (104D) : set       & get   1int  
         burst_dur       (104E) : set   1int   &get       
         get_burst_dur   (104E) : set       & get   1int  
         AggrProt        (1009) : set   1int   &get       
         getAggrProt     (1009) : set       & get   1int  
         AggrProtDur     (100A) : set   1int   &get       
         getAggrProtDur   (100A) :set       & get   1int  
         AggrProtMax     (100B) : set   1int   &get       
         getAggrProtMax   (100B) :set       & get   1int  
         TXPowLim2G      (100C) : set   1int   &get       
         getTxPowLim2G   (100C) : set       & get   1int  
         TXPowLim5G      (100D) : set   1int   &get       
         getTxPowLim5G   (100D) : set       & get   1int  
         TXPwrOvr        (100E) : set   1int   &get       
         getTXPwrOvr     (100E) : set       & get   1int  
         DisASPMWk       (100F) : set   1int   &get       
         getDisASPMWk    (100F) : set       & get   1int  
         EnaASPM         (1010) : set   1int   &get       
         getEnaASPM      (1010) : set       & get   1int  
         BcnNoReset      (1011) : set   1int   &get       
         getBcnNoReset   (1011) : set       & get   1int  
         CABlevel        (1012) : set   1int   &get       
         getCABlevel     (1012) : set       & get   1int  
         ATHDebug        (1013) : set   1int   &get       
         getATHDebug     (1013) : set       & get   1int  
         tpscale         (1014) : set   1int   &get       
         get_tpscale     (1014) : set       & get   1int  
         acktimeout      (1015) : set   1int   &get       
         get_acktimeout   (1015) :set       & get   1int  
         rximt_first     (1040) : set   1int   &get       
         get_rximt_first  (1040) :set       & get   1int  
         rximt_last      (1041) : set   1int   &get       
         get_rximt_last   (1041) :set       & get   1int  
         tximt_first     (1042) : set   1int   &get       
         get_tximt_first  (1042) :set       & get   1int  
         tximt_last      (1043) : set   1int   &get       
         get_tximt_last   (1043) :set       & get   1int  
         AMSDU           (101A) : set   1int   &get       
         getAMSDU        (101A) : set       & get   1int  
         retrydur        (101B) : set   1int   &get       
         get_retrydur    (101B) : set       & get   1int  
         hbrPER_high     (101C) : set   1int   &get       
         get_hbrPER_high  (101C) :set       & get   1int  
         hbrPER_low      (101D) : set   1int   &get       
         get_hbrPER_low   (101D) :set       & get   1int  
         txstbc          (101F) : set   1int   &get       
         get_txstbc      (101F) : set       & get   1int  
         rxstbc          (101E) : set   1int   &get       
         get_rxstbc      (101E) : set       & get   1int  
         immunity        (1022) : set   1int   &get       
         get_immunity    (1022) : set       & get   1int  
         limit_legacy    (1021) : set   1int   &get       
         get_limit_legacy (1021) : set       & get   1int  
         get_ledcustom   (1025) : set       & get   1int  
         set_ledcustom   (1025) : set   1int   &get       
         get_swapled     (1026) : set       & get   1int  
         set_swapled     (1026) : set   1int   &get       
         get_cvtimeout   (1045) : set       & get   1int  
         set_cvtimeout   (1045) : set   1int   &get       
         set_bcnburst    (1050) : set   1int   &get       
         get_bcnburst    (1050) : set       & get   1int  
         setCountryID    (2000) : set   1int   &get       
         getCountryID    (2000) : set       & get   1int  
         setHwaddr       (8BE4) : set  17 char  &get       
         getHwaddr       (8BE5) : set       & get  17 char 
         setCountry      (8BE2) : set   3char  &get       
         getCountry      (8BE3) : set       & get   3 char 
         amemPrint       (2001) : set   1int   &get       
         getPhyRestartWar (1046) : set       & get   1int  
         setPhyRestartWar (1046) : set   1int   &get       
         dyntxchain      (1049) : set   1int   &get       
         get_dyntxchain   (1049) :set       & get   1int  
         disp_tpc        (2002) : set   1int   &get       
         dcs_enable      (1052) : set   1int   &get       
         get_dcs_enable   (1052) :set       & get   1int  
         get_total_PER   (1059) : set       & get   1int  
         setctsrate      (105C) : set   1int   &get       
         get_ctsrate     (105C) : set       & get   1int 

 

VAP接口

~ # iwpriv ath0
ath0
     Available private ioctls :
         setoptie        (8BE8) : set 512 byte  &get       
         getoptie        (8BE9) : set       & get 512 byte 
         setkey          (8BE2) : set  64 byte  &get       
         delkey          (8BE4) : set   7byte  &get       
         setmlme         (8BE6) : set 558 byte  &get       
         addmac          (8BEA) : set   1addr  &get       
         delmac          (8BEC) : set   1addr  &get       
         getmac          (8BFD) : set       & get 256 addr 
         kickmac         (8BEF) : set   1addr  &get       
         setchanlist     (8BEE) : set  32 byte  &get       
         getchanlist     (8BED) : set       & get  32 byte 
         getchaninfo     (8BE7) : set       & get 1022 int  
         mode            (8BF2) : set  16 char  &get       
         get_mode        (8BF1) : set       & get  16 char 
         setwmmparams    (8BE3) : set   4int   &get       
         getwmmparams    (8BE5) : set   3int   &get   1int  
         cwmin           (0001) : set   3int   &get       
         get_cwmin       (0001) : set   2int   &get   1int  
         cwmax           (0002) : set   3int   &get       
         get_cwmax       (0002) : set   2int   &get   1int  
         aifs            (0003) : set   3int   &get       
         get_aifs        (0003) : set   2int   &get   1int  
         txoplimit       (0004) : set   3int   &get       
         get_txoplimit   (0004) : set   2int   &get   1int  
         acm             (0005) : set   3int   &get       
         get_acm         (0005) : set   2int   &get   1int  
         noackpolicy     (0006) : set   3int   &get       
         get_noackpolicy  (0006) :set   2int   &get   1int  
         setparam        (8BE0) : set   2int   &get       
         getparam        (8BE1) : set   1int   &get   1int  
         authmode        (0003) : set   1int   &get       
         get_authmode    (0003) : set       & get   1int  
         protmode        (0004) : set   1int   &get       
         get_protmode    (0004) : set       & get   1int  
         mcastcipher     (0005) : set   1int   &get       
         get_mcastcipher  (0005) :set       & get   1int  
         mcastkeylen     (0006) : set   1int   &get       
         get_mcastkeylen  (0006) :set       & get   1int  
         ucastciphers    (0007) : set   1int   &get       
         get_uciphers    (0007) : set       & get   1int  
         ucastcipher     (0008) : set   1int   &get       
         get_ucastcipher  (0008) :set       & get   1int  
         ucastkeylen     (0009) : set   1int   &get       
         get_ucastkeylen  (0009) :set       & get   1int  
         keymgtalgs      (0015) : set   1int   &get       
         get_keymgtalgs   (0015) :set       & get   1int  
         rsncaps         (0016) : set   1int   &get       
         get_rsncaps     (0016) : set       & get   1int  
         privacy         (000D) : set   1int   &get       
         get_privacy     (000D) : set       & get   1int  
         countermeasures  (000E) :set   1int   &get       
         get_countermeas  (000E) :set       & get   1int  
         dropunencrypted  (000F) :set   1int   &get       
         get_dropunencry  (000F) :set       & get   1int  
         wpa             (000A) : set   1int   &get       
         get_wpa         (000A) : set       & get   1int  
         driver_caps     (0010) : set   1int   &get       
         get_driver_caps  (0010) :set       & get   1int  
         maccmd          (0011) : set   1int   &get       
         get_maccmd      (0011) : set       & get   1int  
         wmm             (0012) : set   1int   &get       
         get_wmm         (0012) : set       & get   1int  
         hide_ssid       (0013) : set   1int   &get       
         get_hide_ssid   (0013) : set       & get   1int  
         ap_bridge       (0014) : set   1int   &get       
         get_ap_bridge   (0014) : set       & get   1int  
         inact           (0017) : set   1int   &get       
         get_inact       (0017) : set       & get   1int  
         inact_auth      (0018) : set   1int   &get       
         get_inact_auth   (0018) :set       & get   1int  
         inact_init      (0019) : set   1int   &get       
         get_inact_init   (0019) :set       & get   1int  
         abolt           (001A) : set   1int   &get       
         get_abolt       (001A) : set       & get   1int  
         dtim_period     (001C) : set   1int   &get       
         get_dtim_period  (001C) :set       & get   1int  
          
bintval         (001D) : set   1int   &get       
         get_bintval     (001D) : set       & get   1int  
         doth            (001E) : set   1int   &get       
         get_doth        (001E) : set       & get   1int  
         doth_pwrtgt     (001F) : set   1int   &get       
         get_doth_pwrtgt  (001F) :set       & get   1int  
         doth_reassoc    (0020) : set   1int   &get       
         compression     (0021) : set   1int   &get       
         get_compression  (0021) :set       & get   1int  
         ff              (0022) : set   1int   &get       
         get_ff          (0022) : set       & get   1int  
         turbo           (0001) : set   1int   &get       
         get_turbo       (0001) : set       & get   1int  
         burst           (0024) : set   1int   &get       
         get_burst       (0024) : set       & get   1int  
         doth_chanswitch  (8BF0) :set   2int   &get       
         pureg           (0025) : set   1int   &get       
         get_pureg       (0025) : set       & get   1int  
         ar              (0026) : set   1int   &get       
         get_ar          (0026) : set       & get   1int  
         wds             (0027) : set   1int   &get       
         get_wds         (0027) : set       & get   1int  
         vap_ind         (006F) : set   1int   &get       
         get_vap_ind     (006F) : set       & get   1int  
         mcast_rate      (002B) : set   1int   &get       
         get_mcast_rate   (002B) :set       & get   1int  
         countryie       (002D) : set   1int   &get       
         get_countryie   (002D) : set       & get   1int  
         uapsd           (0035) : set   1int   &get       
         get_uapsd       (0035) : set       & get   1int  
         sleep           (0036) : set   1int   &get       
         get_sleep       (0036) : set       & get   1int  
         qosnull         (0037) : set   1int   &get       
         pspoll          (0038) : set   1int   &get       
         ips_pspoll      (00FF) : set   1int   &get       
         get_ips_pspoll   (00FF) :set       & get   1int  
         eospdrop        (0039) : set   1int   &get       
         get_eospdrop    (0039) : set       & get   1int  
         markdfs         (003A) : set   1int   &get       
         get_markdfs     (003A) : set       & get   1int  
         chanbw          (003C) : set   1int   &get       
         get_chanbw      (003C) : set       & get   1int  
         shpreamble      (003E) : set   1int   &get       
         get_shpreamble   (003E) :set       & get   1int  
         blockdfschan    (003F) : set   1int   &get       
         setiebuf        (8BF4) : set 1024 byte  &get       
         getiebuf        (8BF3) : set       & get 1024 byte 
         setfilter       (8BF6) : set   4byte  &get       
         powersave       (0069) : set   1int   &get       
         get_powersave   (0069) : set       & get   1int  
         extprotmode     (0042) : set   1int   &get       
         get_extprotmode  (0042) :set       & get   1int  
         extprotspac     (0043) : set   1int   &get       
         get_extprotspac  (0043) :set       & get   1int  
         cwmenable       (0044) : set   1int   &get       
         get_cwmenable   (0044) : set       & get   1int  
         extbusythres    (0045) : set   1int   &get       
         get_extbusythres (0045) : set       & get   1int  
         shortgi         (0047) : set   1int   &get       
         get_shortgi     (0047) : set       & get   1int  
         ampdu           (0049) : set   1int   &get       
         get_ampdu       (0049) : set       & get   1int  
         reset           (0054) : set   1int   &get       
         get_countrycode  (004F) :set       & get   1int  
         mcastenhance    (005E) : set   1int   &get       
         get_mcastenhance (005E) : set       & get   1int  
         medump_dummy    (005F) : set   1int   &get       
         medump          (005F) : set       & get   1int  
         medebug         (0060) : set   1int   &get       
         get_medebug     (0060) : set       & get   1int  
         me_length       (0061) : set   1int   &get       
         get_me_length   (0061) : set       & get   1int  
         metimer         (0062) : set   1int   &get       
         get_metimer     (0062) : set       & get   1int  
         metimeout       (0063) : set   1int   &get       
         get_metimeout   (0063) : set       & get   1int  
         medropmcast     (007D) : set   1int   &get       
         get_medropmcast  (007D) :set       & get   1int  
         me_showdeny     (007E) : set       & get   1int  
         me_cleardeny    (007F) : set   1int   &get       
         hbrtimer        (006B) : set   1int   &get       
         get_hbrtimer    (006B) : set       & get   1int  
         get_hbrstate    (006C) : set       & get   1int  
         get_iqueconfig   (0081) :set       & get   1int  
         acparams        (8BF5) : set   4int   &get       
         rtparams        (8BF7) : set   3int   &get       
         hbrparams       (8BFE) : set   3int   &get       
         me_adddeny      (8BFB) : set   4int   &get       
         scanvalid       (002E) : set   1int   &get       
         get_scanvalid   (002E) : set       & get   1int  
         rxtimeout       (8BFF) : set   2int   &get       
         dbgreq          (8BF8) : set  72 byte  &get       
         setaddbaoper    (0055) : set   1int   &get       
         set11NRates     (0057) : set   1int   &get       
         get11NRates     (0057) : set       & get   1int  
         rateset         (0117) : set   1int   &get       
         ratesetclear    (0118) : set   1int   &get       
         set11NRetries   (0058) : set   1int   &get       
         get11NRetries   (0058) : set       & get   1int  
         dbgLVL          (0059) : set   1int   &get       
         getdbgLVL       (0059) : set       & get   1int  
         dbgLVL_high     (0104) : set   1int   &get       
         getdbgLVL_high   (0104) :set       & get   1int  
         no_wradar       (0108) : set   1int   &get       
         get_no_wradar   (0108) : set       & get   1int  
         wepkeycache     (010A) : set   1int   &get       
         get_wepkeycache  (010A) :set       & get   1int  
         wdsdetect       (005A) : set   1int   &get       
         get_wdsdetect   (005A) : set       & get   1int  
         htweptkip       (0067) : set   1int   &get       
         get_htweptkip   (0067) : set       & get   1int  
         puren           (0064) : set   1int   &get       
         get_puren       (0064) : set       & get   1int  
         basicrates      (0065) : set   1int   &get       
         ignore11d       (005C) : set   1int   &get       
         get_ignore11d   (005C) : set       & get   1int  
         stafwd          (005D) : set   1int   &get       
         get_stafwd      (005D) : set       & get   1int  
         extap           (007B) : set   1int   &get       
         get_extap       (007B) : set       & get   1int  
         clrappoptie     (00BF) : set   1int   &get       
         autoassoc       (00B8) : set   1int   &get       
         get_autoassoc   (00B8) : set       & get   1int  
         vap_contryie    (00B5) : set   1int   &get       
         get_vapcontryie  (00B5) :set       & get   1int  
         vap_doth        (00B6) : set   1int   &get       
         get_vap_doth    (00B6) : set       & get   1int  
         ht40intol       (0079) : set   1int   &get       
         get_ht40intol   (0079) : set       & get   1int  
         chwidth         (007A) : set   1int   &get       
         get_chwidth     (007A) : set       & get   1int  
         chextoffset     (0076) : set   1int   &get       
         get_chextoffset  (0076) :set       & get   1int  
         sko             (00B7) : set   1int   &get       
         get_sko         (00B7) : set       & get   1int  
         chscaninit      (0077) : set   1int   &get       
         get_chscaninit   (0077) :set       & get   1int  
         disablecoext    (007C) : set   1int   &get       
         get_disablecoext (007C) : set       & get   1int  
         mfptest         (00F5) : set   1int   &get       
         get_mfptest     (00F5) : set       & get   1int  
         rrm             (00C3) : set   1int   &get       
         get_rrm         (00C3) : set       & get   1int  
         rrmstats        (00F3) : set   1int   &get       
         get_rrmstats    (00F3) : set       & get   1int  
         rrmslwin        (00F4) : set   1int   &get       
         get_rrmslwin    (00F4) : set       & get   1int  
         sendmgmt        (8BFA) : set 1024 byte  &get       
         ant_ps_on       (0071) : set   1int   &get       
         get_ant_ps_on   (0071) : set       & get   1int  
         ps_timeout      (0072) : set   1int   &get       
         get_ps_timeout   (0072) :set       & get   1int  
         setwapi         (0070) : set   1int   &get       
         wapi_rkupkt     (00BB) : set   1int   &get       
         get_wapi_rkupkt  (00BB) :set       & get   1int  
         wapi_rkmpkt     (00BC) : set   1int   &get       
         get_wapi_rkmpkt  (00BC) :set       & get   1int  
         wapi_rkupdate   (00BD) : set   6byte  &get       
         wps             (0074) : set   1int   &get       
         get_wps         (0074) : set       & get   1int  
         ccmpSwSelEn     (0082) : set   1int   &get       
         get_ccmpSwSelEn  (0082) :set       & get   1int  
         periodicScan    (00B3) : set   1int   &get       
         get_periodicScan (00B3) : set       & get   1int  
         csa2g           (00BA) : set   1int   &get       
         get_csa2g       (00BA) : set       & get   1int  
         wdsaddr         (00C5) : set   2addr  &get       
         no_disassoc     (0100) : set   1int   &get       
         get_no_disassoc  (0100) :set       & get   1int  
         autocvupdate    (00F0) : set   1int   &get       
         get_autocvupdate (00F0) : set       & get   1int  
         cvupdateper     (00F1) : set   1int   &get       
         get_cvupdateper  (00F1) :set       & get   1int  
         maxsta          (00F2) : set   1int   &get       
         get_maxsta      (00F2) : set       & get   1int  
         scanband        (00F6) : set   1int   &get       
         get_scanband    (00F6) : set       & get   1int  
         senddeauth      (0109) : set   1int   &get       
         get_senddeauth   (0109) :set       & get   1int  
         siwtxpwradjust   (0113) :set   1int   &get       
         rrmdbg          (010B) : set   1int   &get       
         get_rrmdbg      (010B) : set       & get   1int  
         aponly          (0115) : set   1int   &get       
         get_aponly      (0115) : set       & get   1int 

 

  • 2
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
`iwpriv`命令的源码主要位于Linux内核源代码树中的`net/wireless/wext-core.c`文件中,以下是该文件中`ioctl_standard_iwpriv`函数的源码解析: ```c static int ioctl_standard_iwpriv(struct net_device *dev, struct iwreq *iwr, u32 cmd) { /* 通过命令码cmd解析出设备驱动程序中相应的命令处理函数 */ struct iw_priv_args *priv; struct iw_handler_def *iwe; int i, count; struct iw_priv_args user_priv; void __user *argp = iwr->u.name; int (*handler)(struct net_device *, struct iw_request_info *, union iwreq_data *, struct iw_priv_args *); union iwreq_data wrqu; int ret = 0; /* 遍历设备驱动程序中支持的所有IWPRIV命令 */ for (i = 0; i < dev->ieee80211_ptr->priv_args_count; i++) { priv = &dev->ieee80211_ptr->priv_args[i]; if ((!priv->name) || (!priv->set)) { continue; } if (strcmp(priv->name, iwr->u.name) == 0) { /* 找到要执行的IWPRIV命令 */ iwe = priv->handler; count = iwe->num_standard; /* 该命令支持的标准命令个数 */ if (iwe->flags & IW_HANDLER_SPECIAL) { /* 特殊处理的IWPRIV命令 */ handler = iwe->standard[count].handler; if (!handler) return -EOPNOTSUPP; ret = handler(dev, NULL, &wrqu, priv); } else { /* 标准IWPRIV命令 */ handler = iwe->standard[IW_PRIV_CMD_GET].handler; if (!handler) return -EOPNOTSUPP; /* 解析参数 */ if (iwe->standard[IW_PRIV_CMD_SET].handler) { if (copy_from_user(&user_priv, argp, sizeof(user_priv))) return -EFAULT; wrqu.data.pointer = user_priv.pointer; wrqu.data.length = user_priv.length; wrqu.data.flags = user_priv.flags; } /* 调用设备驱动程序中的命令处理函数 */ ret = handler(dev, NULL, &wrqu, priv); /* 将处理结果返回给用户空间 */ if (iwe->standard[IW_PRIV_CMD_GET].handler) { if (copy_to_user(argp, &user_priv, sizeof(user_priv))) return -EFAULT; } } break; } } if (i == dev->ieee80211_ptr->priv_args_count) /* 没有找到要执行的IWPRIV命令 */ ret = -EOPNOTSUPP; return ret; } ``` `ioctl_standard_iwpriv`函数主要实现了`iwpriv`命令的功能。它通过解析`iwr->u.name`中的命令参数,找到对应的设备驱动程序中的命令处理函数,并通过调用该函数完成相应的操作。该函数的主要步骤包括: 1. 遍历设备驱动程序中支持的所有IWPRIV命令,找到要执行的IWPRIV命令。 2. 解析命令参数,根据命令处理函数的要求设置对应的参数值。 3. 调用设备驱动程序中的命令处理函数,完成相应的操作。 4. 将处理结果返回给用户空间。 在该函数中,命令处理函数主要分为两种类型:标准IWPRIV命令和特殊处理的IWPRIV命令。对于标准IWPRIV命令,用户空间可以通过`ioctl`系统调用的`arg`参数向内核空间传递一些参数,内核空间则通过解析这些参数来执行相应的操作;对于特殊处理的IWPRIV命令,用户空间直接调用该命令即可,不需要传递任何参数。 总的来说,`ioctl_standard_iwpriv`函数的实现比较复杂,需要涉及到内核空间和用户空间之间的数据传输、命令参数的解析和处理等方面的问题。如果您想要深入了解该函数的实现细节,可以仔细阅读该函数的源码,并结合相关的内核文档进行学习。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值