On 2012-11-26 8:16 PM, Petr Štetiar wrote:
> As rt2800 hw can only be configured to mask the last three bits of the
> programmed MAC addresses, we can't change first byte of the MAC - otherwise it
> doesn't work. More information about this issue [1].
> 
> Should fix #12133.
> 
> 1. http://marc.info/?l=linux-wireless&m=135387062429809&w=2
> 
> Thanks to Paul Fertser and Helmut Schaa.
> 
> Signed-off-by: Petr Štetiar <yn...@true.cz>
> ---
>  package/mac80211/files/lib/wifi/mac80211.sh |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/package/mac80211/files/lib/wifi/mac80211.sh 
> b/package/mac80211/files/lib/wifi/mac80211.sh
> index 1b0bea7..68a2f3e 100644
> --- a/package/mac80211/files/lib/wifi/mac80211.sh
> +++ b/package/mac80211/files/lib/wifi/mac80211.sh
> @@ -272,13 +272,17 @@ get_freq() {
>       iw "$phy" info | grep -E -m1 "(\* ${chan:-....} 
> MHz${chan:+|\\[$chan\\]})" | grep MHz | awk '{print $2}'
>  }
>  
> +is_rt2800() {
> +     grep -sqE 'Ralink (RT3050|RT3052|RT3350|RT3352)' /proc/cpuinfo
> +}
> +
Please don't use /proc/cpuinfo to make assumptions about the wifi driver
type. Here's something better:

drvname="$(readlink sys/class/ieee80211/$phy/device/driver)"
drvname="${drvname##*/}"

Then check if drvname is rt2800pci, rt2800usb or any other ralink
devices that might be affected.

- Felix

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to