Print this page
6601 Various GLD drivers return EINVAL instead of ENOTSUP for unused mac_prop_id_t's
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>

@@ -20,10 +20,11 @@
  */
 /*
  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  * Copyright 2012 Milan Jurik. All rights reserved.
+ * Copyright 2016 OmniTI Computer Consulting, Inc. All rights reserved.
  */
 
 /*
  * SunOs MT STREAMS Hydra 10Gb Ethernet Device Driver.
  */

@@ -3319,11 +3320,11 @@
                         err = hxge_get_priv_prop(hxgep, pr_name, pr_valsize,
                             pr_val);
                         break;
 
                 default:
-                        err = EINVAL;
+                        err = ENOTSUP;
                         break;
         }
 
         HXGE_DEBUG_MSG((hxgep, DLADM_CTL, "<== hxge_m_getprop"));
 

@@ -3431,11 +3432,11 @@
                     (caddr_t)&param_arr[param_class_opt_ipv6_ah]);
         } else if (strcmp(pr_name, "_class_opt_ipv6_sctp") == 0) {
                 err = hxge_param_set_ip_opt(hxgep, NULL, NULL, (char *)pr_val,
                     (caddr_t)&param_arr[param_class_opt_ipv6_sctp]);
         } else {
-                err = EINVAL;
+                err = ENOTSUP;
         }
 
         HXGE_DEBUG_MSG((hxgep, DLADM_CTL,
             "<== hxge_set_priv_prop: err %d", err));
 

@@ -3501,11 +3502,11 @@
                 err = hxge_param_get_ip_opt(hxgep, NULL, NULL,
                     (caddr_t)&param_arr[param_class_opt_ipv6_sctp]);
 
                 value = (int)param_arr[param_class_opt_ipv6_sctp].value;
         } else {
-                err = EINVAL;
+                err = ENOTSUP;
         }
 
         if (err == 0) {
                 (void) snprintf(valstr, sizeof (valstr), "0x%x", value);