[PATCH] libertas: fix assignment of WEP key type
authorDan Williams <dcbw@redhat.com>
Thu, 2 Aug 2007 17:17:41 +0000 (13:17 -0400)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:50:13 +0000 (16:50 -0700)
keytype is a u8

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/cmd.c

index cd3bddb243b1d3583e07f9ebd3648c5dfff5492f..257d6443f6c7c561bc180e3ee346ef7c33f531ec 100644 (file)
@@ -181,15 +181,13 @@ static int wlan_cmd_802_11_set_wep(wlan_private * priv,
 
                        switch (pkey->len) {
                        case KEY_LEN_WEP_40:
-                               wep->keytype[i] =
-                                       cpu_to_le16(CMD_TYPE_WEP_40_BIT);
+                               wep->keytype[i] = (u8)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] =
-                                       cpu_to_le16(CMD_TYPE_WEP_104_BIT);
+                               wep->keytype[i] = (u8)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);