ax: check for IFCAP_VLAN_HWTAGGING when reading descriptor

This commit is contained in:
Stephan de Wit 2021-04-23 13:21:18 +00:00 committed by Franco Fichtner
parent a3579cc4dc
commit cbec57fd1f
1 changed files with 2 additions and 1 deletions

View File

@ -1453,7 +1453,8 @@ xgbe_dev_read(struct xgbe_channel *channel)
if (!err || !etlt) {
/* No error if err is 0 or etlt is 0 */
if (etlt == 0x09) {
if (etlt == 0x09 &&
(if_getcapenable(pdata->netdev) & IFCAP_VLAN_HWTAGGING)) {
XGMAC_SET_BITS(packet->attributes, RX_PACKET_ATTRIBUTES,
VLAN_CTAG, 1);
packet->vlan_ctag = XGMAC_GET_BITS_LE(rdesc->desc0,