Skip to content

Commit

Permalink
[PATCH] libertas: fix assignment of WEP key type
Browse files Browse the repository at this point in the history
keytype is a u8

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Dan Williams authored and David S. Miller committed Oct 10, 2007
1 parent 965f8bb commit 5707708
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/wireless/libertas/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5707708

Please sign in to comment.