aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rndis_wlan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rndis_wlan.c')
-rw-r--r--drivers/net/wireless/rndis_wlan.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index d9460aed1f22..10b776c1adc5 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -260,7 +260,7 @@ struct NDIS_802_11_KEY {
260 __le32 KeyLength; 260 __le32 KeyLength;
261 u8 Bssid[6]; 261 u8 Bssid[6];
262 u8 Padding[6]; 262 u8 Padding[6];
263 __le64 KeyRSC; 263 u8 KeyRSC[8];
264 u8 KeyMaterial[32]; 264 u8 KeyMaterial[32];
265} __attribute__((packed)); 265} __attribute__((packed));
266 266
@@ -1508,7 +1508,7 @@ static int rndis_iw_set_encode_ext(struct net_device *dev,
1508 struct usbnet *usbdev = dev->priv; 1508 struct usbnet *usbdev = dev->priv;
1509 struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); 1509 struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev);
1510 struct NDIS_802_11_KEY ndis_key; 1510 struct NDIS_802_11_KEY ndis_key;
1511 int i, keyidx, ret; 1511 int keyidx, ret;
1512 u8 *addr; 1512 u8 *addr;
1513 1513
1514 keyidx = wrqu->encoding.flags & IW_ENCODE_INDEX; 1514 keyidx = wrqu->encoding.flags & IW_ENCODE_INDEX;
@@ -1543,9 +1543,7 @@ static int rndis_iw_set_encode_ext(struct net_device *dev,
1543 ndis_key.KeyIndex = cpu_to_le32(keyidx); 1543 ndis_key.KeyIndex = cpu_to_le32(keyidx);
1544 1544
1545 if (ext->ext_flags & IW_ENCODE_EXT_RX_SEQ_VALID) { 1545 if (ext->ext_flags & IW_ENCODE_EXT_RX_SEQ_VALID) {
1546 for (i = 0; i < 6; i++) 1546 memcpy(ndis_key.KeyRSC, ext->rx_seq, 6);
1547 ndis_key.KeyRSC |=
1548 cpu_to_le64(ext->rx_seq[i] << (i * 8));
1549 ndis_key.KeyIndex |= cpu_to_le32(1 << 29); 1547 ndis_key.KeyIndex |= cpu_to_le32(1 << 29);
1550 } 1548 }
1551 1549