forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/net/ethernet/brocade/bna/bnad.c
....@@ -1,14 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Linux network driver for QLogic BR-series Converged Network Adapter.
3
- *
4
- * This program is free software; you can redistribute it and/or modify it
5
- * under the terms of the GNU General Public License (GPL) Version 2 as
6
- * published by the Free Software Foundation
7
- *
8
- * This program is distributed in the hope that it will be useful, but
9
- * WITHOUT ANY WARRANTY; without even the implied warranty of
10
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
- * General Public License for more details.
124 */
135 /*
146 * Copyright (c) 2005-2014 Brocade Communications Systems, Inc.
....@@ -2512,12 +2504,7 @@
25122504 IPPROTO_TCP, 0);
25132505 BNAD_UPDATE_CTR(bnad, tso4);
25142506 } else {
2515
- struct ipv6hdr *ipv6h = ipv6_hdr(skb);
2516
-
2517
- ipv6h->payload_len = 0;
2518
- tcp_hdr(skb)->check =
2519
- ~csum_ipv6_magic(&ipv6h->saddr, &ipv6h->daddr, 0,
2520
- IPPROTO_TCP, 0);
2507
+ tcp_v6_gso_csum_prep(skb);
25212508 BNAD_UPDATE_CTR(bnad, tso6);
25222509 }
25232510
....@@ -3040,7 +3027,7 @@
30403027 head_unmap->nvecs++;
30413028
30423029 for (i = 0, vect_id = 0; i < vectors - 1; i++) {
3043
- const struct skb_frag_struct *frag = &skb_shinfo(skb)->frags[i];
3030
+ const skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
30443031 u32 size = skb_frag_size(frag);
30453032
30463033 if (unlikely(size == 0)) {
....@@ -3482,7 +3469,7 @@
34823469 bnad->pcidev = pdev;
34833470 bnad->mmio_start = pci_resource_start(pdev, 0);
34843471 bnad->mmio_len = pci_resource_len(pdev, 0);
3485
- bnad->bar0 = ioremap_nocache(bnad->mmio_start, bnad->mmio_len);
3472
+ bnad->bar0 = ioremap(bnad->mmio_start, bnad->mmio_len);
34863473 if (!bnad->bar0) {
34873474 dev_err(&pdev->dev, "ioremap for bar0 failed\n");
34883475 return -ENOMEM;
....@@ -3852,9 +3839,6 @@
38523839 {
38533840 int err;
38543841
3855
- pr_info("bna: QLogic BR-series 10G Ethernet driver - version: %s\n",
3856
- BNAD_VERSION);
3857
-
38583842 bfa_nw_ioc_auto_recover(bnad_ioc_auto_recover);
38593843
38603844 err = pci_register_driver(&bnad_pci_driver);
....@@ -3879,6 +3863,5 @@
38793863 MODULE_AUTHOR("Brocade");
38803864 MODULE_LICENSE("GPL");
38813865 MODULE_DESCRIPTION("QLogic BR-series 10G PCIe Ethernet driver");
3882
-MODULE_VERSION(BNAD_VERSION);
38833866 MODULE_FIRMWARE(CNA_FW_FILE_CT);
38843867 MODULE_FIRMWARE(CNA_FW_FILE_CT2);