Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
Revert "tcp: Always set urgent pointer if it's beyond snd_nxt"
ipv6: Copy cork options in ip6_append_data
udp: Fix UDP short packet false positive
gianfar: Fix potential soft reset race
gianfar: Fix BD_LENGTH_MASK definition
cxgb3: Fix lro switch
iwlwifi: save PCI state before suspend, restore after resume
iwlwifi: clean key table in iwl_clear_stations_table

+70 -27
+1 -2
drivers/net/cxgb3/sge.c
··· 2276 2276 } else if ((len = ntohl(r->len_cq)) != 0) { 2277 2277 struct sge_fl *fl; 2278 2278 2279 - if (eth) 2280 - lro = qs->lro_enabled && is_eth_tcp(rss_hi); 2279 + lro &= eth && is_eth_tcp(rss_hi); 2281 2280 2282 2281 fl = (len & F_RSPD_FLQ) ? &qs->fl[1] : &qs->fl[0]; 2283 2282 if (fl->use_pages) {
+3
drivers/net/gianfar.c
··· 351 351 /* Reset MAC layer */ 352 352 gfar_write(&priv->regs->maccfg1, MACCFG1_SOFT_RESET); 353 353 354 + /* We need to delay at least 3 TX clocks */ 355 + udelay(2); 356 + 354 357 tempval = (MACCFG1_TX_FLOW | MACCFG1_RX_FLOW); 355 358 gfar_write(&priv->regs->maccfg1, tempval); 356 359
+1 -1
drivers/net/gianfar.h
··· 312 312 #define ATTRELI_EI(x) (x) 313 313 314 314 #define BD_LFLAG(flags) ((flags) << 16) 315 - #define BD_LENGTH_MASK 0x00ff 315 + #define BD_LENGTH_MASK 0x0000ffff 316 316 317 317 /* TxBD status field bits */ 318 318 #define TXBD_READY 0x8000
+2
drivers/net/wireless/iwlwifi/iwl-agn.c
··· 4042 4042 priv->is_open = 1; 4043 4043 } 4044 4044 4045 + pci_save_state(pdev); 4045 4046 pci_set_power_state(pdev, PCI_D3hot); 4046 4047 4047 4048 return 0; ··· 4053 4052 struct iwl_priv *priv = pci_get_drvdata(pdev); 4054 4053 4055 4054 pci_set_power_state(pdev, PCI_D0); 4055 + pci_restore_state(pdev); 4056 4056 4057 4057 if (priv->is_open) 4058 4058 iwl_mac_start(priv->hw);
+3
drivers/net/wireless/iwlwifi/iwl-sta.c
··· 480 480 priv->num_stations = 0; 481 481 memset(priv->stations, 0, sizeof(priv->stations)); 482 482 483 + /* clean ucode key table bit map */ 484 + priv->ucode_key_table = 0; 485 + 483 486 spin_unlock_irqrestore(&priv->sta_lock, flags); 484 487 } 485 488 EXPORT_SYMBOL(iwl_clear_stations_table);
+2
drivers/net/wireless/iwlwifi/iwl3945-base.c
··· 8143 8143 priv->is_open = 1; 8144 8144 } 8145 8145 8146 + pci_save_state(pdev); 8146 8147 pci_set_power_state(pdev, PCI_D3hot); 8147 8148 8148 8149 return 0; ··· 8154 8153 struct iwl3945_priv *priv = pci_get_drvdata(pdev); 8155 8154 8156 8155 pci_set_power_state(pdev, PCI_D0); 8156 + pci_restore_state(pdev); 8157 8157 8158 8158 if (priv->is_open) 8159 8159 iwl3945_mac_start(priv->hw);
+4 -8
net/ipv4/tcp_output.c
··· 663 663 th->urg_ptr = 0; 664 664 665 665 /* The urg_mode check is necessary during a below snd_una win probe */ 666 - if (unlikely(tcp_urg_mode(tp))) { 667 - if (between(tp->snd_up, tcb->seq + 1, tcb->seq + 0xFFFF)) { 668 - th->urg_ptr = htons(tp->snd_up - tcb->seq); 669 - th->urg = 1; 670 - } else if (after(tcb->seq + 0xFFFF, tp->snd_nxt)) { 671 - th->urg_ptr = 0xFFFF; 672 - th->urg = 1; 673 - } 666 + if (unlikely(tcp_urg_mode(tp) && 667 + between(tp->snd_up, tcb->seq + 1, tcb->seq + 0xFFFF))) { 668 + th->urg_ptr = htons(tp->snd_up - tcb->seq); 669 + th->urg = 1; 674 670 } 675 671 676 672 tcp_options_write((__be32 *)(th + 1), tp, &opts, &md5_hash_location);
+2 -1
net/ipv4/udp.c
··· 1231 1231 int proto) 1232 1232 { 1233 1233 struct sock *sk; 1234 - struct udphdr *uh = udp_hdr(skb); 1234 + struct udphdr *uh; 1235 1235 unsigned short ulen; 1236 1236 struct rtable *rt = (struct rtable*)skb->dst; 1237 1237 __be32 saddr = ip_hdr(skb)->saddr; ··· 1244 1244 if (!pskb_may_pull(skb, sizeof(struct udphdr))) 1245 1245 goto drop; /* No space for header. */ 1246 1246 1247 + uh = udp_hdr(skb); 1247 1248 ulen = ntohs(uh->len); 1248 1249 if (ulen > skb->len) 1249 1250 goto short_packet;
+52 -15
net/ipv6/ip6_output.c
··· 1105 1105 return err; 1106 1106 } 1107 1107 1108 + static inline struct ipv6_opt_hdr *ip6_opt_dup(struct ipv6_opt_hdr *src, 1109 + gfp_t gfp) 1110 + { 1111 + return src ? kmemdup(src, (src->hdrlen + 1) * 8, gfp) : NULL; 1112 + } 1113 + 1114 + static inline struct ipv6_rt_hdr *ip6_rthdr_dup(struct ipv6_rt_hdr *src, 1115 + gfp_t gfp) 1116 + { 1117 + return src ? kmemdup(src, (src->hdrlen + 1) * 8, gfp) : NULL; 1118 + } 1119 + 1108 1120 int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, 1109 1121 int offset, int len, int odd, struct sk_buff *skb), 1110 1122 void *from, int length, int transhdrlen, ··· 1142 1130 * setup for corking 1143 1131 */ 1144 1132 if (opt) { 1145 - if (np->cork.opt == NULL) { 1146 - np->cork.opt = kmalloc(opt->tot_len, 1147 - sk->sk_allocation); 1148 - if (unlikely(np->cork.opt == NULL)) 1149 - return -ENOBUFS; 1150 - } else if (np->cork.opt->tot_len < opt->tot_len) { 1151 - printk(KERN_DEBUG "ip6_append_data: invalid option length\n"); 1133 + if (WARN_ON(np->cork.opt)) 1152 1134 return -EINVAL; 1153 - } 1154 - memcpy(np->cork.opt, opt, opt->tot_len); 1155 - inet->cork.flags |= IPCORK_OPT; 1135 + 1136 + np->cork.opt = kmalloc(opt->tot_len, sk->sk_allocation); 1137 + if (unlikely(np->cork.opt == NULL)) 1138 + return -ENOBUFS; 1139 + 1140 + np->cork.opt->tot_len = opt->tot_len; 1141 + np->cork.opt->opt_flen = opt->opt_flen; 1142 + np->cork.opt->opt_nflen = opt->opt_nflen; 1143 + 1144 + np->cork.opt->dst0opt = ip6_opt_dup(opt->dst0opt, 1145 + sk->sk_allocation); 1146 + if (opt->dst0opt && !np->cork.opt->dst0opt) 1147 + return -ENOBUFS; 1148 + 1149 + np->cork.opt->dst1opt = ip6_opt_dup(opt->dst1opt, 1150 + sk->sk_allocation); 1151 + if (opt->dst1opt && !np->cork.opt->dst1opt) 1152 + return -ENOBUFS; 1153 + 1154 + np->cork.opt->hopopt = ip6_opt_dup(opt->hopopt, 1155 + sk->sk_allocation); 1156 + if (opt->hopopt && !np->cork.opt->hopopt) 1157 + return -ENOBUFS; 1158 + 1159 + np->cork.opt->srcrt = ip6_rthdr_dup(opt->srcrt, 1160 + sk->sk_allocation); 1161 + if (opt->srcrt && !np->cork.opt->srcrt) 1162 + return -ENOBUFS; 1163 + 1156 1164 /* need source address above miyazawa*/ 1157 1165 } 1158 1166 dst_hold(&rt->u.dst); ··· 1199 1167 } else { 1200 1168 rt = (struct rt6_info *)inet->cork.dst; 1201 1169 fl = &inet->cork.fl; 1202 - if (inet->cork.flags & IPCORK_OPT) 1203 - opt = np->cork.opt; 1170 + opt = np->cork.opt; 1204 1171 transhdrlen = 0; 1205 1172 exthdrlen = 0; 1206 1173 mtu = inet->cork.fragsize; ··· 1438 1407 1439 1408 static void ip6_cork_release(struct inet_sock *inet, struct ipv6_pinfo *np) 1440 1409 { 1441 - inet->cork.flags &= ~IPCORK_OPT; 1442 - kfree(np->cork.opt); 1443 - np->cork.opt = NULL; 1410 + if (np->cork.opt) { 1411 + kfree(np->cork.opt->dst0opt); 1412 + kfree(np->cork.opt->dst1opt); 1413 + kfree(np->cork.opt->hopopt); 1414 + kfree(np->cork.opt->srcrt); 1415 + kfree(np->cork.opt); 1416 + np->cork.opt = NULL; 1417 + } 1418 + 1444 1419 if (inet->cork.dst) { 1445 1420 dst_release(inet->cork.dst); 1446 1421 inet->cork.dst = NULL;