diff options
author | Dan Williams <dcbw@redhat.com> | 2007-08-02 10:45:55 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:49:38 -0400 |
commit | 1443b6530d8db779082dc9fabbd894e2b551b101 (patch) | |
tree | 076a7d53d86b829ac1087df4a2f23b252c6648f3 /drivers/net/wireless/libertas/cmdresp.c | |
parent | 0c9ca690e0117e1bf415d5f3e392e27c0c472c68 (diff) |
[PATCH] libertas: rename WLAN_802_11_KEY to enc_key and clean up usage
It doesn't touch hardware and therefore doesn't need endian notations
either.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmdresp.c')
-rw-r--r-- | drivers/net/wireless/libertas/cmdresp.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c index 6ac0d4752fa..89bd43c2efa 100644 --- a/drivers/net/wireless/libertas/cmdresp.c +++ b/drivers/net/wireless/libertas/cmdresp.c | |||
@@ -321,11 +321,12 @@ static int wlan_ret_802_11_key_material(wlan_private * priv, | |||
321 | while (buf_ptr < resp_end) { | 321 | while (buf_ptr < resp_end) { |
322 | struct MrvlIEtype_keyParamSet * pkeyparamset = | 322 | struct MrvlIEtype_keyParamSet * pkeyparamset = |
323 | (struct MrvlIEtype_keyParamSet *) buf_ptr; | 323 | (struct MrvlIEtype_keyParamSet *) buf_ptr; |
324 | struct WLAN_802_11_KEY * pkey; | 324 | struct enc_key * pkey; |
325 | u16 key_info = le16_to_cpu(pkeyparamset->keyinfo); | ||
326 | u16 param_set_len = le16_to_cpu(pkeyparamset->length); | 325 | u16 param_set_len = le16_to_cpu(pkeyparamset->length); |
327 | u8 * end; | ||
328 | u16 key_len = le16_to_cpu(pkeyparamset->keylen); | 326 | u16 key_len = le16_to_cpu(pkeyparamset->keylen); |
327 | u16 key_flags = le16_to_cpu(pkeyparamset->keyinfo); | ||
328 | u16 key_type = le16_to_cpu(pkeyparamset->keytypeid); | ||
329 | u8 * end; | ||
329 | 330 | ||
330 | end = (u8 *) pkeyparamset + sizeof (pkeyparamset->type) | 331 | end = (u8 *) pkeyparamset + sizeof (pkeyparamset->type) |
331 | + sizeof (pkeyparamset->length) | 332 | + sizeof (pkeyparamset->length) |
@@ -334,20 +335,20 @@ static int wlan_ret_802_11_key_material(wlan_private * priv, | |||
334 | if (end > resp_end) | 335 | if (end > resp_end) |
335 | break; | 336 | break; |
336 | 337 | ||
337 | if (key_info & KEY_INFO_WPA_UNICAST) | 338 | if (key_flags & KEY_INFO_WPA_UNICAST) |
338 | pkey = &adapter->wpa_unicast_key; | 339 | pkey = &adapter->wpa_unicast_key; |
339 | else if (key_info & KEY_INFO_WPA_MCAST) | 340 | else if (key_flags & KEY_INFO_WPA_MCAST) |
340 | pkey = &adapter->wpa_mcast_key; | 341 | pkey = &adapter->wpa_mcast_key; |
341 | else | 342 | else |
342 | break; | 343 | break; |
343 | 344 | ||
344 | /* Copy returned key into driver */ | 345 | /* Copy returned key into driver */ |
345 | memset(pkey, 0, sizeof(struct WLAN_802_11_KEY)); | 346 | memset(pkey, 0, sizeof(struct enc_key)); |
346 | if (key_len > sizeof(pkey->key)) | 347 | if (key_len > sizeof(pkey->key)) |
347 | break; | 348 | break; |
348 | pkey->type = le16_to_cpu(pkeyparamset->keytypeid); | 349 | pkey->type = key_type; |
349 | pkey->flags = le16_to_cpu(pkeyparamset->keyinfo); | 350 | pkey->flags = key_flags; |
350 | pkey->len = le16_to_cpu(pkeyparamset->keylen); | 351 | pkey->len = key_len; |
351 | memcpy(pkey->key, pkeyparamset->key, pkey->len); | 352 | memcpy(pkey->key, pkeyparamset->key, pkey->len); |
352 | 353 | ||
353 | buf_ptr = end + 1; | 354 | buf_ptr = end + 1; |