aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMithlesh Thukral <mithlesh@linsyssoft.com>2009-03-25 06:20:34 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-17 14:06:31 -0400
commit8d17e6ad8113f7534d978b1b3511f62637483fcc (patch)
tree690413713d8c1549950dcebf7002054174e185ed /drivers
parent1f895130c0b0dd293b924b1c6cecac90a2e35dc6 (diff)
Staging: sxg: Use correct queue_id for transmitting non-TCP packets
Use correct queue_id while transmitting non-TCP packets. They should always use queue 0. Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com> Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/sxg/sxg.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/staging/sxg/sxg.c b/drivers/staging/sxg/sxg.c
index 52d2ab970709..d8edf42ac528 100644
--- a/drivers/staging/sxg/sxg.c
+++ b/drivers/staging/sxg/sxg.c
@@ -2615,7 +2615,9 @@ static int sxg_dumb_sgl(struct sxg_x64_sgl *pSgl,
2615 struct iphdr *ip; 2615 struct iphdr *ip;
2616 2616
2617 ip = ip_hdr(skb); 2617 ip = ip_hdr(skb);
2618 if ((ip->protocol == IPPROTO_TCP)&&(DataLength >= sizeof( 2618 if (ip->protocol != IPPROTO_TCP || !tcp_hdr(skb))
2619 queue_id = 0;
2620 else if ((ip->protocol == IPPROTO_TCP)&&(DataLength >= sizeof(
2619 struct tcphdr))){ 2621 struct tcphdr))){
2620 queue_id = ((ntohs(tcp_hdr(skb)->dest) == ISCSI_PORT) ? 2622 queue_id = ((ntohs(tcp_hdr(skb)->dest) == ISCSI_PORT) ?
2621 (ntohs (tcp_hdr(skb)->source) & 2623 (ntohs (tcp_hdr(skb)->source) &
@@ -2624,8 +2626,10 @@ static int sxg_dumb_sgl(struct sxg_x64_sgl *pSgl,
2624 SXG_LARGE_SEND_QUEUE_MASK)); 2626 SXG_LARGE_SEND_QUEUE_MASK));
2625 } 2627 }
2626 } else if (skb->protocol == htons(ETH_P_IPV6)) { 2628 } else if (skb->protocol == htons(ETH_P_IPV6)) {
2627 if ((ipv6_hdr(skb)->nexthdr == IPPROTO_TCP) && (DataLength >= 2629 if (ipv6_hdr(skb)->nexthdr != IPPROTO_TCP || !tcp_hdr(skb))
2628 sizeof(struct tcphdr)) ) { 2630 queue_id = 0;
2631 else if ((ipv6_hdr(skb)->nexthdr == IPPROTO_TCP) && (DataLength
2632 >= sizeof(struct tcphdr)) ) {
2629 queue_id = ((ntohs(tcp_hdr(skb)->dest) == ISCSI_PORT) ? 2633 queue_id = ((ntohs(tcp_hdr(skb)->dest) == ISCSI_PORT) ?
2630 (ntohs (tcp_hdr(skb)->source) & 2634 (ntohs (tcp_hdr(skb)->source) &
2631 SXG_LARGE_SEND_QUEUE_MASK): 2635 SXG_LARGE_SEND_QUEUE_MASK):