diff options
author | Ivan Vecera <ivecera@redhat.com> | 2014-10-06 13:02:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-07 00:00:35 -0400 |
commit | 6654cf60ab888170693084a06dfb7c00977ad964 (patch) | |
tree | 6be628cedbd382a8c190a733abaffaf9a1addaa5 /drivers/net/ethernet/brocade/bna | |
parent | bdf6fa52f01b941d4a80372d56de465bdbbd1d23 (diff) |
bna: allow transmit tagged frames
When Tx VLAN offloading is disabled frames with size ~ MTU are not
transmitted as the driver does not account 4 bytes of VLAN header added
by stack. It should use VLAN_ETH_HLEN instead of ETH_HLEN.
The second problem is with newer BNA chips (BNA 1860). These chips filter
out any VLAN tagged frames in Tx path. This is a problem when Tx VLAN
offloading is disabled and frames are tagged by stack. Older chips like
1010/1020 are not affected as they probably don't do such filtering.
Cc: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/brocade/bna')
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bna_tx_rx.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bnad.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/brocade/bna/bna_tx_rx.c b/drivers/net/ethernet/brocade/bna/bna_tx_rx.c index 85e63546abe3..9949bd9d54cb 100644 --- a/drivers/net/ethernet/brocade/bna/bna_tx_rx.c +++ b/drivers/net/ethernet/brocade/bna/bna_tx_rx.c | |||
@@ -3410,7 +3410,7 @@ bna_bfi_tx_enet_start(struct bna_tx *tx) | |||
3410 | 3410 | ||
3411 | cfg_req->tx_cfg.vlan_mode = BFI_ENET_TX_VLAN_WI; | 3411 | cfg_req->tx_cfg.vlan_mode = BFI_ENET_TX_VLAN_WI; |
3412 | cfg_req->tx_cfg.vlan_id = htons((u16)tx->txf_vlan_id); | 3412 | cfg_req->tx_cfg.vlan_id = htons((u16)tx->txf_vlan_id); |
3413 | cfg_req->tx_cfg.admit_tagged_frame = BNA_STATUS_T_DISABLED; | 3413 | cfg_req->tx_cfg.admit_tagged_frame = BNA_STATUS_T_ENABLED; |
3414 | cfg_req->tx_cfg.apply_vlan_filter = BNA_STATUS_T_DISABLED; | 3414 | cfg_req->tx_cfg.apply_vlan_filter = BNA_STATUS_T_DISABLED; |
3415 | 3415 | ||
3416 | bfa_msgq_cmd_set(&tx->msgq_cmd, NULL, NULL, | 3416 | bfa_msgq_cmd_set(&tx->msgq_cmd, NULL, NULL, |
diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c index ffc92a41d75b..153cafac323c 100644 --- a/drivers/net/ethernet/brocade/bna/bnad.c +++ b/drivers/net/ethernet/brocade/bna/bnad.c | |||
@@ -2864,7 +2864,7 @@ bnad_txq_wi_prepare(struct bnad *bnad, struct bna_tcb *tcb, | |||
2864 | txqent->hdr.wi.opcode = htons(BNA_TXQ_WI_SEND); | 2864 | txqent->hdr.wi.opcode = htons(BNA_TXQ_WI_SEND); |
2865 | txqent->hdr.wi.lso_mss = 0; | 2865 | txqent->hdr.wi.lso_mss = 0; |
2866 | 2866 | ||
2867 | if (unlikely(skb->len > (bnad->netdev->mtu + ETH_HLEN))) { | 2867 | if (unlikely(skb->len > (bnad->netdev->mtu + VLAN_ETH_HLEN))) { |
2868 | BNAD_UPDATE_CTR(bnad, tx_skb_non_tso_too_long); | 2868 | BNAD_UPDATE_CTR(bnad, tx_skb_non_tso_too_long); |
2869 | return -EINVAL; | 2869 | return -EINVAL; |
2870 | } | 2870 | } |