From c38691f291066f42000232a42521167ec5374f91 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@openwrt.org>
Date: Thu, 12 Apr 2007 17:34:21 +0000
Subject: [PATCH] madwifi init: set the channel after bringing up the interface
 (sometimes it needs the channel before bringing up the interface, sometimes
 after, no idea what's going on)

SVN-Revision: 6939
---
 package/madwifi/files/lib/wifi/madwifi.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/madwifi/files/lib/wifi/madwifi.sh b/package/madwifi/files/lib/wifi/madwifi.sh
index 89ab83d8fd..1dce76715b 100755
--- a/package/madwifi/files/lib/wifi/madwifi.sh
+++ b/package/madwifi/files/lib/wifi/madwifi.sh
@@ -181,6 +181,7 @@ enable_atheros() {
 		fi
 
 		ifconfig "$ifname" up
+		iwconfig "$ifname" channel "$channel"
 
 		local net_cfg bridge
 		net_cfg="$(find_net_config "$vif")"
-- 
2.25.1