From 59fcc6424f7b6e198d7d19670f214167d2045bfa Mon Sep 17 00:00:00 2001
From: Anish Mangal <anish@sugarlabs.org>
Date: Tue, 1 Feb 2011 20:15:24 -0300
Subject: [PATCH] Redisable mesh after suspend fix
Organization: Sugar Labs Foundation


Signed-off-by: Anish Mangal <anish@sugarlabs.org>
---
 etc/powerd/postresume.d/disable_mesh.sh |   36 +++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)
 create mode 100755 etc/powerd/postresume.d/disable_mesh.sh

diff --git a/etc/powerd/postresume.d/disable_mesh.sh b/etc/powerd/postresume.d/disable_mesh.sh
new file mode 100755
index 0000000..7d64c07
--- /dev/null
+++ b/etc/powerd/postresume.d/disable_mesh.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Copyright (C) 2010, Martin Abente
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+#WARNING: 
+#         This is a workaround for disabling the mesh until the feature gets
+#         included in the libertas code. Therefore this workaround MUST be
+#         removed after that.
+
+#INSTRUCTIONS:
+#         1. Copy this file to /etc/powerd/postresume.d
+#         2. Grant it execution permissions (chmod 755)
+
+LBS_MESH=/sys/class/net/eth0/lbs_mesh
+
+while [ ! -f $LBS_MESH ] || [ $(cat $LBS_MESH) = "0x0" ]
+do
+    sleep 0.5s
+done
+
+echo 0 > $LBS_MESH
+
+
-- 
1.7.3.4

