| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * QLogic qlcnic NIC Driver |
|---|
| 3 | 4 | * Copyright (c) 2009-2013 QLogic Corporation |
|---|
| 4 | | - * |
|---|
| 5 | | - * See LICENSE.qlcnic for copyright and licensing details. |
|---|
| 6 | 5 | */ |
|---|
| 7 | 6 | |
|---|
| 8 | 7 | #include <linux/netdevice.h> |
|---|
| .. | .. |
|---|
| 459 | 458 | struct cmd_desc_type0 *first_desc, struct sk_buff *skb, |
|---|
| 460 | 459 | struct qlcnic_host_tx_ring *tx_ring) |
|---|
| 461 | 460 | { |
|---|
| 462 | | - u8 l4proto, opcode = 0, hdr_len = 0; |
|---|
| 461 | + u8 l4proto, opcode = 0, hdr_len = 0, tag_vlan = 0; |
|---|
| 463 | 462 | u16 flags = 0, vlan_tci = 0; |
|---|
| 464 | 463 | int copied, offset, copy_len, size; |
|---|
| 465 | 464 | struct cmd_desc_type0 *hwdesc; |
|---|
| .. | .. |
|---|
| 472 | 471 | flags = QLCNIC_FLAGS_VLAN_TAGGED; |
|---|
| 473 | 472 | vlan_tci = ntohs(vh->h_vlan_TCI); |
|---|
| 474 | 473 | protocol = ntohs(vh->h_vlan_encapsulated_proto); |
|---|
| 474 | + tag_vlan = 1; |
|---|
| 475 | 475 | } else if (skb_vlan_tag_present(skb)) { |
|---|
| 476 | 476 | flags = QLCNIC_FLAGS_VLAN_OOB; |
|---|
| 477 | 477 | vlan_tci = skb_vlan_tag_get(skb); |
|---|
| 478 | + tag_vlan = 1; |
|---|
| 478 | 479 | } |
|---|
| 479 | 480 | if (unlikely(adapter->tx_pvid)) { |
|---|
| 480 | | - if (vlan_tci && !(adapter->flags & QLCNIC_TAGGING_ENABLED)) |
|---|
| 481 | + if (tag_vlan && !(adapter->flags & QLCNIC_TAGGING_ENABLED)) |
|---|
| 481 | 482 | return -EIO; |
|---|
| 482 | | - if (vlan_tci && (adapter->flags & QLCNIC_TAGGING_ENABLED)) |
|---|
| 483 | + if (tag_vlan && (adapter->flags & QLCNIC_TAGGING_ENABLED)) |
|---|
| 483 | 484 | goto set_flags; |
|---|
| 484 | 485 | |
|---|
| 485 | 486 | flags = QLCNIC_FLAGS_VLAN_OOB; |
|---|
| .. | .. |
|---|
| 579 | 580 | struct qlcnic_cmd_buffer *pbuf) |
|---|
| 580 | 581 | { |
|---|
| 581 | 582 | struct qlcnic_skb_frag *nf; |
|---|
| 582 | | - struct skb_frag_struct *frag; |
|---|
| 583 | + skb_frag_t *frag; |
|---|
| 583 | 584 | int i, nr_frags; |
|---|
| 584 | 585 | dma_addr_t map; |
|---|
| 585 | 586 | |
|---|