]> git.ipfire.org Git - people/ms/mstpd.git/blame - driver_deps.c
Translate new ageing time to the kernel bridge code
[people/ms/mstpd.git] / driver_deps.c
CommitLineData
fef685fc
VD
1/*
2 * driver_deps.c Driver-specific code.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *
9 * Authors: Vitalii Demianets <vitas@nppfactor.kiev.ua>
10 */
11
12#include <string.h>
13#include <unistd.h>
14#include <fcntl.h>
15#include <asm/byteorder.h>
16
17#include "log.h"
18#include "mstp.h"
19
20/*
21 * Set new state (BR_STATE_xxx) for the given port and MSTI.
22 * Return new actual state (BR_STATE_xxx) from driver.
23 */
24int driver_set_new_state(per_tree_port_t *ptp, int new_state)
25{
26 /* TODO: insert driver-specific code here */
27 return new_state;
28}
27ef19da
VD
29
30void driver_flush_all_fids(per_tree_port_t *ptp)
31{
32 /* TODO: do real flushing.
33 * Make it asynchronous, with completion function calling
34 * MSTP_IN_all_fids_flushed(ptp)
35 */
36 MSTP_IN_all_fids_flushed(ptp);
37}
c109fcb6
VD
38
39/*
40 * Set new ageing time (in seconds) for the bridge.
41 * Return new actual ageing time from driver (the ageing timer granularity
42 * in the hardware can be more than 1 sec)
43 */
44unsigned int driver_set_ageing_time(bridge_t *br, unsigned int ageingTime)
45{
46 /* TODO: do set new ageing time */
47 return ageingTime;
48}