Staging: rt28x0: fix GTK length check in ParseKeyData()
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sun, 23 Aug 2009 13:30:17 +0000 (15:30 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Sep 2009 19:02:22 +0000 (12:02 -0700)
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/rt2860/sta/wpa.c
drivers/staging/rt2860/wpa.h

index b8410a2692a6acbacdd8363cc75a7da2e6cab2ed..8c34e39f38607e273ab13457224a8c9b58ddaea7 100644 (file)
@@ -1764,12 +1764,7 @@ BOOLEAN ParseKeyData(
        // Get GTK length - refer to IEEE 802.11i-2004 p.82
        GTKLEN = pKDE->Len -6;
 
-#ifdef RT30xx
        if (GTKLEN < LEN_AES_KEY)
-#endif
-#ifndef RT30xx
-       if (GTKLEN < MIN_LEN_OF_GTK)
-#endif
        {
                DBGPRINT(RT_DEBUG_ERROR, ("ERROR: GTK Key length is too short (%d) \n", GTKLEN));
         return FALSE;
index 355309a68632ce4dd85af794c30cd6d438dac15e..7006e389e3233afd52d0e3e6fbe019eebbb4b70a 100644 (file)
@@ -90,7 +90,6 @@
 #define TKIP_AP_RXMICK_OFFSET          (TKIP_AP_TXMICK_OFFSET+LEN_TKIP_TXMICK)
 #define TKIP_GTK_LENGTH                                ((LEN_TKIP_EK)+(LEN_TKIP_RXMICK)+(LEN_TKIP_TXMICK))
 #define LEN_PTK                                                ((LEN_EAP_KEY)+(LEN_TKIP_KEY))
-#define MIN_LEN_OF_GTK                         5
 
 // RSN IE Length definition
 #define MAX_LEN_OF_RSNIE               90