/* Look for a model identifier */
/* Based on "model_name" */
/* Look for a model identifier */
/* Based on "model_name" */
- if (buf = nvram_get("model_name")) {
+ if ((buf = nvram_get("model_name"))) {
if (!strcmp(buf, "DIR-130"))
return &platforms[DIR130];
if (!strcmp(buf, "DIR-330"))
if (!strcmp(buf, "DIR-130"))
return &platforms[DIR130];
if (!strcmp(buf, "DIR-330"))
}
/* Based on "model_no" */
}
/* Based on "model_no" */
- if (buf = nvram_get("model_no")) {
+ if ((buf = nvram_get("model_no"))) {
if (startswith(buf,"WL700")) /* WL700* */
return &platforms[WL700GE];
}
/* Based on "hardware_version" */
if (startswith(buf,"WL700")) /* WL700* */
return &platforms[WL700GE];
}
/* Based on "hardware_version" */
- if (buf = nvram_get("hardware_version")) {
+ if ((buf = nvram_get("hardware_version"))) {
if (startswith(buf,"WL500GPV2-")) /* WL500GPV2-* */
return &platforms[WL500GPV2];
if (startswith(buf,"WL520GC-")) /* WL520GU-* */
if (startswith(buf,"WL500GPV2-")) /* WL500GPV2-* */
return &platforms[WL500GPV2];
if (startswith(buf,"WL520GC-")) /* WL520GU-* */
}
/* Based on "ModelId" */
}
/* Based on "ModelId" */
- if (buf = nvram_get("ModelId")) {
+ if ((buf = nvram_get("ModelId"))) {
if (!strcmp(buf, "WR850GP"))
return &platforms[WR850GP];
if (!strcmp(buf,"WX-5565"))
if (!strcmp(buf, "WR850GP"))
return &platforms[WR850GP];
if (!strcmp(buf,"WX-5565"))
#ifndef BCMDRIVER
#include <linux/ssb/ssb_embedded.h>
#ifndef BCMDRIVER
#include <linux/ssb/ssb_embedded.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
+#include <linux/gpio.h>
+#define ssb ssb_bcm47xx
+#endif
extern struct ssb_bus ssb;
extern struct ssb_bus ssb;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
+ irq = gpio_to_irq(0);
+ if (irq == -EINVAL) return;
+#else
if (ssb.chipco.dev)
irq = ssb_mips_irq(ssb.chipco.dev) + 2;
else if (ssb.extif.dev)
irq = ssb_mips_irq(ssb.extif.dev) + 2;
else return;
if (ssb.chipco.dev)
irq = ssb_mips_irq(ssb.chipco.dev) + 2;
else if (ssb.extif.dev)
irq = ssb_mips_irq(ssb.extif.dev) + 2;
else return;
if (enabled) {
if (request_irq(irq, handler, IRQF_SHARED | IRQF_SAMPLE_RANDOM, "gpio", handler))
if (enabled) {
if (request_irq(irq, handler, IRQF_SHARED | IRQF_SAMPLE_RANDOM, "gpio", handler))
#ifndef BCMDRIVER
#include <linux/ssb/ssb_embedded.h>
#ifndef BCMDRIVER
#include <linux/ssb/ssb_embedded.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
+#define ssb ssb_bcm47xx
+#endif
+
extern struct ssb_bus ssb;
extern struct ssb_bus ssb;