summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorRolf Leggewie <oe-devel@rolf.leggewie.biz>2008-01-24 17:49:06 +0000
committerRolf Leggewie <oe-devel@rolf.leggewie.biz>2008-01-24 17:49:06 +0000
commit2d9c184c9d3b28efdfdbd0c827d6b1fda0d507a7 (patch)
treea5599ebfb95cab01037ac2d7739bc4e2ee81c9a2 /classes
parentf68ff6a19d85b3f7dd8f2cfd72840e340fa0b328 (diff)
kernel: add wifi suspend fix to kernel-module-(hostap|orinoco)-cs. Closes 3664.
* applies only to kernel later than 2.6.17 * added base_version_less_or_equal function to base.bbclass (thanks, zecke and mickey!) to do the comparison. This does not change existing functionality. Skipped RFC.
Diffstat (limited to 'classes')
-rw-r--r--classes/base.bbclass8
-rw-r--r--classes/kernel.bbclass2
2 files changed, 10 insertions, 0 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index d48d2a5726..c8ee75627f 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -128,6 +128,14 @@ def base_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
else:
return falsevalue
+def base_version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
+ import bb
+ result = bb.vercmp(bb.data.getVar(variable,d,True), checkvalue)
+ if result <= 0:
+ return truevalue
+ else:
+ return falsevalue
+
def base_contains(variable, checkvalues, truevalue, falsevalue, d):
import bb
matches = 0
diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
index 8724ad2cf1..047a3ec047 100644
--- a/classes/kernel.bbclass
+++ b/classes/kernel.bbclass
@@ -180,6 +180,8 @@ FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*"
FILES_kernel-dev = "/boot/System.map* /boot/config*"
FILES_kernel-vmlinux = "/boot/vmlinux*"
RDEPENDS_kernel = "kernel-base"
+RRECOMMENDS_kernel-module-hostap-cs += '${@base_version_less_or_equal("KERNEL_VERSION", "2.6.17", "", "apm-wifi-suspendfix", d)}'
+RRECOMMENDS_kernel-module-orinoco-cs += '${@base_version_less_or_equal("KERNEL_VERSION", "2.6.17", "", "apm-wifi-suspendfix", d)}'
# Allow machines to override this dependency if kernel image files are
# not wanted in images as standard
RDEPENDS_kernel-base ?= "kernel-image"