aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/8021q/vlan_dev.c6
-rw-r--r--net/bluetooth/l2cap_core.c9
-rw-r--r--net/sctp/output.c19
3 files changed, 18 insertions, 16 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 86bff9b1ac47..6e82148edfc8 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -528,7 +528,11 @@ static int vlan_dev_init(struct net_device *dev)
528 (1<<__LINK_STATE_DORMANT))) | 528 (1<<__LINK_STATE_DORMANT))) |
529 (1<<__LINK_STATE_PRESENT); 529 (1<<__LINK_STATE_PRESENT);
530 530
531 dev->hw_features = NETIF_F_ALL_TX_OFFLOADS; 531 dev->hw_features = NETIF_F_ALL_CSUM | NETIF_F_SG |
532 NETIF_F_FRAGLIST | NETIF_F_ALL_TSO |
533 NETIF_F_HIGHDMA | NETIF_F_SCTP_CSUM |
534 NETIF_F_ALL_FCOE;
535
532 dev->features |= real_dev->vlan_features | NETIF_F_LLTX; 536 dev->features |= real_dev->vlan_features | NETIF_F_LLTX;
533 dev->gso_max_size = real_dev->gso_max_size; 537 dev->gso_max_size = real_dev->gso_max_size;
534 538
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index ebff14c69078..7705e26e699f 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -620,7 +620,8 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
620 struct sock *parent = bt_sk(sk)->parent; 620 struct sock *parent = bt_sk(sk)->parent;
621 rsp.result = cpu_to_le16(L2CAP_CR_PEND); 621 rsp.result = cpu_to_le16(L2CAP_CR_PEND);
622 rsp.status = cpu_to_le16(L2CAP_CS_AUTHOR_PEND); 622 rsp.status = cpu_to_le16(L2CAP_CS_AUTHOR_PEND);
623 parent->sk_data_ready(parent, 0); 623 if (parent)
624 parent->sk_data_ready(parent, 0);
624 625
625 } else { 626 } else {
626 sk->sk_state = BT_CONFIG; 627 sk->sk_state = BT_CONFIG;
@@ -2323,8 +2324,7 @@ static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr
2323 2324
2324 sk = chan->sk; 2325 sk = chan->sk;
2325 2326
2326 if ((bt_sk(sk)->defer_setup && sk->sk_state != BT_CONNECT2) || 2327 if (sk->sk_state != BT_CONFIG && sk->sk_state != BT_CONNECT2) {
2327 (!bt_sk(sk)->defer_setup && sk->sk_state != BT_CONFIG)) {
2328 struct l2cap_cmd_rej rej; 2328 struct l2cap_cmd_rej rej;
2329 2329
2330 rej.reason = cpu_to_le16(0x0002); 2330 rej.reason = cpu_to_le16(0x0002);
@@ -4010,7 +4010,8 @@ static int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
4010 struct sock *parent = bt_sk(sk)->parent; 4010 struct sock *parent = bt_sk(sk)->parent;
4011 res = L2CAP_CR_PEND; 4011 res = L2CAP_CR_PEND;
4012 stat = L2CAP_CS_AUTHOR_PEND; 4012 stat = L2CAP_CS_AUTHOR_PEND;
4013 parent->sk_data_ready(parent, 0); 4013 if (parent)
4014 parent->sk_data_ready(parent, 0);
4014 } else { 4015 } else {
4015 sk->sk_state = BT_CONFIG; 4016 sk->sk_state = BT_CONFIG;
4016 res = L2CAP_CR_SUCCESS; 4017 res = L2CAP_CR_SUCCESS;
diff --git a/net/sctp/output.c b/net/sctp/output.c
index b4f3cf06d8da..08b3cead6503 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -500,23 +500,20 @@ int sctp_packet_transmit(struct sctp_packet *packet)
500 * Note: Adler-32 is no longer applicable, as has been replaced 500 * Note: Adler-32 is no longer applicable, as has been replaced
501 * by CRC32-C as described in <draft-ietf-tsvwg-sctpcsum-02.txt>. 501 * by CRC32-C as described in <draft-ietf-tsvwg-sctpcsum-02.txt>.
502 */ 502 */
503 if (!sctp_checksum_disable && 503 if (!sctp_checksum_disable) {
504 !(dst->dev->features & (NETIF_F_NO_CSUM | NETIF_F_SCTP_CSUM))) { 504 if (!(dst->dev->features & NETIF_F_SCTP_CSUM)) {
505 __u32 crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len); 505 __u32 crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len);
506 506
507 /* 3) Put the resultant value into the checksum field in the 507 /* 3) Put the resultant value into the checksum field in the
508 * common header, and leave the rest of the bits unchanged. 508 * common header, and leave the rest of the bits unchanged.
509 */ 509 */
510 sh->checksum = sctp_end_cksum(crc32); 510 sh->checksum = sctp_end_cksum(crc32);
511 } else { 511 } else {
512 if (dst->dev->features & NETIF_F_SCTP_CSUM) {
513 /* no need to seed pseudo checksum for SCTP */ 512 /* no need to seed pseudo checksum for SCTP */
514 nskb->ip_summed = CHECKSUM_PARTIAL; 513 nskb->ip_summed = CHECKSUM_PARTIAL;
515 nskb->csum_start = (skb_transport_header(nskb) - 514 nskb->csum_start = (skb_transport_header(nskb) -
516 nskb->head); 515 nskb->head);
517 nskb->csum_offset = offsetof(struct sctphdr, checksum); 516 nskb->csum_offset = offsetof(struct sctphdr, checksum);
518 } else {
519 nskb->ip_summed = CHECKSUM_UNNECESSARY;
520 } 517 }
521 } 518 }
522 519