/* * netsniff-ng - the packet sniffing beast * Copyright 2009, 2010 Daniel Borkmann. * Subject to the GPL, version 2. */ #ifndef DISSECTOR_ETH_H #define DISSECTOR_ETH_H #include "hash.h" #include "proto.h" #include "protos.h" #include "tprintf.h" #include "oui.h" extern struct hash_table eth_lay2; extern struct hash_table eth_lay3; extern void dissector_init_ethernet(int fnttype); extern void dissector_cleanup_ethernet(void); extern char *lookup_port_udp(unsigned int id); extern char *lookup_port_tcp(unsigned int id); extern char *lookup_ether_type(unsigned int id); #ifdef __WITH_PROTOS static inline struct protocol *dissector_get_ethernet_entry_point(void) { return ðernet_ops; } static inline struct protocol *dissector_get_ethernet_exit_point(void) { return &none_ops; } #else static inline struct protocol *dissector_get_ethernet_entry_point(void) { return NULL; } static inline struct protocol *dissector_get_ethernet_exit_point(void) { return NULL; } #endif /* __WITH_PROTOS */ #endif /* DISSECTOR_ETH_H */ p'>emaclite-cleanup net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorFabio Baltieri <fabio.baltieri@gmail.com>2014-06-08 22:06:24 +0100
committerGuenter Roeck <linux@roeck-us.net>2014-06-12 08:36:18 -0700
commitc0214f98943b1fe43f7be61b7782b0c8f0836f28 (patch)
tree5a820dc1926e81b18ed357f94d3a1bbcb9d59d32 /drivers
parent5c02c392cd2320e8d612376d6b72b6548a680923 (diff)
hwmon: (ina2xx) Cast to s16 on shunt and current regs
All devices supported by ina2xx are bidirectional and report the measured shunt voltage and power values as a signed 16 bit, but the current driver implementation caches all registers as u16, leading to an incorrect sign extension when reporting to userspace in ina2xx_get_value(). This patch fixes the problem by casting the signed registers to s16. Tested on an INA219. Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com> Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers')