]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
rt2x00: Use addr_mask to disallow invalid MAC addresses in mutli-bssid mode
authorHelmut Schaa <helmut.schaa@googlemail.com>
Wed, 28 Nov 2012 09:28:52 +0000 (10:28 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 30 Nov 2012 18:38:14 +0000 (13:38 -0500)
Reported-by: Petr Stetiar <ynezz@true.cz>
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00dev.c

index 67d167993d4590237c4850ccfd3d2717ce739536..66b3b17b16d239728a1eb861cc27d2ea44c6bcee 100644 (file)
@@ -1182,6 +1182,13 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
         */
        rt2x00dev->hw->vif_data_size = sizeof(struct rt2x00_intf);
 
+       /*
+        * rt2x00 devices can only use the last n bits of the MAC address
+        * for virtual interfaces.
+        */
+       rt2x00dev->hw->wiphy->addr_mask[ETH_ALEN - 1] =
+               (rt2x00dev->ops->max_ap_intf - 1);
+
        /*
         * Determine which operating modes are supported, all modes
         * which require beaconing, depend on the availability of