includes endian.h now to do correct le conversion.

FossilOrigin-Name: a80f0244a82774b248636f57e98c79b79d5eddf526e3f4f57ba9693285ec0bd0
This commit is contained in:
7u83@mail.ru 2014-11-08 07:51:44 +00:00
parent 0f41acb38d
commit 134130c1dc

View File

@ -1,5 +1,7 @@
#include <errno.h> #include <errno.h>
#include <endian.h>
#include "wtpdrv.h" #include "wtpdrv.h"
@ -721,7 +723,7 @@ int start_ap(struct nl_sock *sk)
head = malloc(256); head = malloc(256);
uint8_t * tail; uint8_t * tail;
head->frame_control = htons (DOT11_FTYPE_MGMT | DOT11_STYPE_BEACON) ; head->frame_control = htole16 (DOT11_FTYPE_MGMT | DOT11_STYPE_BEACON) ;
head->duration = htons(0); head->duration = htons(0);
/* destination address */ /* destination address */
@ -729,7 +731,7 @@ int start_ap(struct nl_sock *sk)
memcpy (head->sa , rd.mac,6); memcpy (head->sa , rd.mac,6);
memcpy (head->bssid , rd.mac,6); memcpy (head->bssid , rd.mac,6);
head->u.beacon.beacon_int=htons(100); head->u.beacon.beacon_int=htole16(100);
head->u.beacon.capab_info=0; head->u.beacon.capab_info=0;
memset (head->u.beacon.timestamp,0,8); memset (head->u.beacon.timestamp,0,8);
@ -914,10 +916,8 @@ int gr()
del_if("wlan0"); del_if("wlan0");
make_if("wlan0"); make_if("wlan0");
return 0;
start_ap(sk); start_ap(sk);
sleep(1000); sleep(1000);
return 0; return 0;