aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-07-21 16:38:42 -0400
committerDavid S. Miller <davem@davemloft.net>2011-07-21 16:38:42 -0400
commit033b1142f4bd44a116d1356fe4a0510437ceddf9 (patch)
treed2a971a7dc9f3a1af8035e38419c4c4ad8c22632 /net
parentf5caadbb3d8fc0b71533e880c684b2230bdb76ac (diff)
parente6625fa48e6580a74b7e700efd7e6463e282810b (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: net/bluetooth/l2cap_core.c
Diffstat (limited to 'net')
-rw-r--r--net/8021q/vlan_dev.c6
-rw-r--r--net/bluetooth/l2cap_core.c9
-rw-r--r--net/ceph/ceph_fs.c17
-rw-r--r--net/sctp/output.c19
4 files changed, 28 insertions, 23 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 49bb75294b7d..934e221c1d07 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -530,7 +530,11 @@ static int vlan_dev_init(struct net_device *dev)
530 (1<<__LINK_STATE_DORMANT))) | 530 (1<<__LINK_STATE_DORMANT))) |
531 (1<<__LINK_STATE_PRESENT); 531 (1<<__LINK_STATE_PRESENT);
532 532
533 dev->hw_features = NETIF_F_ALL_TX_OFFLOADS; 533 dev->hw_features = NETIF_F_ALL_CSUM | NETIF_F_SG |
534 NETIF_F_FRAGLIST | NETIF_F_ALL_TSO |
535 NETIF_F_HIGHDMA | NETIF_F_SCTP_CSUM |
536 NETIF_F_ALL_FCOE;
537
534 dev->features |= real_dev->vlan_features | NETIF_F_LLTX; 538 dev->features |= real_dev->vlan_features | NETIF_F_LLTX;
535 dev->gso_max_size = real_dev->gso_max_size; 539 dev->gso_max_size = real_dev->gso_max_size;
536 540
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index f7f8e2cd3f70..3204ba8a701c 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -763,7 +763,8 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
763 struct sock *parent = bt_sk(sk)->parent; 763 struct sock *parent = bt_sk(sk)->parent;
764 rsp.result = cpu_to_le16(L2CAP_CR_PEND); 764 rsp.result = cpu_to_le16(L2CAP_CR_PEND);
765 rsp.status = cpu_to_le16(L2CAP_CS_AUTHOR_PEND); 765 rsp.status = cpu_to_le16(L2CAP_CS_AUTHOR_PEND);
766 parent->sk_data_ready(parent, 0); 766 if (parent)
767 parent->sk_data_ready(parent, 0);
767 768
768 } else { 769 } else {
769 l2cap_state_change(chan, BT_CONFIG); 770 l2cap_state_change(chan, BT_CONFIG);
@@ -2523,8 +2524,7 @@ static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr
2523 2524
2524 sk = chan->sk; 2525 sk = chan->sk;
2525 2526
2526 if ((bt_sk(sk)->defer_setup && chan->state != BT_CONNECT2) || 2527 if (chan->state != BT_CONFIG && chan->state != BT_CONNECT2) {
2527 (!bt_sk(sk)->defer_setup && chan->state != BT_CONFIG)) {
2528 struct l2cap_cmd_rej_cid rej; 2528 struct l2cap_cmd_rej_cid rej;
2529 2529
2530 rej.reason = cpu_to_le16(L2CAP_REJ_INVALID_CID); 2530 rej.reason = cpu_to_le16(L2CAP_REJ_INVALID_CID);
@@ -4150,7 +4150,8 @@ static int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
4150 struct sock *parent = bt_sk(sk)->parent; 4150 struct sock *parent = bt_sk(sk)->parent;
4151 res = L2CAP_CR_PEND; 4151 res = L2CAP_CR_PEND;
4152 stat = L2CAP_CS_AUTHOR_PEND; 4152 stat = L2CAP_CS_AUTHOR_PEND;
4153 parent->sk_data_ready(parent, 0); 4153 if (parent)
4154 parent->sk_data_ready(parent, 0);
4154 } else { 4155 } else {
4155 l2cap_state_change(chan, BT_CONFIG); 4156 l2cap_state_change(chan, BT_CONFIG);
4156 res = L2CAP_CR_SUCCESS; 4157 res = L2CAP_CR_SUCCESS;
diff --git a/net/ceph/ceph_fs.c b/net/ceph/ceph_fs.c
index a3a3a31d3c37..41466ccb972a 100644
--- a/net/ceph/ceph_fs.c
+++ b/net/ceph/ceph_fs.c
@@ -36,16 +36,19 @@ int ceph_flags_to_mode(int flags)
36 if ((flags & O_DIRECTORY) == O_DIRECTORY) 36 if ((flags & O_DIRECTORY) == O_DIRECTORY)
37 return CEPH_FILE_MODE_PIN; 37 return CEPH_FILE_MODE_PIN;
38#endif 38#endif
39 if ((flags & O_APPEND) == O_APPEND)
40 flags |= O_WRONLY;
41 39
42 if ((flags & O_ACCMODE) == O_RDWR) 40 switch (flags & O_ACCMODE) {
43 mode = CEPH_FILE_MODE_RDWR; 41 case O_WRONLY:
44 else if ((flags & O_ACCMODE) == O_WRONLY)
45 mode = CEPH_FILE_MODE_WR; 42 mode = CEPH_FILE_MODE_WR;
46 else 43 break;
44 case O_RDONLY:
47 mode = CEPH_FILE_MODE_RD; 45 mode = CEPH_FILE_MODE_RD;
48 46 break;
47 case O_RDWR:
48 case O_ACCMODE: /* this is what the VFS does */
49 mode = CEPH_FILE_MODE_RDWR;
50 break;
51 }
49#ifdef O_LAZY 52#ifdef O_LAZY
50 if (flags & O_LAZY) 53 if (flags & O_LAZY)
51 mode |= CEPH_FILE_MODE_LAZY; 54 mode |= CEPH_FILE_MODE_LAZY;
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