Re: [PATCH v2 2/2] leds: trigger: netdev: add additional specific link duplex mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  static ssize_t device_name_show(struct device *dev,
> @@ -230,6 +241,7 @@ static int set_device_name(struct led_netdev_data *trigger_data,
>  
>  	trigger_data->carrier_link_up = false;
>  	trigger_data->link_speed = 0;
> +	trigger_data->duplex = 0;

/* Duplex, half or full. */
#define DUPLEX_HALF		0x00
#define DUPLEX_FULL		0x01
#define DUPLEX_UNKNOWN		0xff

You probably want to initialise it to DUPLEX_UNKNOWN, not DUPLEX_HALF.

There is also SPEED_UNKNOWN, which might be good to use, rather than
0.

	Andrew



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux