netdev: Make 'netdev' parameter of 'get_features()' const.
authorAndrew Evans <aevans@nicira.com>
Mon, 17 Jan 2011 23:18:38 +0000 (15:18 -0800)
committerAndrew Evans <aevans@nicira.com>
Tue, 18 Jan 2011 01:44:07 +0000 (17:44 -0800)
Implementations shouldn't need to modify it.

AUTHORS
lib/netdev-linux.c
lib/netdev-provider.h
lib/netdev.c
lib/netdev.h

diff --git a/AUTHORS b/AUTHORS
index 183a8b3..38afb2c 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,6 +1,7 @@
 The following people, in alphabetical order, have either authored or
 signed off on commits in the Open vSwitch version control repository.
 
 The following people, in alphabetical order, have either authored or
 signed off on commits in the Open vSwitch version control repository.
 
+Andrew Evans            aevans@nicira.com
 Andrew Lambeth          wal@nicira.com
 Andy Southgate          andy.southgate@citrix.com
 Ben Pfaff               blp@nicira.com
 Andrew Lambeth          wal@nicira.com
 Andy Southgate          andy.southgate@citrix.com
 Ben Pfaff               blp@nicira.com
index 1ff4d40..168cd01 100644 (file)
@@ -1201,7 +1201,7 @@ netdev_linux_get_stats(const struct netdev *netdev_,
  * bitmap of "enum ofp_port_features" bits, in host byte order.  Returns 0 if
  * successful, otherwise a positive errno value. */
 static int
  * bitmap of "enum ofp_port_features" bits, in host byte order.  Returns 0 if
  * successful, otherwise a positive errno value. */
 static int
-netdev_linux_get_features(struct netdev *netdev,
+netdev_linux_get_features(const struct netdev *netdev,
                           uint32_t *current, uint32_t *advertised,
                           uint32_t *supported, uint32_t *peer)
 {
                           uint32_t *current, uint32_t *advertised,
                           uint32_t *supported, uint32_t *peer)
 {
index 9c75ccb..58d51d7 100644 (file)
@@ -295,7 +295,7 @@ struct netdev_class {
      *
      * This function may be set to null if it would always return EOPNOTSUPP.
      */
      *
      * This function may be set to null if it would always return EOPNOTSUPP.
      */
-    int (*get_features)(struct netdev *netdev,
+    int (*get_features)(const struct netdev *netdev,
                         uint32_t *current, uint32_t *advertised,
                         uint32_t *supported, uint32_t *peer);
 
                         uint32_t *current, uint32_t *advertised,
                         uint32_t *supported, uint32_t *peer);
 
index b2c4d66..122525a 100644 (file)
@@ -618,11 +618,11 @@ netdev_get_ifindex(const struct netdev *netdev)
  * Some network devices may not implement support for this function.  In such
  * cases this function will always return EOPNOTSUPP. */
 int
  * Some network devices may not implement support for this function.  In such
  * cases this function will always return EOPNOTSUPP. */
 int
-netdev_get_features(struct netdev *netdev,
+netdev_get_features(const struct netdev *netdev,
                     uint32_t *current, uint32_t *advertised,
                     uint32_t *supported, uint32_t *peer)
 {
                     uint32_t *current, uint32_t *advertised,
                     uint32_t *supported, uint32_t *peer)
 {
-    int (*get_features)(struct netdev *netdev,
+    int (*get_features)(const struct netdev *netdev,
                         uint32_t *current, uint32_t *advertised,
                         uint32_t *supported, uint32_t *peer);
     uint32_t dummy[4];
                         uint32_t *current, uint32_t *advertised,
                         uint32_t *supported, uint32_t *peer);
     uint32_t dummy[4];
index 179628c..03d7f95 100644 (file)
@@ -127,7 +127,7 @@ int netdev_get_etheraddr(const struct netdev *, uint8_t mac[6]);
 /* PHY interface. */
 bool netdev_get_carrier(const struct netdev *);
 bool netdev_get_miimon(const struct netdev *);
 /* PHY interface. */
 bool netdev_get_carrier(const struct netdev *);
 bool netdev_get_miimon(const struct netdev *);
-int netdev_get_features(struct netdev *,
+int netdev_get_features(const struct netdev *,
                         uint32_t *current, uint32_t *advertised,
                         uint32_t *supported, uint32_t *peer);
 uint64_t netdev_features_to_bps(uint32_t features);
                         uint32_t *current, uint32_t *advertised,
                         uint32_t *supported, uint32_t *peer);
 uint64_t netdev_features_to_bps(uint32_t features);