-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi.
> +is_not_rt2800() { + grep -E 'Ralink (RT3050|RT3052|RT3350|RT3352)' > /proc/cpuinfo >/dev/null && \ + return 1 || return 0 +} This can be simplified to: is_not_rt2800() { grep -sqE 'Ralink (RT3050|RT3052|RT3350|RT3352)' /proc/cpuinfo } > mac80211_generate_mac() { local off="$1" local mac="$2" local > oIFS="$IFS"; IFS=":"; set -- $mac; IFS="$oIFS" > > local b2mask=0x00 - [ $off -gt 0 ] && b2mask=0x02 + [ $off -gt 0 ] > && is_not_rt2800 && b2mask=0x02 > > printf "%02x:%s:%s:%s:%02x:%02x" \ $(( 0x$1 | $b2mask )) $2 $3 $4 > \ Since Daniel Dickinson recently posted a series of patches to override the VAP mac generation for a specific product I wonder whether we maybe should move the mac generation procedure into an include file... something like /lib/platform/mac80211_rules.sh which would provide overrides for any functionality that diverges from the default. But then I suppose there could be cases where a given platform like ramips can support both models with ralink wifi or external atheros. I have no objections to this patch but I wonder whether we should take the opportunity to generalize it. ~ Jow -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlCzusAACgkQdputYINPTPMt8ACgi2z/nfrUI0rOWoU/7W0mnSud iKsAnRJTXMV5i6/w0t5FEh7AOOOX+gaH =z5K8 -----END PGP SIGNATURE----- _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel