@@ -945,38 +945,36 @@ static int igc_get_ethtool_nfc_entry(struct igc_adapter *adapter,
945
945
if (!rule || fsp -> location != rule -> sw_idx )
946
946
return - EINVAL ;
947
947
948
- if (rule -> filter .match_flags ) {
949
- fsp -> flow_type = ETHER_FLOW ;
950
- fsp -> ring_cookie = rule -> action ;
951
- if (rule -> filter .match_flags & IGC_FILTER_FLAG_ETHER_TYPE ) {
952
- fsp -> h_u .ether_spec .h_proto = rule -> filter .etype ;
953
- fsp -> m_u .ether_spec .h_proto = ETHER_TYPE_FULL_MASK ;
954
- }
955
- if (rule -> filter .match_flags & IGC_FILTER_FLAG_VLAN_TCI ) {
956
- fsp -> flow_type |= FLOW_EXT ;
957
- fsp -> h_ext .vlan_tci = rule -> filter .vlan_tci ;
958
- fsp -> m_ext .vlan_tci = htons (VLAN_PRIO_MASK );
959
- }
960
- if (rule -> filter .match_flags & IGC_FILTER_FLAG_DST_MAC_ADDR ) {
961
- ether_addr_copy (fsp -> h_u .ether_spec .h_dest ,
962
- rule -> filter .dst_addr );
963
- /* As we only support matching by the full
964
- * mask, return the mask to userspace
965
- */
966
- eth_broadcast_addr (fsp -> m_u .ether_spec .h_dest );
967
- }
968
- if (rule -> filter .match_flags & IGC_FILTER_FLAG_SRC_MAC_ADDR ) {
969
- ether_addr_copy (fsp -> h_u .ether_spec .h_source ,
970
- rule -> filter .src_addr );
971
- /* As we only support matching by the full
972
- * mask, return the mask to userspace
973
- */
974
- eth_broadcast_addr (fsp -> m_u .ether_spec .h_source );
975
- }
948
+ if (!rule -> filter .match_flags )
949
+ return - EINVAL ;
976
950
977
- return 0 ;
951
+ fsp -> flow_type = ETHER_FLOW ;
952
+ fsp -> ring_cookie = rule -> action ;
953
+
954
+ if (rule -> filter .match_flags & IGC_FILTER_FLAG_ETHER_TYPE ) {
955
+ fsp -> h_u .ether_spec .h_proto = rule -> filter .etype ;
956
+ fsp -> m_u .ether_spec .h_proto = ETHER_TYPE_FULL_MASK ;
978
957
}
979
- return - EINVAL ;
958
+
959
+ if (rule -> filter .match_flags & IGC_FILTER_FLAG_VLAN_TCI ) {
960
+ fsp -> flow_type |= FLOW_EXT ;
961
+ fsp -> h_ext .vlan_tci = rule -> filter .vlan_tci ;
962
+ fsp -> m_ext .vlan_tci = htons (VLAN_PRIO_MASK );
963
+ }
964
+
965
+ if (rule -> filter .match_flags & IGC_FILTER_FLAG_DST_MAC_ADDR ) {
966
+ ether_addr_copy (fsp -> h_u .ether_spec .h_dest ,
967
+ rule -> filter .dst_addr );
968
+ eth_broadcast_addr (fsp -> m_u .ether_spec .h_dest );
969
+ }
970
+
971
+ if (rule -> filter .match_flags & IGC_FILTER_FLAG_SRC_MAC_ADDR ) {
972
+ ether_addr_copy (fsp -> h_u .ether_spec .h_source ,
973
+ rule -> filter .src_addr );
974
+ eth_broadcast_addr (fsp -> m_u .ether_spec .h_source );
975
+ }
976
+
977
+ return 0 ;
980
978
}
981
979
982
980
static int igc_get_ethtool_nfc_all (struct igc_adapter * adapter ,
0 commit comments