switch netif_up/down to internal static function
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>pull/106/head^2
parent
fb19f0edcb
commit
dc8f25b61a
|
|
@ -27,9 +27,6 @@
|
||||||
#define GET_BITTIMING 3
|
#define GET_BITTIMING 3
|
||||||
#define GET_CTRLMODE 4
|
#define GET_CTRLMODE 4
|
||||||
|
|
||||||
int netif_down(int fd, const char *name);
|
|
||||||
int netif_up(int fd, const char *name);
|
|
||||||
|
|
||||||
int scan_set_restart(const char *name);
|
int scan_set_restart(const char *name);
|
||||||
int scan_set_bitrate(const char *name, __u32 bitrate);
|
int scan_set_bitrate(const char *name, __u32 bitrate);
|
||||||
int scan_set_restart_ms(const char *name, __u32 restart_ms);
|
int scan_set_restart_ms(const char *name, __u32 restart_ms);
|
||||||
|
|
|
||||||
|
|
@ -459,6 +459,16 @@ static int do_set_nl_link(int fd, __u8 if_state, const char *name,
|
||||||
return send_mod_request(fd, &req.n);
|
return send_mod_request(fd, &req.n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int netif_up(int fd, const char *name)
|
||||||
|
{
|
||||||
|
return do_set_nl_link(fd, IF_UP, name, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int netif_down(int fd, const char *name)
|
||||||
|
{
|
||||||
|
return do_set_nl_link(fd, IF_DOWN, name, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
static int set_link(const char *name, struct req_info *req_info)
|
static int set_link(const char *name, struct req_info *req_info)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
|
@ -486,16 +496,6 @@ err_out:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
int netif_up(int fd, const char *name)
|
|
||||||
{
|
|
||||||
return do_set_nl_link(fd, IF_UP, name, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
int netif_down(int fd, const char *name)
|
|
||||||
{
|
|
||||||
return do_set_nl_link(fd, IF_DOWN, name, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
int scan_set_restart(const char *name)
|
int scan_set_restart(const char *name)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue