aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmd.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-08-02 10:45:55 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:49:38 -0400
commit1443b6530d8db779082dc9fabbd894e2b551b101 (patch)
tree076a7d53d86b829ac1087df4a2f23b252c6648f3 /drivers/net/wireless/libertas/cmd.c
parent0c9ca690e0117e1bf415d5f3e392e27c0c472c68 (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/cmd.c')
-rw-r--r--drivers/net/wireless/libertas/cmd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 4a8f5dc70239..355a3960323b 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -181,7 +181,7 @@ static int wlan_cmd_802_11_set_wep(wlan_private * priv,
181 181
182 /* Copy key types and material to host command structure */ 182 /* Copy key types and material to host command structure */
183 for (i = 0; i < 4; i++) { 183 for (i = 0; i < 4; i++) {
184 struct WLAN_802_11_KEY * pkey = &assoc_req->wep_keys[i]; 184 struct enc_key * pkey = &assoc_req->wep_keys[i];
185 185
186 switch (pkey->len) { 186 switch (pkey->len) {
187 case KEY_LEN_WEP_40: 187 case KEY_LEN_WEP_40:
@@ -249,10 +249,8 @@ static int wlan_cmd_802_11_enable_rsn(wlan_private * priv,
249 249
250 250
251static void set_one_wpa_key(struct MrvlIEtype_keyParamSet * pkeyparamset, 251static void set_one_wpa_key(struct MrvlIEtype_keyParamSet * pkeyparamset,
252 struct WLAN_802_11_KEY * pkey) 252 struct enc_key * pkey)
253{ 253{
254 pkeyparamset->keytypeid = cpu_to_le16(pkey->type);
255
256 if (pkey->flags & KEY_INFO_WPA_ENABLED) { 254 if (pkey->flags & KEY_INFO_WPA_ENABLED) {
257 pkeyparamset->keyinfo |= cpu_to_le16(KEY_INFO_WPA_ENABLED); 255 pkeyparamset->keyinfo |= cpu_to_le16(KEY_INFO_WPA_ENABLED);
258 } 256 }
@@ -264,6 +262,7 @@ static void set_one_wpa_key(struct MrvlIEtype_keyParamSet * pkeyparamset,
264 } 262 }
265 263
266 pkeyparamset->type = cpu_to_le16(TLV_TYPE_KEY_MATERIAL); 264 pkeyparamset->type = cpu_to_le16(TLV_TYPE_KEY_MATERIAL);
265 pkeyparamset->keytypeid = cpu_to_le16(pkey->type);
267 pkeyparamset->keylen = cpu_to_le16(pkey->len); 266 pkeyparamset->keylen = cpu_to_le16(pkey->len);
268 memcpy(pkeyparamset->key, pkey->key, pkey->len); 267 memcpy(pkeyparamset->key, pkey->key, pkey->len);
269 pkeyparamset->length = cpu_to_le16( sizeof(pkeyparamset->keytypeid) 268 pkeyparamset->length = cpu_to_le16( sizeof(pkeyparamset->keytypeid)