From: Helmut Schaa Date: Wed, 28 Nov 2012 09:28:52 +0000 (+0100) Subject: rt2x00: Use addr_mask to disallow invalid MAC addresses in mutli-bssid mode X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6c50f9459e62eb133563fd23606f68bfc9d120e8;p=linux-beck.git rt2x00: Use addr_mask to disallow invalid MAC addresses in mutli-bssid mode Reported-by: Petr Stetiar Signed-off-by: Helmut Schaa Acked-by: Gertjan van Wingerde Acked-by: Ivo van Doorn Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 67d167993d45..66b3b17b16d2 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c @@ -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