diff options
author | David S. Miller <davem@davemloft.net> | 2009-11-29 03:57:15 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-29 03:57:15 -0500 |
commit | 9b963e5d0e01461099a40117b05480f24b63381f (patch) | |
tree | 4756d554e37bf4ab7202f2c564cbe629af98b576 /net | |
parent | 3b8626ba01a8a745a3fdf22dd347edd708b0af13 (diff) | |
parent | 5fdd4baef6195a1f2960e901c8877e2105f832ca (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/ieee802154/fakehard.c
drivers/net/e1000e/ich8lan.c
drivers/net/e1000e/phy.c
drivers/net/netxen/netxen_nic_init.c
drivers/net/wireless/ath/ath9k/main.c
Diffstat (limited to 'net')
-rw-r--r-- | net/core/pktgen.c | 32 | ||||
-rw-r--r-- | net/mac80211/agg-tx.c | 18 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 8 | ||||
-rw-r--r-- | net/mac80211/util.c | 19 | ||||
-rw-r--r-- | net/netfilter/nf_log.c | 18 | ||||
-rw-r--r-- | net/netfilter/xt_limit.c | 2 | ||||
-rw-r--r-- | net/netfilter/xt_osf.c | 2 | ||||
-rw-r--r-- | net/rfkill/core.c | 1 | ||||
-rw-r--r-- | net/sctp/outqueue.c | 10 | ||||
-rw-r--r-- | net/sctp/sm_sideeffect.c | 1 | ||||
-rw-r--r-- | net/sctp/transport.c | 5 |
11 files changed, 55 insertions, 61 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index d38470a32792..b44104d3e6be 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -364,6 +364,7 @@ struct pktgen_dev { | |||
364 | * device name (not when the inject is | 364 | * device name (not when the inject is |
365 | * started as it used to do.) | 365 | * started as it used to do.) |
366 | */ | 366 | */ |
367 | char odevname[32]; | ||
367 | struct flow_state *flows; | 368 | struct flow_state *flows; |
368 | unsigned cflows; /* Concurrent flows (config) */ | 369 | unsigned cflows; /* Concurrent flows (config) */ |
369 | unsigned lflow; /* Flow length (config) */ | 370 | unsigned lflow; /* Flow length (config) */ |
@@ -427,7 +428,7 @@ static const char version[] = | |||
427 | static int pktgen_remove_device(struct pktgen_thread *t, struct pktgen_dev *i); | 428 | static int pktgen_remove_device(struct pktgen_thread *t, struct pktgen_dev *i); |
428 | static int pktgen_add_device(struct pktgen_thread *t, const char *ifname); | 429 | static int pktgen_add_device(struct pktgen_thread *t, const char *ifname); |
429 | static struct pktgen_dev *pktgen_find_dev(struct pktgen_thread *t, | 430 | static struct pktgen_dev *pktgen_find_dev(struct pktgen_thread *t, |
430 | const char *ifname); | 431 | const char *ifname, bool exact); |
431 | static int pktgen_device_event(struct notifier_block *, unsigned long, void *); | 432 | static int pktgen_device_event(struct notifier_block *, unsigned long, void *); |
432 | static void pktgen_run_all_threads(void); | 433 | static void pktgen_run_all_threads(void); |
433 | static void pktgen_reset_all_threads(void); | 434 | static void pktgen_reset_all_threads(void); |
@@ -529,7 +530,7 @@ static int pktgen_if_show(struct seq_file *seq, void *v) | |||
529 | seq_printf(seq, | 530 | seq_printf(seq, |
530 | " frags: %d delay: %llu clone_skb: %d ifname: %s\n", | 531 | " frags: %d delay: %llu clone_skb: %d ifname: %s\n", |
531 | pkt_dev->nfrags, (unsigned long long) pkt_dev->delay, | 532 | pkt_dev->nfrags, (unsigned long long) pkt_dev->delay, |
532 | pkt_dev->clone_skb, pkt_dev->odev->name); | 533 | pkt_dev->clone_skb, pkt_dev->odevname); |
533 | 534 | ||
534 | seq_printf(seq, " flows: %u flowlen: %u\n", pkt_dev->cflows, | 535 | seq_printf(seq, " flows: %u flowlen: %u\n", pkt_dev->cflows, |
535 | pkt_dev->lflow); | 536 | pkt_dev->lflow); |
@@ -1689,13 +1690,13 @@ static int pktgen_thread_show(struct seq_file *seq, void *v) | |||
1689 | if_lock(t); | 1690 | if_lock(t); |
1690 | list_for_each_entry(pkt_dev, &t->if_list, list) | 1691 | list_for_each_entry(pkt_dev, &t->if_list, list) |
1691 | if (pkt_dev->running) | 1692 | if (pkt_dev->running) |
1692 | seq_printf(seq, "%s ", pkt_dev->odev->name); | 1693 | seq_printf(seq, "%s ", pkt_dev->odevname); |
1693 | 1694 | ||
1694 | seq_printf(seq, "\nStopped: "); | 1695 | seq_printf(seq, "\nStopped: "); |
1695 | 1696 | ||
1696 | list_for_each_entry(pkt_dev, &t->if_list, list) | 1697 | list_for_each_entry(pkt_dev, &t->if_list, list) |
1697 | if (!pkt_dev->running) | 1698 | if (!pkt_dev->running) |
1698 | seq_printf(seq, "%s ", pkt_dev->odev->name); | 1699 | seq_printf(seq, "%s ", pkt_dev->odevname); |
1699 | 1700 | ||
1700 | if (t->result[0]) | 1701 | if (t->result[0]) |
1701 | seq_printf(seq, "\nResult: %s\n", t->result); | 1702 | seq_printf(seq, "\nResult: %s\n", t->result); |
@@ -1818,9 +1819,10 @@ static struct pktgen_dev *__pktgen_NN_threads(const char *ifname, int remove) | |||
1818 | { | 1819 | { |
1819 | struct pktgen_thread *t; | 1820 | struct pktgen_thread *t; |
1820 | struct pktgen_dev *pkt_dev = NULL; | 1821 | struct pktgen_dev *pkt_dev = NULL; |
1822 | bool exact = (remove == FIND); | ||
1821 | 1823 | ||
1822 | list_for_each_entry(t, &pktgen_threads, th_list) { | 1824 | list_for_each_entry(t, &pktgen_threads, th_list) { |
1823 | pkt_dev = pktgen_find_dev(t, ifname); | 1825 | pkt_dev = pktgen_find_dev(t, ifname, exact); |
1824 | if (pkt_dev) { | 1826 | if (pkt_dev) { |
1825 | if (remove) { | 1827 | if (remove) { |
1826 | if_lock(t); | 1828 | if_lock(t); |
@@ -1995,7 +1997,7 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev) | |||
1995 | "queue_map_min (zero-based) (%d) exceeds valid range " | 1997 | "queue_map_min (zero-based) (%d) exceeds valid range " |
1996 | "[0 - %d] for (%d) queues on %s, resetting\n", | 1998 | "[0 - %d] for (%d) queues on %s, resetting\n", |
1997 | pkt_dev->queue_map_min, (ntxq ?: 1) - 1, ntxq, | 1999 | pkt_dev->queue_map_min, (ntxq ?: 1) - 1, ntxq, |
1998 | pkt_dev->odev->name); | 2000 | pkt_dev->odevname); |
1999 | pkt_dev->queue_map_min = ntxq - 1; | 2001 | pkt_dev->queue_map_min = ntxq - 1; |
2000 | } | 2002 | } |
2001 | if (pkt_dev->queue_map_max >= ntxq) { | 2003 | if (pkt_dev->queue_map_max >= ntxq) { |
@@ -2003,7 +2005,7 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev) | |||
2003 | "queue_map_max (zero-based) (%d) exceeds valid range " | 2005 | "queue_map_max (zero-based) (%d) exceeds valid range " |
2004 | "[0 - %d] for (%d) queues on %s, resetting\n", | 2006 | "[0 - %d] for (%d) queues on %s, resetting\n", |
2005 | pkt_dev->queue_map_max, (ntxq ?: 1) - 1, ntxq, | 2007 | pkt_dev->queue_map_max, (ntxq ?: 1) - 1, ntxq, |
2006 | pkt_dev->odev->name); | 2008 | pkt_dev->odevname); |
2007 | pkt_dev->queue_map_max = ntxq - 1; | 2009 | pkt_dev->queue_map_max = ntxq - 1; |
2008 | } | 2010 | } |
2009 | 2011 | ||
@@ -3263,7 +3265,7 @@ static int pktgen_stop_device(struct pktgen_dev *pkt_dev) | |||
3263 | 3265 | ||
3264 | if (!pkt_dev->running) { | 3266 | if (!pkt_dev->running) { |
3265 | printk(KERN_WARNING "pktgen: interface: %s is already " | 3267 | printk(KERN_WARNING "pktgen: interface: %s is already " |
3266 | "stopped\n", pkt_dev->odev->name); | 3268 | "stopped\n", pkt_dev->odevname); |
3267 | return -EINVAL; | 3269 | return -EINVAL; |
3268 | } | 3270 | } |
3269 | 3271 | ||
@@ -3467,7 +3469,7 @@ static void pktgen_xmit(struct pktgen_dev *pkt_dev) | |||
3467 | default: /* Drivers are not supposed to return other values! */ | 3469 | default: /* Drivers are not supposed to return other values! */ |
3468 | if (net_ratelimit()) | 3470 | if (net_ratelimit()) |
3469 | pr_info("pktgen: %s xmit error: %d\n", | 3471 | pr_info("pktgen: %s xmit error: %d\n", |
3470 | odev->name, ret); | 3472 | pkt_dev->odevname, ret); |
3471 | pkt_dev->errors++; | 3473 | pkt_dev->errors++; |
3472 | /* fallthru */ | 3474 | /* fallthru */ |
3473 | case NETDEV_TX_LOCKED: | 3475 | case NETDEV_TX_LOCKED: |
@@ -3570,13 +3572,18 @@ static int pktgen_thread_worker(void *arg) | |||
3570 | } | 3572 | } |
3571 | 3573 | ||
3572 | static struct pktgen_dev *pktgen_find_dev(struct pktgen_thread *t, | 3574 | static struct pktgen_dev *pktgen_find_dev(struct pktgen_thread *t, |
3573 | const char *ifname) | 3575 | const char *ifname, bool exact) |
3574 | { | 3576 | { |
3575 | struct pktgen_dev *p, *pkt_dev = NULL; | 3577 | struct pktgen_dev *p, *pkt_dev = NULL; |
3576 | if_lock(t); | 3578 | size_t len = strlen(ifname); |
3577 | 3579 | ||
3580 | if_lock(t); | ||
3578 | list_for_each_entry(p, &t->if_list, list) | 3581 | list_for_each_entry(p, &t->if_list, list) |
3579 | if (strncmp(p->odev->name, ifname, IFNAMSIZ) == 0) { | 3582 | if (strncmp(p->odevname, ifname, len) == 0) { |
3583 | if (p->odevname[len]) { | ||
3584 | if (exact || p->odevname[len] != '@') | ||
3585 | continue; | ||
3586 | } | ||
3580 | pkt_dev = p; | 3587 | pkt_dev = p; |
3581 | break; | 3588 | break; |
3582 | } | 3589 | } |
@@ -3632,6 +3639,7 @@ static int pktgen_add_device(struct pktgen_thread *t, const char *ifname) | |||
3632 | if (!pkt_dev) | 3639 | if (!pkt_dev) |
3633 | return -ENOMEM; | 3640 | return -ENOMEM; |
3634 | 3641 | ||
3642 | strcpy(pkt_dev->odevname, ifname); | ||
3635 | pkt_dev->flows = vmalloc(MAX_CFLOWS * sizeof(struct flow_state)); | 3643 | pkt_dev->flows = vmalloc(MAX_CFLOWS * sizeof(struct flow_state)); |
3636 | if (pkt_dev->flows == NULL) { | 3644 | if (pkt_dev->flows == NULL) { |
3637 | kfree(pkt_dev); | 3645 | kfree(pkt_dev); |
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c index b50b2bc3b8c5..adf01fcd462e 100644 --- a/net/mac80211/agg-tx.c +++ b/net/mac80211/agg-tx.c | |||
@@ -175,12 +175,14 @@ static void sta_addba_resp_timer_expired(unsigned long data) | |||
175 | 175 | ||
176 | /* check if the TID waits for addBA response */ | 176 | /* check if the TID waits for addBA response */ |
177 | spin_lock_bh(&sta->lock); | 177 | spin_lock_bh(&sta->lock); |
178 | if (!(*state & HT_ADDBA_REQUESTED_MSK)) { | 178 | if ((*state & (HT_ADDBA_REQUESTED_MSK | HT_ADDBA_RECEIVED_MSK)) != |
179 | HT_ADDBA_REQUESTED_MSK) { | ||
179 | spin_unlock_bh(&sta->lock); | 180 | spin_unlock_bh(&sta->lock); |
180 | *state = HT_AGG_STATE_IDLE; | 181 | *state = HT_AGG_STATE_IDLE; |
181 | #ifdef CONFIG_MAC80211_HT_DEBUG | 182 | #ifdef CONFIG_MAC80211_HT_DEBUG |
182 | printk(KERN_DEBUG "timer expired on tid %d but we are not " | 183 | printk(KERN_DEBUG "timer expired on tid %d but we are not " |
183 | "expecting addBA response there", tid); | 184 | "(or no longer) expecting addBA response there", |
185 | tid); | ||
184 | #endif | 186 | #endif |
185 | return; | 187 | return; |
186 | } | 188 | } |
@@ -649,21 +651,21 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local, | |||
649 | 651 | ||
650 | state = &sta->ampdu_mlme.tid_state_tx[tid]; | 652 | state = &sta->ampdu_mlme.tid_state_tx[tid]; |
651 | 653 | ||
652 | del_timer_sync(&sta->ampdu_mlme.tid_tx[tid]->addba_resp_timer); | ||
653 | |||
654 | spin_lock_bh(&sta->lock); | 654 | spin_lock_bh(&sta->lock); |
655 | 655 | ||
656 | if (!(*state & HT_ADDBA_REQUESTED_MSK)) | 656 | if (!(*state & HT_ADDBA_REQUESTED_MSK)) |
657 | goto timer_still_needed; | 657 | goto out; |
658 | 658 | ||
659 | if (mgmt->u.action.u.addba_resp.dialog_token != | 659 | if (mgmt->u.action.u.addba_resp.dialog_token != |
660 | sta->ampdu_mlme.tid_tx[tid]->dialog_token) { | 660 | sta->ampdu_mlme.tid_tx[tid]->dialog_token) { |
661 | #ifdef CONFIG_MAC80211_HT_DEBUG | 661 | #ifdef CONFIG_MAC80211_HT_DEBUG |
662 | printk(KERN_DEBUG "wrong addBA response token, tid %d\n", tid); | 662 | printk(KERN_DEBUG "wrong addBA response token, tid %d\n", tid); |
663 | #endif /* CONFIG_MAC80211_HT_DEBUG */ | 663 | #endif /* CONFIG_MAC80211_HT_DEBUG */ |
664 | goto timer_still_needed; | 664 | goto out; |
665 | } | 665 | } |
666 | 666 | ||
667 | del_timer(&sta->ampdu_mlme.tid_tx[tid]->addba_resp_timer); | ||
668 | |||
667 | #ifdef CONFIG_MAC80211_HT_DEBUG | 669 | #ifdef CONFIG_MAC80211_HT_DEBUG |
668 | printk(KERN_DEBUG "switched off addBA timer for tid %d \n", tid); | 670 | printk(KERN_DEBUG "switched off addBA timer for tid %d \n", tid); |
669 | #endif /* CONFIG_MAC80211_HT_DEBUG */ | 671 | #endif /* CONFIG_MAC80211_HT_DEBUG */ |
@@ -682,10 +684,6 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local, | |||
682 | ___ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_INITIATOR); | 684 | ___ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_INITIATOR); |
683 | } | 685 | } |
684 | 686 | ||
685 | goto out; | ||
686 | |||
687 | timer_still_needed: | ||
688 | add_timer(&sta->ampdu_mlme.tid_tx[tid]->addba_resp_timer); | ||
689 | out: | 687 | out: |
690 | spin_unlock_bh(&sta->lock); | 688 | spin_unlock_bh(&sta->lock); |
691 | } | 689 | } |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 04093e84ebd7..ab2894211638 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -601,6 +601,14 @@ struct ieee80211_local { | |||
601 | bool suspended; | 601 | bool suspended; |
602 | 602 | ||
603 | /* | 603 | /* |
604 | * Resuming is true while suspended, but when we're reprogramming the | ||
605 | * hardware -- at that time it's allowed to use ieee80211_queue_work() | ||
606 | * again even though some other parts of the stack are still suspended | ||
607 | * and we still drop received frames to avoid waking the stack. | ||
608 | */ | ||
609 | bool resuming; | ||
610 | |||
611 | /* | ||
604 | * quiescing is true during the suspend process _only_ to | 612 | * quiescing is true during the suspend process _only_ to |
605 | * ease timer cancelling etc. | 613 | * ease timer cancelling etc. |
606 | */ | 614 | */ |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 2fb0432ac830..d09f78bb2442 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -520,9 +520,9 @@ EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_atomic); | |||
520 | */ | 520 | */ |
521 | static bool ieee80211_can_queue_work(struct ieee80211_local *local) | 521 | static bool ieee80211_can_queue_work(struct ieee80211_local *local) |
522 | { | 522 | { |
523 | if (WARN(local->suspended, "queueing ieee80211 work while " | 523 | if (WARN(local->suspended && !local->resuming, |
524 | "going to suspend\n")) | 524 | "queueing ieee80211 work while going to suspend\n")) |
525 | return false; | 525 | return false; |
526 | 526 | ||
527 | return true; | 527 | return true; |
528 | } | 528 | } |
@@ -1033,13 +1033,9 @@ int ieee80211_reconfig(struct ieee80211_local *local) | |||
1033 | struct sta_info *sta; | 1033 | struct sta_info *sta; |
1034 | unsigned long flags; | 1034 | unsigned long flags; |
1035 | int res; | 1035 | int res; |
1036 | bool from_suspend = local->suspended; | ||
1037 | 1036 | ||
1038 | /* | 1037 | if (local->suspended) |
1039 | * We're going to start the hardware, at that point | 1038 | local->resuming = true; |
1040 | * we are no longer suspended and can RX frames. | ||
1041 | */ | ||
1042 | local->suspended = false; | ||
1043 | 1039 | ||
1044 | /* restart hardware */ | 1040 | /* restart hardware */ |
1045 | if (local->open_count) { | 1041 | if (local->open_count) { |
@@ -1137,11 +1133,14 @@ int ieee80211_reconfig(struct ieee80211_local *local) | |||
1137 | * If this is for hw restart things are still running. | 1133 | * If this is for hw restart things are still running. |
1138 | * We may want to change that later, however. | 1134 | * We may want to change that later, however. |
1139 | */ | 1135 | */ |
1140 | if (!from_suspend) | 1136 | if (!local->suspended) |
1141 | return 0; | 1137 | return 0; |
1142 | 1138 | ||
1143 | #ifdef CONFIG_PM | 1139 | #ifdef CONFIG_PM |
1140 | /* first set suspended false, then resuming */ | ||
1144 | local->suspended = false; | 1141 | local->suspended = false; |
1142 | mb(); | ||
1143 | local->resuming = false; | ||
1145 | 1144 | ||
1146 | list_for_each_entry(sdata, &local->interfaces, list) { | 1145 | list_for_each_entry(sdata, &local->interfaces, list) { |
1147 | switch(sdata->vif.type) { | 1146 | switch(sdata->vif.type) { |
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c index c93494fef8ef..d65d3481919c 100644 --- a/net/netfilter/nf_log.c +++ b/net/netfilter/nf_log.c | |||
@@ -128,9 +128,8 @@ EXPORT_SYMBOL(nf_log_packet); | |||
128 | 128 | ||
129 | #ifdef CONFIG_PROC_FS | 129 | #ifdef CONFIG_PROC_FS |
130 | static void *seq_start(struct seq_file *seq, loff_t *pos) | 130 | static void *seq_start(struct seq_file *seq, loff_t *pos) |
131 | __acquires(RCU) | ||
132 | { | 131 | { |
133 | rcu_read_lock(); | 132 | mutex_lock(&nf_log_mutex); |
134 | 133 | ||
135 | if (*pos >= ARRAY_SIZE(nf_loggers)) | 134 | if (*pos >= ARRAY_SIZE(nf_loggers)) |
136 | return NULL; | 135 | return NULL; |
@@ -149,9 +148,8 @@ static void *seq_next(struct seq_file *s, void *v, loff_t *pos) | |||
149 | } | 148 | } |
150 | 149 | ||
151 | static void seq_stop(struct seq_file *s, void *v) | 150 | static void seq_stop(struct seq_file *s, void *v) |
152 | __releases(RCU) | ||
153 | { | 151 | { |
154 | rcu_read_unlock(); | 152 | mutex_unlock(&nf_log_mutex); |
155 | } | 153 | } |
156 | 154 | ||
157 | static int seq_show(struct seq_file *s, void *v) | 155 | static int seq_show(struct seq_file *s, void *v) |
@@ -161,7 +159,7 @@ static int seq_show(struct seq_file *s, void *v) | |||
161 | struct nf_logger *t; | 159 | struct nf_logger *t; |
162 | int ret; | 160 | int ret; |
163 | 161 | ||
164 | logger = rcu_dereference(nf_loggers[*pos]); | 162 | logger = nf_loggers[*pos]; |
165 | 163 | ||
166 | if (!logger) | 164 | if (!logger) |
167 | ret = seq_printf(s, "%2lld NONE (", *pos); | 165 | ret = seq_printf(s, "%2lld NONE (", *pos); |
@@ -171,22 +169,16 @@ static int seq_show(struct seq_file *s, void *v) | |||
171 | if (ret < 0) | 169 | if (ret < 0) |
172 | return ret; | 170 | return ret; |
173 | 171 | ||
174 | mutex_lock(&nf_log_mutex); | ||
175 | list_for_each_entry(t, &nf_loggers_l[*pos], list[*pos]) { | 172 | list_for_each_entry(t, &nf_loggers_l[*pos], list[*pos]) { |
176 | ret = seq_printf(s, "%s", t->name); | 173 | ret = seq_printf(s, "%s", t->name); |
177 | if (ret < 0) { | 174 | if (ret < 0) |
178 | mutex_unlock(&nf_log_mutex); | ||
179 | return ret; | 175 | return ret; |
180 | } | ||
181 | if (&t->list[*pos] != nf_loggers_l[*pos].prev) { | 176 | if (&t->list[*pos] != nf_loggers_l[*pos].prev) { |
182 | ret = seq_printf(s, ","); | 177 | ret = seq_printf(s, ","); |
183 | if (ret < 0) { | 178 | if (ret < 0) |
184 | mutex_unlock(&nf_log_mutex); | ||
185 | return ret; | 179 | return ret; |
186 | } | ||
187 | } | 180 | } |
188 | } | 181 | } |
189 | mutex_unlock(&nf_log_mutex); | ||
190 | 182 | ||
191 | return seq_printf(s, ")\n"); | 183 | return seq_printf(s, ")\n"); |
192 | } | 184 | } |
diff --git a/net/netfilter/xt_limit.c b/net/netfilter/xt_limit.c index 2e8089ecd0af..2773be6a71dd 100644 --- a/net/netfilter/xt_limit.c +++ b/net/netfilter/xt_limit.c | |||
@@ -112,7 +112,7 @@ static bool limit_mt_check(const struct xt_mtchk_param *par) | |||
112 | 112 | ||
113 | priv = kmalloc(sizeof(*priv), GFP_KERNEL); | 113 | priv = kmalloc(sizeof(*priv), GFP_KERNEL); |
114 | if (priv == NULL) | 114 | if (priv == NULL) |
115 | return -ENOMEM; | 115 | return false; |
116 | 116 | ||
117 | /* For SMP, we only want to use one set of state. */ | 117 | /* For SMP, we only want to use one set of state. */ |
118 | r->master = priv; | 118 | r->master = priv; |
diff --git a/net/netfilter/xt_osf.c b/net/netfilter/xt_osf.c index 63e190504656..4d1a41bbd5d7 100644 --- a/net/netfilter/xt_osf.c +++ b/net/netfilter/xt_osf.c | |||
@@ -118,7 +118,7 @@ static int xt_osf_remove_callback(struct sock *ctnl, struct sk_buff *skb, | |||
118 | { | 118 | { |
119 | struct xt_osf_user_finger *f; | 119 | struct xt_osf_user_finger *f; |
120 | struct xt_osf_finger *sf; | 120 | struct xt_osf_finger *sf; |
121 | int err = ENOENT; | 121 | int err = -ENOENT; |
122 | 122 | ||
123 | if (!osf_attrs[OSF_ATTR_FINGER]) | 123 | if (!osf_attrs[OSF_ATTR_FINGER]) |
124 | return -EINVAL; | 124 | return -EINVAL; |
diff --git a/net/rfkill/core.c b/net/rfkill/core.c index 09f4e161799b..448e5a0fcc2e 100644 --- a/net/rfkill/core.c +++ b/net/rfkill/core.c | |||
@@ -1191,6 +1191,7 @@ static long rfkill_fop_ioctl(struct file *file, unsigned int cmd, | |||
1191 | #endif | 1191 | #endif |
1192 | 1192 | ||
1193 | static const struct file_operations rfkill_fops = { | 1193 | static const struct file_operations rfkill_fops = { |
1194 | .owner = THIS_MODULE, | ||
1194 | .open = rfkill_fop_open, | 1195 | .open = rfkill_fop_open, |
1195 | .read = rfkill_fop_read, | 1196 | .read = rfkill_fop_read, |
1196 | .write = rfkill_fop_write, | 1197 | .write = rfkill_fop_write, |
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 2f2377369e2b..e231a9831016 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c | |||
@@ -423,16 +423,6 @@ void sctp_retransmit_mark(struct sctp_outq *q, | |||
423 | if ((reason == SCTP_RTXR_FAST_RTX && | 423 | if ((reason == SCTP_RTXR_FAST_RTX && |
424 | (chunk->fast_retransmit == SCTP_NEED_FRTX)) || | 424 | (chunk->fast_retransmit == SCTP_NEED_FRTX)) || |
425 | (reason != SCTP_RTXR_FAST_RTX && !chunk->tsn_gap_acked)) { | 425 | (reason != SCTP_RTXR_FAST_RTX && !chunk->tsn_gap_acked)) { |
426 | /* If this chunk was sent less then 1 rto ago, do not | ||
427 | * retransmit this chunk, but give the peer time | ||
428 | * to acknowlege it. Do this only when | ||
429 | * retransmitting due to T3 timeout. | ||
430 | */ | ||
431 | if (reason == SCTP_RTXR_T3_RTX && | ||
432 | time_before(jiffies, chunk->sent_at + | ||
433 | transport->last_rto)) | ||
434 | continue; | ||
435 | |||
436 | /* RFC 2960 6.2.1 Processing a Received SACK | 426 | /* RFC 2960 6.2.1 Processing a Received SACK |
437 | * | 427 | * |
438 | * C) Any time a DATA chunk is marked for | 428 | * C) Any time a DATA chunk is marked for |
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index 8ae67098e094..d771cc1b777a 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c | |||
@@ -479,7 +479,6 @@ static void sctp_do_8_2_transport_strike(struct sctp_association *asoc, | |||
479 | * that indicates that we have an outstanding HB. | 479 | * that indicates that we have an outstanding HB. |
480 | */ | 480 | */ |
481 | if (!is_hb || transport->hb_sent) { | 481 | if (!is_hb || transport->hb_sent) { |
482 | transport->last_rto = transport->rto; | ||
483 | transport->rto = min((transport->rto * 2), transport->asoc->rto_max); | 482 | transport->rto = min((transport->rto * 2), transport->asoc->rto_max); |
484 | } | 483 | } |
485 | } | 484 | } |
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 9a6cb22d129f..b827d21dbe54 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -74,7 +74,7 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer, | |||
74 | * given destination transport address, set RTO to the protocol | 74 | * given destination transport address, set RTO to the protocol |
75 | * parameter 'RTO.Initial'. | 75 | * parameter 'RTO.Initial'. |
76 | */ | 76 | */ |
77 | peer->last_rto = peer->rto = msecs_to_jiffies(sctp_rto_initial); | 77 | peer->rto = msecs_to_jiffies(sctp_rto_initial); |
78 | peer->rtt = 0; | 78 | peer->rtt = 0; |
79 | peer->rttvar = 0; | 79 | peer->rttvar = 0; |
80 | peer->srtt = 0; | 80 | peer->srtt = 0; |
@@ -385,7 +385,6 @@ void sctp_transport_update_rto(struct sctp_transport *tp, __u32 rtt) | |||
385 | tp->rto = tp->asoc->rto_max; | 385 | tp->rto = tp->asoc->rto_max; |
386 | 386 | ||
387 | tp->rtt = rtt; | 387 | tp->rtt = rtt; |
388 | tp->last_rto = tp->rto; | ||
389 | 388 | ||
390 | /* Reset rto_pending so that a new RTT measurement is started when a | 389 | /* Reset rto_pending so that a new RTT measurement is started when a |
391 | * new data chunk is sent. | 390 | * new data chunk is sent. |
@@ -637,7 +636,7 @@ void sctp_transport_reset(struct sctp_transport *t) | |||
637 | t->cwnd = min(4*asoc->pathmtu, max_t(__u32, 2*asoc->pathmtu, 4380)); | 636 | t->cwnd = min(4*asoc->pathmtu, max_t(__u32, 2*asoc->pathmtu, 4380)); |
638 | t->burst_limited = 0; | 637 | t->burst_limited = 0; |
639 | t->ssthresh = asoc->peer.i.a_rwnd; | 638 | t->ssthresh = asoc->peer.i.a_rwnd; |
640 | t->last_rto = t->rto = asoc->rto_initial; | 639 | t->rto = asoc->rto_initial; |
641 | t->rtt = 0; | 640 | t->rtt = 0; |
642 | t->srtt = 0; | 641 | t->srtt = 0; |
643 | t->rttvar = 0; | 642 | t->rttvar = 0; |