Hello,
my DIR-300B1 was unable to control WAN led indicator, so I decided to fix this.
The only bad thing after patch - it dosnt light WAN led on cable plug at all, you need to set it manually via /sys/class/leds/d-link:amber:wan/brightness or /sys/class/leds/d-link:green:wan/brightness via script or luci leds triggers.
...
#define DIR_300B_GPIO_LED_WAN_AMBER 14
#define DIR_300B_GPIO_LED_WAN_GREEN 12
...
...
, {
.name = "d-link:amber:wan",
.gpio = DIR_300B_GPIO_LED_WAN_AMBER,
.active_low = 1,
}, {
.name = "d-link:green:wan",
.gpio = DIR_300B_GPIO_LED_WAN_GREEN,
.active_low = 1,
},
...
these changes go to https://dev.openwrt.org/browser/trunk/t … 300-revb.c
sorry, I dont know how to exactly create a patch, so I'll post just changes and somebody maybe formalize if find it useful.