From 5e730eee30c5ab9ffff3471c63a65e14bc483863 Mon Sep 17 00:00:00 2001 From: Bart Van Der Meerssche Date: Mon, 24 Aug 2009 22:27:29 +0000 Subject: [PATCH] openwrt: fix the wifi bit rate at 6Mbps as a workaround for https://dev.openwrt.org/ticket/5395 --- openwrt/files/etc/init.d/network | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 openwrt/files/etc/init.d/network diff --git a/openwrt/files/etc/init.d/network b/openwrt/files/etc/init.d/network new file mode 100755 index 0000000..6e2bf13 --- /dev/null +++ b/openwrt/files/etc/init.d/network @@ -0,0 +1,37 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=40 +STOP=40 + +boot() { + setup_switch() { return 0; } + + include /lib/network + setup_switch + [ -s /etc/config/wireless ] || \ + /sbin/wifi detect > /etc/config/wireless + /sbin/wifi up + iwconfig ath0 rate 6M +} + +start() { + ifup -a + /sbin/wifi up + iwconfig ath0 rate 6M +} + +restart() { + setup_switch() { return 0; } + + include /lib/network + setup_switch + ifup -a + /sbin/wifi up + iwconfig ath0 rate 6M +} + +stop() { + ifdown -a +} +