diff options
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c index 5980f308a253..6829de91605b 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | |||
@@ -694,7 +694,7 @@ void clear_filter(struct adapter *adap, struct filter_entry *f) | |||
694 | if (f->smt) | 694 | if (f->smt) |
695 | cxgb4_smt_release(f->smt); | 695 | cxgb4_smt_release(f->smt); |
696 | 696 | ||
697 | if (f->fs.hash && f->fs.type) | 697 | if ((f->fs.hash || is_t6(adap->params.chip)) && f->fs.type) |
698 | cxgb4_clip_release(f->dev, (const u32 *)&f->fs.val.lip, 1); | 698 | cxgb4_clip_release(f->dev, (const u32 *)&f->fs.val.lip, 1); |
699 | 699 | ||
700 | /* The zeroing of the filter rule below clears the filter valid, | 700 | /* The zeroing of the filter rule below clears the filter valid, |
@@ -1291,6 +1291,16 @@ int __cxgb4_set_filter(struct net_device *dev, int filter_id, | |||
1291 | if (f->valid) | 1291 | if (f->valid) |
1292 | clear_filter(adapter, f); | 1292 | clear_filter(adapter, f); |
1293 | 1293 | ||
1294 | if (is_t6(adapter->params.chip) && fs->type && | ||
1295 | ipv6_addr_type((const struct in6_addr *)fs->val.lip) != | ||
1296 | IPV6_ADDR_ANY) { | ||
1297 | ret = cxgb4_clip_get(dev, (const u32 *)&fs->val.lip, 1); | ||
1298 | if (ret) { | ||
1299 | cxgb4_clear_ftid(&adapter->tids, filter_id, PF_INET6); | ||
1300 | return ret; | ||
1301 | } | ||
1302 | } | ||
1303 | |||
1294 | /* Convert the filter specification into our internal format. | 1304 | /* Convert the filter specification into our internal format. |
1295 | * We copy the PF/VF specification into the Outer VLAN field | 1305 | * We copy the PF/VF specification into the Outer VLAN field |
1296 | * here so the rest of the code -- including the interface to | 1306 | * here so the rest of the code -- including the interface to |