7 void RxPsPoll(Frame_t
*rdu
)
14 //PSDEBUG("RxPsPoll");
16 aid
= durId(rdu
) & 0x3FFF;
21 if ((aid
> MAX_AID
) || (aid
== 0)){
22 zd_SendClass3ErrorFrame(sta
, vapId
);
26 pHash
= sstByAid
[aid
];
27 if (pHash
->asoc
== STATION_STATE_ASOC
)
30 zd_SendClass3ErrorFrame(sta
, vapId
);
34 BOOLEAN
RxMgtMpdu(Signal_t
*signal
)
36 StationState sas
, sau
;
44 pfrmDesc
= signal
->frmInfo
.frmDesc
;
46 FrmType
= frmType(rdu
);
47 ZDEBUG_V("FrmType", FrmType
);
53 signal
->id
= SIG_PROBE
;
54 signal
->block
= BLOCK_SYNCH
;
56 if ( memcmp(0x61,addr2(rdu
)+5,1) == 0 && memcmp(0xd0,addr2(rdu
)+4,1) == 0 )
57 printk("Receive==Probe Requset===\n");
61 if (isGroup(addr1(rdu
)))
64 if ((memcmp(&mBssId
.mac
[0],addr2(rdu
),6)==0 && mBssType
==INFRASTRUCTURE_BSS
))
67 printk(KERN_ERR
"Rx Deauth,Reason:%u\n",reason(rdu
));
69 signal
->id
= SIG_DEAUTH
;
70 signal
->block
= BLOCK_AUTH_RSP
;
73 else if ((memcmp(&mBssId
.mac
[0],addr1(rdu
),6)==0 && mBssType
==AP_BSS
))
76 u8
*pCh
=(u8
*)addr2(rdu
);
78 printk(KERN_ERR
"Rx Deauth from station:");
81 printk("%02X ", *pCh
++);
85 signal
->id
= SIG_DEAUTH
;
86 signal
->block
= BLOCK_AUTH_RSP
;
92 u8
*pCh
=(u8
*)addr2(rdu
);
94 printk(KERN_ERR
"Rx Deauth from unknown station:");
97 printk("%02X ", *pCh
++);
108 if (isGroup(addr1(rdu
)))
111 authSeq
= authSeqNum(rdu
);
112 if ((authSeq
== 1) || ((authSeq
== 3) && wepBit(rdu
))){ //Seqence 1 or 3
113 signal
->id
= SIG_AUTH_ODD
;
114 signal
->block
= BLOCK_AUTH_RSP
;
117 else if ((authSeq
== 2) || (authSeq
== 4)){ //Seqence 2 or 4
118 signal
->id
= SIG_AUTH_EVEN
;
119 signal
->block
= BLOCK_AUTH_REQ
;
128 SsInquiry(addr2(rdu
), &sas
, &sau
);
129 if ((memcmp(&mBssId
.mac
[0],addr2(rdu
),6)==0 && mBssType
==INFRASTRUCTURE_BSS
))
132 printk(KERN_ERR
"Rx DeAssoc,Reason:%u\n",reason(rdu
));
135 if(sau
== STATION_STATE_NOT_AUTH
){
139 signal
->id
= SIG_DISASSOC
;
140 signal
->block
= BLOCK_ASOC
;
145 SsInquiry(addr2(rdu
), &sas
, &sau
);
146 if (sau
== STATION_STATE_NOT_AUTH
){
150 signal
->id
= SIG_ASSOC
;
151 signal
->block
= BLOCK_ASOC
;
156 SsInquiry(addr2(rdu
), &sas
, &sau
);
157 if (sau
== STATION_STATE_NOT_AUTH
){
161 signal
->id
= SIG_REASSOC
;
162 signal
->block
= BLOCK_ASOC
;
168 if (mBssType
== AP_BSS
)
171 signal
->id
= SIQ_PROBE_RSP_BEACON
;
172 signal
->block
= BLOCK_SYNCH
;
176 if (mBssType
== AP_BSS
)
179 signal
->id
= SIG_ASSOC_RSP
;
180 signal
->block
= BLOCK_ASOC
;
184 if (mBssType
== AP_BSS
)
187 signal
->id
= SIG_REASSOC_RSP
;
188 signal
->block
= BLOCK_ASOC
;
196 ZDEBUG("goto rx_release");
200 signal
->frmInfo
.frmDesc
= pfrmDesc
;
201 sigEnque(pMgtQ
, (signal
));
205 ZDEBUG("goto class2_err");
206 signal
->id
= SIG_DEAUTH_REQ
;
207 signal
->block
= BLOCK_AUTH_REQ
;
208 memcpy((U8
*)&signal
->frmInfo
.Sta
, (U8
*)(addr2(rdu
)), 6);
209 signal
->frmInfo
.rCode
= RC_CLASS2_ERROR
;
211 sigEnque(pMgtQ
, (signal
));