rt2x00: Copy the MAC address to the WCID entry properly.
authorGertjan van Wingerde <gwingerde@gmail.com>
Sun, 30 Jan 2011 12:23:03 +0000 (13:23 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 31 Jan 2011 20:06:25 +0000 (15:06 -0500)
Use the specific mac field of the wcid_entry structure to copy the MAC
address to, instead of just overwriting the structure.
Previous code resulted in the same, but this form is cleaner.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800lib.c

index 4c34fceaec117e84f481153fd7ce1727d18b6080..c9bf074342bafb7122782bbce77245537d2065a1 100644 (file)
@@ -1030,7 +1030,7 @@ static void rt2800_config_wcid_attr(struct rt2x00_dev *rt2x00dev,
 
        memset(&wcid_entry, 0, sizeof(wcid_entry));
        if (crypto->cmd == SET_KEY)
-               memcpy(&wcid_entry, crypto->address, ETH_ALEN);
+               memcpy(wcid_entry.mac, crypto->address, ETH_ALEN);
        rt2800_register_multiwrite(rt2x00dev, offset,
                                      &wcid_entry, sizeof(wcid_entry));
 }