4 #include "osdep_service.h"
12 /* if mode ==0, then the sta is allowed once the addr is hit.
13 * if mode ==1, then the sta is rejected once the addr is non-hit.
15 struct wlan_acl_node
{
16 struct list_head list
;
21 struct wlan_acl_pool
{
22 struct wlan_acl_node aclnode
[NUM_ACL
];
25 struct stainfo_stats
{
35 struct list_head list
; /*free_sta_queue*/
36 struct list_head hash_list
; /*sta_hash*/
37 struct sta_xmit_priv sta_xmitpriv
;
38 struct sta_recv_priv sta_recvpriv
;
44 uint ieee8021x_blocked
; /*0: allowed, 1:blocked */
45 uint XPrivacy
; /*aes, tkip...*/
46 union Keytype tkiptxmickey
;
47 union Keytype tkiprxmickey
;
48 union Keytype x_UncstKey
;
49 union pn48 txpn
; /* PN48 used for Unicast xmit.*/
50 union pn48 rxpn
; /* PN48 used for Unicast recv.*/
55 struct stainfo_stats sta_stats
;
56 /*for A-MPDU Rx reordering buffer control */
57 struct recv_reorder_ctrl recvreorder_ctrl
[16];
58 struct ht_priv htpriv
;
61 * curr_network(mlme_priv/security_priv/qos/ht)
62 * + sta_info: (STA & AP) CAP/INFO
65 * curr_network(mlme_priv/security_priv/qos/ht) : AP CAP/INFO
66 * sta_info: (AP & STA) CAP/INFO
68 #ifdef CONFIG_R8712_AP
69 struct list_head asoc_list
;
70 struct list_head auth_list
;
71 unsigned int expire_to
;
72 unsigned int auth_seq
;
74 unsigned char chg_txt
[128];
75 unsigned int tx_ra_bitmap
;
80 u8
*pallocated_stainfo_buf
;
82 struct __queue free_sta_queue
;
83 spinlock_t sta_hash_lock
;
84 struct list_head sta_hash
[NUM_STA
];
86 struct __queue sleep_q
;
87 struct __queue wakeup_q
;
88 struct _adapter
*padapter
;
89 #ifdef CONFIG_R8712_AP
90 struct list_head asoc_list
;
91 struct list_head auth_list
;
92 unsigned int auth_to
; /* sec, time to expire in authenticating. */
93 unsigned int assoc_to
; /* sec, time to expire before associating. */
94 unsigned int expire_to
; /* sec , time to expire after associated. */
98 static inline u32
wifi_mac_hash(u8
*mac
)
103 x
= (x
<< 2) ^ mac
[1];
104 x
= (x
<< 2) ^ mac
[2];
105 x
= (x
<< 2) ^ mac
[3];
106 x
= (x
<< 2) ^ mac
[4];
107 x
= (x
<< 2) ^ mac
[5];
109 x
= x
& (NUM_STA
- 1);
113 u32
_r8712_init_sta_priv(struct sta_priv
*pstapriv
);
114 u32
_r8712_free_sta_priv(struct sta_priv
*pstapriv
);
115 struct sta_info
*r8712_alloc_stainfo(struct sta_priv
*pstapriv
,
117 void r8712_free_stainfo(struct _adapter
*padapter
, struct sta_info
*psta
);
118 void r8712_free_all_stainfo(struct _adapter
*padapter
);
119 struct sta_info
*r8712_get_stainfo(struct sta_priv
*pstapriv
, u8
*hwaddr
);
120 void r8712_init_bcmc_stainfo(struct _adapter
*padapter
);
121 struct sta_info
*r8712_get_bcmc_stainfo(struct _adapter
*padapter
);
122 u8
r8712_access_ctrl(struct wlan_acl_pool
*pacl_list
, u8
* mac_addr
);
124 #endif /* _STA_INFO_H_ */