~awe/wpasupplicant/add-fake-aps

« back to all changes in this revision

Viewing changes to wpa_supplicant/scan.c

  • Committer: Tony Espy
  • Date: 2015-09-14 19:27:11 UTC
  • Revision ID: espy@canonical.com-20150914192711-8ffzx1jge2w53vgh
scan: make fake AP level random(0-99)

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include "scan.h"
25
25
 
26
26
 
 
27
static int dummy_quality = 1;
 
28
 
27
29
static void wpa_supplicant_gen_assoc_event(struct wpa_supplicant *wpa_s)
28
30
{
29
31
        struct wpa_ssid *ssid;
1671
1673
                res->freq = 2442;
1672
1674
                res->beacon_int = 0; // u16
1673
1675
                res->caps = 0; // u16
 
1676
 
1674
1677
                res->qual = 99; // int
1675
1678
                res->noise = 10; // int
1676
 
                res->level = -35;
 
1679
                res->level = rand() % 100;
1677
1680
                res->tsf = 0; // tsf???  is what?
1678
1681
                res->age = 0; // uint
1679
1682