fix nas compatibility and overrides for newer wla2-g54l units
SVN-Revision: 1181
This commit is contained in:
parent
9108389d74
commit
e091c662cc
@ -30,11 +30,13 @@ typedef void (*bcm_timer_cb)(bcm_timer_id id, int data);
|
|||||||
/* OS-independant interfaces, applications should call these functions only */
|
/* OS-independant interfaces, applications should call these functions only */
|
||||||
int bcm_timer_module_init(int timer_entries, bcm_timer_module_id *module_id);
|
int bcm_timer_module_init(int timer_entries, bcm_timer_module_id *module_id);
|
||||||
int bcm_timer_module_cleanup(bcm_timer_module_id module_id);
|
int bcm_timer_module_cleanup(bcm_timer_module_id module_id);
|
||||||
|
int bcm_timer_module_enable(bcm_timer_module_id module_id, int enable);
|
||||||
int bcm_timer_create(bcm_timer_module_id module_id, bcm_timer_id *timer_id);
|
int bcm_timer_create(bcm_timer_module_id module_id, bcm_timer_id *timer_id);
|
||||||
int bcm_timer_delete(bcm_timer_id timer_id);
|
int bcm_timer_delete(bcm_timer_id timer_id);
|
||||||
int bcm_timer_gettime(bcm_timer_id timer_id, struct itimerspec *value);
|
int bcm_timer_gettime(bcm_timer_id timer_id, struct itimerspec *value);
|
||||||
int bcm_timer_settime(bcm_timer_id timer_id, const struct itimerspec *value);
|
int bcm_timer_settime(bcm_timer_id timer_id, const struct itimerspec *value);
|
||||||
int bcm_timer_connect(bcm_timer_id timer_id, bcm_timer_cb func, int data);
|
int bcm_timer_connect(bcm_timer_id timer_id, bcm_timer_cb func, int data);
|
||||||
int bcm_timer_cancel(bcm_timer_id timer_id);
|
int bcm_timer_cancel(bcm_timer_id timer_id);
|
||||||
|
int bcm_timer_change_expirytime(bcm_timer_id timer_id, const struct itimerspec *timer_spec);
|
||||||
|
|
||||||
#endif /* #ifndef __bcmtimer_h__ */
|
#endif /* #ifndef __bcmtimer_h__ */
|
||||||
|
@ -112,7 +112,7 @@ static void check_timer();
|
|||||||
#if THIS_FINDS_USE
|
#if THIS_FINDS_USE
|
||||||
static int count_queue(struct event *);
|
static int count_queue(struct event *);
|
||||||
#endif
|
#endif
|
||||||
|
static int timer_change_settime(timer_t timer_id, const struct itimerspec *timer_spec);
|
||||||
void block_timer();
|
void block_timer();
|
||||||
void unblock_timer();
|
void unblock_timer();
|
||||||
|
|
||||||
@ -247,6 +247,23 @@ int timer_connect
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Please Call this function only from the call back functions of the alarm_handler.
|
||||||
|
* This is just a hack
|
||||||
|
*/
|
||||||
|
int timer_change_settime
|
||||||
|
(
|
||||||
|
timer_t timerid, /* timer ID */
|
||||||
|
const struct itimerspec * value /* time to be set */
|
||||||
|
)
|
||||||
|
{
|
||||||
|
struct event *event = (struct event *) timerid;
|
||||||
|
|
||||||
|
TIMESPEC_TO_TIMEVAL(&event->it_interval, &value->it_interval);
|
||||||
|
TIMESPEC_TO_TIMEVAL(&event->it_value, &value->it_value);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
int timer_settime
|
int timer_settime
|
||||||
(
|
(
|
||||||
@ -673,6 +690,16 @@ int bcm_timer_module_cleanup(bcm_timer_module_id module_id)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Enable/Disable timer module */
|
||||||
|
int bcm_timer_module_enable(bcm_timer_module_id module_id, int enable)
|
||||||
|
{
|
||||||
|
if (enable)
|
||||||
|
unblock_timer();
|
||||||
|
else
|
||||||
|
block_timer();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int bcm_timer_create(bcm_timer_module_id module_id, bcm_timer_id *timer_id)
|
int bcm_timer_create(bcm_timer_module_id module_id, bcm_timer_id *timer_id)
|
||||||
{
|
{
|
||||||
module_id = 0;
|
module_id = 0;
|
||||||
@ -704,4 +731,8 @@ int bcm_timer_cancel(bcm_timer_id timer_id)
|
|||||||
timer_cancel((timer_t)timer_id);
|
timer_cancel((timer_t)timer_id);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
int bcm_timer_change_expirytime(bcm_timer_id timer_id, const struct itimerspec *timer_spec)
|
||||||
|
{
|
||||||
|
timer_change_settime((timer_t)timer_id, timer_spec);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
@ -51,7 +51,8 @@ remap () {
|
|||||||
|
|
||||||
# hacks for buffalo wla2-g54l
|
# hacks for buffalo wla2-g54l
|
||||||
[ "$(nvram get boardnum)" = "00" ] && \
|
[ "$(nvram get boardnum)" = "00" ] && \
|
||||||
[ "$(nvram get product_name)" = "Product_name" ] && {
|
[ "$(nvram get product_name)" = "Product_name" ] || \
|
||||||
|
[ "$(nvram get product_name)" = "WLA2-G54L" ] && {
|
||||||
debug "### wla2-g54l hacks ###"
|
debug "### wla2-g54l hacks ###"
|
||||||
NVRAM_wan_ifname="none"
|
NVRAM_wan_ifname="none"
|
||||||
NVRAM_lan_ifnames="vlan0"
|
NVRAM_lan_ifnames="vlan0"
|
||||||
|
Loading…
Reference in New Issue
Block a user