Lines Matching defs:opt
2889 static int atl2_validate_option(int *value, struct atl2_option *opt)
2895 *value = opt->def;
2899 switch (opt->type) {
2903 printk(KERN_INFO "%s Enabled\n", opt->name);
2906 printk(KERN_INFO "%s Disabled\n", opt->name);
2911 if (*value >= opt->arg.r.min && *value <= opt->arg.r.max) {
2912 printk(KERN_INFO "%s set to %i\n", opt->name, *value);
2917 for (i = 0; i < opt->arg.l.nr; i++) {
2918 ent = &opt->arg.l.p[i];
2931 opt->name, *value, opt->err);
2932 *value = opt->def;
2948 struct atl2_option opt;
2960 opt.type = range_option;
2961 opt.name = "Bytes of Transmit Memory";
2962 opt.err = "using default of " __MODULE_STRING(ATL2_DEFAULT_TX_MEMSIZE);
2963 opt.def = ATL2_DEFAULT_TX_MEMSIZE;
2964 opt.arg.r.min = ATL2_MIN_TX_MEMSIZE;
2965 opt.arg.r.max = ATL2_MAX_TX_MEMSIZE;
2970 atl2_validate_option(&val, &opt);
2974 adapter->txd_ring_size = ((u32)opt.def) * 1024;
2982 opt.type = range_option;
2983 opt.name = "Number of receive memory block";
2984 opt.err = "using default of " __MODULE_STRING(ATL2_DEFAULT_RXD_COUNT);
2985 opt.def = ATL2_DEFAULT_RXD_COUNT;
2986 opt.arg.r.min = ATL2_MIN_RXD_COUNT;
2987 opt.arg.r.max = ATL2_MAX_RXD_COUNT;
2992 atl2_validate_option(&val, &opt);
2998 adapter->rxd_ring_size = (u32)opt.def;
3007 opt.type = range_option;
3008 opt.name = "Interrupt Moderate Timer";
3009 opt.err = "using default of " __MODULE_STRING(INT_MOD_DEFAULT_CNT);
3010 opt.def = INT_MOD_DEFAULT_CNT;
3011 opt.arg.r.min = INT_MOD_MIN_CNT;
3012 opt.arg.r.max = INT_MOD_MAX_CNT;
3017 atl2_validate_option(&val, &opt);
3021 adapter->imt = (u16)(opt.def);
3024 opt.type = range_option;
3025 opt.name = "SPI Flash Vendor";
3026 opt.err = "using default of " __MODULE_STRING(FLASH_VENDOR_DEFAULT);
3027 opt.def = FLASH_VENDOR_DEFAULT;
3028 opt.arg.r.min = FLASH_VENDOR_MIN;
3029 opt.arg.r.max = FLASH_VENDOR_MAX;
3034 atl2_validate_option(&val, &opt);
3038 adapter->hw.flash_vendor = (u8)(opt.def);
3041 opt.type = range_option;
3042 opt.name = "Speed/Duplex Selection";
3043 opt.err = "using default of " __MODULE_STRING(MEDIA_TYPE_AUTO_SENSOR);
3044 opt.def = MEDIA_TYPE_AUTO_SENSOR;
3045 opt.arg.r.min = MEDIA_TYPE_AUTO_SENSOR;
3046 opt.arg.r.max = MEDIA_TYPE_10M_HALF;
3051 atl2_validate_option(&val, &opt);
3055 adapter->hw.MediaType = (u16)(opt.def);