]> git.lizzy.rs Git - plan9front.git/blob - sys/src/9/pc/wifi.h
etheriwl: work towards supporting other cards than 5300, gather channel information
[plan9front.git] / sys / src / 9 / pc / wifi.h
1 typedef struct Wnode Wnode;
2 typedef struct Wifi Wifi;
3
4 typedef struct Wifipkt Wifipkt;
5
6 struct Wifipkt
7 {
8         uchar   fc[2];
9         uchar   dur[2];
10         uchar   a1[Eaddrlen];
11         uchar   a2[Eaddrlen];
12         uchar   a3[Eaddrlen];
13         uchar   seq[2];
14 };
15
16 enum {
17         WIFIHDRSIZE = 2+2+3*6+2,
18 };
19
20 struct Wnode
21 {
22         uchar   bssid[Eaddrlen];
23         char    ssid[32+2];
24         int     ival;
25         int     cap;
26         int     aid;
27         int     channel;
28         long    lastseen;
29 };
30
31 struct Wifi
32 {
33         Ether   *ether;
34
35         Queue   *iq;
36         char    *status;
37         void    (*transmit)(Wifi*, Wnode*, Block*);
38
39         Wnode   node[16];
40         Wnode   *bss;
41
42         uint    txseq;
43         char    essid[32+2];
44 };
45
46 Wifi *wifiattach(Ether *ether, void (*transmit)(Wifi*, Wnode*, Block*));
47 void wifiiq(Wifi*, Block*);
48
49 long wifistat(Wifi*, void*, long, ulong);
50 long wifictl(Wifi*, void*, long);
51