diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_bic.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_cubic.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_illinois.c | 3 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 18 | ||||
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 3 | ||||
-rw-r--r-- | net/ipv4/tcp_lp.c | 3 | ||||
-rw-r--r-- | net/ipv4/tcp_vegas.c | 3 | ||||
-rw-r--r-- | net/ipv4/tcp_veno.c | 3 | ||||
-rw-r--r-- | net/ipv6/addrconf.c | 33 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 2 | ||||
-rw-r--r-- | net/irda/irlap_event.c | 28 | ||||
-rw-r--r-- | net/irda/irlap_frame.c | 3 | ||||
-rw-r--r-- | net/mac80211/debugfs.c | 2 | ||||
-rw-r--r-- | net/mac80211/ieee80211_sta.c | 12 | ||||
-rw-r--r-- | net/rxrpc/ar-connection.c | 2 | ||||
-rw-r--r-- | net/sctp/associola.c | 4 | ||||
-rw-r--r-- | net/sctp/input.c | 24 | ||||
-rw-r--r-- | net/sctp/socket.c | 31 | ||||
-rw-r--r-- | net/sctp/transport.c | 39 | ||||
-rw-r--r-- | net/wireless/sysfs.c | 2 |
20 files changed, 136 insertions, 83 deletions
diff --git a/net/ipv4/tcp_bic.c b/net/ipv4/tcp_bic.c index 281c9f913257..dd9ef65ad3ff 100644 --- a/net/ipv4/tcp_bic.c +++ b/net/ipv4/tcp_bic.c | |||
@@ -29,7 +29,7 @@ static int fast_convergence = 1; | |||
29 | static int max_increment = 16; | 29 | static int max_increment = 16; |
30 | static int low_window = 14; | 30 | static int low_window = 14; |
31 | static int beta = 819; /* = 819/1024 (BICTCP_BETA_SCALE) */ | 31 | static int beta = 819; /* = 819/1024 (BICTCP_BETA_SCALE) */ |
32 | static int initial_ssthresh = 100; | 32 | static int initial_ssthresh; |
33 | static int smooth_part = 20; | 33 | static int smooth_part = 20; |
34 | 34 | ||
35 | module_param(fast_convergence, int, 0644); | 35 | module_param(fast_convergence, int, 0644); |
diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c index 14224487b16b..ebfaac2f9f46 100644 --- a/net/ipv4/tcp_cubic.c +++ b/net/ipv4/tcp_cubic.c | |||
@@ -29,7 +29,7 @@ | |||
29 | static int fast_convergence __read_mostly = 1; | 29 | static int fast_convergence __read_mostly = 1; |
30 | static int max_increment __read_mostly = 16; | 30 | static int max_increment __read_mostly = 16; |
31 | static int beta __read_mostly = 819; /* = 819/1024 (BICTCP_BETA_SCALE) */ | 31 | static int beta __read_mostly = 819; /* = 819/1024 (BICTCP_BETA_SCALE) */ |
32 | static int initial_ssthresh __read_mostly = 100; | 32 | static int initial_ssthresh __read_mostly; |
33 | static int bic_scale __read_mostly = 41; | 33 | static int bic_scale __read_mostly = 41; |
34 | static int tcp_friendliness __read_mostly = 1; | 34 | static int tcp_friendliness __read_mostly = 1; |
35 | 35 | ||
diff --git a/net/ipv4/tcp_illinois.c b/net/ipv4/tcp_illinois.c index 4adc47c55351..b2b2256d3b84 100644 --- a/net/ipv4/tcp_illinois.c +++ b/net/ipv4/tcp_illinois.c | |||
@@ -90,6 +90,9 @@ static void tcp_illinois_acked(struct sock *sk, u32 pkts_acked, ktime_t last) | |||
90 | 90 | ||
91 | ca->acked = pkts_acked; | 91 | ca->acked = pkts_acked; |
92 | 92 | ||
93 | if (ktime_equal(last, net_invalid_timestamp())) | ||
94 | return; | ||
95 | |||
93 | rtt = ktime_to_us(net_timedelta(last)); | 96 | rtt = ktime_to_us(net_timedelta(last)); |
94 | 97 | ||
95 | /* ignore bogus values, this prevents wraparound in alpha math */ | 98 | /* ignore bogus values, this prevents wraparound in alpha math */ |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 74683d81c3f1..69f9f1ef3ef6 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -953,7 +953,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_ | |||
953 | int prior_fackets; | 953 | int prior_fackets; |
954 | u32 lost_retrans = 0; | 954 | u32 lost_retrans = 0; |
955 | int flag = 0; | 955 | int flag = 0; |
956 | int dup_sack = 0; | 956 | int found_dup_sack = 0; |
957 | int cached_fack_count; | 957 | int cached_fack_count; |
958 | int i; | 958 | int i; |
959 | int first_sack_index; | 959 | int first_sack_index; |
@@ -964,20 +964,20 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_ | |||
964 | 964 | ||
965 | /* Check for D-SACK. */ | 965 | /* Check for D-SACK. */ |
966 | if (before(ntohl(sp[0].start_seq), TCP_SKB_CB(ack_skb)->ack_seq)) { | 966 | if (before(ntohl(sp[0].start_seq), TCP_SKB_CB(ack_skb)->ack_seq)) { |
967 | dup_sack = 1; | 967 | found_dup_sack = 1; |
968 | tp->rx_opt.sack_ok |= 4; | 968 | tp->rx_opt.sack_ok |= 4; |
969 | NET_INC_STATS_BH(LINUX_MIB_TCPDSACKRECV); | 969 | NET_INC_STATS_BH(LINUX_MIB_TCPDSACKRECV); |
970 | } else if (num_sacks > 1 && | 970 | } else if (num_sacks > 1 && |
971 | !after(ntohl(sp[0].end_seq), ntohl(sp[1].end_seq)) && | 971 | !after(ntohl(sp[0].end_seq), ntohl(sp[1].end_seq)) && |
972 | !before(ntohl(sp[0].start_seq), ntohl(sp[1].start_seq))) { | 972 | !before(ntohl(sp[0].start_seq), ntohl(sp[1].start_seq))) { |
973 | dup_sack = 1; | 973 | found_dup_sack = 1; |
974 | tp->rx_opt.sack_ok |= 4; | 974 | tp->rx_opt.sack_ok |= 4; |
975 | NET_INC_STATS_BH(LINUX_MIB_TCPDSACKOFORECV); | 975 | NET_INC_STATS_BH(LINUX_MIB_TCPDSACKOFORECV); |
976 | } | 976 | } |
977 | 977 | ||
978 | /* D-SACK for already forgotten data... | 978 | /* D-SACK for already forgotten data... |
979 | * Do dumb counting. */ | 979 | * Do dumb counting. */ |
980 | if (dup_sack && | 980 | if (found_dup_sack && |
981 | !after(ntohl(sp[0].end_seq), prior_snd_una) && | 981 | !after(ntohl(sp[0].end_seq), prior_snd_una) && |
982 | after(ntohl(sp[0].end_seq), tp->undo_marker)) | 982 | after(ntohl(sp[0].end_seq), tp->undo_marker)) |
983 | tp->undo_retrans--; | 983 | tp->undo_retrans--; |
@@ -1058,6 +1058,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_ | |||
1058 | __u32 start_seq = ntohl(sp->start_seq); | 1058 | __u32 start_seq = ntohl(sp->start_seq); |
1059 | __u32 end_seq = ntohl(sp->end_seq); | 1059 | __u32 end_seq = ntohl(sp->end_seq); |
1060 | int fack_count; | 1060 | int fack_count; |
1061 | int dup_sack = (found_dup_sack && (i == first_sack_index)); | ||
1061 | 1062 | ||
1062 | skb = cached_skb; | 1063 | skb = cached_skb; |
1063 | fack_count = cached_fack_count; | 1064 | fack_count = cached_fack_count; |
@@ -2037,7 +2038,7 @@ static void tcp_try_to_open(struct sock *sk, int flag) | |||
2037 | { | 2038 | { |
2038 | struct tcp_sock *tp = tcp_sk(sk); | 2039 | struct tcp_sock *tp = tcp_sk(sk); |
2039 | 2040 | ||
2040 | tp->left_out = tp->sacked_out; | 2041 | tcp_sync_left_out(tp); |
2041 | 2042 | ||
2042 | if (tp->retrans_out == 0) | 2043 | if (tp->retrans_out == 0) |
2043 | tp->retrans_stamp = 0; | 2044 | tp->retrans_stamp = 0; |
@@ -2409,7 +2410,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, __s32 *seq_rtt_p) | |||
2409 | int acked = 0; | 2410 | int acked = 0; |
2410 | int prior_packets = tp->packets_out; | 2411 | int prior_packets = tp->packets_out; |
2411 | __s32 seq_rtt = -1; | 2412 | __s32 seq_rtt = -1; |
2412 | ktime_t last_ackt = ktime_set(0,0); | 2413 | ktime_t last_ackt = net_invalid_timestamp(); |
2413 | 2414 | ||
2414 | while ((skb = tcp_write_queue_head(sk)) && | 2415 | while ((skb = tcp_write_queue_head(sk)) && |
2415 | skb != tcp_send_head(sk)) { | 2416 | skb != tcp_send_head(sk)) { |
@@ -2487,6 +2488,10 @@ static int tcp_clean_rtx_queue(struct sock *sk, __s32 *seq_rtt_p) | |||
2487 | tcp_ack_update_rtt(sk, acked, seq_rtt); | 2488 | tcp_ack_update_rtt(sk, acked, seq_rtt); |
2488 | tcp_ack_packets_out(sk); | 2489 | tcp_ack_packets_out(sk); |
2489 | 2490 | ||
2491 | /* Is the ACK triggering packet unambiguous? */ | ||
2492 | if (acked & FLAG_RETRANS_DATA_ACKED) | ||
2493 | last_ackt = net_invalid_timestamp(); | ||
2494 | |||
2490 | if (ca_ops->pkts_acked) | 2495 | if (ca_ops->pkts_acked) |
2491 | ca_ops->pkts_acked(sk, pkts_acked, last_ackt); | 2496 | ca_ops->pkts_acked(sk, pkts_acked, last_ackt); |
2492 | } | 2497 | } |
@@ -2932,6 +2937,7 @@ void tcp_parse_options(struct sk_buff *skb, struct tcp_options_received *opt_rx, | |||
2932 | opt_rx->sack_ok) { | 2937 | opt_rx->sack_ok) { |
2933 | TCP_SKB_CB(skb)->sacked = (ptr - 2) - (unsigned char *)th; | 2938 | TCP_SKB_CB(skb)->sacked = (ptr - 2) - (unsigned char *)th; |
2934 | } | 2939 | } |
2940 | break; | ||
2935 | #ifdef CONFIG_TCP_MD5SIG | 2941 | #ifdef CONFIG_TCP_MD5SIG |
2936 | case TCPOPT_MD5SIG: | 2942 | case TCPOPT_MD5SIG: |
2937 | /* | 2943 | /* |
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 97e294e82679..354721d67f69 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -878,6 +878,7 @@ int tcp_v4_md5_do_add(struct sock *sk, __be32 addr, | |||
878 | kfree(newkey); | 878 | kfree(newkey); |
879 | return -ENOMEM; | 879 | return -ENOMEM; |
880 | } | 880 | } |
881 | sk->sk_route_caps &= ~NETIF_F_GSO_MASK; | ||
881 | } | 882 | } |
882 | if (tcp_alloc_md5sig_pool() == NULL) { | 883 | if (tcp_alloc_md5sig_pool() == NULL) { |
883 | kfree(newkey); | 884 | kfree(newkey); |
@@ -1007,7 +1008,7 @@ static int tcp_v4_parse_md5_keys(struct sock *sk, char __user *optval, | |||
1007 | return -EINVAL; | 1008 | return -EINVAL; |
1008 | 1009 | ||
1009 | tp->md5sig_info = p; | 1010 | tp->md5sig_info = p; |
1010 | 1011 | sk->sk_route_caps &= ~NETIF_F_GSO_MASK; | |
1011 | } | 1012 | } |
1012 | 1013 | ||
1013 | newkey = kmemdup(cmd.tcpm_key, cmd.tcpm_keylen, GFP_KERNEL); | 1014 | newkey = kmemdup(cmd.tcpm_key, cmd.tcpm_keylen, GFP_KERNEL); |
diff --git a/net/ipv4/tcp_lp.c b/net/ipv4/tcp_lp.c index 43294ad9f63e..e49836ce012e 100644 --- a/net/ipv4/tcp_lp.c +++ b/net/ipv4/tcp_lp.c | |||
@@ -266,7 +266,8 @@ static void tcp_lp_pkts_acked(struct sock *sk, u32 num_acked, ktime_t last) | |||
266 | struct tcp_sock *tp = tcp_sk(sk); | 266 | struct tcp_sock *tp = tcp_sk(sk); |
267 | struct lp *lp = inet_csk_ca(sk); | 267 | struct lp *lp = inet_csk_ca(sk); |
268 | 268 | ||
269 | tcp_lp_rtt_sample(sk, ktime_to_us(net_timedelta(last))); | 269 | if (!ktime_equal(last, net_invalid_timestamp())) |
270 | tcp_lp_rtt_sample(sk, ktime_to_us(net_timedelta(last))); | ||
270 | 271 | ||
271 | /* calc inference */ | 272 | /* calc inference */ |
272 | if (tcp_time_stamp > tp->rx_opt.rcv_tsecr) | 273 | if (tcp_time_stamp > tp->rx_opt.rcv_tsecr) |
diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c index 73e19cf7df21..e218a51ceced 100644 --- a/net/ipv4/tcp_vegas.c +++ b/net/ipv4/tcp_vegas.c | |||
@@ -117,6 +117,9 @@ void tcp_vegas_pkts_acked(struct sock *sk, u32 cnt, ktime_t last) | |||
117 | struct vegas *vegas = inet_csk_ca(sk); | 117 | struct vegas *vegas = inet_csk_ca(sk); |
118 | u32 vrtt; | 118 | u32 vrtt; |
119 | 119 | ||
120 | if (ktime_equal(last, net_invalid_timestamp())) | ||
121 | return; | ||
122 | |||
120 | /* Never allow zero rtt or baseRTT */ | 123 | /* Never allow zero rtt or baseRTT */ |
121 | vrtt = ktime_to_us(net_timedelta(last)) + 1; | 124 | vrtt = ktime_to_us(net_timedelta(last)) + 1; |
122 | 125 | ||
diff --git a/net/ipv4/tcp_veno.c b/net/ipv4/tcp_veno.c index 9edb340f2f95..ec854cc5fad5 100644 --- a/net/ipv4/tcp_veno.c +++ b/net/ipv4/tcp_veno.c | |||
@@ -74,6 +74,9 @@ static void tcp_veno_pkts_acked(struct sock *sk, u32 cnt, ktime_t last) | |||
74 | struct veno *veno = inet_csk_ca(sk); | 74 | struct veno *veno = inet_csk_ca(sk); |
75 | u32 vrtt; | 75 | u32 vrtt; |
76 | 76 | ||
77 | if (ktime_equal(last, net_invalid_timestamp())) | ||
78 | return; | ||
79 | |||
77 | /* Never allow zero rtt or baseRTT */ | 80 | /* Never allow zero rtt or baseRTT */ |
78 | vrtt = ktime_to_us(net_timedelta(last)) + 1; | 81 | vrtt = ktime_to_us(net_timedelta(last)) + 1; |
79 | 82 | ||
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 5a5f8bd4597a..f96ed76d8fa4 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -2154,6 +2154,15 @@ static void addrconf_dev_config(struct net_device *dev) | |||
2154 | 2154 | ||
2155 | ASSERT_RTNL(); | 2155 | ASSERT_RTNL(); |
2156 | 2156 | ||
2157 | if ((dev->type != ARPHRD_ETHER) && | ||
2158 | (dev->type != ARPHRD_FDDI) && | ||
2159 | (dev->type != ARPHRD_IEEE802_TR) && | ||
2160 | (dev->type != ARPHRD_ARCNET) && | ||
2161 | (dev->type != ARPHRD_INFINIBAND)) { | ||
2162 | /* Alas, we support only Ethernet autoconfiguration. */ | ||
2163 | return; | ||
2164 | } | ||
2165 | |||
2157 | idev = addrconf_add_dev(dev); | 2166 | idev = addrconf_add_dev(dev); |
2158 | if (idev == NULL) | 2167 | if (idev == NULL) |
2159 | return; | 2168 | return; |
@@ -2241,36 +2250,16 @@ static void addrconf_ip6_tnl_config(struct net_device *dev) | |||
2241 | ip6_tnl_add_linklocal(idev); | 2250 | ip6_tnl_add_linklocal(idev); |
2242 | } | 2251 | } |
2243 | 2252 | ||
2244 | static int ipv6_hwtype(struct net_device *dev) | ||
2245 | { | ||
2246 | if ((dev->type == ARPHRD_ETHER) || | ||
2247 | (dev->type == ARPHRD_LOOPBACK) || | ||
2248 | (dev->type == ARPHRD_SIT) || | ||
2249 | (dev->type == ARPHRD_TUNNEL6) || | ||
2250 | (dev->type == ARPHRD_FDDI) || | ||
2251 | (dev->type == ARPHRD_IEEE802_TR) || | ||
2252 | (dev->type == ARPHRD_ARCNET) || | ||
2253 | (dev->type == ARPHRD_INFINIBAND)) | ||
2254 | return 1; | ||
2255 | |||
2256 | return 0; | ||
2257 | } | ||
2258 | |||
2259 | static int addrconf_notify(struct notifier_block *this, unsigned long event, | 2253 | static int addrconf_notify(struct notifier_block *this, unsigned long event, |
2260 | void * data) | 2254 | void * data) |
2261 | { | 2255 | { |
2262 | struct net_device *dev = (struct net_device *) data; | 2256 | struct net_device *dev = (struct net_device *) data; |
2263 | struct inet6_dev *idev; | 2257 | struct inet6_dev *idev = __in6_dev_get(dev); |
2264 | int run_pending = 0; | 2258 | int run_pending = 0; |
2265 | 2259 | ||
2266 | if (!ipv6_hwtype(dev)) | ||
2267 | return NOTIFY_OK; | ||
2268 | |||
2269 | idev = __in6_dev_get(dev); | ||
2270 | |||
2271 | switch(event) { | 2260 | switch(event) { |
2272 | case NETDEV_REGISTER: | 2261 | case NETDEV_REGISTER: |
2273 | if (!idev) { | 2262 | if (!idev && dev->mtu >= IPV6_MIN_MTU) { |
2274 | idev = ipv6_add_dev(dev); | 2263 | idev = ipv6_add_dev(dev); |
2275 | if (!idev) | 2264 | if (!idev) |
2276 | printk(KERN_WARNING "IPv6: add_dev failed for %s\n", | 2265 | printk(KERN_WARNING "IPv6: add_dev failed for %s\n", |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 4f06a51ad4fd..193d9d60bb7a 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -590,6 +590,7 @@ static int tcp_v6_md5_do_add(struct sock *sk, struct in6_addr *peer, | |||
590 | kfree(newkey); | 590 | kfree(newkey); |
591 | return -ENOMEM; | 591 | return -ENOMEM; |
592 | } | 592 | } |
593 | sk->sk_route_caps &= ~NETIF_F_GSO_MASK; | ||
593 | } | 594 | } |
594 | tcp_alloc_md5sig_pool(); | 595 | tcp_alloc_md5sig_pool(); |
595 | if (tp->md5sig_info->alloced6 == tp->md5sig_info->entries6) { | 596 | if (tp->md5sig_info->alloced6 == tp->md5sig_info->entries6) { |
@@ -724,6 +725,7 @@ static int tcp_v6_parse_md5_keys (struct sock *sk, char __user *optval, | |||
724 | return -ENOMEM; | 725 | return -ENOMEM; |
725 | 726 | ||
726 | tp->md5sig_info = p; | 727 | tp->md5sig_info = p; |
728 | sk->sk_route_caps &= ~NETIF_F_GSO_MASK; | ||
727 | } | 729 | } |
728 | 730 | ||
729 | newkey = kmemdup(cmd.tcpm_key, cmd.tcpm_keylen, GFP_KERNEL); | 731 | newkey = kmemdup(cmd.tcpm_key, cmd.tcpm_keylen, GFP_KERNEL); |
diff --git a/net/irda/irlap_event.c b/net/irda/irlap_event.c index 0b02073ffdf3..a8b8873aa263 100644 --- a/net/irda/irlap_event.c +++ b/net/irda/irlap_event.c | |||
@@ -317,23 +317,6 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event, | |||
317 | } | 317 | } |
318 | 318 | ||
319 | /* | 319 | /* |
320 | * Function irlap_next_state (self, state) | ||
321 | * | ||
322 | * Switches state and provides debug information | ||
323 | * | ||
324 | */ | ||
325 | static inline void irlap_next_state(struct irlap_cb *self, IRLAP_STATE state) | ||
326 | { | ||
327 | /* | ||
328 | if (!self || self->magic != LAP_MAGIC) | ||
329 | return; | ||
330 | |||
331 | IRDA_DEBUG(4, "next LAP state = %s\n", irlap_state[state]); | ||
332 | */ | ||
333 | self->state = state; | ||
334 | } | ||
335 | |||
336 | /* | ||
337 | * Function irlap_state_ndm (event, skb, frame) | 320 | * Function irlap_state_ndm (event, skb, frame) |
338 | * | 321 | * |
339 | * NDM (Normal Disconnected Mode) state | 322 | * NDM (Normal Disconnected Mode) state |
@@ -1086,7 +1069,6 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1086 | } else { | 1069 | } else { |
1087 | /* Final packet of window */ | 1070 | /* Final packet of window */ |
1088 | irlap_send_data_primary_poll(self, skb); | 1071 | irlap_send_data_primary_poll(self, skb); |
1089 | irlap_next_state(self, LAP_NRM_P); | ||
1090 | 1072 | ||
1091 | /* | 1073 | /* |
1092 | * Make sure state machine does not try to send | 1074 | * Make sure state machine does not try to send |
@@ -1436,14 +1418,14 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1436 | */ | 1418 | */ |
1437 | self->remote_busy = FALSE; | 1419 | self->remote_busy = FALSE; |
1438 | 1420 | ||
1421 | /* Stop final timer */ | ||
1422 | del_timer(&self->final_timer); | ||
1423 | |||
1439 | /* | 1424 | /* |
1440 | * Nr as expected? | 1425 | * Nr as expected? |
1441 | */ | 1426 | */ |
1442 | ret = irlap_validate_nr_received(self, info->nr); | 1427 | ret = irlap_validate_nr_received(self, info->nr); |
1443 | if (ret == NR_EXPECTED) { | 1428 | if (ret == NR_EXPECTED) { |
1444 | /* Stop final timer */ | ||
1445 | del_timer(&self->final_timer); | ||
1446 | |||
1447 | /* Update Nr received */ | 1429 | /* Update Nr received */ |
1448 | irlap_update_nr_received(self, info->nr); | 1430 | irlap_update_nr_received(self, info->nr); |
1449 | 1431 | ||
@@ -1475,14 +1457,12 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1475 | 1457 | ||
1476 | /* Resend rejected frames */ | 1458 | /* Resend rejected frames */ |
1477 | irlap_resend_rejected_frames(self, CMD_FRAME); | 1459 | irlap_resend_rejected_frames(self, CMD_FRAME); |
1478 | 1460 | irlap_start_final_timer(self, self->final_timeout * 2); | |
1479 | /* Final timer ??? Jean II */ | ||
1480 | 1461 | ||
1481 | irlap_next_state(self, LAP_NRM_P); | 1462 | irlap_next_state(self, LAP_NRM_P); |
1482 | } else if (ret == NR_INVALID) { | 1463 | } else if (ret == NR_INVALID) { |
1483 | IRDA_DEBUG(1, "%s(), Received RR with " | 1464 | IRDA_DEBUG(1, "%s(), Received RR with " |
1484 | "invalid nr !\n", __FUNCTION__); | 1465 | "invalid nr !\n", __FUNCTION__); |
1485 | del_timer(&self->final_timer); | ||
1486 | 1466 | ||
1487 | irlap_next_state(self, LAP_RESET_WAIT); | 1467 | irlap_next_state(self, LAP_RESET_WAIT); |
1488 | 1468 | ||
diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c index 3c5a68e36414..3013c49ab975 100644 --- a/net/irda/irlap_frame.c +++ b/net/irda/irlap_frame.c | |||
@@ -798,16 +798,19 @@ void irlap_send_data_primary_poll(struct irlap_cb *self, struct sk_buff *skb) | |||
798 | self->vs = (self->vs + 1) % 8; | 798 | self->vs = (self->vs + 1) % 8; |
799 | self->ack_required = FALSE; | 799 | self->ack_required = FALSE; |
800 | 800 | ||
801 | irlap_next_state(self, LAP_NRM_P); | ||
801 | irlap_send_i_frame(self, tx_skb, CMD_FRAME); | 802 | irlap_send_i_frame(self, tx_skb, CMD_FRAME); |
802 | } else { | 803 | } else { |
803 | IRDA_DEBUG(4, "%s(), sending unreliable frame\n", __FUNCTION__); | 804 | IRDA_DEBUG(4, "%s(), sending unreliable frame\n", __FUNCTION__); |
804 | 805 | ||
805 | if (self->ack_required) { | 806 | if (self->ack_required) { |
806 | irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME); | 807 | irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME); |
808 | irlap_next_state(self, LAP_NRM_P); | ||
807 | irlap_send_rr_frame(self, CMD_FRAME); | 809 | irlap_send_rr_frame(self, CMD_FRAME); |
808 | self->ack_required = FALSE; | 810 | self->ack_required = FALSE; |
809 | } else { | 811 | } else { |
810 | skb->data[1] |= PF_BIT; | 812 | skb->data[1] |= PF_BIT; |
813 | irlap_next_state(self, LAP_NRM_P); | ||
811 | irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME); | 814 | irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME); |
812 | } | 815 | } |
813 | } | 816 | } |
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c index bb6c0feb2d48..476c8486f789 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c | |||
@@ -112,7 +112,7 @@ DEBUGFS_READONLY_FILE(wep_iv, 20, "%#06x", | |||
112 | local->wep_iv & 0xffffff); | 112 | local->wep_iv & 0xffffff); |
113 | DEBUGFS_READONLY_FILE(tx_power_reduction, 20, "%d.%d dBm", | 113 | DEBUGFS_READONLY_FILE(tx_power_reduction, 20, "%d.%d dBm", |
114 | local->hw.conf.tx_power_reduction / 10, | 114 | local->hw.conf.tx_power_reduction / 10, |
115 | local->hw.conf.tx_power_reduction & 10); | 115 | local->hw.conf.tx_power_reduction % 10); |
116 | DEBUGFS_READONLY_FILE(rate_ctrl_alg, 100, "%s", | 116 | DEBUGFS_READONLY_FILE(rate_ctrl_alg, 100, "%s", |
117 | local->rate_ctrl ? local->rate_ctrl->ops->name : "<unset>"); | 117 | local->rate_ctrl ? local->rate_ctrl->ops->name : "<unset>"); |
118 | 118 | ||
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index 9f30ae4c2ab3..91b545c144c1 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -2592,11 +2592,17 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw) | |||
2592 | 2592 | ||
2593 | read_lock(&local->sub_if_lock); | 2593 | read_lock(&local->sub_if_lock); |
2594 | list_for_each_entry(sdata, &local->sub_if_list, list) { | 2594 | list_for_each_entry(sdata, &local->sub_if_list, list) { |
2595 | |||
2596 | /* No need to wake the master device. */ | ||
2597 | if (sdata->dev == local->mdev) | ||
2598 | continue; | ||
2599 | |||
2595 | if (sdata->type == IEEE80211_IF_TYPE_STA) { | 2600 | if (sdata->type == IEEE80211_IF_TYPE_STA) { |
2596 | if (sdata->u.sta.associated) | 2601 | if (sdata->u.sta.associated) |
2597 | ieee80211_send_nullfunc(local, sdata, 0); | 2602 | ieee80211_send_nullfunc(local, sdata, 0); |
2598 | ieee80211_sta_timer((unsigned long)sdata); | 2603 | ieee80211_sta_timer((unsigned long)sdata); |
2599 | } | 2604 | } |
2605 | |||
2600 | netif_wake_queue(sdata->dev); | 2606 | netif_wake_queue(sdata->dev); |
2601 | } | 2607 | } |
2602 | read_unlock(&local->sub_if_lock); | 2608 | read_unlock(&local->sub_if_lock); |
@@ -2738,6 +2744,12 @@ static int ieee80211_sta_start_scan(struct net_device *dev, | |||
2738 | 2744 | ||
2739 | read_lock(&local->sub_if_lock); | 2745 | read_lock(&local->sub_if_lock); |
2740 | list_for_each_entry(sdata, &local->sub_if_list, list) { | 2746 | list_for_each_entry(sdata, &local->sub_if_list, list) { |
2747 | |||
2748 | /* Don't stop the master interface, otherwise we can't transmit | ||
2749 | * probes! */ | ||
2750 | if (sdata->dev == local->mdev) | ||
2751 | continue; | ||
2752 | |||
2741 | netif_stop_queue(sdata->dev); | 2753 | netif_stop_queue(sdata->dev); |
2742 | if (sdata->type == IEEE80211_IF_TYPE_STA && | 2754 | if (sdata->type == IEEE80211_IF_TYPE_STA && |
2743 | sdata->u.sta.associated) | 2755 | sdata->u.sta.associated) |
diff --git a/net/rxrpc/ar-connection.c b/net/rxrpc/ar-connection.c index 43cb3e051ece..482750efc235 100644 --- a/net/rxrpc/ar-connection.c +++ b/net/rxrpc/ar-connection.c | |||
@@ -211,7 +211,7 @@ static struct rxrpc_connection *rxrpc_alloc_connection(gfp_t gfp) | |||
211 | conn->header_size = sizeof(struct rxrpc_header); | 211 | conn->header_size = sizeof(struct rxrpc_header); |
212 | } | 212 | } |
213 | 213 | ||
214 | _leave(" = %p{%d}", conn, conn->debug_id); | 214 | _leave(" = %p{%d}", conn, conn ? conn->debug_id : 0); |
215 | return conn; | 215 | return conn; |
216 | } | 216 | } |
217 | 217 | ||
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index df94e3cdfba3..498edb0cd4e5 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -1231,6 +1231,10 @@ void sctp_assoc_sync_pmtu(struct sctp_association *asoc) | |||
1231 | /* Get the lowest pmtu of all the transports. */ | 1231 | /* Get the lowest pmtu of all the transports. */ |
1232 | list_for_each(pos, &asoc->peer.transport_addr_list) { | 1232 | list_for_each(pos, &asoc->peer.transport_addr_list) { |
1233 | t = list_entry(pos, struct sctp_transport, transports); | 1233 | t = list_entry(pos, struct sctp_transport, transports); |
1234 | if (t->pmtu_pending && t->dst) { | ||
1235 | sctp_transport_update_pmtu(t, dst_mtu(t->dst)); | ||
1236 | t->pmtu_pending = 0; | ||
1237 | } | ||
1234 | if (!pmtu || (t->pathmtu < pmtu)) | 1238 | if (!pmtu || (t->pathmtu < pmtu)) |
1235 | pmtu = t->pathmtu; | 1239 | pmtu = t->pathmtu; |
1236 | } | 1240 | } |
diff --git a/net/sctp/input.c b/net/sctp/input.c index 885109fb3dda..d57ff7f3c576 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c | |||
@@ -367,24 +367,18 @@ static void sctp_add_backlog(struct sock *sk, struct sk_buff *skb) | |||
367 | void sctp_icmp_frag_needed(struct sock *sk, struct sctp_association *asoc, | 367 | void sctp_icmp_frag_needed(struct sock *sk, struct sctp_association *asoc, |
368 | struct sctp_transport *t, __u32 pmtu) | 368 | struct sctp_transport *t, __u32 pmtu) |
369 | { | 369 | { |
370 | if (sock_owned_by_user(sk) || !t || (t->pathmtu == pmtu)) | 370 | if (!t || (t->pathmtu == pmtu)) |
371 | return; | 371 | return; |
372 | 372 | ||
373 | if (sock_owned_by_user(sk)) { | ||
374 | asoc->pmtu_pending = 1; | ||
375 | t->pmtu_pending = 1; | ||
376 | return; | ||
377 | } | ||
378 | |||
373 | if (t->param_flags & SPP_PMTUD_ENABLE) { | 379 | if (t->param_flags & SPP_PMTUD_ENABLE) { |
374 | if (unlikely(pmtu < SCTP_DEFAULT_MINSEGMENT)) { | 380 | /* Update transports view of the MTU */ |
375 | printk(KERN_WARNING "%s: Reported pmtu %d too low, " | 381 | sctp_transport_update_pmtu(t, pmtu); |
376 | "using default minimum of %d\n", | ||
377 | __FUNCTION__, pmtu, | ||
378 | SCTP_DEFAULT_MINSEGMENT); | ||
379 | /* Use default minimum segment size and disable | ||
380 | * pmtu discovery on this transport. | ||
381 | */ | ||
382 | t->pathmtu = SCTP_DEFAULT_MINSEGMENT; | ||
383 | t->param_flags = (t->param_flags & ~SPP_PMTUD) | | ||
384 | SPP_PMTUD_DISABLE; | ||
385 | } else { | ||
386 | t->pathmtu = pmtu; | ||
387 | } | ||
388 | 382 | ||
389 | /* Update association pmtu. */ | 383 | /* Update association pmtu. */ |
390 | sctp_assoc_sync_pmtu(asoc); | 384 | sctp_assoc_sync_pmtu(asoc); |
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 4dcdabf56473..6edaaa009d62 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -333,12 +333,19 @@ SCTP_STATIC int sctp_do_bind(struct sock *sk, union sctp_addr *addr, int len) | |||
333 | if (!sp->pf->bind_verify(sp, addr)) | 333 | if (!sp->pf->bind_verify(sp, addr)) |
334 | return -EADDRNOTAVAIL; | 334 | return -EADDRNOTAVAIL; |
335 | 335 | ||
336 | /* We must either be unbound, or bind to the same port. */ | 336 | /* We must either be unbound, or bind to the same port. |
337 | if (bp->port && (snum != bp->port)) { | 337 | * It's OK to allow 0 ports if we are already bound. |
338 | SCTP_DEBUG_PRINTK("sctp_do_bind:" | 338 | * We'll just inhert an already bound port in this case |
339 | */ | ||
340 | if (bp->port) { | ||
341 | if (!snum) | ||
342 | snum = bp->port; | ||
343 | else if (snum != bp->port) { | ||
344 | SCTP_DEBUG_PRINTK("sctp_do_bind:" | ||
339 | " New port %d does not match existing port " | 345 | " New port %d does not match existing port " |
340 | "%d.\n", snum, bp->port); | 346 | "%d.\n", snum, bp->port); |
341 | return -EINVAL; | 347 | return -EINVAL; |
348 | } | ||
342 | } | 349 | } |
343 | 350 | ||
344 | if (snum && snum < PROT_SOCK && !capable(CAP_NET_BIND_SERVICE)) | 351 | if (snum && snum < PROT_SOCK && !capable(CAP_NET_BIND_SERVICE)) |
@@ -1655,6 +1662,9 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
1655 | goto out_free; | 1662 | goto out_free; |
1656 | } | 1663 | } |
1657 | 1664 | ||
1665 | if (asoc->pmtu_pending) | ||
1666 | sctp_assoc_pending_pmtu(asoc); | ||
1667 | |||
1658 | /* If fragmentation is disabled and the message length exceeds the | 1668 | /* If fragmentation is disabled and the message length exceeds the |
1659 | * association fragmentation point, return EMSGSIZE. The I-D | 1669 | * association fragmentation point, return EMSGSIZE. The I-D |
1660 | * does not specify what this error is, but this looks like | 1670 | * does not specify what this error is, but this looks like |
@@ -3550,6 +3560,7 @@ SCTP_STATIC int sctp_do_peeloff(struct sctp_association *asoc, | |||
3550 | struct sock *sk = asoc->base.sk; | 3560 | struct sock *sk = asoc->base.sk; |
3551 | struct socket *sock; | 3561 | struct socket *sock; |
3552 | struct inet_sock *inetsk; | 3562 | struct inet_sock *inetsk; |
3563 | struct sctp_af *af; | ||
3553 | int err = 0; | 3564 | int err = 0; |
3554 | 3565 | ||
3555 | /* An association cannot be branched off from an already peeled-off | 3566 | /* An association cannot be branched off from an already peeled-off |
@@ -3571,8 +3582,9 @@ SCTP_STATIC int sctp_do_peeloff(struct sctp_association *asoc, | |||
3571 | /* Make peeled-off sockets more like 1-1 accepted sockets. | 3582 | /* Make peeled-off sockets more like 1-1 accepted sockets. |
3572 | * Set the daddr and initialize id to something more random | 3583 | * Set the daddr and initialize id to something more random |
3573 | */ | 3584 | */ |
3585 | af = sctp_get_af_specific(asoc->peer.primary_addr.sa.sa_family); | ||
3586 | af->to_sk_daddr(&asoc->peer.primary_addr, sk); | ||
3574 | inetsk = inet_sk(sock->sk); | 3587 | inetsk = inet_sk(sock->sk); |
3575 | inetsk->daddr = asoc->peer.primary_addr.v4.sin_addr.s_addr; | ||
3576 | inetsk->id = asoc->next_tsn ^ jiffies; | 3588 | inetsk->id = asoc->next_tsn ^ jiffies; |
3577 | 3589 | ||
3578 | *sockp = sock; | 3590 | *sockp = sock; |
@@ -4343,11 +4355,12 @@ copy_getaddrs: | |||
4343 | err = -EFAULT; | 4355 | err = -EFAULT; |
4344 | goto error; | 4356 | goto error; |
4345 | } | 4357 | } |
4346 | if (put_user(cnt, &((struct sctp_getaddrs __user *)optval)->addr_num)) | 4358 | if (put_user(cnt, &((struct sctp_getaddrs __user *)optval)->addr_num)) { |
4347 | return -EFAULT; | 4359 | err = -EFAULT; |
4360 | goto error; | ||
4361 | } | ||
4348 | if (put_user(bytes_copied, optlen)) | 4362 | if (put_user(bytes_copied, optlen)) |
4349 | return -EFAULT; | 4363 | err = -EFAULT; |
4350 | |||
4351 | error: | 4364 | error: |
4352 | kfree(addrs); | 4365 | kfree(addrs); |
4353 | return err; | 4366 | return err; |
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 961df275d5b9..5f467c914f80 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -241,6 +241,45 @@ void sctp_transport_pmtu(struct sctp_transport *transport) | |||
241 | transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT; | 241 | transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT; |
242 | } | 242 | } |
243 | 243 | ||
244 | /* this is a complete rip-off from __sk_dst_check | ||
245 | * the cookie is always 0 since this is how it's used in the | ||
246 | * pmtu code | ||
247 | */ | ||
248 | static struct dst_entry *sctp_transport_dst_check(struct sctp_transport *t) | ||
249 | { | ||
250 | struct dst_entry *dst = t->dst; | ||
251 | |||
252 | if (dst && dst->obsolete && dst->ops->check(dst, 0) == NULL) { | ||
253 | dst_release(t->dst); | ||
254 | t->dst = NULL; | ||
255 | return NULL; | ||
256 | } | ||
257 | |||
258 | return dst; | ||
259 | } | ||
260 | |||
261 | void sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu) | ||
262 | { | ||
263 | struct dst_entry *dst; | ||
264 | |||
265 | if (unlikely(pmtu < SCTP_DEFAULT_MINSEGMENT)) { | ||
266 | printk(KERN_WARNING "%s: Reported pmtu %d too low, " | ||
267 | "using default minimum of %d\n", | ||
268 | __FUNCTION__, pmtu, | ||
269 | SCTP_DEFAULT_MINSEGMENT); | ||
270 | /* Use default minimum segment size and disable | ||
271 | * pmtu discovery on this transport. | ||
272 | */ | ||
273 | t->pathmtu = SCTP_DEFAULT_MINSEGMENT; | ||
274 | } else { | ||
275 | t->pathmtu = pmtu; | ||
276 | } | ||
277 | |||
278 | dst = sctp_transport_dst_check(t); | ||
279 | if (dst) | ||
280 | dst->ops->update_pmtu(dst, pmtu); | ||
281 | } | ||
282 | |||
244 | /* Caches the dst entry and source address for a transport's destination | 283 | /* Caches the dst entry and source address for a transport's destination |
245 | * address. | 284 | * address. |
246 | */ | 285 | */ |
diff --git a/net/wireless/sysfs.c b/net/wireless/sysfs.c index 3ebae1442963..88aaacd9f822 100644 --- a/net/wireless/sysfs.c +++ b/net/wireless/sysfs.c | |||
@@ -33,7 +33,7 @@ static ssize_t _show_permaddr(struct device *dev, | |||
33 | struct device_attribute *attr, | 33 | struct device_attribute *attr, |
34 | char *buf) | 34 | char *buf) |
35 | { | 35 | { |
36 | char *addr = dev_to_rdev(dev)->wiphy.perm_addr; | 36 | unsigned char *addr = dev_to_rdev(dev)->wiphy.perm_addr; |
37 | 37 | ||
38 | return sprintf(buf, "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", | 38 | return sprintf(buf, "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", |
39 | addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); | 39 | addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); |