Skip to content

Commit

Permalink
qlcnic: validate eswitch config values for PF
Browse files Browse the repository at this point in the history
Currently driver set default eswitch configuration values for PF function,
instead of validating values sent by application.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Amit Kumar Salecha authored and David S. Miller committed Dec 3, 2010
1 parent 97319a2 commit 091056b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/net/qlcnic/qlcnic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3537,9 +3537,12 @@ validate_esw_config(struct qlcnic_adapter *adapter,
case QLCNIC_PORT_DEFAULTS:
if (QLC_DEV_GET_DRV(op_mode, pci_func) !=
QLCNIC_NON_PRIV_FUNC) {
esw_cfg[i].mac_anti_spoof = 0;
esw_cfg[i].mac_override = 1;
esw_cfg[i].promisc_mode = 1;
if (esw_cfg[i].mac_anti_spoof != 0)
return QL_STATUS_INVALID_PARAM;
if (esw_cfg[i].mac_override != 1)
return QL_STATUS_INVALID_PARAM;
if (esw_cfg[i].promisc_mode != 1)
return QL_STATUS_INVALID_PARAM;
}
break;
case QLCNIC_ADD_VLAN:
Expand Down

0 comments on commit 091056b

Please sign in to comment.