Skip to content
Permalink
Browse files

samples: net: gptp: Allow running gPTP over VLAN

By default gPTP is not run over VLAN but if needed that can be
done by setting CONFIG_NET_GPTP_VLAN and CONFIG_NET_GPTP_VLAN_TAG
options.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
  • Loading branch information...
jukkar committed Feb 26, 2018
1 parent e9228a3 commit ad150569b6646b29de35e15bef607f0a84e59b43
Showing with 3 additions and 3 deletions.
  1. +3 −3 samples/net/gptp/src/main.c
@@ -21,7 +21,7 @@

static struct gptp_phase_dis_cb phase_dis;

#if defined(CONFIG_NET_VLAN)
#if defined(CONFIG_NET_GPTP_VLAN)
/* User data for the interface callback */
struct ud {
struct net_if *first;
@@ -124,7 +124,7 @@ static int init_vlan(void)

return 0;
}
#endif /* CONFIG_NET_VLAN */
#endif /* CONFIG_NET_GPTP_VLAN */

static void gptp_phase_dis_cb(u8_t *gm_identity,
u16_t *time_base,
@@ -147,7 +147,7 @@ static void gptp_phase_dis_cb(u8_t *gm_identity,

static int init_app(void)
{
#if defined(CONFIG_NET_VLAN)
#if defined(CONFIG_NET_GPTP_VLAN)
if (init_vlan() < 0) {
NET_ERR("Cannot setup VLAN");
}

0 comments on commit ad15056

Please sign in to comment.
You can’t perform that action at this time.