Modify

Opened 11 years ago

Closed 11 years ago

#1038 closed enhancement (fixed)

Trendware TEW-411BRPplus support patch

Reported by: anonymous Owned by: developers
Priority: normal Milestone: 0.9/rc6
Component: kernel Version:
Keywords: Cc: if@…

Description

trendware TEW-411BRPplus AP needs some special treatment.
-> http://forum.openwrt.org/viewtopic.php?pid=5525

I have created a patch against whiterussian RC6:

diff -u -r whiterussian_rc6/target/linux/package/diag/src/diag.c whiterussian_rc6_tew411brpp/target/linux/package/diag/src/diag.c
--- whiterussian_rc6/target/linux/package/diag/src/diag.c       2006-11-08 22:19:12.000000000 +0100
+++ whiterussian_rc6_tew411brpp/target/linux/package/diag/src/diag.c    2006-12-10 00:03:22.000000000 +0100
@@ -83,6 +83,9 @@

        /* Belkin */
        BELKIN_UNKNOWN,
+
+       /* Trendware */
+       TEW411BRPP,
 };

 static struct platform_t __init platforms[] = {
@@ -382,6 +385,19 @@
                        { .name = "connected",  .gpio = 1 << 0, .polarity = NORMAL },
                },
        },
+       /* trendware */
+       [TEW411BRPP] = {
+               .name           = "Trendware TEW411BRP+",
+               .buttons        = {
+                       { /* No usable buttons */ },
+               },
+               .leds           = {
+                       { .name = "power",      .gpio = 1 << 7, .polarity = NORMAL },
+                       { .name = "wlan",       .gpio = 1 << 1, .polarity = NORMAL },
+                       { .name = "bridge",     .gpio = 1 << 6, .polarity = NORMAL },
+               },
+       },
+
 };

 static inline char __init *getvar(char *str)
@@ -477,6 +493,10 @@
                return &platforms[WR850GV2V3];
        }

+       if (!strcmp(boardnum, "44")) {  /* trendware TEW-411BRP+ */
+               return &platforms[TEW411BRPP];
+       }
+
        /* not found */
        return NULL;
 }
diff -u -r whiterussian_rc6/target/linux/package/switch/src/switch-adm.c whiterussian_rc6_tew411brpp/target/linux/package/switch/
--- whiterussian_rc6/target/linux/package/switch/src/switch-adm.c       2006-11-08 22:19:11.000000000 +0100
+++ whiterussian_rc6_tew411brpp/target/linux/package/switch/src/switch-adm.c    2006-12-10 00:05:32.000000000 +0100
@@ -493,8 +493,17 @@
 
 #if defined(BCMGPIO2) || defined(BCMGPIO)
        int boardflags = atoi(nvram_get("boardflags"));
+       int boardnum = atoi(nvram_get("boardnum"));
 
-       if ((boardflags & 0x80) || force) {
+       if (boardnum == 44) {   /* trendware TEW-411BRP+ */
+               ret = 1;
+
+               eecs = getgpiopin("adm_eecs", 2);
+                eesk = getgpiopin("adm_eesk", 3);
+                eedi = getgpiopin("adm_eedi", 4);
+                eerc = getgpiopin("adm_rc", 5);  
+
+       } else if ((boardflags & 0x80) || force) {
                ret = 1;
 
                eecs = getgpiopin("adm_eecs", 2);

Attachments (1)

tew-411BRPp_patch.txt (2.4 KB) - added by if@… 11 years ago.
Patch for tew-411BRP+

Download all attachments as: .zip

Change History (2)

Changed 11 years ago by if@…

Patch for tew-411BRP+

comment:1 Changed 11 years ago by florian

  • Resolution set to fixed
  • Status changed from new to closed

Added in [5764], thanks a lot ! It has also been added to kamikaze at the same time.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.