diff --git a/patches/openwrt/0048-ar71xx-fix-AR71XX_MODEL-on-TP-Link-TL-WR703N.patch b/patches/openwrt/0048-ar71xx-fix-AR71XX_MODEL-on-TP-Link-TL-WR703N.patch new file mode 100644 index 0000000000000000000000000000000000000000..c2796ddb6a87900228c3ba81cceb13afc6c7dc19 --- /dev/null +++ b/patches/openwrt/0048-ar71xx-fix-AR71XX_MODEL-on-TP-Link-TL-WR703N.patch @@ -0,0 +1,22 @@ +From: Matthias Schiffer <mschiffer@universe-factory.net> +Date: Thu, 19 Nov 2015 23:29:17 +0100 +Subject: ar71xx: fix AR71XX_MODEL on TP-Link TL-WR703N + +The hwid check was wrong, causing the AR71XX_MODEL value to end with a +space (as $hwver was unset). + +Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> + +diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh +index 6ba40aa..329f558 100755 +--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh ++++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh +@@ -110,7 +110,7 @@ tplink_board_detect() { + "3C0001"*) + model="OOLITE" + ;; +- "070300"*) ++ "070301"*) + model="TP-Link TL-WR703N" + ;; + "071000"*) diff --git a/patches/openwrt/0049-ar71xx-fix-wndr3700_board_detect-for-some-NETGEAR-WNDR3700v2-again.patch b/patches/openwrt/0049-ar71xx-fix-wndr3700_board_detect-for-some-NETGEAR-WNDR3700v2-again.patch new file mode 100644 index 0000000000000000000000000000000000000000..972e09147bfdc29feaf055acbb198b4a59606ee2 --- /dev/null +++ b/patches/openwrt/0049-ar71xx-fix-wndr3700_board_detect-for-some-NETGEAR-WNDR3700v2-again.patch @@ -0,0 +1,46 @@ +From: Matthias Schiffer <mschiffer@universe-factory.net> +Date: Fri, 20 Nov 2015 15:09:03 +0100 +Subject: ar71xx: fix wndr3700_board_detect for some NETGEAR WNDR3700v2 (again) + +When fixing the model string for WNDR3700v2 which contain a model string +followed by 0xff in r46455, the match for other versions of the WNDR3700v2 +which just contain lots of 0xff broke (as the 0xff $model is checked for +is stripped off). + +Fix by stripping off non-printable characters only for the actual output +string, but not for the internal matching. + +diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh +index 329f558..1f341e3 100755 +--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh ++++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh +@@ -37,8 +37,9 @@ wndr3700_board_detect() { + machine="NETGEAR WNDR3700" + ;; + "33373031") +- # Use awk to remove everything after the first zero byte +- model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c | LC_CTYPE=C awk -v 'FS=[^[:print:]]' '{print $1; exit}')" ++ model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c)" ++ # Use awk to remove everything unprintable ++ model_stripped="$(echo -n "$model" | LC_CTYPE=C awk -v 'FS=[^[:print:]]' '{print $1; exit}')" + case $model in + $'\xff'*) + if [ "${model:24:1}" = 'N' ]; then +@@ -48,14 +49,14 @@ wndr3700_board_detect() { + fi + ;; + '29763654+16+64'*) +- machine="NETGEAR ${model:14}" ++ machine="NETGEAR ${model_stripped:14}" + ;; + '29763654+16+128'*) +- machine="NETGEAR ${model:15}" ++ machine="NETGEAR ${model_stripped:15}" + ;; + *) + # Unknown ID +- machine="NETGEAR $model" ++ machine="NETGEAR ${model_stripped}" + esac + esac +