Print this page
fixup .text where possible
7127  remove -Wno-missing-braces from Makefile.uts

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/mac/plugins/mac_ether.c
          +++ new/usr/src/uts/common/io/mac/plugins/mac_ether.c
↓ open down ↓ 119 lines elided ↑ open up ↑
 120  120          { ETHER_STAT_LINK_DUPLEX, "link_duplex", KSTAT_DATA_UINT32,     0 }
 121  121  };
 122  122  
 123  123  static struct modlmisc mac_ether_modlmisc = {
 124  124          &mod_miscops,
 125  125          "Ethernet MAC plugin"
 126  126  };
 127  127  
 128  128  static struct modlinkage mac_ether_modlinkage = {
 129  129          MODREV_1,
 130      -        &mac_ether_modlmisc,
 131      -        NULL
      130 +        {   &mac_ether_modlmisc,
      131 +            NULL }
 132  132  };
 133  133  
 134  134  static mactype_ops_t mac_ether_type_ops;
 135  135  
 136  136  static mac_ndd_mapping_t  mac_ether_mapping[] = {
 137      -        {"adv_autoneg_cap",     MAC_PROP_AUTONEG, 0, 1,
      137 +        {"adv_autoneg_cap",     .mp_prop_id = MAC_PROP_AUTONEG, 0, 1,
 138  138              sizeof (uint8_t), MAC_PROP_PERM_RW},
 139  139  
 140      -        {"adv_5000fdx_cap",     MAC_PROP_EN_5000FDX_CAP, 0, 1,
      140 +        {"adv_5000fdx_cap",     .mp_prop_id = MAC_PROP_EN_5000FDX_CAP, 0, 1,
 141  141              sizeof (uint8_t), MAC_PROP_PERM_RW},
 142  142  
 143      -        {"adv_2500fdx_cap",     MAC_PROP_EN_2500FDX_CAP, 0, 1,
      143 +        {"adv_2500fdx_cap",     .mp_prop_id = MAC_PROP_EN_2500FDX_CAP, 0, 1,
 144  144              sizeof (uint8_t), MAC_PROP_PERM_RW},
 145  145  
 146      -        {"adv_100gfdx_cap",     MAC_PROP_EN_100GFDX_CAP, 0, 1,
      146 +        {"adv_100gfdx_cap",     .mp_prop_id = MAC_PROP_EN_100GFDX_CAP, 0, 1,
 147  147              sizeof (uint8_t), MAC_PROP_PERM_RW},
 148  148  
 149      -        {"adv_40gfdx_cap",      MAC_PROP_EN_40GFDX_CAP, 0, 1,
      149 +        {"adv_40gfdx_cap",      .mp_prop_id = MAC_PROP_EN_40GFDX_CAP, 0, 1,
 150  150              sizeof (uint8_t), MAC_PROP_PERM_RW},
 151  151  
 152      -        {"adv_10gfdx_cap",      MAC_PROP_EN_10GFDX_CAP, 0, 1,
      152 +        {"adv_10gfdx_cap",      .mp_prop_id = MAC_PROP_EN_10GFDX_CAP, 0, 1,
 153  153              sizeof (uint8_t), MAC_PROP_PERM_RW},
 154  154  
 155      -        {"adv_1000fdx_cap",     MAC_PROP_EN_1000FDX_CAP, 0, 1,
      155 +        {"adv_1000fdx_cap",     .mp_prop_id = MAC_PROP_EN_1000FDX_CAP, 0, 1,
 156  156              sizeof (uint8_t), MAC_PROP_PERM_RW},
 157  157  
 158      -        {"adv_1000hdx_cap",     MAC_PROP_EN_1000HDX_CAP, 0, 1,
      158 +        {"adv_1000hdx_cap",     .mp_prop_id = MAC_PROP_EN_1000HDX_CAP, 0, 1,
 159  159              sizeof (uint8_t), MAC_PROP_PERM_RW},
 160  160  
 161      -        {"adv_100fdx_cap",      MAC_PROP_EN_100FDX_CAP, 0, 1,
      161 +        {"adv_100fdx_cap",      .mp_prop_id = MAC_PROP_EN_100FDX_CAP, 0, 1,
 162  162              sizeof (uint8_t), MAC_PROP_PERM_RW},
 163  163  
 164      -        {"adv_100hdx_cap",      MAC_PROP_EN_100HDX_CAP, 0, 1,
      164 +        {"adv_100hdx_cap",      .mp_prop_id = MAC_PROP_EN_100HDX_CAP, 0, 1,
 165  165              sizeof (uint8_t), MAC_PROP_PERM_RW},
 166  166  
 167      -        {"adv_10fdx_cap",       MAC_PROP_EN_10FDX_CAP, 0, 1,
      167 +        {"adv_10fdx_cap",       .mp_prop_id = MAC_PROP_EN_10FDX_CAP, 0, 1,
 168  168              sizeof (uint8_t), MAC_PROP_PERM_RW},
 169  169  
 170      -        {"adv_10hdx_cap",       MAC_PROP_EN_10HDX_CAP, 0, 1,
      170 +        {"adv_10hdx_cap",       .mp_prop_id = MAC_PROP_EN_10HDX_CAP, 0, 1,
 171  171              sizeof (uint8_t), MAC_PROP_PERM_RW},
 172  172  
 173      -        {"adv_100T4_cap",       MAC_PROP_EN_100T4_CAP, 0, 1,
      173 +        {"adv_100T4_cap",       .mp_prop_id = MAC_PROP_EN_100T4_CAP, 0, 1,
 174  174              sizeof (uint8_t), MAC_PROP_PERM_READ},
 175  175  
 176      -        {"link_status",         MAC_STAT_LINK_UP, 0, 1,
      176 +        {"link_status",         .mp_prop_id = MAC_STAT_LINK_UP, 0, 1,
 177  177              sizeof (long), MAC_PROP_FLAGS_RK},
 178  178  
 179      -        {"link_speed",          MAC_PROP_SPEED, 0, LONG_MAX,
      179 +        {"link_speed",          .mp_prop_id = MAC_PROP_SPEED, 0, LONG_MAX,
 180  180              sizeof (uint64_t), MAC_PROP_PERM_READ},
 181  181  
 182      -        {"link_duplex",         MAC_PROP_DUPLEX, 0, 2,
      182 +        {"link_duplex",         .mp_prop_id = MAC_PROP_DUPLEX, 0, 2,
 183  183              sizeof (link_duplex_t), MAC_PROP_PERM_READ},
 184  184  
 185      -        {"autoneg_cap",         ETHER_STAT_CAP_AUTONEG, 0, 1,
      185 +        {"autoneg_cap",         .mp_prop_id = ETHER_STAT_CAP_AUTONEG, 0, 1,
 186  186              sizeof (long), MAC_PROP_FLAGS_RK},
 187  187  
 188      -        {"pause_cap",           ETHER_STAT_CAP_PAUSE, 0, 1,
      188 +        {"pause_cap",           .mp_prop_id = ETHER_STAT_CAP_PAUSE, 0, 1,
 189  189              sizeof (long), MAC_PROP_FLAGS_RK},
 190  190  
 191      -        {"asym_pause_cap",      ETHER_STAT_CAP_ASMPAUSE, 0, 1,
      191 +        {"asym_pause_cap",      .mp_prop_id = ETHER_STAT_CAP_ASMPAUSE, 0, 1,
 192  192              sizeof (long), MAC_PROP_FLAGS_RK},
 193  193  
 194      -        {"5000fdx_cap",         ETHER_STAT_CAP_5000FDX, 0, 1,
      194 +        {"5000fdx_cap",         .mp_prop_id = ETHER_STAT_CAP_5000FDX, 0, 1,
 195  195              sizeof (long), MAC_PROP_FLAGS_RK},
 196  196  
 197      -        {"2500fdx_cap",         ETHER_STAT_CAP_2500FDX, 0, 1,
      197 +        {"2500fdx_cap",         .mp_prop_id = ETHER_STAT_CAP_2500FDX, 0, 1,
 198  198              sizeof (long), MAC_PROP_FLAGS_RK},
 199  199  
 200      -        {"100gfdx_cap",         ETHER_STAT_CAP_100GFDX, 0, 1,
      200 +        {"100gfdx_cap",         .mp_prop_id = ETHER_STAT_CAP_100GFDX, 0, 1,
 201  201              sizeof (long), MAC_PROP_FLAGS_RK},
 202  202  
 203      -        {"40gfdx_cap",          ETHER_STAT_CAP_40GFDX, 0, 1,
      203 +        {"40gfdx_cap",          .mp_prop_id = ETHER_STAT_CAP_40GFDX, 0, 1,
 204  204              sizeof (long), MAC_PROP_FLAGS_RK},
 205  205  
 206      -        {"10gfdx_cap",          ETHER_STAT_CAP_10GFDX, 0, 1,
      206 +        {"10gfdx_cap",          .mp_prop_id = ETHER_STAT_CAP_10GFDX, 0, 1,
 207  207              sizeof (long), MAC_PROP_FLAGS_RK},
 208  208  
 209      -        {"1000fdx_cap",         ETHER_STAT_CAP_1000FDX, 0, 1,
      209 +        {"1000fdx_cap",         .mp_prop_id = ETHER_STAT_CAP_1000FDX, 0, 1,
 210  210              sizeof (long), MAC_PROP_FLAGS_RK},
 211  211  
 212      -        {"1000hdx_cap",         ETHER_STAT_CAP_1000HDX, 0, 1,
      212 +        {"1000hdx_cap",         .mp_prop_id = ETHER_STAT_CAP_1000HDX, 0, 1,
 213  213              sizeof (long), MAC_PROP_FLAGS_RK},
 214  214  
 215      -        {"100T4_cap",           ETHER_STAT_CAP_100T4, 0, 1,
      215 +        {"100T4_cap",           .mp_prop_id = ETHER_STAT_CAP_100T4, 0, 1,
 216  216              sizeof (long), MAC_PROP_FLAGS_RK},
 217  217  
 218      -        {"100fdx_cap",          ETHER_STAT_CAP_100FDX, 0, 1,
      218 +        {"100fdx_cap",          .mp_prop_id = ETHER_STAT_CAP_100FDX, 0, 1,
 219  219              sizeof (long), MAC_PROP_FLAGS_RK},
 220  220  
 221      -        {"100hdx_cap",          ETHER_STAT_CAP_100HDX, 0, 1,
      221 +        {"100hdx_cap",          .mp_prop_id = ETHER_STAT_CAP_100HDX, 0, 1,
 222  222              sizeof (long), MAC_PROP_FLAGS_RK},
 223  223  
 224      -        {"10fdx_cap",           ETHER_STAT_CAP_10FDX, 0, 1,
      224 +        {"10fdx_cap",           .mp_prop_id = ETHER_STAT_CAP_10FDX, 0, 1,
 225  225              sizeof (long), MAC_PROP_FLAGS_RK},
 226  226  
 227      -        {"10hdx_cap",           ETHER_STAT_CAP_10HDX, 0, 1,
      227 +        {"10hdx_cap",           .mp_prop_id = ETHER_STAT_CAP_10HDX, 0, 1,
 228  228              sizeof (long), MAC_PROP_FLAGS_RK},
 229  229  
 230      -        {"lp_autoneg_cap",      ETHER_STAT_LP_CAP_AUTONEG, 0, 1,
      230 +        {"lp_autoneg_cap",      .mp_prop_id = ETHER_STAT_LP_CAP_AUTONEG, 0, 1,
 231  231              sizeof (long), MAC_PROP_FLAGS_RK},
 232  232  
 233      -        {"lp_pause_cap",        ETHER_STAT_LP_CAP_PAUSE, 0, 1,
      233 +        {"lp_pause_cap",        .mp_prop_id = ETHER_STAT_LP_CAP_PAUSE, 0, 1,
 234  234              sizeof (long), MAC_PROP_FLAGS_RK},
 235  235  
 236      -        {"lp_asym_pause_cap",   ETHER_STAT_LP_CAP_ASMPAUSE, 0, 1,
      236 +        {"lp_asym_pause_cap",   .mp_prop_id = ETHER_STAT_LP_CAP_ASMPAUSE, 0, 1,
 237  237              sizeof (long), MAC_PROP_FLAGS_RK},
 238  238  
 239      -        {"lp_5000fdx_cap",      ETHER_STAT_LP_CAP_5000FDX, 0, 1,
      239 +        {"lp_5000fdx_cap",      .mp_prop_id = ETHER_STAT_LP_CAP_5000FDX, 0, 1,
 240  240              sizeof (long), MAC_PROP_FLAGS_RK},
 241  241  
 242      -        {"lp_2500fdx_cap",      ETHER_STAT_LP_CAP_2500FDX, 0, 1,
      242 +        {"lp_2500fdx_cap",      .mp_prop_id = ETHER_STAT_LP_CAP_2500FDX, 0, 1,
 243  243              sizeof (long), MAC_PROP_FLAGS_RK},
 244  244  
 245      -        {"lp_100gfdx_cap",      ETHER_STAT_LP_CAP_100GFDX, 0, 1,
      245 +        {"lp_100gfdx_cap",      .mp_prop_id = ETHER_STAT_LP_CAP_100GFDX, 0, 1,
 246  246              sizeof (long), MAC_PROP_FLAGS_RK},
 247  247  
 248      -        {"lp_40gfdx_cap",       ETHER_STAT_LP_CAP_40GFDX, 0, 1,
      248 +        {"lp_40gfdx_cap",       .mp_prop_id = ETHER_STAT_LP_CAP_40GFDX, 0, 1,
 249  249              sizeof (long), MAC_PROP_FLAGS_RK},
 250  250  
 251      -        {"lp_10gfdx_cap",       ETHER_STAT_LP_CAP_10GFDX, 0, 1,
      251 +        {"lp_10gfdx_cap",       .mp_prop_id = ETHER_STAT_LP_CAP_10GFDX, 0, 1,
 252  252              sizeof (long), MAC_PROP_FLAGS_RK},
 253  253  
 254      -        {"lp_1000hdx_cap",      ETHER_STAT_LP_CAP_1000HDX, 0, 1,
      254 +        {"lp_1000hdx_cap",      .mp_prop_id = ETHER_STAT_LP_CAP_1000HDX, 0, 1,
 255  255              sizeof (long), MAC_PROP_FLAGS_RK},
 256  256  
 257      -        {"lp_1000fdx_cap",      ETHER_STAT_LP_CAP_1000FDX, 0, 1,
      257 +        {"lp_1000fdx_cap",      .mp_prop_id = ETHER_STAT_LP_CAP_1000FDX, 0, 1,
 258  258              sizeof (long), MAC_PROP_FLAGS_RK},
 259  259  
 260      -        {"lp_100T4_cap",        ETHER_STAT_LP_CAP_100T4, 0, 1,
      260 +        {"lp_100T4_cap",        .mp_prop_id = ETHER_STAT_LP_CAP_100T4, 0, 1,
 261  261              sizeof (long), MAC_PROP_FLAGS_RK},
 262  262  
 263      -        {"lp_100fdx_cap",       ETHER_STAT_LP_CAP_100FDX, 0, 1,
      263 +        {"lp_100fdx_cap",       .mp_prop_id = ETHER_STAT_LP_CAP_100FDX, 0, 1,
 264  264              sizeof (long), MAC_PROP_FLAGS_RK},
 265  265  
 266      -        {"lp_100hdx_cap",       ETHER_STAT_LP_CAP_100HDX, 0, 1,
      266 +        {"lp_100hdx_cap",       .mp_prop_id = ETHER_STAT_LP_CAP_100HDX, 0, 1,
 267  267              sizeof (long), MAC_PROP_FLAGS_RK},
 268  268  
 269      -        {"lp_10fdx_cap",        ETHER_STAT_LP_CAP_10FDX, 0, 1,
      269 +        {"lp_10fdx_cap",        .mp_prop_id = ETHER_STAT_LP_CAP_10FDX, 0, 1,
 270  270              sizeof (long), MAC_PROP_FLAGS_RK},
 271  271  
 272      -        {"lp_10hdx_cap",        ETHER_STAT_LP_CAP_10HDX, 0, 1,
      272 +        {"lp_10hdx_cap",        .mp_prop_id = ETHER_STAT_LP_CAP_10HDX, 0, 1,
 273  273              sizeof (long), MAC_PROP_FLAGS_RK},
 274  274  
 275      -        {"link_autoneg",        ETHER_STAT_LINK_AUTONEG, 0, 1,
      275 +        {"link_autoneg",        .mp_prop_id = ETHER_STAT_LINK_AUTONEG, 0, 1,
 276  276              sizeof (long), MAC_PROP_FLAGS_RK}
 277  277  
 278  278  };
 279  279  
 280  280  
 281  281  int
 282  282  _init(void)
 283  283  {
 284  284          mactype_register_t *mtrp;
 285  285          int     err;
↓ open down ↓ 186 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX