The fix for ad-hoc WEP decryption in r21814 broke WPA. Replace it with

a better fix.  Clean up whitespace while we're at it.

svn path=/trunk/; revision=21847
This commit is contained in:
Gerald Combs 2007-05-20 22:40:35 +00:00
parent b713a968bd
commit 7c8bb268ca
3 changed files with 1165 additions and 1137 deletions

File diff suppressed because it is too large Load Diff

View File

@ -71,6 +71,7 @@
*/
#define AIRPDCAP_TYPE(FrameControl_0) (UINT8)((FrameControl_0 >> 2) & 0x3)
#define AIRPDCAP_SUBTYPE(FrameControl_0) (UINT8)((FrameControl_0 >> 4) & 0xF)
#define AIRPDCAP_DS_BITS(FrameControl_1) (UINT8)(FrameControl_1 & 0x3)
#define AIRPDCAP_TO_DS(FrameControl_1) (UINT8)(FrameControl_1 & 0x1)
#define AIRPDCAP_FROM_DS(FrameControl_1) (UINT8)((FrameControl_1 >> 1) & 0x1)
#define AIRPDCAP_WEP(FrameControl_1) (UINT8)((FrameControl_1 >> 6) & 0x1)

View File

@ -59,7 +59,7 @@ INT AirPDcapWepDecrypt(
UINT8 icv[4];
size_t buflen;
/* Generate key stream (RC4 Pseude-Random Number Generator) */
/* Generate key stream (RC4 Pseudo-Random Number Generator) */
for (i = 0; i < 256; i++)
S[i] = (UINT8)i;
for (j = i = 0; i < 256; i++) {