• 大小: 9.28MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-09
  • 语言: 其他
  • 标签: linux  driver  dwa  rtl8811  

资源简介

d-link 171 linux 驱动 DWA-171_RTL8811AU_Linux_v4.3.0_10674.20140321.zip

资源截图

代码片段和文件信息


#include “p2p_test.h“

unsigned int wps_pin_checksum(unsigned int pin)
{
unsigned int accum = 0;
while( pin )
{
accum += pin % 10;
pin /= 10;
accum += 3 * (pin % 10);
pin /= 10;
}
return( accum % 10 );
}

char lower(char s)
{    
if((‘A‘ <= s) && (s <= ‘Z‘))
return ( s = ‘a‘ + (s - ‘A‘) );
return s;
}

int p2p_check_success(struct p2p *p)
{
int ret = 0;

if( p->status == P2P_STATE_GONEGO_OK )
ret = 1;

return ret;
}

int read_all_sta(struct p2p *p)
{
int sta_count = 0;
FILE *pf;

memset( p->cmd 0x00 CMD_SZ );
sprintf( p->cmd “%s all_sta > supp_status.txt“ p->apcli_path);
system( p->cmd );
pf = fopen( “./supp_status.txt“ “r“ );
if ( pf )
{
while( !feof( pf ) ){
memset( p->parse 0x00 CMD_SZ );
fgets( p->parse CMD_SZ pf );
if( strncmp( p->parse “dot11RSNAStatsSTAAddress=“ 25) == 0 )
{
sta_count++;
if( p->no_sta_connected == sta_count )
return _TRUE;
}
}

fclose( pf );
}

return _FALSE;
}

