diff options
33 files changed, 127 insertions, 90 deletions
diff --git a/arch/ia64/include/asm/elf.h b/arch/ia64/include/asm/elf.h index e14108b19c09..4c41656ede87 100644 --- a/arch/ia64/include/asm/elf.h +++ b/arch/ia64/include/asm/elf.h | |||
| @@ -201,7 +201,9 @@ extern void ia64_elf_core_copy_regs (struct pt_regs *src, elf_gregset_t dst); | |||
| 201 | relevant until we have real hardware to play with... */ | 201 | relevant until we have real hardware to play with... */ |
| 202 | #define ELF_PLATFORM NULL | 202 | #define ELF_PLATFORM NULL |
| 203 | 203 | ||
| 204 | #define SET_PERSONALITY(ex) set_personality(PER_LINUX) | 204 | #define SET_PERSONALITY(ex) \ |
| 205 | set_personality((current->personality & ~PER_MASK) | PER_LINUX) | ||
| 206 | |||
| 205 | #define elf_read_implies_exec(ex, executable_stack) \ | 207 | #define elf_read_implies_exec(ex, executable_stack) \ |
| 206 | ((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0) | 208 | ((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0) |
| 207 | 209 | ||
diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h index 1994d3f58443..f2ad2163109d 100644 --- a/arch/x86/include/asm/elf.h +++ b/arch/x86/include/asm/elf.h | |||
| @@ -170,10 +170,7 @@ static inline void elf_common_init(struct thread_struct *t, | |||
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | #define ELF_PLAT_INIT(_r, load_addr) \ | 172 | #define ELF_PLAT_INIT(_r, load_addr) \ |
| 173 | do { \ | 173 | elf_common_init(¤t->thread, _r, 0) |
| 174 | elf_common_init(¤t->thread, _r, 0); \ | ||
| 175 | clear_thread_flag(TIF_IA32); \ | ||
| 176 | } while (0) | ||
| 177 | 174 | ||
| 178 | #define COMPAT_ELF_PLAT_INIT(regs, load_addr) \ | 175 | #define COMPAT_ELF_PLAT_INIT(regs, load_addr) \ |
| 179 | elf_common_init(¤t->thread, regs, __USER_DS) | 176 | elf_common_init(¤t->thread, regs, __USER_DS) |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 41a26a82470a..126f0b493d04 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
| @@ -527,6 +527,7 @@ void set_personality_ia32(void) | |||
| 527 | 527 | ||
| 528 | /* Make sure to be in 32bit mode */ | 528 | /* Make sure to be in 32bit mode */ |
| 529 | set_thread_flag(TIF_IA32); | 529 | set_thread_flag(TIF_IA32); |
| 530 | current->personality |= force_personality32; | ||
| 530 | 531 | ||
| 531 | /* Prepare the first "return" to user space */ | 532 | /* Prepare the first "return" to user space */ |
| 532 | current_thread_info()->status |= TS_COMPAT; | 533 | current_thread_info()->status |= TS_COMPAT; |
diff --git a/drivers/md/dm-log-userspace-transfer.c b/drivers/md/dm-log-userspace-transfer.c index 54abf9e303b7..f1c8cae70b4b 100644 --- a/drivers/md/dm-log-userspace-transfer.c +++ b/drivers/md/dm-log-userspace-transfer.c | |||
| @@ -172,11 +172,15 @@ int dm_consult_userspace(const char *uuid, uint64_t luid, int request_type, | |||
| 172 | { | 172 | { |
| 173 | int r = 0; | 173 | int r = 0; |
| 174 | size_t dummy = 0; | 174 | size_t dummy = 0; |
| 175 | int overhead_size = | 175 | int overhead_size = sizeof(struct dm_ulog_request) + sizeof(struct cn_msg); |
| 176 | sizeof(struct dm_ulog_request *) + sizeof(struct cn_msg); | ||
| 177 | struct dm_ulog_request *tfr = prealloced_ulog_tfr; | 176 | struct dm_ulog_request *tfr = prealloced_ulog_tfr; |
| 178 | struct receiving_pkg pkg; | 177 | struct receiving_pkg pkg; |
| 179 | 178 | ||
| 179 | /* | ||
| 180 | * Given the space needed to hold the 'struct cn_msg' and | ||
| 181 | * 'struct dm_ulog_request' - do we have enough payload | ||
| 182 | * space remaining? | ||
| 183 | */ | ||
| 180 | if (data_size > (DM_ULOG_PREALLOCED_SIZE - overhead_size)) { | 184 | if (data_size > (DM_ULOG_PREALLOCED_SIZE - overhead_size)) { |
| 181 | DMINFO("Size of tfr exceeds preallocated size"); | 185 | DMINFO("Size of tfr exceeds preallocated size"); |
| 182 | return -EINVAL; | 186 | return -EINVAL; |
| @@ -191,7 +195,7 @@ resend: | |||
| 191 | */ | 195 | */ |
| 192 | mutex_lock(&dm_ulog_lock); | 196 | mutex_lock(&dm_ulog_lock); |
| 193 | 197 | ||
| 194 | memset(tfr, 0, DM_ULOG_PREALLOCED_SIZE - overhead_size); | 198 | memset(tfr, 0, DM_ULOG_PREALLOCED_SIZE - sizeof(struct cn_msg)); |
| 195 | memcpy(tfr->uuid, uuid, DM_UUID_LEN); | 199 | memcpy(tfr->uuid, uuid, DM_UUID_LEN); |
| 196 | tfr->luid = luid; | 200 | tfr->luid = luid; |
| 197 | tfr->seq = dm_ulog_seq++; | 201 | tfr->seq = dm_ulog_seq++; |
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index ad779bd13aec..6c1046df81f6 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c | |||
| @@ -724,7 +724,7 @@ static void do_writes(struct mirror_set *ms, struct bio_list *writes) | |||
| 724 | /* | 724 | /* |
| 725 | * Dispatch io. | 725 | * Dispatch io. |
| 726 | */ | 726 | */ |
| 727 | if (unlikely(ms->log_failure)) { | 727 | if (unlikely(ms->log_failure) && errors_handled(ms)) { |
| 728 | spin_lock_irq(&ms->lock); | 728 | spin_lock_irq(&ms->lock); |
| 729 | bio_list_merge(&ms->failures, &sync); | 729 | bio_list_merge(&ms->failures, &sync); |
| 730 | spin_unlock_irq(&ms->lock); | 730 | spin_unlock_irq(&ms->lock); |
diff --git a/drivers/md/dm-region-hash.c b/drivers/md/dm-region-hash.c index 5f19ceb6fe91..168bd38f5006 100644 --- a/drivers/md/dm-region-hash.c +++ b/drivers/md/dm-region-hash.c | |||
| @@ -660,10 +660,9 @@ void dm_rh_recovery_end(struct dm_region *reg, int success) | |||
| 660 | spin_lock_irq(&rh->region_lock); | 660 | spin_lock_irq(&rh->region_lock); |
| 661 | if (success) | 661 | if (success) |
| 662 | list_add(®->list, ®->rh->recovered_regions); | 662 | list_add(®->list, ®->rh->recovered_regions); |
| 663 | else { | 663 | else |
| 664 | reg->state = DM_RH_NOSYNC; | ||
| 665 | list_add(®->list, ®->rh->failed_recovered_regions); | 664 | list_add(®->list, ®->rh->failed_recovered_regions); |
| 666 | } | 665 | |
| 667 | spin_unlock_irq(&rh->region_lock); | 666 | spin_unlock_irq(&rh->region_lock); |
| 668 | 667 | ||
| 669 | rh->wakeup_workers(rh->context); | 668 | rh->wakeup_workers(rh->context); |
diff --git a/drivers/md/dm-snap-persistent.c b/drivers/md/dm-snap-persistent.c index 7d08879689ac..c097d8a4823d 100644 --- a/drivers/md/dm-snap-persistent.c +++ b/drivers/md/dm-snap-persistent.c | |||
| @@ -254,7 +254,7 @@ static int chunk_io(struct pstore *ps, void *area, chunk_t chunk, int rw, | |||
| 254 | * Issue the synchronous I/O from a different thread | 254 | * Issue the synchronous I/O from a different thread |
| 255 | * to avoid generic_make_request recursion. | 255 | * to avoid generic_make_request recursion. |
| 256 | */ | 256 | */ |
| 257 | INIT_WORK(&req.work, do_metadata); | 257 | INIT_WORK_ON_STACK(&req.work, do_metadata); |
| 258 | queue_work(ps->metadata_wq, &req.work); | 258 | queue_work(ps->metadata_wq, &req.work); |
| 259 | flush_workqueue(ps->metadata_wq); | 259 | flush_workqueue(ps->metadata_wq); |
| 260 | 260 | ||
diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c index e0efc1adcaff..bd58703ee8f6 100644 --- a/drivers/md/dm-stripe.c +++ b/drivers/md/dm-stripe.c | |||
| @@ -110,7 +110,7 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | stripes = simple_strtoul(argv[0], &end, 10); | 112 | stripes = simple_strtoul(argv[0], &end, 10); |
| 113 | if (*end) { | 113 | if (!stripes || *end) { |
| 114 | ti->error = "Invalid stripe count"; | 114 | ti->error = "Invalid stripe count"; |
| 115 | return -EINVAL; | 115 | return -EINVAL; |
| 116 | } | 116 | } |
diff --git a/drivers/md/dm-sysfs.c b/drivers/md/dm-sysfs.c index f53392df7b97..f91b40942e07 100644 --- a/drivers/md/dm-sysfs.c +++ b/drivers/md/dm-sysfs.c | |||
| @@ -80,20 +80,12 @@ static struct sysfs_ops dm_sysfs_ops = { | |||
| 80 | }; | 80 | }; |
| 81 | 81 | ||
| 82 | /* | 82 | /* |
| 83 | * The sysfs structure is embedded in md struct, nothing to do here | ||
| 84 | */ | ||
| 85 | static void dm_sysfs_release(struct kobject *kobj) | ||
| 86 | { | ||
| 87 | } | ||
| 88 | |||
| 89 | /* | ||
| 90 | * dm kobject is embedded in mapped_device structure | 83 | * dm kobject is embedded in mapped_device structure |
| 91 | * no need to define release function here | 84 | * no need to define release function here |
| 92 | */ | 85 | */ |
| 93 | static struct kobj_type dm_ktype = { | 86 | static struct kobj_type dm_ktype = { |
| 94 | .sysfs_ops = &dm_sysfs_ops, | 87 | .sysfs_ops = &dm_sysfs_ops, |
| 95 | .default_attrs = dm_attrs, | 88 | .default_attrs = dm_attrs, |
| 96 | .release = dm_sysfs_release | ||
| 97 | }; | 89 | }; |
| 98 | 90 | ||
| 99 | /* | 91 | /* |
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 3167480b532c..aa4e2aa86d49 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
| @@ -1595,10 +1595,15 @@ static int dm_prep_fn(struct request_queue *q, struct request *rq) | |||
| 1595 | return BLKPREP_OK; | 1595 | return BLKPREP_OK; |
| 1596 | } | 1596 | } |
| 1597 | 1597 | ||
| 1598 | static void map_request(struct dm_target *ti, struct request *clone, | 1598 | /* |
| 1599 | struct mapped_device *md) | 1599 | * Returns: |
| 1600 | * 0 : the request has been processed (not requeued) | ||
| 1601 | * !0 : the request has been requeued | ||
| 1602 | */ | ||
| 1603 | static int map_request(struct dm_target *ti, struct request *clone, | ||
| 1604 | struct mapped_device *md) | ||
| 1600 | { | 1605 | { |
| 1601 | int r; | 1606 | int r, requeued = 0; |
| 1602 | struct dm_rq_target_io *tio = clone->end_io_data; | 1607 | struct dm_rq_target_io *tio = clone->end_io_data; |
| 1603 | 1608 | ||
| 1604 | /* | 1609 | /* |
| @@ -1625,6 +1630,7 @@ static void map_request(struct dm_target *ti, struct request *clone, | |||
| 1625 | case DM_MAPIO_REQUEUE: | 1630 | case DM_MAPIO_REQUEUE: |
| 1626 | /* The target wants to requeue the I/O */ | 1631 | /* The target wants to requeue the I/O */ |
| 1627 | dm_requeue_unmapped_request(clone); | 1632 | dm_requeue_unmapped_request(clone); |
| 1633 | requeued = 1; | ||
| 1628 | break; | 1634 | break; |
| 1629 | default: | 1635 | default: |
| 1630 | if (r > 0) { | 1636 | if (r > 0) { |
| @@ -1636,6 +1642,8 @@ static void map_request(struct dm_target *ti, struct request *clone, | |||
| 1636 | dm_kill_unmapped_request(clone, r); | 1642 | dm_kill_unmapped_request(clone, r); |
| 1637 | break; | 1643 | break; |
| 1638 | } | 1644 | } |
| 1645 | |||
| 1646 | return requeued; | ||
| 1639 | } | 1647 | } |
| 1640 | 1648 | ||
| 1641 | /* | 1649 | /* |
| @@ -1677,12 +1685,17 @@ static void dm_request_fn(struct request_queue *q) | |||
| 1677 | atomic_inc(&md->pending[rq_data_dir(clone)]); | 1685 | atomic_inc(&md->pending[rq_data_dir(clone)]); |
| 1678 | 1686 | ||
| 1679 | spin_unlock(q->queue_lock); | 1687 | spin_unlock(q->queue_lock); |
| 1680 | map_request(ti, clone, md); | 1688 | if (map_request(ti, clone, md)) |
| 1689 | goto requeued; | ||
| 1690 | |||
| 1681 | spin_lock_irq(q->queue_lock); | 1691 | spin_lock_irq(q->queue_lock); |
| 1682 | } | 1692 | } |
| 1683 | 1693 | ||
| 1684 | goto out; | 1694 | goto out; |
| 1685 | 1695 | ||
| 1696 | requeued: | ||
| 1697 | spin_lock_irq(q->queue_lock); | ||
| 1698 | |||
| 1686 | plug_and_out: | 1699 | plug_and_out: |
| 1687 | if (!elv_queue_empty(q)) | 1700 | if (!elv_queue_empty(q)) |
| 1688 | /* Some requests still remain, retry later */ | 1701 | /* Some requests still remain, retry later */ |
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index fee6eee7ae5b..006cb2efcd22 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c | |||
| @@ -296,6 +296,7 @@ static void be_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr, | |||
| 296 | req_hdr->opcode = opcode; | 296 | req_hdr->opcode = opcode; |
| 297 | req_hdr->subsystem = subsystem; | 297 | req_hdr->subsystem = subsystem; |
| 298 | req_hdr->request_length = cpu_to_le32(cmd_len - sizeof(*req_hdr)); | 298 | req_hdr->request_length = cpu_to_le32(cmd_len - sizeof(*req_hdr)); |
| 299 | req_hdr->version = 0; | ||
| 299 | } | 300 | } |
| 300 | 301 | ||
| 301 | static void be_cmd_page_addrs_prepare(struct phys_addr *pages, u32 max_pages, | 302 | static void be_cmd_page_addrs_prepare(struct phys_addr *pages, u32 max_pages, |
diff --git a/drivers/net/ixgbe/ixgbe_82598.c b/drivers/net/ixgbe/ixgbe_82598.c index 3103f4165311..35a06b47587b 100644 --- a/drivers/net/ixgbe/ixgbe_82598.c +++ b/drivers/net/ixgbe/ixgbe_82598.c | |||
| @@ -357,12 +357,34 @@ static s32 ixgbe_fc_enable_82598(struct ixgbe_hw *hw, s32 packetbuf_num) | |||
| 357 | u32 fctrl_reg; | 357 | u32 fctrl_reg; |
| 358 | u32 rmcs_reg; | 358 | u32 rmcs_reg; |
| 359 | u32 reg; | 359 | u32 reg; |
| 360 | u32 link_speed = 0; | ||
| 361 | bool link_up; | ||
| 360 | 362 | ||
| 361 | #ifdef CONFIG_DCB | 363 | #ifdef CONFIG_DCB |
| 362 | if (hw->fc.requested_mode == ixgbe_fc_pfc) | 364 | if (hw->fc.requested_mode == ixgbe_fc_pfc) |
| 363 | goto out; | 365 | goto out; |
| 364 | 366 | ||
| 365 | #endif /* CONFIG_DCB */ | 367 | #endif /* CONFIG_DCB */ |
| 368 | /* | ||
| 369 | * On 82598 having Rx FC on causes resets while doing 1G | ||
| 370 | * so if it's on turn it off once we know link_speed. For | ||
| 371 | * more details see 82598 Specification update. | ||
| 372 | */ | ||
| 373 | hw->mac.ops.check_link(hw, &link_speed, &link_up, false); | ||
| 374 | if (link_up && link_speed == IXGBE_LINK_SPEED_1GB_FULL) { | ||
| 375 | switch (hw->fc.requested_mode) { | ||
| 376 | case ixgbe_fc_full: | ||
| 377 | hw->fc.requested_mode = ixgbe_fc_tx_pause; | ||
| 378 | break; | ||
| 379 | case ixgbe_fc_rx_pause: | ||
| 380 | hw->fc.requested_mode = ixgbe_fc_none; | ||
| 381 | break; | ||
| 382 | default: | ||
| 383 | /* no change */ | ||
| 384 | break; | ||
| 385 | } | ||
| 386 | } | ||
| 387 | |||
| 366 | /* Negotiate the fc mode to use */ | 388 | /* Negotiate the fc mode to use */ |
| 367 | ret_val = ixgbe_fc_autoneg(hw); | 389 | ret_val = ixgbe_fc_autoneg(hw); |
| 368 | if (ret_val) | 390 | if (ret_val) |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 7b7c8486c0bf..951b73cf5ca2 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
| @@ -5763,6 +5763,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
| 5763 | if (err) | 5763 | if (err) |
| 5764 | goto err_sw_init; | 5764 | goto err_sw_init; |
| 5765 | 5765 | ||
| 5766 | /* Make it possible the adapter to be woken up via WOL */ | ||
| 5767 | if (adapter->hw.mac.type == ixgbe_mac_82599EB) | ||
| 5768 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0); | ||
| 5769 | |||
| 5766 | /* | 5770 | /* |
| 5767 | * If there is a fan on this device and it has failed log the | 5771 | * If there is a fan on this device and it has failed log the |
| 5768 | * failure. | 5772 | * failure. |
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c index 103e8b0e2a0d..46997e177ee3 100644 --- a/drivers/net/sfc/efx.c +++ b/drivers/net/sfc/efx.c | |||
| @@ -2284,6 +2284,7 @@ static int __devinit efx_pci_probe(struct pci_dev *pci_dev, | |||
| 2284 | fail2: | 2284 | fail2: |
| 2285 | efx_fini_struct(efx); | 2285 | efx_fini_struct(efx); |
| 2286 | fail1: | 2286 | fail1: |
| 2287 | WARN_ON(rc > 0); | ||
| 2287 | EFX_LOG(efx, "initialisation failed. rc=%d\n", rc); | 2288 | EFX_LOG(efx, "initialisation failed. rc=%d\n", rc); |
| 2288 | free_netdev(net_dev); | 2289 | free_netdev(net_dev); |
| 2289 | return rc; | 2290 | return rc; |
diff --git a/drivers/net/sfc/qt202x_phy.c b/drivers/net/sfc/qt202x_phy.c index e0d13a451019..67eec7a6e487 100644 --- a/drivers/net/sfc/qt202x_phy.c +++ b/drivers/net/sfc/qt202x_phy.c | |||
| @@ -320,7 +320,7 @@ static int qt202x_reset_phy(struct efx_nic *efx) | |||
| 320 | 320 | ||
| 321 | falcon_board(efx)->type->init_phy(efx); | 321 | falcon_board(efx)->type->init_phy(efx); |
| 322 | 322 | ||
| 323 | return rc; | 323 | return 0; |
| 324 | 324 | ||
| 325 | fail: | 325 | fail: |
| 326 | EFX_ERR(efx, "PHY reset timed out\n"); | 326 | EFX_ERR(efx, "PHY reset timed out\n"); |
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index c93f58f5c6f2..317aa34b21cf 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c | |||
| @@ -1877,13 +1877,12 @@ static void velocity_error(struct velocity_info *vptr, int status) | |||
| 1877 | /** | 1877 | /** |
| 1878 | * tx_srv - transmit interrupt service | 1878 | * tx_srv - transmit interrupt service |
| 1879 | * @vptr; Velocity | 1879 | * @vptr; Velocity |
| 1880 | * @status: | ||
| 1881 | * | 1880 | * |
| 1882 | * Scan the queues looking for transmitted packets that | 1881 | * Scan the queues looking for transmitted packets that |
| 1883 | * we can complete and clean up. Update any statistics as | 1882 | * we can complete and clean up. Update any statistics as |
| 1884 | * necessary/ | 1883 | * necessary/ |
| 1885 | */ | 1884 | */ |
| 1886 | static int velocity_tx_srv(struct velocity_info *vptr, u32 status) | 1885 | static int velocity_tx_srv(struct velocity_info *vptr) |
| 1887 | { | 1886 | { |
| 1888 | struct tx_desc *td; | 1887 | struct tx_desc *td; |
| 1889 | int qnum; | 1888 | int qnum; |
| @@ -2090,14 +2089,12 @@ static int velocity_receive_frame(struct velocity_info *vptr, int idx) | |||
| 2090 | /** | 2089 | /** |
| 2091 | * velocity_rx_srv - service RX interrupt | 2090 | * velocity_rx_srv - service RX interrupt |
| 2092 | * @vptr: velocity | 2091 | * @vptr: velocity |
| 2093 | * @status: adapter status (unused) | ||
| 2094 | * | 2092 | * |
| 2095 | * Walk the receive ring of the velocity adapter and remove | 2093 | * Walk the receive ring of the velocity adapter and remove |
| 2096 | * any received packets from the receive queue. Hand the ring | 2094 | * any received packets from the receive queue. Hand the ring |
| 2097 | * slots back to the adapter for reuse. | 2095 | * slots back to the adapter for reuse. |
| 2098 | */ | 2096 | */ |
| 2099 | static int velocity_rx_srv(struct velocity_info *vptr, int status, | 2097 | static int velocity_rx_srv(struct velocity_info *vptr, int budget_left) |
| 2100 | int budget_left) | ||
| 2101 | { | 2098 | { |
| 2102 | struct net_device_stats *stats = &vptr->dev->stats; | 2099 | struct net_device_stats *stats = &vptr->dev->stats; |
| 2103 | int rd_curr = vptr->rx.curr; | 2100 | int rd_curr = vptr->rx.curr; |
| @@ -2151,32 +2148,24 @@ static int velocity_poll(struct napi_struct *napi, int budget) | |||
| 2151 | struct velocity_info *vptr = container_of(napi, | 2148 | struct velocity_info *vptr = container_of(napi, |
| 2152 | struct velocity_info, napi); | 2149 | struct velocity_info, napi); |
| 2153 | unsigned int rx_done; | 2150 | unsigned int rx_done; |
| 2154 | u32 isr_status; | 2151 | unsigned long flags; |
| 2155 | |||
| 2156 | spin_lock(&vptr->lock); | ||
| 2157 | isr_status = mac_read_isr(vptr->mac_regs); | ||
| 2158 | |||
| 2159 | /* Ack the interrupt */ | ||
| 2160 | mac_write_isr(vptr->mac_regs, isr_status); | ||
| 2161 | if (isr_status & (~(ISR_PRXI | ISR_PPRXI | ISR_PTXI | ISR_PPTXI))) | ||
| 2162 | velocity_error(vptr, isr_status); | ||
| 2163 | 2152 | ||
| 2153 | spin_lock_irqsave(&vptr->lock, flags); | ||
| 2164 | /* | 2154 | /* |
| 2165 | * Do rx and tx twice for performance (taken from the VIA | 2155 | * Do rx and tx twice for performance (taken from the VIA |
| 2166 | * out-of-tree driver). | 2156 | * out-of-tree driver). |
| 2167 | */ | 2157 | */ |
| 2168 | rx_done = velocity_rx_srv(vptr, isr_status, budget / 2); | 2158 | rx_done = velocity_rx_srv(vptr, budget / 2); |
| 2169 | velocity_tx_srv(vptr, isr_status); | 2159 | velocity_tx_srv(vptr); |
| 2170 | rx_done += velocity_rx_srv(vptr, isr_status, budget - rx_done); | 2160 | rx_done += velocity_rx_srv(vptr, budget - rx_done); |
| 2171 | velocity_tx_srv(vptr, isr_status); | 2161 | velocity_tx_srv(vptr); |
| 2172 | |||
| 2173 | spin_unlock(&vptr->lock); | ||
| 2174 | 2162 | ||
| 2175 | /* If budget not fully consumed, exit the polling mode */ | 2163 | /* If budget not fully consumed, exit the polling mode */ |
| 2176 | if (rx_done < budget) { | 2164 | if (rx_done < budget) { |
| 2177 | napi_complete(napi); | 2165 | napi_complete(napi); |
| 2178 | mac_enable_int(vptr->mac_regs); | 2166 | mac_enable_int(vptr->mac_regs); |
| 2179 | } | 2167 | } |
| 2168 | spin_unlock_irqrestore(&vptr->lock, flags); | ||
| 2180 | 2169 | ||
| 2181 | return rx_done; | 2170 | return rx_done; |
| 2182 | } | 2171 | } |
| @@ -2206,10 +2195,17 @@ static irqreturn_t velocity_intr(int irq, void *dev_instance) | |||
| 2206 | return IRQ_NONE; | 2195 | return IRQ_NONE; |
| 2207 | } | 2196 | } |
| 2208 | 2197 | ||
| 2198 | /* Ack the interrupt */ | ||
| 2199 | mac_write_isr(vptr->mac_regs, isr_status); | ||
| 2200 | |||
| 2209 | if (likely(napi_schedule_prep(&vptr->napi))) { | 2201 | if (likely(napi_schedule_prep(&vptr->napi))) { |
| 2210 | mac_disable_int(vptr->mac_regs); | 2202 | mac_disable_int(vptr->mac_regs); |
| 2211 | __napi_schedule(&vptr->napi); | 2203 | __napi_schedule(&vptr->napi); |
| 2212 | } | 2204 | } |
| 2205 | |||
| 2206 | if (isr_status & (~(ISR_PRXI | ISR_PPRXI | ISR_PTXI | ISR_PPTXI))) | ||
| 2207 | velocity_error(vptr, isr_status); | ||
| 2208 | |||
| 2213 | spin_unlock(&vptr->lock); | 2209 | spin_unlock(&vptr->lock); |
| 2214 | 2210 | ||
| 2215 | return IRQ_HANDLED; | 2211 | return IRQ_HANDLED; |
| @@ -3100,7 +3096,7 @@ static int velocity_resume(struct pci_dev *pdev) | |||
| 3100 | velocity_init_registers(vptr, VELOCITY_INIT_WOL); | 3096 | velocity_init_registers(vptr, VELOCITY_INIT_WOL); |
| 3101 | mac_disable_int(vptr->mac_regs); | 3097 | mac_disable_int(vptr->mac_regs); |
| 3102 | 3098 | ||
| 3103 | velocity_tx_srv(vptr, 0); | 3099 | velocity_tx_srv(vptr); |
| 3104 | 3100 | ||
| 3105 | for (i = 0; i < vptr->tx.numq; i++) { | 3101 | for (i = 0; i < vptr->tx.numq; i++) { |
| 3106 | if (vptr->tx.used[i]) | 3102 | if (vptr->tx.used[i]) |
| @@ -3344,6 +3340,7 @@ static int velocity_set_coalesce(struct net_device *dev, | |||
| 3344 | { | 3340 | { |
| 3345 | struct velocity_info *vptr = netdev_priv(dev); | 3341 | struct velocity_info *vptr = netdev_priv(dev); |
| 3346 | int max_us = 0x3f * 64; | 3342 | int max_us = 0x3f * 64; |
| 3343 | unsigned long flags; | ||
| 3347 | 3344 | ||
| 3348 | /* 6 bits of */ | 3345 | /* 6 bits of */ |
| 3349 | if (ecmd->tx_coalesce_usecs > max_us) | 3346 | if (ecmd->tx_coalesce_usecs > max_us) |
| @@ -3365,6 +3362,7 @@ static int velocity_set_coalesce(struct net_device *dev, | |||
| 3365 | ecmd->tx_coalesce_usecs); | 3362 | ecmd->tx_coalesce_usecs); |
| 3366 | 3363 | ||
| 3367 | /* Setup the interrupt suppression and queue timers */ | 3364 | /* Setup the interrupt suppression and queue timers */ |
| 3365 | spin_lock_irqsave(&vptr->lock, flags); | ||
| 3368 | mac_disable_int(vptr->mac_regs); | 3366 | mac_disable_int(vptr->mac_regs); |
| 3369 | setup_adaptive_interrupts(vptr); | 3367 | setup_adaptive_interrupts(vptr); |
| 3370 | setup_queue_timers(vptr); | 3368 | setup_queue_timers(vptr); |
| @@ -3372,6 +3370,7 @@ static int velocity_set_coalesce(struct net_device *dev, | |||
| 3372 | mac_write_int_mask(vptr->int_mask, vptr->mac_regs); | 3370 | mac_write_int_mask(vptr->int_mask, vptr->mac_regs); |
| 3373 | mac_clear_isr(vptr->mac_regs); | 3371 | mac_clear_isr(vptr->mac_regs); |
| 3374 | mac_enable_int(vptr->mac_regs); | 3372 | mac_enable_int(vptr->mac_regs); |
| 3373 | spin_unlock_irqrestore(&vptr->lock, flags); | ||
| 3375 | 3374 | ||
| 3376 | return 0; | 3375 | return 0; |
| 3377 | } | 3376 | } |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index fa12b9060b0b..29bf33692f71 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
| @@ -1615,7 +1615,7 @@ static int ath_tx_setup_buffer(struct ieee80211_hw *hw, struct ath_buf *bf, | |||
| 1615 | bf->bf_frmlen -= padsize; | 1615 | bf->bf_frmlen -= padsize; |
| 1616 | } | 1616 | } |
| 1617 | 1617 | ||
| 1618 | if (conf_is_ht(&hw->conf) && !is_pae(skb)) | 1618 | if (conf_is_ht(&hw->conf)) |
| 1619 | bf->bf_state.bf_type |= BUF_HT; | 1619 | bf->bf_state.bf_type |= BUF_HT; |
| 1620 | 1620 | ||
| 1621 | bf->bf_flags = setup_tx_flags(sc, skb, txctl->txq); | 1621 | bf->bf_flags = setup_tx_flags(sc, skb, txctl->txq); |
| @@ -1701,7 +1701,7 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf, | |||
| 1701 | goto tx_done; | 1701 | goto tx_done; |
| 1702 | } | 1702 | } |
| 1703 | 1703 | ||
| 1704 | if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) { | 1704 | if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && !is_pae(skb)) { |
| 1705 | /* | 1705 | /* |
| 1706 | * Try aggregation if it's a unicast data frame | 1706 | * Try aggregation if it's a unicast data frame |
| 1707 | * and the destination is HT capable. | 1707 | * and the destination is HT capable. |
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index fe3bf9491997..c484cc253892 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h | |||
| @@ -115,6 +115,7 @@ | |||
| 115 | #define B43_MMIO_TSF_2 0x636 /* core rev < 3 only */ | 115 | #define B43_MMIO_TSF_2 0x636 /* core rev < 3 only */ |
| 116 | #define B43_MMIO_TSF_3 0x638 /* core rev < 3 only */ | 116 | #define B43_MMIO_TSF_3 0x638 /* core rev < 3 only */ |
| 117 | #define B43_MMIO_RNG 0x65A | 117 | #define B43_MMIO_RNG 0x65A |
| 118 | #define B43_MMIO_IFSSLOT 0x684 /* Interframe slot time */ | ||
| 118 | #define B43_MMIO_IFSCTL 0x688 /* Interframe space control */ | 119 | #define B43_MMIO_IFSCTL 0x688 /* Interframe space control */ |
| 119 | #define B43_MMIO_IFSCTL_USE_EDCF 0x0004 | 120 | #define B43_MMIO_IFSCTL_USE_EDCF 0x0004 |
| 120 | #define B43_MMIO_POWERUP_DELAY 0x6A8 | 121 | #define B43_MMIO_POWERUP_DELAY 0x6A8 |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 4c41cfe44f26..490fb45d1d05 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
| @@ -628,10 +628,17 @@ static void b43_upload_card_macaddress(struct b43_wldev *dev) | |||
| 628 | static void b43_set_slot_time(struct b43_wldev *dev, u16 slot_time) | 628 | static void b43_set_slot_time(struct b43_wldev *dev, u16 slot_time) |
| 629 | { | 629 | { |
| 630 | /* slot_time is in usec. */ | 630 | /* slot_time is in usec. */ |
| 631 | if (dev->phy.type != B43_PHYTYPE_G) | 631 | /* This test used to exit for all but a G PHY. */ |
| 632 | if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) | ||
| 632 | return; | 633 | return; |
| 633 | b43_write16(dev, 0x684, 510 + slot_time); | 634 | b43_write16(dev, B43_MMIO_IFSSLOT, 510 + slot_time); |
| 634 | b43_shm_write16(dev, B43_SHM_SHARED, 0x0010, slot_time); | 635 | /* Shared memory location 0x0010 is the slot time and should be |
| 636 | * set to slot_time; however, this register is initially 0 and changing | ||
| 637 | * the value adversely affects the transmit rate for BCM4311 | ||
| 638 | * devices. Until this behavior is unterstood, delete this step | ||
| 639 | * | ||
| 640 | * b43_shm_write16(dev, B43_SHM_SHARED, 0x0010, slot_time); | ||
| 641 | */ | ||
| 635 | } | 642 | } |
| 636 | 643 | ||
| 637 | static void b43_short_slot_timing_enable(struct b43_wldev *dev) | 644 | static void b43_short_slot_timing_enable(struct b43_wldev *dev) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 5461f105bd2d..d10bea64fce3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
| @@ -2744,6 +2744,7 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
| 2744 | if ((le16_to_cpu(priv->staging_rxon.channel) != ch)) | 2744 | if ((le16_to_cpu(priv->staging_rxon.channel) != ch)) |
| 2745 | priv->staging_rxon.flags = 0; | 2745 | priv->staging_rxon.flags = 0; |
| 2746 | 2746 | ||
| 2747 | iwl_set_rxon_ht(priv, ht_conf); | ||
| 2747 | iwl_set_rxon_channel(priv, conf->channel); | 2748 | iwl_set_rxon_channel(priv, conf->channel); |
| 2748 | 2749 | ||
| 2749 | iwl_set_flags_for_band(priv, conf->channel->band); | 2750 | iwl_set_flags_for_band(priv, conf->channel->band); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index 6f36b6e79f5e..2dbce85404aa 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c | |||
| @@ -928,7 +928,10 @@ static void iwl_pass_packet_to_mac80211(struct iwl_priv *priv, | |||
| 928 | if (ieee80211_is_mgmt(fc) || | 928 | if (ieee80211_is_mgmt(fc) || |
| 929 | ieee80211_has_protected(fc) || | 929 | ieee80211_has_protected(fc) || |
| 930 | ieee80211_has_morefrags(fc) || | 930 | ieee80211_has_morefrags(fc) || |
| 931 | le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG) | 931 | le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG || |
| 932 | (ieee80211_is_data_qos(fc) && | ||
| 933 | *ieee80211_get_qos_ctl(hdr) & | ||
| 934 | IEEE80211_QOS_CONTROL_A_MSDU_PRESENT)) | ||
| 932 | ret = skb_linearize(skb); | 935 | ret = skb_linearize(skb); |
| 933 | else | 936 | else |
| 934 | ret = __pskb_pull_tail(skb, min_t(u16, IWL_LINK_HDR_MAX, len)) ? | 937 | ret = __pskb_pull_tail(skb, min_t(u16, IWL_LINK_HDR_MAX, len)) ? |
diff --git a/drivers/net/wireless/iwmc3200wifi/rx.c b/drivers/net/wireless/iwmc3200wifi/rx.c index 6d6ed7485175..f727b4a83196 100644 --- a/drivers/net/wireless/iwmc3200wifi/rx.c +++ b/drivers/net/wireless/iwmc3200wifi/rx.c | |||
| @@ -794,7 +794,7 @@ static int iwm_mlme_update_bss_table(struct iwm_priv *iwm, u8 *buf, | |||
| 794 | } | 794 | } |
| 795 | 795 | ||
| 796 | bss->bss = kzalloc(bss_len, GFP_KERNEL); | 796 | bss->bss = kzalloc(bss_len, GFP_KERNEL); |
| 797 | if (!bss) { | 797 | if (!bss->bss) { |
| 798 | kfree(bss); | 798 | kfree(bss); |
| 799 | IWM_ERR(iwm, "Couldn't allocate bss\n"); | 799 | IWM_ERR(iwm, "Couldn't allocate bss\n"); |
| 800 | return -ENOMEM; | 800 | return -ENOMEM; |
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c index bc5726dd5fe4..7ba3052b0708 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c | |||
| @@ -65,6 +65,7 @@ static struct usb_device_id rtl8187_table[] __devinitdata = { | |||
| 65 | /* Sitecom */ | 65 | /* Sitecom */ |
| 66 | {USB_DEVICE(0x0df6, 0x000d), .driver_info = DEVICE_RTL8187}, | 66 | {USB_DEVICE(0x0df6, 0x000d), .driver_info = DEVICE_RTL8187}, |
| 67 | {USB_DEVICE(0x0df6, 0x0028), .driver_info = DEVICE_RTL8187B}, | 67 | {USB_DEVICE(0x0df6, 0x0028), .driver_info = DEVICE_RTL8187B}, |
| 68 | {USB_DEVICE(0x0df6, 0x0029), .driver_info = DEVICE_RTL8187B}, | ||
| 68 | /* Sphairon Access Systems GmbH */ | 69 | /* Sphairon Access Systems GmbH */ |
| 69 | {USB_DEVICE(0x114B, 0x0150), .driver_info = DEVICE_RTL8187}, | 70 | {USB_DEVICE(0x114B, 0x0150), .driver_info = DEVICE_RTL8187}, |
| 70 | /* Dick Smith Electronics */ | 71 | /* Dick Smith Electronics */ |
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index 5681ebed9c65..03dfd27c4bfb 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c | |||
| @@ -494,8 +494,7 @@ static int ssb_devices_register(struct ssb_bus *bus) | |||
| 494 | #endif | 494 | #endif |
| 495 | break; | 495 | break; |
| 496 | case SSB_BUSTYPE_SDIO: | 496 | case SSB_BUSTYPE_SDIO: |
| 497 | #ifdef CONFIG_SSB_SDIO | 497 | #ifdef CONFIG_SSB_SDIOHOST |
| 498 | sdev->irq = bus->host_sdio->dev.irq; | ||
| 499 | dev->parent = &bus->host_sdio->dev; | 498 | dev->parent = &bus->host_sdio->dev; |
| 500 | #endif | 499 | #endif |
| 501 | break; | 500 | break; |
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index d8aee584e8d1..236a9988ea91 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c | |||
| @@ -927,6 +927,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr) | |||
| 927 | case ETHTOOL_GPERMADDR: | 927 | case ETHTOOL_GPERMADDR: |
| 928 | case ETHTOOL_GUFO: | 928 | case ETHTOOL_GUFO: |
| 929 | case ETHTOOL_GGSO: | 929 | case ETHTOOL_GGSO: |
| 930 | case ETHTOOL_GGRO: | ||
| 930 | case ETHTOOL_GFLAGS: | 931 | case ETHTOOL_GFLAGS: |
| 931 | case ETHTOOL_GPFLAGS: | 932 | case ETHTOOL_GPFLAGS: |
| 932 | case ETHTOOL_GRXFH: | 933 | case ETHTOOL_GRXFH: |
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 76c08402c933..a42f658e756a 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
| @@ -946,7 +946,6 @@ int igmp_rcv(struct sk_buff *skb) | |||
| 946 | break; | 946 | break; |
| 947 | case IGMP_HOST_MEMBERSHIP_REPORT: | 947 | case IGMP_HOST_MEMBERSHIP_REPORT: |
| 948 | case IGMPV2_HOST_MEMBERSHIP_REPORT: | 948 | case IGMPV2_HOST_MEMBERSHIP_REPORT: |
| 949 | case IGMPV3_HOST_MEMBERSHIP_REPORT: | ||
| 950 | /* Is it our report looped back? */ | 949 | /* Is it our report looped back? */ |
| 951 | if (skb_rtable(skb)->fl.iif == 0) | 950 | if (skb_rtable(skb)->fl.iif == 0) |
| 952 | break; | 951 | break; |
| @@ -960,6 +959,7 @@ int igmp_rcv(struct sk_buff *skb) | |||
| 960 | in_dev_put(in_dev); | 959 | in_dev_put(in_dev); |
| 961 | return pim_rcv_v1(skb); | 960 | return pim_rcv_v1(skb); |
| 962 | #endif | 961 | #endif |
| 962 | case IGMPV3_HOST_MEMBERSHIP_REPORT: | ||
| 963 | case IGMP_DVMRP: | 963 | case IGMP_DVMRP: |
| 964 | case IGMP_TRACE: | 964 | case IGMP_TRACE: |
| 965 | case IGMP_HOST_LEAVE_MESSAGE: | 965 | case IGMP_HOST_LEAVE_MESSAGE: |
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c index 38fbf04150ae..544ce0876f12 100644 --- a/net/ipv4/ipcomp.c +++ b/net/ipv4/ipcomp.c | |||
| @@ -124,16 +124,12 @@ static int ipcomp4_init_state(struct xfrm_state *x) | |||
| 124 | if (x->props.mode == XFRM_MODE_TUNNEL) { | 124 | if (x->props.mode == XFRM_MODE_TUNNEL) { |
| 125 | err = ipcomp_tunnel_attach(x); | 125 | err = ipcomp_tunnel_attach(x); |
| 126 | if (err) | 126 | if (err) |
| 127 | goto error_tunnel; | 127 | goto out; |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | err = 0; | 130 | err = 0; |
| 131 | out: | 131 | out: |
| 132 | return err; | 132 | return err; |
| 133 | |||
| 134 | error_tunnel: | ||
| 135 | ipcomp_destroy(x); | ||
| 136 | goto out; | ||
| 137 | } | 133 | } |
| 138 | 134 | ||
| 139 | static const struct xfrm_type ipcomp_type = { | 135 | static const struct xfrm_type ipcomp_type = { |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 28e029632493..3fddc69ccccc 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
| @@ -5783,11 +5783,9 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | |||
| 5783 | 5783 | ||
| 5784 | /* tcp_ack considers this ACK as duplicate | 5784 | /* tcp_ack considers this ACK as duplicate |
| 5785 | * and does not calculate rtt. | 5785 | * and does not calculate rtt. |
| 5786 | * Fix it at least with timestamps. | 5786 | * Force it here. |
| 5787 | */ | 5787 | */ |
| 5788 | if (tp->rx_opt.saw_tstamp && | 5788 | tcp_ack_update_rtt(sk, 0, 0); |
| 5789 | tp->rx_opt.rcv_tsecr && !tp->srtt) | ||
| 5790 | tcp_ack_saw_tstamp(sk, 0); | ||
| 5791 | 5789 | ||
| 5792 | if (tp->rx_opt.tstamp_ok) | 5790 | if (tp->rx_opt.tstamp_ok) |
| 5793 | tp->advmss -= TCPOLEN_TSTAMP_ALIGNED; | 5791 | tp->advmss -= TCPOLEN_TSTAMP_ALIGNED; |
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index 2f2a5ca2c878..002e6eef9120 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c | |||
| @@ -154,16 +154,12 @@ static int ipcomp6_init_state(struct xfrm_state *x) | |||
| 154 | if (x->props.mode == XFRM_MODE_TUNNEL) { | 154 | if (x->props.mode == XFRM_MODE_TUNNEL) { |
| 155 | err = ipcomp6_tunnel_attach(x); | 155 | err = ipcomp6_tunnel_attach(x); |
| 156 | if (err) | 156 | if (err) |
| 157 | goto error_tunnel; | 157 | goto out; |
| 158 | } | 158 | } |
| 159 | 159 | ||
| 160 | err = 0; | 160 | err = 0; |
| 161 | out: | 161 | out: |
| 162 | return err; | 162 | return err; |
| 163 | error_tunnel: | ||
| 164 | ipcomp_destroy(x); | ||
| 165 | |||
| 166 | goto out; | ||
| 167 | } | 163 | } |
| 168 | 164 | ||
| 169 | static const struct xfrm_type ipcomp6_type = | 165 | static const struct xfrm_type ipcomp6_type = |
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 1f2db647bb5c..22f0c2aa7a89 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
| @@ -647,7 +647,7 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, | |||
| 647 | } | 647 | } |
| 648 | if (pos[1] != 0 && | 648 | if (pos[1] != 0 && |
| 649 | (pos[1] != ifibss->ssid_len || | 649 | (pos[1] != ifibss->ssid_len || |
| 650 | !memcmp(pos + 2, ifibss->ssid, ifibss->ssid_len))) { | 650 | memcmp(pos + 2, ifibss->ssid, ifibss->ssid_len))) { |
| 651 | /* Ignore ProbeReq for foreign SSID */ | 651 | /* Ignore ProbeReq for foreign SSID */ |
| 652 | return; | 652 | return; |
| 653 | } | 653 | } |
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index b9007f80cb92..12a2bff7dcdb 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c | |||
| @@ -245,6 +245,9 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata, | |||
| 245 | info->control.rates[i].count = 1; | 245 | info->control.rates[i].count = 1; |
| 246 | } | 246 | } |
| 247 | 247 | ||
| 248 | if (sdata->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) | ||
| 249 | return; | ||
| 250 | |||
| 248 | if (sta && sdata->force_unicast_rateidx > -1) { | 251 | if (sta && sdata->force_unicast_rateidx > -1) { |
| 249 | info->control.rates[0].idx = sdata->force_unicast_rateidx; | 252 | info->control.rates[0].idx = sdata->force_unicast_rateidx; |
| 250 | } else { | 253 | } else { |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index f934c9620b73..bc17cf7d68db 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
| @@ -439,6 +439,16 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, | |||
| 439 | if (local->scan_req) | 439 | if (local->scan_req) |
| 440 | return -EBUSY; | 440 | return -EBUSY; |
| 441 | 441 | ||
| 442 | if (req != local->int_scan_req && | ||
| 443 | sdata->vif.type == NL80211_IFTYPE_STATION && | ||
| 444 | !list_empty(&ifmgd->work_list)) { | ||
| 445 | /* actually wait for the work it's doing to finish/time out */ | ||
| 446 | set_bit(IEEE80211_STA_REQ_SCAN, &ifmgd->request); | ||
| 447 | local->scan_req = req; | ||
| 448 | local->scan_sdata = sdata; | ||
| 449 | return 0; | ||
| 450 | } | ||
| 451 | |||
| 442 | if (local->ops->hw_scan) { | 452 | if (local->ops->hw_scan) { |
| 443 | u8 *ies; | 453 | u8 *ies; |
| 444 | 454 | ||
| @@ -463,14 +473,6 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, | |||
| 463 | local->scan_req = req; | 473 | local->scan_req = req; |
| 464 | local->scan_sdata = sdata; | 474 | local->scan_sdata = sdata; |
| 465 | 475 | ||
| 466 | if (req != local->int_scan_req && | ||
| 467 | sdata->vif.type == NL80211_IFTYPE_STATION && | ||
| 468 | !list_empty(&ifmgd->work_list)) { | ||
| 469 | /* actually wait for the work it's doing to finish/time out */ | ||
| 470 | set_bit(IEEE80211_STA_REQ_SCAN, &ifmgd->request); | ||
| 471 | return 0; | ||
| 472 | } | ||
| 473 | |||
| 474 | if (local->ops->hw_scan) | 476 | if (local->ops->hw_scan) |
| 475 | __set_bit(SCAN_HW_SCANNING, &local->scanning); | 477 | __set_bit(SCAN_HW_SCANNING, &local->scanning); |
| 476 | else | 478 | else |
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index b36cc344474b..f445ea1c5f52 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c | |||
| @@ -1102,7 +1102,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig, int *errp) | |||
| 1102 | int err = -ENOMEM; | 1102 | int err = -ENOMEM; |
| 1103 | struct xfrm_state *x = xfrm_state_alloc(net); | 1103 | struct xfrm_state *x = xfrm_state_alloc(net); |
| 1104 | if (!x) | 1104 | if (!x) |
| 1105 | goto error; | 1105 | goto out; |
| 1106 | 1106 | ||
| 1107 | memcpy(&x->id, &orig->id, sizeof(x->id)); | 1107 | memcpy(&x->id, &orig->id, sizeof(x->id)); |
| 1108 | memcpy(&x->sel, &orig->sel, sizeof(x->sel)); | 1108 | memcpy(&x->sel, &orig->sel, sizeof(x->sel)); |
| @@ -1160,16 +1160,10 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig, int *errp) | |||
| 1160 | return x; | 1160 | return x; |
| 1161 | 1161 | ||
| 1162 | error: | 1162 | error: |
| 1163 | xfrm_state_put(x); | ||
| 1164 | out: | ||
| 1163 | if (errp) | 1165 | if (errp) |
| 1164 | *errp = err; | 1166 | *errp = err; |
| 1165 | if (x) { | ||
| 1166 | kfree(x->aalg); | ||
| 1167 | kfree(x->ealg); | ||
| 1168 | kfree(x->calg); | ||
| 1169 | kfree(x->encap); | ||
| 1170 | kfree(x->coaddr); | ||
| 1171 | } | ||
| 1172 | kfree(x); | ||
| 1173 | return NULL; | 1167 | return NULL; |
| 1174 | } | 1168 | } |
| 1175 | 1169 | ||
