Lines Matching refs:esw_cfg

482 			       struct qlcnic_esw_func_cfg *esw_cfg, int count)  in validate_esw_config()  argument
495 pci_func = esw_cfg[i].pci_func; in validate_esw_config()
503 switch (esw_cfg[i].op_mode) { in validate_esw_config()
510 esw_cfg[i].offload_flags = 0; in validate_esw_config()
514 if (esw_cfg[i].mac_anti_spoof != 0) in validate_esw_config()
516 if (esw_cfg[i].mac_override != 1) in validate_esw_config()
518 if (esw_cfg[i].promisc_mode != 1) in validate_esw_config()
523 if (!IS_VALID_VLAN(esw_cfg[i].vlan_id)) in validate_esw_config()
525 if (!esw_cfg[i].op_type) in validate_esw_config()
529 if (!esw_cfg[i].op_type) in validate_esw_config()
548 struct qlcnic_esw_func_cfg *esw_cfg; in qlcnic_sysfs_write_esw_config() local
560 esw_cfg = (struct qlcnic_esw_func_cfg *)buf; in qlcnic_sysfs_write_esw_config()
561 ret = validate_esw_config(adapter, esw_cfg, count); in qlcnic_sysfs_write_esw_config()
567 if (qlcnic_config_switch_port(adapter, &esw_cfg[i])) in qlcnic_sysfs_write_esw_config()
570 if (adapter->ahw->pci_func != esw_cfg[i].pci_func) in qlcnic_sysfs_write_esw_config()
573 op_mode = esw_cfg[i].op_mode; in qlcnic_sysfs_write_esw_config()
574 qlcnic_get_eswitch_port_config(adapter, &esw_cfg[i]); in qlcnic_sysfs_write_esw_config()
575 esw_cfg[i].op_mode = op_mode; in qlcnic_sysfs_write_esw_config()
576 esw_cfg[i].pci_func = adapter->ahw->pci_func; in qlcnic_sysfs_write_esw_config()
578 switch (esw_cfg[i].op_mode) { in qlcnic_sysfs_write_esw_config()
580 qlcnic_set_eswitch_port_features(adapter, &esw_cfg[i]); in qlcnic_sysfs_write_esw_config()
582 qlcnic_set_netdev_features(adapter, &esw_cfg[i]); in qlcnic_sysfs_write_esw_config()
586 qlcnic_set_vlan_config(adapter, &esw_cfg[i]); in qlcnic_sysfs_write_esw_config()
589 esw_cfg[i].vlan_id = 0; in qlcnic_sysfs_write_esw_config()
590 qlcnic_set_vlan_config(adapter, &esw_cfg[i]); in qlcnic_sysfs_write_esw_config()
599 pci_func = esw_cfg[i].pci_func; in qlcnic_sysfs_write_esw_config()
604 switch (esw_cfg[i].op_mode) { in qlcnic_sysfs_write_esw_config()
606 npar->promisc_mode = esw_cfg[i].promisc_mode; in qlcnic_sysfs_write_esw_config()
607 npar->mac_override = esw_cfg[i].mac_override; in qlcnic_sysfs_write_esw_config()
608 npar->offload_flags = esw_cfg[i].offload_flags; in qlcnic_sysfs_write_esw_config()
609 npar->mac_anti_spoof = esw_cfg[i].mac_anti_spoof; in qlcnic_sysfs_write_esw_config()
610 npar->discard_tagged = esw_cfg[i].discard_tagged; in qlcnic_sysfs_write_esw_config()
613 npar->pvid = esw_cfg[i].vlan_id; in qlcnic_sysfs_write_esw_config()
632 struct qlcnic_esw_func_cfg *esw_cfg; in qlcnic_sysfs_read_esw_config() local
638 esw_cfg = (struct qlcnic_esw_func_cfg *)buf; in qlcnic_sysfs_read_esw_config()
650 esw_cfg[pci_func].pci_func = pci_func; in qlcnic_sysfs_read_esw_config()
651 if (qlcnic_get_eswitch_port_config(adapter, &esw_cfg[pci_func])) in qlcnic_sysfs_read_esw_config()