diff options
author | David S. Miller <davem@davemloft.net> | 2011-05-31 23:30:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-31 23:30:39 -0400 |
commit | e11ec900cfbea3d8f6a188674ee6fcb65f2a73d6 (patch) | |
tree | 55f5b27cdec71fdaa918b04d554b43fa16413f3f /net | |
parent | e12ca23d41bd157354a5d1aadff30211a410c53a (diff) | |
parent | 948252cb9e01d65a89ecadf67be5018351eee15e (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/ip_options.c | 15 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 7 | ||||
-rw-r--r-- | net/mac80211/scan.c | 1 | ||||
-rw-r--r-- | net/sctp/associola.c | 23 | ||||
-rw-r--r-- | net/sctp/sm_sideeffect.c | 3 | ||||
-rw-r--r-- | net/sctp/sm_statefuns.c | 14 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 4 |
7 files changed, 46 insertions, 21 deletions
diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c index c3118e1cd3bb..ec93335901dd 100644 --- a/net/ipv4/ip_options.c +++ b/net/ipv4/ip_options.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <asm/uaccess.h> | 16 | #include <asm/uaccess.h> |
17 | #include <asm/unaligned.h> | ||
17 | #include <linux/skbuff.h> | 18 | #include <linux/skbuff.h> |
18 | #include <linux/ip.h> | 19 | #include <linux/ip.h> |
19 | #include <linux/icmp.h> | 20 | #include <linux/icmp.h> |
@@ -350,7 +351,7 @@ int ip_options_compile(struct net *net, | |||
350 | goto error; | 351 | goto error; |
351 | } | 352 | } |
352 | if (optptr[2] <= optlen) { | 353 | if (optptr[2] <= optlen) { |
353 | __be32 *timeptr = NULL; | 354 | unsigned char *timeptr = NULL; |
354 | if (optptr[2]+3 > optptr[1]) { | 355 | if (optptr[2]+3 > optptr[1]) { |
355 | pp_ptr = optptr + 2; | 356 | pp_ptr = optptr + 2; |
356 | goto error; | 357 | goto error; |
@@ -359,7 +360,7 @@ int ip_options_compile(struct net *net, | |||
359 | case IPOPT_TS_TSONLY: | 360 | case IPOPT_TS_TSONLY: |
360 | opt->ts = optptr - iph; | 361 | opt->ts = optptr - iph; |
361 | if (skb) | 362 | if (skb) |
362 | timeptr = (__be32*)&optptr[optptr[2]-1]; | 363 | timeptr = &optptr[optptr[2]-1]; |
363 | opt->ts_needtime = 1; | 364 | opt->ts_needtime = 1; |
364 | optptr[2] += 4; | 365 | optptr[2] += 4; |
365 | break; | 366 | break; |
@@ -371,7 +372,7 @@ int ip_options_compile(struct net *net, | |||
371 | opt->ts = optptr - iph; | 372 | opt->ts = optptr - iph; |
372 | if (rt) { | 373 | if (rt) { |
373 | memcpy(&optptr[optptr[2]-1], &rt->rt_spec_dst, 4); | 374 | memcpy(&optptr[optptr[2]-1], &rt->rt_spec_dst, 4); |
374 | timeptr = (__be32*)&optptr[optptr[2]+3]; | 375 | timeptr = &optptr[optptr[2]+3]; |
375 | } | 376 | } |
376 | opt->ts_needaddr = 1; | 377 | opt->ts_needaddr = 1; |
377 | opt->ts_needtime = 1; | 378 | opt->ts_needtime = 1; |
@@ -389,7 +390,7 @@ int ip_options_compile(struct net *net, | |||
389 | if (inet_addr_type(net, addr) == RTN_UNICAST) | 390 | if (inet_addr_type(net, addr) == RTN_UNICAST) |
390 | break; | 391 | break; |
391 | if (skb) | 392 | if (skb) |
392 | timeptr = (__be32*)&optptr[optptr[2]+3]; | 393 | timeptr = &optptr[optptr[2]+3]; |
393 | } | 394 | } |
394 | opt->ts_needtime = 1; | 395 | opt->ts_needtime = 1; |
395 | optptr[2] += 8; | 396 | optptr[2] += 8; |
@@ -403,10 +404,10 @@ int ip_options_compile(struct net *net, | |||
403 | } | 404 | } |
404 | if (timeptr) { | 405 | if (timeptr) { |
405 | struct timespec tv; | 406 | struct timespec tv; |
406 | __be32 midtime; | 407 | u32 midtime; |
407 | getnstimeofday(&tv); | 408 | getnstimeofday(&tv); |
408 | midtime = htonl((tv.tv_sec % 86400) * MSEC_PER_SEC + tv.tv_nsec / NSEC_PER_MSEC); | 409 | midtime = (tv.tv_sec % 86400) * MSEC_PER_SEC + tv.tv_nsec / NSEC_PER_MSEC; |
409 | memcpy(timeptr, &midtime, sizeof(__be32)); | 410 | put_unaligned_be32(midtime, timeptr); |
410 | opt->is_changed = 1; | 411 | opt->is_changed = 1; |
411 | } | 412 | } |
412 | } else { | 413 | } else { |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 4f6b2675e41d..456cccf26b51 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -232,6 +232,9 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata, | |||
232 | WARN_ON(!ieee80211_set_channel_type(local, sdata, channel_type)); | 232 | WARN_ON(!ieee80211_set_channel_type(local, sdata, channel_type)); |
233 | } | 233 | } |
234 | 234 | ||
235 | ieee80211_stop_queues_by_reason(&sdata->local->hw, | ||
236 | IEEE80211_QUEUE_STOP_REASON_CSA); | ||
237 | |||
235 | /* channel_type change automatically detected */ | 238 | /* channel_type change automatically detected */ |
236 | ieee80211_hw_config(local, 0); | 239 | ieee80211_hw_config(local, 0); |
237 | 240 | ||
@@ -245,6 +248,9 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata, | |||
245 | rcu_read_unlock(); | 248 | rcu_read_unlock(); |
246 | } | 249 | } |
247 | 250 | ||
251 | ieee80211_wake_queues_by_reason(&sdata->local->hw, | ||
252 | IEEE80211_QUEUE_STOP_REASON_CSA); | ||
253 | |||
248 | ht_opmode = le16_to_cpu(hti->operation_mode); | 254 | ht_opmode = le16_to_cpu(hti->operation_mode); |
249 | 255 | ||
250 | /* if bss configuration changed store the new one */ | 256 | /* if bss configuration changed store the new one */ |
@@ -1089,6 +1095,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, | |||
1089 | local->hw.conf.flags &= ~IEEE80211_CONF_PS; | 1095 | local->hw.conf.flags &= ~IEEE80211_CONF_PS; |
1090 | config_changed |= IEEE80211_CONF_CHANGE_PS; | 1096 | config_changed |= IEEE80211_CONF_CHANGE_PS; |
1091 | } | 1097 | } |
1098 | local->ps_sdata = NULL; | ||
1092 | 1099 | ||
1093 | ieee80211_hw_config(local, config_changed); | 1100 | ieee80211_hw_config(local, config_changed); |
1094 | 1101 | ||
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 27af6723cb5e..58ffa7d069c7 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/if_arp.h> | 15 | #include <linux/if_arp.h> |
16 | #include <linux/rtnetlink.h> | 16 | #include <linux/rtnetlink.h> |
17 | #include <linux/pm_qos_params.h> | 17 | #include <linux/pm_qos_params.h> |
18 | #include <linux/slab.h> | ||
19 | #include <net/sch_generic.h> | 18 | #include <net/sch_generic.h> |
20 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
21 | #include <net/mac80211.h> | 20 | #include <net/mac80211.h> |
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 525f97c467e9..4a62888f2e43 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -444,15 +444,7 @@ void sctp_association_free(struct sctp_association *asoc) | |||
444 | 444 | ||
445 | asoc->peer.transport_count = 0; | 445 | asoc->peer.transport_count = 0; |
446 | 446 | ||
447 | /* Free any cached ASCONF_ACK chunk. */ | 447 | sctp_asconf_queue_teardown(asoc); |
448 | sctp_assoc_free_asconf_acks(asoc); | ||
449 | |||
450 | /* Free the ASCONF queue. */ | ||
451 | sctp_assoc_free_asconf_queue(asoc); | ||
452 | |||
453 | /* Free any cached ASCONF chunk. */ | ||
454 | if (asoc->addip_last_asconf) | ||
455 | sctp_chunk_free(asoc->addip_last_asconf); | ||
456 | 448 | ||
457 | /* AUTH - Free the endpoint shared keys */ | 449 | /* AUTH - Free the endpoint shared keys */ |
458 | sctp_auth_destroy_keys(&asoc->endpoint_shared_keys); | 450 | sctp_auth_destroy_keys(&asoc->endpoint_shared_keys); |
@@ -1646,3 +1638,16 @@ struct sctp_chunk *sctp_assoc_lookup_asconf_ack( | |||
1646 | 1638 | ||
1647 | return NULL; | 1639 | return NULL; |
1648 | } | 1640 | } |
1641 | |||
1642 | void sctp_asconf_queue_teardown(struct sctp_association *asoc) | ||
1643 | { | ||
1644 | /* Free any cached ASCONF_ACK chunk. */ | ||
1645 | sctp_assoc_free_asconf_acks(asoc); | ||
1646 | |||
1647 | /* Free the ASCONF queue. */ | ||
1648 | sctp_assoc_free_asconf_queue(asoc); | ||
1649 | |||
1650 | /* Free any cached ASCONF chunk. */ | ||
1651 | if (asoc->addip_last_asconf) | ||
1652 | sctp_chunk_free(asoc->addip_last_asconf); | ||
1653 | } | ||
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index d612ca1ca6c0..534c2e5feb05 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c | |||
@@ -1670,6 +1670,9 @@ static int sctp_cmd_interpreter(sctp_event_t event_type, | |||
1670 | case SCTP_CMD_SEND_NEXT_ASCONF: | 1670 | case SCTP_CMD_SEND_NEXT_ASCONF: |
1671 | sctp_cmd_send_asconf(asoc); | 1671 | sctp_cmd_send_asconf(asoc); |
1672 | break; | 1672 | break; |
1673 | case SCTP_CMD_PURGE_ASCONF_QUEUE: | ||
1674 | sctp_asconf_queue_teardown(asoc); | ||
1675 | break; | ||
1673 | default: | 1676 | default: |
1674 | pr_warn("Impossible command: %u, %p\n", | 1677 | pr_warn("Impossible command: %u, %p\n", |
1675 | cmd->verb, cmd->obj.ptr); | 1678 | cmd->verb, cmd->obj.ptr); |
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 7f4a4f8368ee..a297283154d5 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -1718,11 +1718,21 @@ static sctp_disposition_t sctp_sf_do_dupcook_a(const struct sctp_endpoint *ep, | |||
1718 | return SCTP_DISPOSITION_CONSUME; | 1718 | return SCTP_DISPOSITION_CONSUME; |
1719 | } | 1719 | } |
1720 | 1720 | ||
1721 | /* For now, fail any unsent/unacked data. Consider the optional | 1721 | /* For now, stop pending T3-rtx and SACK timers, fail any unsent/unacked |
1722 | * choice of resending of this data. | 1722 | * data. Consider the optional choice of resending of this data. |
1723 | */ | 1723 | */ |
1724 | sctp_add_cmd_sf(commands, SCTP_CMD_T3_RTX_TIMERS_STOP, SCTP_NULL()); | ||
1725 | sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_STOP, | ||
1726 | SCTP_TO(SCTP_EVENT_TIMEOUT_SACK)); | ||
1724 | sctp_add_cmd_sf(commands, SCTP_CMD_PURGE_OUTQUEUE, SCTP_NULL()); | 1727 | sctp_add_cmd_sf(commands, SCTP_CMD_PURGE_OUTQUEUE, SCTP_NULL()); |
1725 | 1728 | ||
1729 | /* Stop pending T4-rto timer, teardown ASCONF queue, ASCONF-ACK queue | ||
1730 | * and ASCONF-ACK cache. | ||
1731 | */ | ||
1732 | sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_STOP, | ||
1733 | SCTP_TO(SCTP_EVENT_TIMEOUT_T4_RTO)); | ||
1734 | sctp_add_cmd_sf(commands, SCTP_CMD_PURGE_ASCONF_QUEUE, SCTP_NULL()); | ||
1735 | |||
1726 | repl = sctp_make_cookie_ack(new_asoc, chunk); | 1736 | repl = sctp_make_cookie_ack(new_asoc, chunk); |
1727 | if (!repl) | 1737 | if (!repl) |
1728 | goto nomem; | 1738 | goto nomem; |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index ec83f413a7ed..88a565f130a5 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -3406,12 +3406,12 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) | |||
3406 | i = 0; | 3406 | i = 0; |
3407 | if (info->attrs[NL80211_ATTR_SCAN_SSIDS]) { | 3407 | if (info->attrs[NL80211_ATTR_SCAN_SSIDS]) { |
3408 | nla_for_each_nested(attr, info->attrs[NL80211_ATTR_SCAN_SSIDS], tmp) { | 3408 | nla_for_each_nested(attr, info->attrs[NL80211_ATTR_SCAN_SSIDS], tmp) { |
3409 | request->ssids[i].ssid_len = nla_len(attr); | ||
3409 | if (request->ssids[i].ssid_len > IEEE80211_MAX_SSID_LEN) { | 3410 | if (request->ssids[i].ssid_len > IEEE80211_MAX_SSID_LEN) { |
3410 | err = -EINVAL; | 3411 | err = -EINVAL; |
3411 | goto out_free; | 3412 | goto out_free; |
3412 | } | 3413 | } |
3413 | memcpy(request->ssids[i].ssid, nla_data(attr), nla_len(attr)); | 3414 | memcpy(request->ssids[i].ssid, nla_data(attr), nla_len(attr)); |
3414 | request->ssids[i].ssid_len = nla_len(attr); | ||
3415 | i++; | 3415 | i++; |
3416 | } | 3416 | } |
3417 | } | 3417 | } |
@@ -3572,6 +3572,7 @@ static int nl80211_start_sched_scan(struct sk_buff *skb, | |||
3572 | if (info->attrs[NL80211_ATTR_SCAN_SSIDS]) { | 3572 | if (info->attrs[NL80211_ATTR_SCAN_SSIDS]) { |
3573 | nla_for_each_nested(attr, info->attrs[NL80211_ATTR_SCAN_SSIDS], | 3573 | nla_for_each_nested(attr, info->attrs[NL80211_ATTR_SCAN_SSIDS], |
3574 | tmp) { | 3574 | tmp) { |
3575 | request->ssids[i].ssid_len = nla_len(attr); | ||
3575 | if (request->ssids[i].ssid_len > | 3576 | if (request->ssids[i].ssid_len > |
3576 | IEEE80211_MAX_SSID_LEN) { | 3577 | IEEE80211_MAX_SSID_LEN) { |
3577 | err = -EINVAL; | 3578 | err = -EINVAL; |
@@ -3579,7 +3580,6 @@ static int nl80211_start_sched_scan(struct sk_buff *skb, | |||
3579 | } | 3580 | } |
3580 | memcpy(request->ssids[i].ssid, nla_data(attr), | 3581 | memcpy(request->ssids[i].ssid, nla_data(attr), |
3581 | nla_len(attr)); | 3582 | nla_len(attr)); |
3582 | request->ssids[i].ssid_len = nla_len(attr); | ||
3583 | i++; | 3583 | i++; |
3584 | } | 3584 | } |
3585 | } | 3585 | } |