aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmd.c
diff options
context:
space:
mode:
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)