[PATCH] libertas: fix u8 constant
authorHolger Schurig <hs4233@mail.mn-solutions.de>
Mon, 8 Oct 2007 09:07:27 +0000 (11:07 +0200)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:55:19 +0000 (16:55 -0700)
Don't write constants that are (per documentation and struct) u8
as 0x0001, use 0x01 instead. Also remove an useless cast.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-By: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/cmd.c
drivers/net/wireless/libertas/host.h

index 33dbed09fc725c85a8648693a7aad769fe1bc9d0..1cbbd96fdbde913200fac048a1b2c62fef54fb36 100644 (file)
@@ -181,13 +181,13 @@ static int wlan_cmd_802_11_set_wep(wlan_private * priv,
 
                        switch (pkey->len) {
                        case KEY_LEN_WEP_40:
-                               wep->keytype[i] = (u8)CMD_TYPE_WEP_40_BIT;
+                               wep->keytype[i] = CMD_TYPE_WEP_40_BIT;
                                memmove(&wep->keymaterial[i], pkey->key,
                                        pkey->len);
                                lbs_deb_cmd("SET_WEP: add key %d (40 bit)\n", i);
                                break;
                        case KEY_LEN_WEP_104:
-                               wep->keytype[i] = (u8)CMD_TYPE_WEP_104_BIT;
+                               wep->keytype[i] = CMD_TYPE_WEP_104_BIT;
                                memmove(&wep->keymaterial[i], pkey->key,
                                        pkey->len);
                                lbs_deb_cmd("SET_WEP: add key %d (104 bit)\n", i);
index 68fa11b3a2dc84d492e51e16376651faef137cc5..b37ddbca969f74dd1e056b358f6f2fdebbca0ef4 100644 (file)
 #define CMD_ACT_REMOVE                      0x0004
 #define CMD_ACT_USE_DEFAULT                 0x0008
 
-#define CMD_TYPE_WEP_40_BIT                 0x0001
-#define CMD_TYPE_WEP_104_BIT                0x0002
+#define CMD_TYPE_WEP_40_BIT                 0x01
+#define CMD_TYPE_WEP_104_BIT                0x02
 
 #define CMD_NUM_OF_WEP_KEYS                 4