void do_wps(struct p2p *p)
{
FILE *pf = NULL;
int ret = _FALSE parsing_ok = _FALSE;

do
{
memset( p->cmd 0x00 CMD_SZ );
if( p->ap_open == _TRUE )
{
if(p->wps_info==1 || p->wps_info==2)
sprintf( p->cmd “%s wps_pin any %d > supp_status.txt“ p->apcli_path p->pin);
else if(p->wps_info==3)
sprintf( p->cmd “%s wps_pbc any > supp_status.txt“ p->apcli_path);
}
else if(p->wpa_open == _TRUE)
{
if(p->connect_go==1)
{
if(p->wps_info==1 || p->wps_info==2)
sprintf( p->cmd “%s wps_pin %s %d > supp_status.txt “ p->wpacli_path p->peer_devaddr p->pin);
else if(p->wps_info==3)
sprintf( p->cmd “%s wps_pbc %s > supp_status.txt “ p->wpacli_path p->peer_devaddr);
}
else if( strncmp(p->peer_ifaddr “00:00:00:00:00:00“ 17)==0 )
{
if(p->wps_info==1 || p->wps_info==2)
sprintf( p->cmd “%s wps_pin any %d > supp_status.txt “ p->wpacli_path p->pin);
else if(p->wps_info==3)
sprintf( p->cmd “%s wps_pbc any > supp_status.txt “ p->wpacli_path);
}
else
{
if(p->wps_info==1 || p->wps_info==2)
sprintf( p->cmd “%s wps_pin %s %d > supp_status.txt “ p->wpacli_path p->peer_ifaddr p->pin);
else if(p->wps_info==3)
sprintf( p->cmd “%s wps_pbc %s > supp_status.txt “ p->wpacli_path p->peer_ifaddr);
}
}
system( p->cmd );

pf = fopen( “./supp_status.txt“ “r“ );
if ( pf )
{
while( !feof( pf ) ){
memset(p->parse 0x00 CMD_SZ);
fgets(p->parse CMD_SZ pf);

if(p->ap_open == _TRUE)
{
if( (p->wps_info==1 || p->wps_info==2) && (strncmp(p->parse ““ 2) == 0) )
parsing_ok = _TRUE;
else if( (p->wps_info==3) && (strncmp(p->parse “OK“ 2) == 0) )
parsing_ok = _TRUE;
}
else if(p->wpa_open == _TRUE)
{
if( (p->wps_info==1 || p->wps_info==2) && (strncmp(p->parse “Se

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-03-21 16:58  RTL8811AU_Linux_v4.3.0_10674.20140321\
     目录           0  2014-03-21 17:05  RTL8811AU_Linux_v4.3.0_10674.20140321\android_ref_codes_JB_4.2\
     文件        2030  2014-03-21 16:42  RTL8811AU_Linux_v4.3.0_10674.20140321\android_ref_codes_JB_4.2\linux-3.0.42_STATION_INFO_ASSOC_REQ_IES.diff
     文件      129466  2014-02-21 00:08  RTL8811AU_Linux_v4.3.0_10674.20140321\android_ref_codes_JB_4.2\Realtek_Wi-Fi_SDK_for_Android_JB_4_2.pdf
     文件       17892  2014-03-21 16:42  RTL8811AU_Linux_v4.3.0_10674.20140321\android_ref_codes_JB_4.2\realtek_wifi_SDK_for_android_JB_4.2_20130208.tar.gz
     目录           0  2014-03-21 17:05  RTL8811AU_Linux_v4.3.0_10674.20140321\android_ref_codes_KK_4.4\
     文件        2030  2014-03-21 16:42  RTL8811AU_Linux_v4.3.0_10674.20140321\android_ref_codes_KK_4.4\linux-3.0.42_STATION_INFO_ASSOC_REQ_IES.diff
     文件      142397  2014-02-21 00:08  RTL8811AU_Linux_v4.3.0_10674.20140321\android_ref_codes_KK_4.4\Realtek_Wi-Fi_SDK_for_Android_KK_4_4.pdf
     文件       16390  2014-03-21 16:42  RTL8811AU_Linux_v4.3.0_10674.20140321\android_ref_codes_KK_4.4\realtek_wifi_SDK_for_android_KK_4.4_20140117.tar.gz
     目录           0  2014-03-21 17:05  RTL8811AU_Linux_v4.3.0_10674.20140321\document\
     文件       42974  2014-02-21 00:08  RTL8811AU_Linux_v4.3.0_10674.20140321\document\HowTo_enable_driver_to_support_80211d.pdf
     文件       16929  2014-02-21 00:09  RTL8811AU_Linux_v4.3.0_10674.20140321\document\HowTo_enable_driver_to_support_WIFI_certification_test.pdf
     文件      154971  2014-02-21 00:09  RTL8811AU_Linux_v4.3.0_10674.20140321\document\HowTo_enable_the_power_saving_functionality.pdf
     文件      167936  2014-03-21 17:04  RTL8811AU_Linux_v4.3.0_10674.20140321\document\HowTo_read_external_TX_power_related_file.pdf
     文件       15821  2014-02-21 00:09  RTL8811AU_Linux_v4.3.0_10674.20140321\document\HowTo_support_more_VidPids.pdf
     文件        4190  2014-03-21 16:42  RTL8811AU_Linux_v4.3.0_10674.20140321\document\linux_dhcp_server_notes.txt
     文件      128554  2014-02-21 00:09  RTL8811AU_Linux_v4.3.0_10674.20140321\document\Miracast_for_Realtek_WiFi.pdf
     文件       16779  2014-02-21 00:09  RTL8811AU_Linux_v4.3.0_10674.20140321\document\Quick_Start_Guide_for_Bridge.pdf
     文件       68773  2014-02-21 00:09  RTL8811AU_Linux_v4.3.0_10674.20140321\document\Quick_Start_Guide_for_Driver_Compilation_and_Installation.pdf
     文件       39476  2014-02-21 00:10  RTL8811AU_Linux_v4.3.0_10674.20140321\document\Quick_Start_Guide_for_SoftAP.pdf
     文件       36192  2014-02-21 00:10  RTL8811AU_Linux_v4.3.0_10674.20140321\document\Quick_Start_Guide_for_Station_Mode.pdf
     文件       61385  2014-02-21 00:13  RTL8811AU_Linux_v4.3.0_10674.20140321\document\Quick_Start_Guide_for_WOW.pdf
     文件      174071  2014-02-21 00:10  RTL8811AU_Linux_v4.3.0_10674.20140321\document\Realtek_WiFi_concurrent_mode_Introduction.pdf
     文件      128897  2014-02-21 00:10  RTL8811AU_Linux_v4.3.0_10674.20140321\document\RTK_P2P_WFD_Programming_guide.pdf
     文件       29988  2014-02-21 00:11  RTL8811AU_Linux_v4.3.0_10674.20140321\document\SoftAP_Mode_features.pdf
     文件       13447  2014-02-21 00:11  RTL8811AU_Linux_v4.3.0_10674.20140321\document\Wireless_tools_porting_guide.pdf
     文件       41564  2014-02-21 00:11  RTL8811AU_Linux_v4.3.0_10674.20140321\document\wpa_cli_with_wpa_supplicant.pdf
     目录           0  2014-03-21 16:44  RTL8811AU_Linux_v4.3.0_10674.20140321\driver\
     文件     1838135  2014-03-21 16:42  RTL8811AU_Linux_v4.3.0_10674.20140321\driver\rtl8811AU_linux_v4.3.0_10674.20140321.tar.gz
     文件        6931  2014-03-21 16:42  RTL8811AU_Linux_v4.3.0_10674.20140321\readme.txt
     文件      144384  2014-03-21 16:58  RTL8811AU_Linux_v4.3.0_10674.20140321\ReleaseNotes.pdf
............此处省略19个文件信息

评论

共有 条评论