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

Configure Feed

Select the types of activity you want to include in your feed.

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

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (42 commits)
net: Fix routing tables with id > 255 for legacy software
sky2: Hold RTNL while calling dev_close()
s2io iomem annotations
atl1: fix suspend regression
qeth: start dev queue after tx drop error
qeth: Prepare-function to call s390dbf was wrong
qeth: reduce number of kernel messages
qeth: Use ccw_device_get_id().
qeth: layer 3 Oops in ip event handler
virtio: use callback on empty in virtio_net
virtio: virtio_net free transmit skbs in a timer
virtio: Fix typo in virtio_net_hdr comments
virtio_net: Fix skb->csum_start computation
ehea: set mac address fix
sfc: Recover from RX queue flush failure
add missing lance_* exports
ixgbe: fix typo
forcedeth: msi interrupts
ipsec: pfkey should ignore events when no listeners
pppoe: Unshare skb before anything else
...

+360 -365
-1
drivers/atm/eni.h
··· 18 18 #include "midway.h" 19 19 20 20 21 - #define KERNEL_OFFSET 0xC0000000 /* kernel 0x0 is at phys 0xC0000000 */ 22 21 #define DEV_LABEL "eni" 23 22 24 23 #define UBR_BUFFER (128*1024) /* UBR buffer size */
-1
drivers/isdn/hardware/eicon/divasmain.c
··· 806 806 807 807 if (!create_divas_proc()) { 808 808 #ifdef MODULE 809 - remove_divas_proc(); 810 809 divas_unregister_chrdev(); 811 810 divasfunc_exit(); 812 811 #endif
+2 -2
drivers/isdn/hardware/eicon/divasproc.c
··· 125 125 126 126 int create_divas_proc(void) 127 127 { 128 - proc_create(divas_proc_name, S_IFREG | S_IRUGO, proc_net_eicon, 129 - &divas_fops); 128 + divas_proc_entry = proc_create(divas_proc_name, S_IFREG | S_IRUGO, 129 + proc_net_eicon, &divas_fops); 130 130 if (!divas_proc_entry) 131 131 return (0); 132 132
+7 -20
drivers/isdn/hysdn/hysdn_procconf.c
··· 207 207 /* read conf file -> output card info data */ 208 208 /*******************************************/ 209 209 static ssize_t 210 - hysdn_conf_read(struct file *file, char __user *buf, size_t count, loff_t * off) 210 + hysdn_conf_read(struct file *file, char __user *buf, size_t count, loff_t *off) 211 211 { 212 212 char *cp; 213 - int i; 214 213 215 - if (file->f_mode & FMODE_READ) { 216 - if (!(cp = file->private_data)) 217 - return (-EFAULT); /* should never happen */ 218 - i = strlen(cp); /* get total string length */ 219 - if (*off < i) { 220 - /* still bytes to transfer */ 221 - cp += *off; /* point to desired data offset */ 222 - i -= *off; /* remaining length */ 223 - if (i > count) 224 - i = count; /* limit length to transfer */ 225 - if (copy_to_user(buf, cp, i)) 226 - return (-EFAULT); /* copy error */ 227 - *off += i; /* adjust offset */ 228 - } else 229 - return (0); 230 - } else 231 - return (-EPERM); /* no permission to read */ 214 + if (!(file->f_mode & FMODE_READ)) 215 + return -EPERM; /* no permission to read */ 232 216 233 - return (i); 217 + if (!(cp = file->private_data)) 218 + return -EFAULT; /* should never happen */ 219 + 220 + return simple_read_from_buffer(buf, count, off, cp, strlen(cp)); 234 221 } /* hysdn_conf_read */ 235 222 236 223 /******************/
+5 -1
drivers/net/7990.c
··· 506 506 507 507 return res; 508 508 } 509 + EXPORT_SYMBOL_GPL(lance_open); 509 510 510 511 int lance_close (struct net_device *dev) 511 512 { ··· 522 521 523 522 return 0; 524 523 } 524 + EXPORT_SYMBOL_GPL(lance_close); 525 525 526 526 void lance_tx_timeout(struct net_device *dev) 527 527 { ··· 531 529 dev->trans_start = jiffies; 532 530 netif_wake_queue (dev); 533 531 } 534 - 532 + EXPORT_SYMBOL_GPL(lance_tx_timeout); 535 533 536 534 int lance_start_xmit (struct sk_buff *skb, struct net_device *dev) 537 535 { ··· 588 586 589 587 return 0; 590 588 } 589 + EXPORT_SYMBOL_GPL(lance_start_xmit); 591 590 592 591 /* taken from the depca driver via a2065.c */ 593 592 static void lance_load_multicast (struct net_device *dev) ··· 657 654 if (!stopped) 658 655 netif_start_queue (dev); 659 656 } 657 + EXPORT_SYMBOL_GPL(lance_set_multicast); 660 658 661 659 #ifdef CONFIG_NET_POLL_CONTROLLER 662 660 void lance_poll(struct net_device *dev)
-17
drivers/net/atlx/atl1.c
··· 637 637 } 638 638 639 639 /* 640 - * Force the PHY into power saving mode using vendor magic. 641 - */ 642 - #ifdef CONFIG_PM 643 - static void atl1_phy_enter_power_saving(struct atl1_hw *hw) 644 - { 645 - atl1_write_phy_reg(hw, MII_DBG_ADDR, 0); 646 - atl1_write_phy_reg(hw, MII_DBG_DATA, 0x124E); 647 - atl1_write_phy_reg(hw, MII_DBG_ADDR, 2); 648 - atl1_write_phy_reg(hw, MII_DBG_DATA, 0x3000); 649 - atl1_write_phy_reg(hw, MII_DBG_ADDR, 3); 650 - atl1_write_phy_reg(hw, MII_DBG_DATA, 0); 651 - 652 - } 653 - #endif 654 - 655 - /* 656 640 * Resets the PHY and make all config validate 657 641 * hw - Struct containing variables accessed by shared code 658 642 * ··· 2844 2860 ctrl |= PCIE_PHYMISC_FORCE_RCV_DET; 2845 2861 iowrite32(ctrl, hw->hw_addr + REG_PCIE_PHYMISC); 2846 2862 ioread32(hw->hw_addr + REG_PCIE_PHYMISC); 2847 - atl1_phy_enter_power_saving(hw); 2848 2863 hw->phy_configured = false; 2849 2864 pci_enable_wake(pdev, pci_choose_state(pdev, state), 0); 2850 2865 exit:
+10 -6
drivers/net/ehea/ehea_main.c
··· 1766 1766 mutex_lock(&ehea_bcmc_regs.lock); 1767 1767 1768 1768 /* Deregister old MAC in pHYP */ 1769 - ret = ehea_broadcast_reg_helper(port, H_DEREG_BCMC); 1770 - if (ret) 1771 - goto out_upregs; 1769 + if (port->state == EHEA_PORT_UP) { 1770 + ret = ehea_broadcast_reg_helper(port, H_DEREG_BCMC); 1771 + if (ret) 1772 + goto out_upregs; 1773 + } 1772 1774 1773 1775 port->mac_addr = cb0->port_mac_addr << 16; 1774 1776 1775 1777 /* Register new MAC in pHYP */ 1776 - ret = ehea_broadcast_reg_helper(port, H_REG_BCMC); 1777 - if (ret) 1778 - goto out_upregs; 1778 + if (port->state == EHEA_PORT_UP) { 1779 + ret = ehea_broadcast_reg_helper(port, H_REG_BCMC); 1780 + if (ret) 1781 + goto out_upregs; 1782 + } 1779 1783 1780 1784 ret = 0; 1781 1785
+20
drivers/net/forcedeth.c
··· 3273 3273 dprintk(KERN_DEBUG "%s: link change notification done.\n", dev->name); 3274 3274 } 3275 3275 3276 + static void nv_msi_workaround(struct fe_priv *np) 3277 + { 3278 + 3279 + /* Need to toggle the msi irq mask within the ethernet device, 3280 + * otherwise, future interrupts will not be detected. 3281 + */ 3282 + if (np->msi_flags & NV_MSI_ENABLED) { 3283 + u8 __iomem *base = np->base; 3284 + 3285 + writel(0, base + NvRegMSIIrqMask); 3286 + writel(NVREG_MSI_VECTOR_0_ENABLED, base + NvRegMSIIrqMask); 3287 + } 3288 + } 3289 + 3276 3290 static irqreturn_t nv_nic_irq(int foo, void *data) 3277 3291 { 3278 3292 struct net_device *dev = (struct net_device *) data; ··· 3308 3294 dprintk(KERN_DEBUG "%s: irq: %08x\n", dev->name, events); 3309 3295 if (!(events & np->irqmask)) 3310 3296 break; 3297 + 3298 + nv_msi_workaround(np); 3311 3299 3312 3300 spin_lock(&np->lock); 3313 3301 nv_tx_done(dev); ··· 3425 3409 dprintk(KERN_DEBUG "%s: irq: %08x\n", dev->name, events); 3426 3410 if (!(events & np->irqmask)) 3427 3411 break; 3412 + 3413 + nv_msi_workaround(np); 3428 3414 3429 3415 spin_lock(&np->lock); 3430 3416 nv_tx_done_optimized(dev, TX_WORK_PER_LOOP); ··· 3767 3749 dprintk(KERN_DEBUG "%s: irq: %08x\n", dev->name, events); 3768 3750 if (!(events & NVREG_IRQ_TIMER)) 3769 3751 return IRQ_RETVAL(0); 3752 + 3753 + nv_msi_workaround(np); 3770 3754 3771 3755 spin_lock(&np->lock); 3772 3756 np->intr_test = 1;
+1
drivers/net/irda/Kconfig
··· 329 329 config MCS_FIR 330 330 tristate "MosChip MCS7780 IrDA-USB dongle" 331 331 depends on IRDA && USB && EXPERIMENTAL 332 + select CRC32 332 333 help 333 334 Say Y or M here if you want to build support for the MosChip 334 335 MCS7780 IrDA-USB bridge device driver.
+2 -2
drivers/net/ixgbe/ixgbe_82598.c
··· 58 58 59 59 static s32 ixgbe_get_invariants_82598(struct ixgbe_hw *hw) 60 60 { 61 - hw->mac.num_rx_queues = IXGBE_82598_MAX_TX_QUEUES; 62 - hw->mac.num_tx_queues = IXGBE_82598_MAX_RX_QUEUES; 61 + hw->mac.num_rx_queues = IXGBE_82598_MAX_RX_QUEUES; 62 + hw->mac.num_tx_queues = IXGBE_82598_MAX_TX_QUEUES; 63 63 hw->mac.num_rx_addrs = IXGBE_82598_RAR_ENTRIES; 64 64 65 65 /* PHY ops are filled in by default properly for Fiber only */
+20 -17
drivers/net/pppoe.c
··· 341 341 struct pppox_sock *relay_po; 342 342 343 343 if (sk->sk_state & PPPOX_BOUND) { 344 - struct pppoe_hdr *ph = pppoe_hdr(skb); 345 - int len = ntohs(ph->length); 346 - skb_pull_rcsum(skb, sizeof(struct pppoe_hdr)); 347 - if (pskb_trim_rcsum(skb, len)) 348 - goto abort_kfree; 349 - 350 344 ppp_input(&po->chan, skb); 351 345 } else if (sk->sk_state & PPPOX_RELAY) { 352 346 relay_po = get_item_by_addr(&po->pppoe_relay); ··· 351 357 if ((sk_pppox(relay_po)->sk_state & PPPOX_CONNECTED) == 0) 352 358 goto abort_put; 353 359 354 - skb_pull(skb, sizeof(struct pppoe_hdr)); 355 360 if (!__pppoe_xmit(sk_pppox(relay_po), skb)) 356 361 goto abort_put; 357 362 } else { ··· 381 388 { 382 389 struct pppoe_hdr *ph; 383 390 struct pppox_sock *po; 391 + int len; 384 392 385 393 if (!(skb = skb_share_check(skb, GFP_ATOMIC))) 386 394 goto out; ··· 393 399 goto drop; 394 400 395 401 ph = pppoe_hdr(skb); 402 + len = ntohs(ph->length); 403 + 404 + skb_pull_rcsum(skb, sizeof(*ph)); 405 + if (skb->len < len) 406 + goto drop; 396 407 397 408 po = get_item(ph->sid, eth_hdr(skb)->h_source, dev->ifindex); 398 - if (po != NULL) 399 - return sk_receive_skb(sk_pppox(po), skb, 0); 409 + if (!po) 410 + goto drop; 411 + 412 + if (pskb_trim_rcsum(skb, len)) 413 + goto drop; 414 + 415 + return sk_receive_skb(sk_pppox(po), skb, 0); 416 + 400 417 drop: 401 418 kfree_skb(skb); 402 419 out: ··· 432 427 if (dev_net(dev) != &init_net) 433 428 goto abort; 434 429 435 - if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr))) 436 - goto abort; 437 - 438 430 if (!(skb = skb_share_check(skb, GFP_ATOMIC))) 439 431 goto out; 432 + 433 + if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr))) 434 + goto abort; 440 435 441 436 ph = pppoe_hdr(skb); 442 437 if (ph->code != PADT_CODE) ··· 942 937 m->msg_namelen = 0; 943 938 944 939 if (skb) { 945 - struct pppoe_hdr *ph = pppoe_hdr(skb); 946 - const int len = ntohs(ph->length); 947 - 948 - error = memcpy_toiovec(m->msg_iov, (unsigned char *) &ph->tag[0], len); 940 + total_len = min(total_len, skb->len); 941 + error = skb_copy_datagram_iovec(skb, 0, m->msg_iov, total_len); 949 942 if (error == 0) 950 - error = len; 943 + error = total_len; 951 944 } 952 945 953 946 kfree_skb(skb);
+12 -8
drivers/net/pppol2tp.c
··· 783 783 err = 0; 784 784 skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT, 785 785 flags & MSG_DONTWAIT, &err); 786 - if (skb) { 787 - err = memcpy_toiovec(msg->msg_iov, (unsigned char *) skb->data, 788 - skb->len); 789 - if (err < 0) 790 - goto do_skb_free; 791 - err = skb->len; 792 - } 793 - do_skb_free: 786 + if (!skb) 787 + goto end; 788 + 789 + if (len > skb->len) 790 + len = skb->len; 791 + else if (len < skb->len) 792 + msg->msg_flags |= MSG_TRUNC; 793 + 794 + err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, len); 795 + if (likely(err == 0)) 796 + err = len; 797 + 794 798 kfree_skb(skb); 795 799 end: 796 800 return err;
+3 -1
drivers/net/sfc/falcon.c
··· 733 733 continue; 734 734 break; 735 735 } 736 - if (rc) 736 + if (rc) { 737 737 EFX_ERR(efx, "failed to flush rx queue %d\n", rx_queue->queue); 738 + efx_schedule_reset(efx, RESET_TYPE_INVISIBLE); 739 + } 738 740 739 741 /* Remove RX descriptor ring from card */ 740 742 EFX_ZERO_OWORD(rx_desc_ptr);
+2
drivers/net/sky2.c
··· 4404 4404 if (err) { 4405 4405 printk(KERN_ERR PFX "%s: could not up: %d\n", 4406 4406 dev->name, err); 4407 + rtnl_lock(); 4407 4408 dev_close(dev); 4409 + rtnl_unlock(); 4408 4410 goto out; 4409 4411 } 4410 4412 }
+28 -5
drivers/net/tg3.c
··· 64 64 65 65 #define DRV_MODULE_NAME "tg3" 66 66 #define PFX DRV_MODULE_NAME ": " 67 - #define DRV_MODULE_VERSION "3.92" 68 - #define DRV_MODULE_RELDATE "May 2, 2008" 67 + #define DRV_MODULE_VERSION "3.92.1" 68 + #define DRV_MODULE_RELDATE "June 9, 2008" 69 69 70 70 #define TG3_DEF_MAC_MODE 0 71 71 #define TG3_DEF_RX_MODE 0 ··· 1295 1295 GRC_LCLCTRL_GPIO_OUTPUT0 | 1296 1296 GRC_LCLCTRL_GPIO_OUTPUT1), 1297 1297 100); 1298 + } else if (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5761) { 1299 + /* The 5761 non-e device swaps GPIO 0 and GPIO 2. */ 1300 + u32 grc_local_ctrl = GRC_LCLCTRL_GPIO_OE0 | 1301 + GRC_LCLCTRL_GPIO_OE1 | 1302 + GRC_LCLCTRL_GPIO_OE2 | 1303 + GRC_LCLCTRL_GPIO_OUTPUT0 | 1304 + GRC_LCLCTRL_GPIO_OUTPUT1 | 1305 + tp->grc_local_ctrl; 1306 + tw32_wait_f(GRC_LOCAL_CTRL, grc_local_ctrl, 100); 1307 + 1308 + grc_local_ctrl |= GRC_LCLCTRL_GPIO_OUTPUT2; 1309 + tw32_wait_f(GRC_LOCAL_CTRL, grc_local_ctrl, 100); 1310 + 1311 + grc_local_ctrl &= ~GRC_LCLCTRL_GPIO_OUTPUT0; 1312 + tw32_wait_f(GRC_LOCAL_CTRL, grc_local_ctrl, 100); 1298 1313 } else { 1299 1314 u32 no_gpio2; 1300 1315 u32 grc_local_ctrl = 0; ··· 3183 3168 err |= tg3_readphy(tp, MII_BMCR, &bmcr); 3184 3169 3185 3170 if ((tp->link_config.autoneg == AUTONEG_ENABLE) && !force_reset && 3186 - (tp->tg3_flags2 & TG3_FLG2_PARALLEL_DETECT) && 3187 - tp->link_config.flowctrl == tp->link_config.active_flowctrl) { 3171 + (tp->tg3_flags2 & TG3_FLG2_PARALLEL_DETECT)) { 3188 3172 /* do nothing, just check for link up at the end */ 3189 3173 } else if (tp->link_config.autoneg == AUTONEG_ENABLE) { 3190 3174 u32 adv, new_adv; ··· 8613 8599 (cmd->speed == SPEED_1000)) 8614 8600 return -EINVAL; 8615 8601 else if ((cmd->speed == SPEED_1000) && 8616 - (tp->tg3_flags2 & TG3_FLAG_10_100_ONLY)) 8602 + (tp->tg3_flags & TG3_FLAG_10_100_ONLY)) 8617 8603 return -EINVAL; 8618 8604 8619 8605 tg3_full_lock(tp, 0); ··· 11781 11767 11782 11768 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755) 11783 11769 tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_UART_SEL; 11770 + 11771 + if (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5761) { 11772 + /* Turn off the debug UART. */ 11773 + tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_UART_SEL; 11774 + if (tp->tg3_flags2 & TG3_FLG2_IS_NIC) 11775 + /* Keep VMain power. */ 11776 + tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE0 | 11777 + GRC_LCLCTRL_GPIO_OUTPUT0; 11778 + } 11784 11779 11785 11780 /* Force the chip into D0. */ 11786 11781 err = tg3_set_power_state(tp, PCI_D0);
+45 -7
drivers/net/virtio_net.c
··· 44 44 /* The skb we couldn't send because buffers were full. */ 45 45 struct sk_buff *last_xmit_skb; 46 46 47 + /* If we need to free in a timer, this is it. */ 48 + struct timer_list xmit_free_timer; 49 + 47 50 /* Number of input buffers, and max we've ever had. */ 48 51 unsigned int num, max; 49 52 50 53 /* For cleaning up after transmission. */ 51 54 struct tasklet_struct tasklet; 55 + bool free_in_tasklet; 52 56 53 57 /* Receive & send queues. */ 54 58 struct sk_buff_head recv; ··· 76 72 /* Suppress further interrupts. */ 77 73 svq->vq_ops->disable_cb(svq); 78 74 79 - /* We were waiting for more output buffers. */ 75 + /* We were probably waiting for more output buffers. */ 80 76 netif_wake_queue(vi->dev); 81 77 82 78 /* Make sure we re-xmit last_xmit_skb: if there are no more packets ··· 98 94 BUG_ON(len > MAX_PACKET_LEN); 99 95 100 96 skb_trim(skb, len); 101 - skb->protocol = eth_type_trans(skb, dev); 102 - pr_debug("Receiving skb proto 0x%04x len %i type %i\n", 103 - ntohs(skb->protocol), skb->len, skb->pkt_type); 97 + 104 98 dev->stats.rx_bytes += skb->len; 105 99 dev->stats.rx_packets++; 106 100 ··· 107 105 if (!skb_partial_csum_set(skb,hdr->csum_start,hdr->csum_offset)) 108 106 goto frame_err; 109 107 } 108 + 109 + skb->protocol = eth_type_trans(skb, dev); 110 + pr_debug("Receiving skb proto 0x%04x len %i type %i\n", 111 + ntohs(skb->protocol), skb->len, skb->pkt_type); 110 112 111 113 if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) { 112 114 pr_debug("GSO!\n"); ··· 244 238 } 245 239 } 246 240 241 + /* If the virtio transport doesn't always notify us when all in-flight packets 242 + * are consumed, we fall back to using this function on a timer to free them. */ 243 + static void xmit_free(unsigned long data) 244 + { 245 + struct virtnet_info *vi = (void *)data; 246 + 247 + netif_tx_lock(vi->dev); 248 + 249 + free_old_xmit_skbs(vi); 250 + 251 + if (!skb_queue_empty(&vi->send)) 252 + mod_timer(&vi->xmit_free_timer, jiffies + (HZ/10)); 253 + 254 + netif_tx_unlock(vi->dev); 255 + } 256 + 247 257 static int xmit_skb(struct virtnet_info *vi, struct sk_buff *skb) 248 258 { 249 - int num; 259 + int num, err; 250 260 struct scatterlist sg[2+MAX_SKB_FRAGS]; 251 261 struct virtio_net_hdr *hdr; 252 262 const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest; ··· 305 283 vnet_hdr_to_sg(sg, skb); 306 284 num = skb_to_sgvec(skb, sg+1, 0, skb->len) + 1; 307 285 308 - return vi->svq->vq_ops->add_buf(vi->svq, sg, num, 0, skb); 286 + err = vi->svq->vq_ops->add_buf(vi->svq, sg, num, 0, skb); 287 + if (!err && !vi->free_in_tasklet) 288 + mod_timer(&vi->xmit_free_timer, jiffies + (HZ/10)); 289 + 290 + return err; 309 291 } 310 292 311 293 static void xmit_tasklet(unsigned long data) ··· 321 295 vi->svq->vq_ops->kick(vi->svq); 322 296 vi->last_xmit_skb = NULL; 323 297 } 298 + if (vi->free_in_tasklet) 299 + free_old_xmit_skbs(vi); 324 300 netif_tx_unlock_bh(vi->dev); 325 301 } 326 302 ··· 463 435 vi->vdev = vdev; 464 436 vdev->priv = vi; 465 437 438 + /* If they give us a callback when all buffers are done, we don't need 439 + * the timer. */ 440 + vi->free_in_tasklet = virtio_has_feature(vdev,VIRTIO_F_NOTIFY_ON_EMPTY); 441 + 466 442 /* We expect two virtqueues, receive then send. */ 467 443 vi->rvq = vdev->config->find_vq(vdev, 0, skb_recv_done); 468 444 if (IS_ERR(vi->rvq)) { ··· 485 453 skb_queue_head_init(&vi->send); 486 454 487 455 tasklet_init(&vi->tasklet, xmit_tasklet, (unsigned long)vi); 456 + 457 + if (!vi->free_in_tasklet) 458 + setup_timer(&vi->xmit_free_timer, xmit_free, (unsigned long)vi); 488 459 489 460 err = register_netdev(dev); 490 461 if (err) { ··· 526 491 /* Stop all the virtqueues. */ 527 492 vdev->config->reset(vdev); 528 493 494 + if (!vi->free_in_tasklet) 495 + del_timer_sync(&vi->xmit_free_timer); 496 + 529 497 /* Free our skbs in send and recv queues, if any. */ 530 498 while ((skb = __skb_dequeue(&vi->recv)) != NULL) { 531 499 kfree_skb(skb); ··· 552 514 static unsigned int features[] = { 553 515 VIRTIO_NET_F_CSUM, VIRTIO_NET_F_GSO, VIRTIO_NET_F_MAC, 554 516 VIRTIO_NET_F_HOST_TSO4, VIRTIO_NET_F_HOST_UFO, VIRTIO_NET_F_HOST_TSO6, 555 - VIRTIO_NET_F_HOST_ECN, 517 + VIRTIO_NET_F_HOST_ECN, VIRTIO_F_NOTIFY_ON_EMPTY, 556 518 }; 557 519 558 520 static struct virtio_driver virtio_net = {
+82 -94
drivers/net/wireless/ipw2200.c
··· 1753 1753 1754 1754 if (priv->workqueue) { 1755 1755 cancel_delayed_work(&priv->request_scan); 1756 + cancel_delayed_work(&priv->request_direct_scan); 1757 + cancel_delayed_work(&priv->request_passive_scan); 1756 1758 cancel_delayed_work(&priv->scan_event); 1757 1759 } 1758 1760 queue_work(priv->workqueue, &priv->down); ··· 2007 2005 wake_up_interruptible(&priv->wait_command_queue); 2008 2006 priv->status &= ~(STATUS_ASSOCIATED | STATUS_ASSOCIATING); 2009 2007 cancel_delayed_work(&priv->request_scan); 2008 + cancel_delayed_work(&priv->request_direct_scan); 2009 + cancel_delayed_work(&priv->request_passive_scan); 2010 2010 cancel_delayed_work(&priv->scan_event); 2011 2011 schedule_work(&priv->link_down); 2012 2012 queue_delayed_work(priv->workqueue, &priv->rf_kill, 2 * HZ); ··· 4716 4712 priv->status &= ~STATUS_SCAN_FORCED; 4717 4713 #endif /* CONFIG_IPW2200_MONITOR */ 4718 4714 4715 + /* Do queued direct scans first */ 4716 + if (priv->status & STATUS_DIRECT_SCAN_PENDING) { 4717 + queue_delayed_work(priv->workqueue, 4718 + &priv->request_direct_scan, 0); 4719 + } 4720 + 4719 4721 if (!(priv->status & (STATUS_ASSOCIATED | 4720 4722 STATUS_ASSOCIATING | 4721 4723 STATUS_ROAMING | ··· 6277 6267 } 6278 6268 } 6279 6269 6280 - static int ipw_request_scan_helper(struct ipw_priv *priv, int type) 6270 + static int ipw_request_scan_helper(struct ipw_priv *priv, int type, int direct) 6281 6271 { 6282 6272 struct ipw_scan_request_ext scan; 6283 6273 int err = 0, scan_type; ··· 6288 6278 6289 6279 mutex_lock(&priv->mutex); 6290 6280 6281 + if (direct && (priv->direct_scan_ssid_len == 0)) { 6282 + IPW_DEBUG_HC("Direct scan requested but no SSID to scan for\n"); 6283 + priv->status &= ~STATUS_DIRECT_SCAN_PENDING; 6284 + goto done; 6285 + } 6286 + 6291 6287 if (priv->status & STATUS_SCANNING) { 6292 - IPW_DEBUG_HC("Concurrent scan requested. Ignoring.\n"); 6293 - priv->status |= STATUS_SCAN_PENDING; 6288 + IPW_DEBUG_HC("Concurrent scan requested. Queuing.\n"); 6289 + priv->status |= direct ? STATUS_DIRECT_SCAN_PENDING : 6290 + STATUS_SCAN_PENDING; 6294 6291 goto done; 6295 6292 } 6296 6293 6297 6294 if (!(priv->status & STATUS_SCAN_FORCED) && 6298 6295 priv->status & STATUS_SCAN_ABORTING) { 6299 6296 IPW_DEBUG_HC("Scan request while abort pending. Queuing.\n"); 6300 - priv->status |= STATUS_SCAN_PENDING; 6297 + priv->status |= direct ? STATUS_DIRECT_SCAN_PENDING : 6298 + STATUS_SCAN_PENDING; 6301 6299 goto done; 6302 6300 } 6303 6301 6304 6302 if (priv->status & STATUS_RF_KILL_MASK) { 6305 - IPW_DEBUG_HC("Aborting scan due to RF Kill activation\n"); 6306 - priv->status |= STATUS_SCAN_PENDING; 6303 + IPW_DEBUG_HC("Queuing scan due to RF Kill activation\n"); 6304 + priv->status |= direct ? STATUS_DIRECT_SCAN_PENDING : 6305 + STATUS_SCAN_PENDING; 6307 6306 goto done; 6308 6307 } 6309 6308 ··· 6340 6321 cpu_to_le16(20); 6341 6322 6342 6323 scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] = cpu_to_le16(120); 6324 + scan.dwell_time[IPW_SCAN_ACTIVE_DIRECT_SCAN] = cpu_to_le16(20); 6343 6325 6344 6326 #ifdef CONFIG_IPW2200_MONITOR 6345 6327 if (priv->ieee->iw_mode == IW_MODE_MONITOR) { ··· 6380 6360 cpu_to_le16(2000); 6381 6361 } else { 6382 6362 #endif /* CONFIG_IPW2200_MONITOR */ 6383 - /* If we are roaming, then make this a directed scan for the 6384 - * current network. Otherwise, ensure that every other scan 6385 - * is a fast channel hop scan */ 6386 - if ((priv->status & STATUS_ROAMING) 6387 - || (!(priv->status & STATUS_ASSOCIATED) 6388 - && (priv->config & CFG_STATIC_ESSID) 6389 - && (le32_to_cpu(scan.full_scan_index) % 2))) { 6363 + /* Honor direct scans first, otherwise if we are roaming make 6364 + * this a direct scan for the current network. Finally, 6365 + * ensure that every other scan is a fast channel hop scan */ 6366 + if (direct) { 6367 + err = ipw_send_ssid(priv, priv->direct_scan_ssid, 6368 + priv->direct_scan_ssid_len); 6369 + if (err) { 6370 + IPW_DEBUG_HC("Attempt to send SSID command " 6371 + "failed\n"); 6372 + goto done; 6373 + } 6374 + 6375 + scan_type = IPW_SCAN_ACTIVE_BROADCAST_AND_DIRECT_SCAN; 6376 + } else if ((priv->status & STATUS_ROAMING) 6377 + || (!(priv->status & STATUS_ASSOCIATED) 6378 + && (priv->config & CFG_STATIC_ESSID) 6379 + && (le32_to_cpu(scan.full_scan_index) % 2))) { 6390 6380 err = ipw_send_ssid(priv, priv->essid, priv->essid_len); 6391 6381 if (err) { 6392 6382 IPW_DEBUG_HC("Attempt to send SSID command " ··· 6421 6391 } 6422 6392 6423 6393 priv->status |= STATUS_SCANNING; 6424 - priv->status &= ~STATUS_SCAN_PENDING; 6394 + if (direct) { 6395 + priv->status &= ~STATUS_DIRECT_SCAN_PENDING; 6396 + priv->direct_scan_ssid_len = 0; 6397 + } else 6398 + priv->status &= ~STATUS_SCAN_PENDING; 6399 + 6425 6400 queue_delayed_work(priv->workqueue, &priv->scan_check, 6426 6401 IPW_SCAN_CHECK_WATCHDOG); 6427 6402 done: ··· 6437 6402 static void ipw_request_passive_scan(struct work_struct *work) 6438 6403 { 6439 6404 struct ipw_priv *priv = 6440 - container_of(work, struct ipw_priv, request_passive_scan); 6441 - ipw_request_scan_helper(priv, IW_SCAN_TYPE_PASSIVE); 6405 + container_of(work, struct ipw_priv, request_passive_scan.work); 6406 + ipw_request_scan_helper(priv, IW_SCAN_TYPE_PASSIVE, 0); 6442 6407 } 6443 6408 6444 6409 static void ipw_request_scan(struct work_struct *work) 6445 6410 { 6446 6411 struct ipw_priv *priv = 6447 6412 container_of(work, struct ipw_priv, request_scan.work); 6448 - ipw_request_scan_helper(priv, IW_SCAN_TYPE_ACTIVE); 6413 + ipw_request_scan_helper(priv, IW_SCAN_TYPE_ACTIVE, 0); 6414 + } 6415 + 6416 + static void ipw_request_direct_scan(struct work_struct *work) 6417 + { 6418 + struct ipw_priv *priv = 6419 + container_of(work, struct ipw_priv, request_direct_scan.work); 6420 + ipw_request_scan_helper(priv, IW_SCAN_TYPE_ACTIVE, 1); 6449 6421 } 6450 6422 6451 6423 static void ipw_bg_abort_scan(struct work_struct *work) ··· 9519 9477 return 0; 9520 9478 } 9521 9479 9522 - static int ipw_request_direct_scan(struct ipw_priv *priv, char *essid, 9523 - int essid_len) 9524 - { 9525 - struct ipw_scan_request_ext scan; 9526 - int err = 0, scan_type; 9527 - 9528 - if (!(priv->status & STATUS_INIT) || 9529 - (priv->status & STATUS_EXIT_PENDING)) 9530 - return 0; 9531 - 9532 - mutex_lock(&priv->mutex); 9533 - 9534 - if (priv->status & STATUS_RF_KILL_MASK) { 9535 - IPW_DEBUG_HC("Aborting scan due to RF kill activation\n"); 9536 - priv->status |= STATUS_SCAN_PENDING; 9537 - goto done; 9538 - } 9539 - 9540 - IPW_DEBUG_HC("starting request direct scan!\n"); 9541 - 9542 - if (priv->status & (STATUS_SCANNING | STATUS_SCAN_ABORTING)) { 9543 - /* We should not sleep here; otherwise we will block most 9544 - * of the system (for instance, we hold rtnl_lock when we 9545 - * get here). 9546 - */ 9547 - err = -EAGAIN; 9548 - goto done; 9549 - } 9550 - memset(&scan, 0, sizeof(scan)); 9551 - 9552 - if (priv->config & CFG_SPEED_SCAN) 9553 - scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_SCAN] = 9554 - cpu_to_le16(30); 9555 - else 9556 - scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_SCAN] = 9557 - cpu_to_le16(20); 9558 - 9559 - scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_AND_DIRECT_SCAN] = 9560 - cpu_to_le16(20); 9561 - scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] = cpu_to_le16(120); 9562 - scan.dwell_time[IPW_SCAN_ACTIVE_DIRECT_SCAN] = cpu_to_le16(20); 9563 - 9564 - scan.full_scan_index = cpu_to_le32(ieee80211_get_scans(priv->ieee)); 9565 - 9566 - err = ipw_send_ssid(priv, essid, essid_len); 9567 - if (err) { 9568 - IPW_DEBUG_HC("Attempt to send SSID command failed\n"); 9569 - goto done; 9570 - } 9571 - scan_type = IPW_SCAN_ACTIVE_BROADCAST_AND_DIRECT_SCAN; 9572 - 9573 - ipw_add_scan_channels(priv, &scan, scan_type); 9574 - 9575 - err = ipw_send_scan_request_ext(priv, &scan); 9576 - if (err) { 9577 - IPW_DEBUG_HC("Sending scan command failed: %08X\n", err); 9578 - goto done; 9579 - } 9580 - 9581 - priv->status |= STATUS_SCANNING; 9582 - 9583 - done: 9584 - mutex_unlock(&priv->mutex); 9585 - return err; 9586 - } 9587 - 9588 9480 static int ipw_wx_set_scan(struct net_device *dev, 9589 9481 struct iw_request_info *info, 9590 9482 union iwreq_data *wrqu, char *extra) 9591 9483 { 9592 9484 struct ipw_priv *priv = ieee80211_priv(dev); 9593 9485 struct iw_scan_req *req = (struct iw_scan_req *)extra; 9486 + struct delayed_work *work = NULL; 9594 9487 9595 9488 mutex_lock(&priv->mutex); 9489 + 9596 9490 priv->user_requested_scan = 1; 9597 - mutex_unlock(&priv->mutex); 9598 9491 9599 9492 if (wrqu->data.length == sizeof(struct iw_scan_req)) { 9600 9493 if (wrqu->data.flags & IW_SCAN_THIS_ESSID) { 9601 - ipw_request_direct_scan(priv, req->essid, 9602 - req->essid_len); 9603 - return 0; 9494 + int len = min((int)req->essid_len, 9495 + (int)sizeof(priv->direct_scan_ssid)); 9496 + memcpy(priv->direct_scan_ssid, req->essid, len); 9497 + priv->direct_scan_ssid_len = len; 9498 + work = &priv->request_direct_scan; 9499 + } else if (req->scan_type == IW_SCAN_TYPE_PASSIVE) { 9500 + work = &priv->request_passive_scan; 9604 9501 } 9605 - if (req->scan_type == IW_SCAN_TYPE_PASSIVE) { 9606 - queue_work(priv->workqueue, 9607 - &priv->request_passive_scan); 9608 - return 0; 9609 - } 9502 + } else { 9503 + /* Normal active broadcast scan */ 9504 + work = &priv->request_scan; 9610 9505 } 9506 + 9507 + mutex_unlock(&priv->mutex); 9611 9508 9612 9509 IPW_DEBUG_WX("Start scan\n"); 9613 9510 9614 - queue_delayed_work(priv->workqueue, &priv->request_scan, 0); 9511 + queue_delayed_work(priv->workqueue, work, 0); 9615 9512 9616 9513 return 0; 9617 9514 } ··· 10712 10731 } 10713 10732 10714 10733 cancel_delayed_work(&priv->request_scan); 10734 + cancel_delayed_work(&priv->request_direct_scan); 10735 + cancel_delayed_work(&priv->request_passive_scan); 10715 10736 cancel_delayed_work(&priv->scan_event); 10716 10737 ipw_reset_stats(priv); 10717 10738 /* Ensure the rate is updated immediately */ ··· 10744 10761 10745 10762 /* Cancel any queued work ... */ 10746 10763 cancel_delayed_work(&priv->request_scan); 10764 + cancel_delayed_work(&priv->request_direct_scan); 10765 + cancel_delayed_work(&priv->request_passive_scan); 10747 10766 cancel_delayed_work(&priv->adhoc_check); 10748 10767 cancel_delayed_work(&priv->gather_stats); 10749 10768 ··· 10785 10800 INIT_WORK(&priv->up, ipw_bg_up); 10786 10801 INIT_WORK(&priv->down, ipw_bg_down); 10787 10802 INIT_DELAYED_WORK(&priv->request_scan, ipw_request_scan); 10803 + INIT_DELAYED_WORK(&priv->request_direct_scan, ipw_request_direct_scan); 10804 + INIT_DELAYED_WORK(&priv->request_passive_scan, ipw_request_passive_scan); 10788 10805 INIT_DELAYED_WORK(&priv->scan_event, ipw_scan_event); 10789 - INIT_WORK(&priv->request_passive_scan, ipw_request_passive_scan); 10790 10806 INIT_DELAYED_WORK(&priv->gather_stats, ipw_bg_gather_stats); 10791 10807 INIT_WORK(&priv->abort_scan, ipw_bg_abort_scan); 10792 10808 INIT_WORK(&priv->roam, ipw_bg_roam); ··· 11821 11835 cancel_delayed_work(&priv->adhoc_check); 11822 11836 cancel_delayed_work(&priv->gather_stats); 11823 11837 cancel_delayed_work(&priv->request_scan); 11838 + cancel_delayed_work(&priv->request_direct_scan); 11839 + cancel_delayed_work(&priv->request_passive_scan); 11824 11840 cancel_delayed_work(&priv->scan_event); 11825 11841 cancel_delayed_work(&priv->rf_kill); 11826 11842 cancel_delayed_work(&priv->scan_check);
+5 -1
drivers/net/wireless/ipw2200.h
··· 1037 1037 #define STATUS_DISASSOC_PENDING (1<<12) 1038 1038 #define STATUS_STATE_PENDING (1<<13) 1039 1039 1040 + #define STATUS_DIRECT_SCAN_PENDING (1<<19) 1040 1041 #define STATUS_SCAN_PENDING (1<<20) 1041 1042 #define STATUS_SCANNING (1<<21) 1042 1043 #define STATUS_SCAN_ABORTING (1<<22) ··· 1293 1292 struct iw_public_data wireless_data; 1294 1293 1295 1294 int user_requested_scan; 1295 + u8 direct_scan_ssid[IW_ESSID_MAX_SIZE]; 1296 + u8 direct_scan_ssid_len; 1296 1297 1297 1298 struct workqueue_struct *workqueue; 1298 1299 ··· 1304 1301 struct work_struct system_config; 1305 1302 struct work_struct rx_replenish; 1306 1303 struct delayed_work request_scan; 1304 + struct delayed_work request_direct_scan; 1305 + struct delayed_work request_passive_scan; 1307 1306 struct delayed_work scan_event; 1308 - struct work_struct request_passive_scan; 1309 1307 struct work_struct adapter_restart; 1310 1308 struct delayed_work rf_kill; 1311 1309 struct work_struct up;
+3 -2
drivers/net/wireless/iwlwifi/iwl-3945-led.c
··· 229 229 led->led_dev.brightness_set = iwl3945_led_brightness_set; 230 230 led->led_dev.default_trigger = trigger; 231 231 232 + led->priv = priv; 233 + led->type = type; 234 + 232 235 ret = led_classdev_register(device, &led->led_dev); 233 236 if (ret) { 234 237 IWL_ERROR("Error: failed to register led handler.\n"); 235 238 return ret; 236 239 } 237 240 238 - led->priv = priv; 239 - led->type = type; 240 241 led->registered = 1; 241 242 242 243 if (set_led && led->led_on)
+4 -1
drivers/net/wireless/libertas/cmd.c
··· 1842 1842 1843 1843 spin_lock_irqsave(&priv->driver_lock, flags); 1844 1844 1845 + /* We don't get a response on the sleep-confirmation */ 1846 + priv->dnld_sent = DNLD_RES_RECEIVED; 1847 + 1845 1848 /* If nothing to do, go back to sleep (?) */ 1846 1849 if (!__kfifo_len(priv->event_fifo) && !priv->resp_len[priv->resp_idx]) 1847 1850 priv->psstate = PS_STATE_SLEEP; ··· 1907 1904 1908 1905 lbs_deb_enter(LBS_DEB_HOST); 1909 1906 1907 + spin_lock_irqsave(&priv->driver_lock, flags); 1910 1908 if (priv->dnld_sent) { 1911 1909 allowed = 0; 1912 1910 lbs_deb_host("dnld_sent was set\n"); 1913 1911 } 1914 1912 1915 - spin_lock_irqsave(&priv->driver_lock, flags); 1916 1913 /* In-progress command? */ 1917 1914 if (priv->cur_cmd) { 1918 1915 allowed = 0;
+1 -1
drivers/net/wireless/libertas/main.c
··· 732 732 lbs_deb_thread("4: currenttxskb %p, dnld_sent %d\n", 733 733 priv->currenttxskb, priv->dnld_sent); 734 734 735 - spin_lock_irq(&priv->driver_lock); 736 735 /* Process any pending command response */ 736 + spin_lock_irq(&priv->driver_lock); 737 737 resp_idx = priv->resp_idx; 738 738 if (priv->resp_len[resp_idx]) { 739 739 spin_unlock_irq(&priv->driver_lock);
+1 -1
drivers/net/wireless/zd1211rw/zd_mac.c
··· 719 719 fc = le16_to_cpu(*((__le16 *) buffer)); 720 720 721 721 is_qos = ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) && 722 - ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_QOS_DATA); 722 + (fc & IEEE80211_STYPE_QOS_DATA); 723 723 is_4addr = (fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) == 724 724 (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS); 725 725 need_padding = is_qos ^ is_4addr;
+15 -34
drivers/s390/net/qeth_core_main.c
··· 290 290 card->dev->features |= NETIF_F_TSO | NETIF_F_SG | 291 291 NETIF_F_HW_CSUM; 292 292 } else { 293 - PRINT_WARN("TSO not supported on %s. " 294 - "large_send set to 'no'.\n", 295 - card->dev->name); 296 293 card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG | 297 294 NETIF_F_HW_CSUM); 298 295 card->options.large_send = QETH_LARGE_SEND_NO; ··· 1404 1407 } 1405 1408 } 1406 1409 1407 - static inline __u16 qeth_raw_devno_from_bus_id(char *id) 1408 - { 1409 - id += (strlen(id) - 4); 1410 - return (__u16) simple_strtoul(id, &id, 16); 1411 - } 1412 - 1413 1410 static int qeth_idx_activate_get_answer(struct qeth_channel *channel, 1414 1411 void (*idx_reply_cb)(struct qeth_channel *, 1415 1412 struct qeth_cmd_buffer *)) ··· 1430 1439 spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); 1431 1440 1432 1441 if (rc) { 1433 - PRINT_ERR("Error2 in activating channel rc=%d\n", rc); 1442 + QETH_DBF_MESSAGE(2, "Error2 in activating channel rc=%d\n", rc); 1434 1443 QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc); 1435 1444 atomic_set(&channel->irq_pending, 0); 1436 1445 wake_up(&card->wait_q); ··· 1459 1468 __u16 temp; 1460 1469 __u8 tmp; 1461 1470 int rc; 1471 + struct ccw_dev_id temp_devid; 1462 1472 1463 1473 card = CARD_FROM_CDEV(channel->ccwdev); 1464 1474 ··· 1486 1494 &card->token.issuer_rm_w, QETH_MPC_TOKEN_LENGTH); 1487 1495 memcpy(QETH_IDX_ACT_FUNC_LEVEL(iob->data), 1488 1496 &card->info.func_level, sizeof(__u16)); 1489 - temp = qeth_raw_devno_from_bus_id(CARD_DDEV_ID(card)); 1490 - memcpy(QETH_IDX_ACT_QDIO_DEV_CUA(iob->data), &temp, 2); 1497 + ccw_device_get_id(CARD_DDEV(card), &temp_devid); 1498 + memcpy(QETH_IDX_ACT_QDIO_DEV_CUA(iob->data), &temp_devid.devno, 2); 1491 1499 temp = (card->info.cula << 8) + card->info.unit_addr2; 1492 1500 memcpy(QETH_IDX_ACT_QDIO_DEV_REALADDR(iob->data), &temp, 2); 1493 1501 ··· 1500 1508 spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); 1501 1509 1502 1510 if (rc) { 1503 - PRINT_ERR("Error1 in activating channel. rc=%d\n", rc); 1511 + QETH_DBF_MESSAGE(2, "Error1 in activating channel. rc=%d\n", 1512 + rc); 1504 1513 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); 1505 1514 atomic_set(&channel->irq_pending, 0); 1506 1515 wake_up(&card->wait_q); ··· 1651 1658 1652 1659 reply = qeth_alloc_reply(card); 1653 1660 if (!reply) { 1654 - PRINT_WARN("Could not alloc qeth_reply!\n"); 1655 1661 return -ENOMEM; 1656 1662 } 1657 1663 reply->callback = reply_cb; ··· 2604 2612 if (newcount < count) { 2605 2613 /* we are in memory shortage so we switch back to 2606 2614 traditional skb allocation and drop packages */ 2607 - if (!atomic_read(&card->force_alloc_skb) && 2608 - net_ratelimit()) 2609 - PRINT_WARN("Switch to alloc skb\n"); 2610 2615 atomic_set(&card->force_alloc_skb, 3); 2611 2616 count = newcount; 2612 2617 } else { 2613 - if ((atomic_read(&card->force_alloc_skb) == 1) && 2614 - net_ratelimit()) 2615 - PRINT_WARN("Switch to sg\n"); 2616 2618 atomic_add_unless(&card->force_alloc_skb, -1, 0); 2617 2619 } 2618 2620 ··· 3020 3034 elements_needed = 1 + (((((unsigned long) hdr) % PAGE_SIZE) 3021 3035 + skb->len) >> PAGE_SHIFT); 3022 3036 if ((elements_needed + elems) > QETH_MAX_BUFFER_ELEMENTS(card)) { 3023 - PRINT_ERR("Invalid size of IP packet " 3037 + QETH_DBF_MESSAGE(2, "Invalid size of IP packet " 3024 3038 "(Number=%d / Length=%d). Discarded.\n", 3025 3039 (elements_needed+elems), skb->len); 3026 3040 return 0; ··· 3233 3247 * free buffers) to handle eddp context */ 3234 3248 if (qeth_eddp_check_buffers_for_context(queue, ctx) 3235 3249 < 0) { 3236 - if (net_ratelimit()) 3237 - PRINT_WARN("eddp tx_dropped 1\n"); 3238 3250 rc = -EBUSY; 3239 3251 goto out; 3240 3252 } ··· 3244 3260 tmp = qeth_eddp_fill_buffer(queue, ctx, 3245 3261 queue->next_buf_to_fill); 3246 3262 if (tmp < 0) { 3247 - PRINT_ERR("eddp tx_dropped 2\n"); 3248 3263 rc = -EBUSY; 3249 3264 goto out; 3250 3265 } ··· 3585 3602 3586 3603 if ((!qeth_adp_supported(card, IPA_SETADP_SET_SNMP_CONTROL)) && 3587 3604 (!card->options.layer2)) { 3588 - PRINT_WARN("SNMP Query MIBS not supported " 3589 - "on %s!\n", QETH_CARD_IFNAME(card)); 3590 3605 return -EOPNOTSUPP; 3591 3606 } 3592 3607 /* skip 4 bytes (data_len struct member) to get req_len */ ··· 3615 3634 rc = qeth_send_ipa_snmp_cmd(card, iob, QETH_SETADP_BASE_LEN + req_len, 3616 3635 qeth_snmp_command_cb, (void *)&qinfo); 3617 3636 if (rc) 3618 - PRINT_WARN("SNMP command failed on %s: (0x%x)\n", 3637 + QETH_DBF_MESSAGE(2, "SNMP command failed on %s: (0x%x)\n", 3619 3638 QETH_CARD_IFNAME(card), rc); 3620 3639 else { 3621 3640 if (copy_to_user(udata, qinfo.udata, qinfo.udata_len)) ··· 3788 3807 if (mpno) 3789 3808 mpno = min(mpno - 1, QETH_MAX_PORTNO); 3790 3809 if (card->info.portno > mpno) { 3791 - PRINT_ERR("Device %s does not offer port number %d \n.", 3792 - CARD_BUS_ID(card), card->info.portno); 3810 + QETH_DBF_MESSAGE(2, "Device %s does not offer port number %d" 3811 + "\n.", CARD_BUS_ID(card), card->info.portno); 3793 3812 rc = -ENODEV; 3794 3813 goto out; 3795 3814 } ··· 3966 3985 return skb; 3967 3986 no_mem: 3968 3987 if (net_ratelimit()) { 3969 - PRINT_WARN("No memory for packet received on %s.\n", 3970 - QETH_CARD_IFNAME(card)); 3971 3988 QETH_DBF_TEXT(TRACE, 2, "noskbmem"); 3972 3989 QETH_DBF_TEXT_(TRACE, 2, "%s", CARD_BUS_ID(card)); 3973 3990 } ··· 3983 4004 } 3984 4005 } 3985 4006 3986 - void qeth_dbf_longtext(enum qeth_dbf_names dbf_nix, int level, char *text, ...) 4007 + void qeth_dbf_longtext(enum qeth_dbf_names dbf_nix, int level, char *fmt, ...) 3987 4008 { 3988 4009 char dbf_txt_buf[32]; 4010 + va_list args; 3989 4011 3990 4012 if (level > (qeth_dbf[dbf_nix].id)->level) 3991 4013 return; 3992 - snprintf(dbf_txt_buf, sizeof(dbf_txt_buf), text); 4014 + va_start(args, fmt); 4015 + vsnprintf(dbf_txt_buf, sizeof(dbf_txt_buf), fmt, args); 4016 + va_end(args); 3993 4017 debug_text_event(qeth_dbf[dbf_nix].id, level, dbf_txt_buf); 3994 - 3995 4018 } 3996 4019 EXPORT_SYMBOL_GPL(qeth_dbf_longtext); 3997 4020
+2 -4
drivers/s390/net/qeth_core_offl.c
··· 122 122 if (element == 0) 123 123 return -EBUSY; 124 124 else { 125 - PRINT_WARN("could only partially fill eddp " 126 - "buffer!\n"); 125 + QETH_DBF_MESSAGE(2, "could only partially fill" 126 + "eddp buffer!\n"); 127 127 goto out; 128 128 } 129 129 } ··· 143 143 if (must_refcnt) { 144 144 must_refcnt = 0; 145 145 if (qeth_eddp_buf_ref_context(buf, ctx)) { 146 - PRINT_WARN("no memory to create eddp context " 147 - "reference\n"); 148 146 goto out_check; 149 147 } 150 148 }
-12
drivers/s390/net/qeth_core_sys.c
··· 129 129 130 130 portno = simple_strtoul(buf, &tmp, 16); 131 131 if (portno > QETH_MAX_PORTNO) { 132 - PRINT_WARN("portno 0x%X is out of range\n", portno); 133 132 return -EINVAL; 134 133 } 135 134 ··· 222 223 * if though we have to permit priority queueing 223 224 */ 224 225 if (card->qdio.no_out_queues == 1) { 225 - PRINT_WARN("Priority queueing disabled due " 226 - "to hardware limitations!\n"); 227 226 card->qdio.do_prio_queueing = QETH_PRIOQ_DEFAULT; 228 227 return -EPERM; 229 228 } ··· 247 250 card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING; 248 251 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE; 249 252 } else { 250 - PRINT_WARN("Unknown queueing type '%s'\n", tmp); 251 253 return -EINVAL; 252 254 } 253 255 return count; ··· 287 291 ((cnt > QETH_IN_BUF_COUNT_MAX) ? QETH_IN_BUF_COUNT_MAX : cnt); 288 292 if (old_cnt != cnt) { 289 293 rc = qeth_realloc_buffer_pool(card, cnt); 290 - if (rc) 291 - PRINT_WARN("Error (%d) while setting " 292 - "buffer count.\n", rc); 293 294 } 294 295 return count; 295 296 } ··· 348 355 card->perf_stats.initial_rx_packets = card->stats.rx_packets; 349 356 card->perf_stats.initial_tx_packets = card->stats.tx_packets; 350 357 } else { 351 - PRINT_WARN("performance_stats: write 0 or 1 to this file!\n"); 352 358 return -EINVAL; 353 359 } 354 360 return count; ··· 391 399 newdis = QETH_DISCIPLINE_LAYER2; 392 400 break; 393 401 default: 394 - PRINT_WARN("layer2: write 0 or 1 to this file!\n"); 395 402 return -EINVAL; 396 403 } 397 404 ··· 454 463 } else if (!strcmp(tmp, "TSO")) { 455 464 type = QETH_LARGE_SEND_TSO; 456 465 } else { 457 - PRINT_WARN("large_send: invalid mode %s!\n", tmp); 458 466 return -EINVAL; 459 467 } 460 468 if (card->options.large_send == type) ··· 493 503 if (i <= max_value) { 494 504 *value = i; 495 505 } else { 496 - PRINT_WARN("blkt total time: write values between" 497 - " 0 and %d to this file!\n", max_value); 498 506 return -EINVAL; 499 507 } 500 508 return count;
+16 -25
drivers/s390/net/qeth_l2_main.c
··· 101 101 { 102 102 struct qeth_card *card; 103 103 struct net_device *ndev; 104 - unsigned char *readno; 105 - __u16 temp_dev_no, card_dev_no; 106 - char *endp; 104 + __u16 temp_dev_no; 107 105 unsigned long flags; 106 + struct ccw_dev_id read_devid; 108 107 109 108 ndev = NULL; 110 109 memcpy(&temp_dev_no, read_dev_no, 2); 111 110 read_lock_irqsave(&qeth_core_card_list.rwlock, flags); 112 111 list_for_each_entry(card, &qeth_core_card_list.list, list) { 113 - readno = CARD_RDEV_ID(card); 114 - readno += (strlen(readno) - 4); 115 - card_dev_no = simple_strtoul(readno, &endp, 16); 116 - if (card_dev_no == temp_dev_no) { 112 + ccw_device_get_id(CARD_RDEV(card), &read_devid); 113 + if (read_devid.devno == temp_dev_no) { 117 114 ndev = card->dev; 118 115 break; 119 116 } ··· 131 134 mac = &cmd->data.setdelmac.mac[0]; 132 135 /* MAC already registered, needed in couple/uncouple case */ 133 136 if (cmd->hdr.return_code == 0x2005) { 134 - PRINT_WARN("Group MAC %02x:%02x:%02x:%02x:%02x:%02x " \ 137 + QETH_DBF_MESSAGE(2, "Group MAC %02x:%02x:%02x:%02x:%02x:%02x " 135 138 "already existing on %s \n", 136 139 mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], 137 140 QETH_CARD_IFNAME(card)); 138 141 cmd->hdr.return_code = 0; 139 142 } 140 143 if (cmd->hdr.return_code) 141 - PRINT_ERR("Could not set group MAC " \ 144 + QETH_DBF_MESSAGE(2, "Could not set group MAC " 142 145 "%02x:%02x:%02x:%02x:%02x:%02x on %s: %x\n", 143 146 mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], 144 147 QETH_CARD_IFNAME(card), cmd->hdr.return_code); ··· 163 166 cmd = (struct qeth_ipa_cmd *) data; 164 167 mac = &cmd->data.setdelmac.mac[0]; 165 168 if (cmd->hdr.return_code) 166 - PRINT_ERR("Could not delete group MAC " \ 169 + QETH_DBF_MESSAGE(2, "Could not delete group MAC " 167 170 "%02x:%02x:%02x:%02x:%02x:%02x on %s: %x\n", 168 171 mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], 169 172 QETH_CARD_IFNAME(card), cmd->hdr.return_code); ··· 183 186 184 187 mc = kmalloc(sizeof(struct qeth_mc_mac), GFP_ATOMIC); 185 188 186 - if (!mc) { 187 - PRINT_ERR("no mem vor mc mac address\n"); 189 + if (!mc) 188 190 return; 189 - } 190 191 191 192 memcpy(mc->mc_addr, mac, OSA_ADDR_LEN); 192 193 mc->mc_addrlen = OSA_ADDR_LEN; ··· 275 280 QETH_DBF_TEXT(TRACE, 2, "L2sdvcb"); 276 281 cmd = (struct qeth_ipa_cmd *) data; 277 282 if (cmd->hdr.return_code) { 278 - PRINT_ERR("Error in processing VLAN %i on %s: 0x%x. " 283 + QETH_DBF_MESSAGE(2, "Error in processing VLAN %i on %s: 0x%x. " 279 284 "Continuing\n", cmd->data.setdelvlan.vlan_id, 280 285 QETH_CARD_IFNAME(card), cmd->hdr.return_code); 281 286 QETH_DBF_TEXT_(TRACE, 2, "L2VL%4x", cmd->hdr.command); ··· 328 333 spin_lock_bh(&card->vlanlock); 329 334 list_add_tail(&id->list, &card->vid_list); 330 335 spin_unlock_bh(&card->vlanlock); 331 - } else { 332 - PRINT_ERR("no memory for vid\n"); 333 336 } 334 337 } 335 338 ··· 543 550 544 551 rc = qeth_query_setadapterparms(card); 545 552 if (rc) { 546 - PRINT_WARN("could not query adapter parameters on device %s: " 547 - "x%x\n", CARD_BUS_ID(card), rc); 553 + QETH_DBF_MESSAGE(2, "could not query adapter parameters on " 554 + "device %s: x%x\n", CARD_BUS_ID(card), rc); 548 555 } 549 556 550 557 if (card->info.guestlan) { 551 558 rc = qeth_setadpparms_change_macaddr(card); 552 559 if (rc) { 553 - PRINT_WARN("couldn't get MAC address on " 554 - "device %s: x%x\n", 555 - CARD_BUS_ID(card), rc); 560 + QETH_DBF_MESSAGE(2, "couldn't get MAC address on " 561 + "device %s: x%x\n", CARD_BUS_ID(card), rc); 556 562 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); 557 563 return rc; 558 564 } ··· 577 585 } 578 586 579 587 if (card->info.type == QETH_CARD_TYPE_OSN) { 580 - PRINT_WARN("Setting MAC address on %s is not supported.\n", 581 - dev->name); 582 588 QETH_DBF_TEXT(TRACE, 3, "setmcOSN"); 583 589 return -EOPNOTSUPP; 584 590 } ··· 656 666 ctx = qeth_eddp_create_context(card, new_skb, hdr, 657 667 skb->sk->sk_protocol); 658 668 if (ctx == NULL) { 659 - PRINT_WARN("could not create eddp context\n"); 669 + QETH_DBF_MESSAGE(2, "could not create eddp context\n"); 660 670 goto tx_drop; 661 671 } 662 672 } else { ··· 721 731 if ((new_skb != skb) && new_skb) 722 732 dev_kfree_skb_any(new_skb); 723 733 dev_kfree_skb_any(skb); 734 + netif_wake_queue(dev); 724 735 return NETDEV_TX_OK; 725 736 } 726 737 ··· 1146 1155 (addr_t) iob, 0, 0); 1147 1156 spin_unlock_irqrestore(get_ccwdev_lock(card->write.ccwdev), flags); 1148 1157 if (rc) { 1149 - PRINT_WARN("qeth_osn_send_control_data: " 1158 + QETH_DBF_MESSAGE(2, "qeth_osn_send_control_data: " 1150 1159 "ccw_device_start rc = %i\n", rc); 1151 1160 QETH_DBF_TEXT_(TRACE, 2, " err%d", rc); 1152 1161 qeth_release_buffer(iob->channel, iob);
+24 -51
drivers/s390/net/qeth_l3_main.c
··· 311 311 312 312 addr = kzalloc(sizeof(struct qeth_ipaddr), GFP_ATOMIC); 313 313 if (addr == NULL) { 314 - PRINT_WARN("Not enough memory to add address\n"); 315 314 return NULL; 316 315 } 317 316 addr->type = QETH_IP_TYPE_NORMAL; ··· 648 649 } 649 650 } 650 651 out_inval: 651 - PRINT_WARN("Routing type '%s' not supported for interface %s.\n" 652 - "Router status set to 'no router'.\n", 653 - ((*type == PRIMARY_ROUTER)? "primary router" : 654 - (*type == SECONDARY_ROUTER)? "secondary router" : 655 - (*type == PRIMARY_CONNECTOR)? "primary connector" : 656 - (*type == SECONDARY_CONNECTOR)? "secondary connector" : 657 - (*type == MULTICAST_ROUTER)? "multicast router" : 658 - "unknown"), 659 - card->dev->name); 660 652 *type = NO_ROUTER; 661 653 } 662 654 ··· 664 674 QETH_PROT_IPV4); 665 675 if (rc) { 666 676 card->options.route4.type = NO_ROUTER; 667 - PRINT_WARN("Error (0x%04x) while setting routing type on %s. " 668 - "Type set to 'no router'.\n", 669 - rc, QETH_CARD_IFNAME(card)); 677 + QETH_DBF_MESSAGE(2, "Error (0x%04x) while setting routing type" 678 + " on %s. Type set to 'no router'.\n", rc, 679 + QETH_CARD_IFNAME(card)); 670 680 } 671 681 return rc; 672 682 } ··· 687 697 QETH_PROT_IPV6); 688 698 if (rc) { 689 699 card->options.route6.type = NO_ROUTER; 690 - PRINT_WARN("Error (0x%04x) while setting routing type on %s. " 691 - "Type set to 'no router'.\n", 692 - rc, QETH_CARD_IFNAME(card)); 700 + QETH_DBF_MESSAGE(2, "Error (0x%04x) while setting routing type" 701 + " on %s. Type set to 'no router'.\n", rc, 702 + QETH_CARD_IFNAME(card)); 693 703 } 694 704 #endif 695 705 return rc; ··· 727 737 if (!memcmp(ipatoe->addr, new->addr, 728 738 (ipatoe->proto == QETH_PROT_IPV4)? 4:16) && 729 739 (ipatoe->mask_bits == new->mask_bits)) { 730 - PRINT_WARN("ipato entry already exists!\n"); 731 740 rc = -EEXIST; 732 741 break; 733 742 } ··· 791 802 rc = -EEXIST; 792 803 spin_unlock_irqrestore(&card->ip_lock, flags); 793 804 if (rc) { 794 - PRINT_WARN("Cannot add VIPA. Address already exists!\n"); 795 805 return rc; 796 806 } 797 807 if (!qeth_l3_add_ip(card, ipaddr)) ··· 855 867 rc = -EEXIST; 856 868 spin_unlock_irqrestore(&card->ip_lock, flags); 857 869 if (rc) { 858 - PRINT_WARN("Cannot add RXIP. Address already exists!\n"); 859 870 return rc; 860 871 } 861 872 if (!qeth_l3_add_ip(card, ipaddr)) ··· 1007 1020 IPA_SETADP_SET_BROADCAST_MODE, 1008 1021 card->options.broadcast_mode); 1009 1022 if (rc) 1010 - PRINT_WARN("couldn't set broadcast mode on " 1023 + QETH_DBF_MESSAGE(2, "couldn't set broadcast mode on " 1011 1024 "device %s: x%x\n", 1012 1025 CARD_BUS_ID(card), rc); 1013 1026 rc = qeth_l3_send_setadp_mode(card, 1014 1027 IPA_SETADP_ALTER_MAC_ADDRESS, 1015 1028 card->options.macaddr_mode); 1016 1029 if (rc) 1017 - PRINT_WARN("couldn't set macaddr mode on " 1030 + QETH_DBF_MESSAGE(2, "couldn't set macaddr mode on " 1018 1031 "device %s: x%x\n", CARD_BUS_ID(card), rc); 1019 1032 return rc; 1020 1033 } 1021 1034 if (card->options.broadcast_mode == QETH_TR_BROADCAST_LOCAL) 1022 - PRINT_WARN("set adapter parameters not available " 1035 + QETH_DBF_MESSAGE(2, "set adapter parameters not available " 1023 1036 "to set broadcast mode, using ALLRINGS " 1024 1037 "on device %s:\n", CARD_BUS_ID(card)); 1025 1038 if (card->options.macaddr_mode == QETH_TR_MACADDR_CANONICAL) 1026 - PRINT_WARN("set adapter parameters not available " 1039 + QETH_DBF_MESSAGE(2, "set adapter parameters not available " 1027 1040 "to set macaddr mode, using NONCANONICAL " 1028 1041 "on device %s:\n", CARD_BUS_ID(card)); 1029 1042 return 0; ··· 2057 2070 card = netdev_priv(dev); 2058 2071 else if (rc == QETH_VLAN_CARD) 2059 2072 card = netdev_priv(vlan_dev_info(dev)->real_dev); 2060 - if (card->options.layer2) 2073 + if (card && card->options.layer2) 2061 2074 card = NULL; 2062 2075 QETH_DBF_TEXT_(TRACE, 4, "%d", rc); 2063 2076 return card ; ··· 2169 2182 if (card->info.guestlan) 2170 2183 return -EOPNOTSUPP; 2171 2184 if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { 2172 - PRINT_WARN("ARP processing not supported " 2173 - "on %s!\n", QETH_CARD_IFNAME(card)); 2174 2185 return -EOPNOTSUPP; 2175 2186 } 2176 2187 rc = qeth_l3_send_simple_setassparms(card, IPA_ARP_PROCESSING, ··· 2176 2191 no_entries); 2177 2192 if (rc) { 2178 2193 tmp = rc; 2179 - PRINT_WARN("Could not set number of ARP entries on %s: " 2180 - "%s (0x%x/%d)\n", QETH_CARD_IFNAME(card), 2194 + QETH_DBF_MESSAGE(2, "Could not set number of ARP entries on " 2195 + "%s: %s (0x%x/%d)\n", QETH_CARD_IFNAME(card), 2181 2196 qeth_l3_arp_get_error_cause(&rc), tmp, tmp); 2182 2197 } 2183 2198 return rc; ··· 2245 2260 qdata->no_entries * uentry_size){ 2246 2261 QETH_DBF_TEXT_(TRACE, 4, "qaer3%i", -ENOMEM); 2247 2262 cmd->hdr.return_code = -ENOMEM; 2248 - PRINT_WARN("query ARP user space buffer is too small for " 2249 - "the returned number of ARP entries. " 2250 - "Aborting query!\n"); 2251 2263 goto out_error; 2252 2264 } 2253 2265 QETH_DBF_TEXT_(TRACE, 4, "anore%i", ··· 2306 2324 2307 2325 if (!qeth_is_supported(card,/*IPA_QUERY_ARP_ADDR_INFO*/ 2308 2326 IPA_ARP_PROCESSING)) { 2309 - PRINT_WARN("ARP processing not supported " 2310 - "on %s!\n", QETH_CARD_IFNAME(card)); 2311 2327 return -EOPNOTSUPP; 2312 2328 } 2313 2329 /* get size of userspace buffer and mask_bits -> 6 bytes */ ··· 2324 2344 qeth_l3_arp_query_cb, (void *)&qinfo); 2325 2345 if (rc) { 2326 2346 tmp = rc; 2327 - PRINT_WARN("Error while querying ARP cache on %s: %s " 2347 + QETH_DBF_MESSAGE(2, "Error while querying ARP cache on %s: %s " 2328 2348 "(0x%x/%d)\n", QETH_CARD_IFNAME(card), 2329 2349 qeth_l3_arp_get_error_cause(&rc), tmp, tmp); 2330 2350 if (copy_to_user(udata, qinfo.udata, 4)) ··· 2355 2375 if (card->info.guestlan) 2356 2376 return -EOPNOTSUPP; 2357 2377 if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { 2358 - PRINT_WARN("ARP processing not supported " 2359 - "on %s!\n", QETH_CARD_IFNAME(card)); 2360 2378 return -EOPNOTSUPP; 2361 2379 } 2362 2380 ··· 2369 2391 if (rc) { 2370 2392 tmp = rc; 2371 2393 qeth_l3_ipaddr4_to_string((u8 *)entry->ipaddr, buf); 2372 - PRINT_WARN("Could not add ARP entry for address %s on %s: " 2373 - "%s (0x%x/%d)\n", 2374 - buf, QETH_CARD_IFNAME(card), 2375 - qeth_l3_arp_get_error_cause(&rc), tmp, tmp); 2394 + QETH_DBF_MESSAGE(2, "Could not add ARP entry for address %s " 2395 + "on %s: %s (0x%x/%d)\n", buf, QETH_CARD_IFNAME(card), 2396 + qeth_l3_arp_get_error_cause(&rc), tmp, tmp); 2376 2397 } 2377 2398 return rc; 2378 2399 } ··· 2394 2417 if (card->info.guestlan) 2395 2418 return -EOPNOTSUPP; 2396 2419 if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { 2397 - PRINT_WARN("ARP processing not supported " 2398 - "on %s!\n", QETH_CARD_IFNAME(card)); 2399 2420 return -EOPNOTSUPP; 2400 2421 } 2401 2422 memcpy(buf, entry, 12); ··· 2408 2433 tmp = rc; 2409 2434 memset(buf, 0, 16); 2410 2435 qeth_l3_ipaddr4_to_string((u8 *)entry->ipaddr, buf); 2411 - PRINT_WARN("Could not delete ARP entry for address %s on %s: " 2412 - "%s (0x%x/%d)\n", 2413 - buf, QETH_CARD_IFNAME(card), 2414 - qeth_l3_arp_get_error_cause(&rc), tmp, tmp); 2436 + QETH_DBF_MESSAGE(2, "Could not delete ARP entry for address %s" 2437 + " on %s: %s (0x%x/%d)\n", buf, QETH_CARD_IFNAME(card), 2438 + qeth_l3_arp_get_error_cause(&rc), tmp, tmp); 2415 2439 } 2416 2440 return rc; 2417 2441 } ··· 2430 2456 if (card->info.guestlan || (card->info.type == QETH_CARD_TYPE_IQD)) 2431 2457 return -EOPNOTSUPP; 2432 2458 if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { 2433 - PRINT_WARN("ARP processing not supported " 2434 - "on %s!\n", QETH_CARD_IFNAME(card)); 2435 2459 return -EOPNOTSUPP; 2436 2460 } 2437 2461 rc = qeth_l3_send_simple_setassparms(card, IPA_ARP_PROCESSING, 2438 2462 IPA_CMD_ASS_ARP_FLUSH_CACHE, 0); 2439 2463 if (rc) { 2440 2464 tmp = rc; 2441 - PRINT_WARN("Could not flush ARP cache on %s: %s (0x%x/%d)\n", 2442 - QETH_CARD_IFNAME(card), 2465 + QETH_DBF_MESSAGE(2, "Could not flush ARP cache on %s: %s " 2466 + "(0x%x/%d)\n", QETH_CARD_IFNAME(card), 2443 2467 qeth_l3_arp_get_error_cause(&rc), tmp, tmp); 2444 2468 } 2445 2469 return rc; ··· 2696 2724 ctx = qeth_eddp_create_context(card, new_skb, hdr, 2697 2725 skb->sk->sk_protocol); 2698 2726 if (ctx == NULL) { 2699 - PRINT_WARN("could not create eddp context\n"); 2727 + QETH_DBF_MESSAGE(2, "could not create eddp context\n"); 2700 2728 goto tx_drop; 2701 2729 } 2702 2730 } else { ··· 2764 2792 if ((new_skb != skb) && new_skb) 2765 2793 dev_kfree_skb_any(new_skb); 2766 2794 dev_kfree_skb_any(skb); 2795 + netif_wake_queue(dev); 2767 2796 return NETDEV_TX_OK; 2768 2797 } 2769 2798
-24
drivers/s390/net/qeth_l3_sys.c
··· 85 85 } else if (!strcmp(tmp, "multicast_router")) { 86 86 route->type = MULTICAST_ROUTER; 87 87 } else { 88 - PRINT_WARN("Invalid routing type '%s'.\n", tmp); 89 88 return -EINVAL; 90 89 } 91 90 if (((card->state == CARD_STATE_SOFTSETUP) || ··· 136 137 return -EINVAL; 137 138 138 139 if (!qeth_is_supported(card, IPA_IPV6)) { 139 - PRINT_WARN("IPv6 not supported for interface %s.\n" 140 - "Routing status no changed.\n", 141 - QETH_CARD_IFNAME(card)); 142 140 return -ENOTSUPP; 143 141 } 144 142 ··· 175 179 if ((i == 0) || (i == 1)) 176 180 card->options.fake_broadcast = i; 177 181 else { 178 - PRINT_WARN("fake_broadcast: write 0 or 1 to this file!\n"); 179 182 return -EINVAL; 180 183 } 181 184 return count; ··· 215 220 216 221 if (!((card->info.link_type == QETH_LINK_TYPE_HSTR) || 217 222 (card->info.link_type == QETH_LINK_TYPE_LANE_TR))) { 218 - PRINT_WARN("Device is not a tokenring device!\n"); 219 223 return -EINVAL; 220 224 } 221 225 ··· 227 233 card->options.broadcast_mode = QETH_TR_BROADCAST_ALLRINGS; 228 234 return count; 229 235 } else { 230 - PRINT_WARN("broadcast_mode: invalid mode %s!\n", 231 - tmp); 232 236 return -EINVAL; 233 237 } 234 238 return count; ··· 267 275 268 276 if (!((card->info.link_type == QETH_LINK_TYPE_HSTR) || 269 277 (card->info.link_type == QETH_LINK_TYPE_LANE_TR))) { 270 - PRINT_WARN("Device is not a tokenring device!\n"); 271 278 return -EINVAL; 272 279 } 273 280 ··· 276 285 QETH_TR_MACADDR_CANONICAL : 277 286 QETH_TR_MACADDR_NONCANONICAL; 278 287 else { 279 - PRINT_WARN("canonical_macaddr: write 0 or 1 to this file!\n"); 280 288 return -EINVAL; 281 289 } 282 290 return count; ··· 317 327 else if (!strcmp(tmp, "no_checksumming")) 318 328 card->options.checksum_type = NO_CHECKSUMMING; 319 329 else { 320 - PRINT_WARN("Unknown checksumming type '%s'\n", tmp); 321 330 return -EINVAL; 322 331 } 323 332 return count; ··· 371 382 } else if (!strcmp(tmp, "0")) { 372 383 card->ipato.enabled = 0; 373 384 } else { 374 - PRINT_WARN("ipato_enable: write 0, 1 or 'toggle' to " 375 - "this file\n"); 376 385 return -EINVAL; 377 386 } 378 387 return count; ··· 409 422 } else if (!strcmp(tmp, "0")) { 410 423 card->ipato.invert4 = 0; 411 424 } else { 412 - PRINT_WARN("ipato_invert4: write 0, 1 or 'toggle' to " 413 - "this file\n"); 414 425 return -EINVAL; 415 426 } 416 427 return count; ··· 471 486 /* get address string */ 472 487 end = strchr(start, '/'); 473 488 if (!end || (end - start >= 40)) { 474 - PRINT_WARN("Invalid format for ipato_addx/delx. " 475 - "Use <ip addr>/<mask bits>\n"); 476 489 return -EINVAL; 477 490 } 478 491 strncpy(buffer, start, end - start); 479 492 if (qeth_l3_string_to_ipaddr(buffer, proto, addr)) { 480 - PRINT_WARN("Invalid IP address format!\n"); 481 493 return -EINVAL; 482 494 } 483 495 start = end + 1; ··· 482 500 if (!strlen(start) || 483 501 (tmp == start) || 484 502 (*mask_bits > ((proto == QETH_PROT_IPV4) ? 32 : 128))) { 485 - PRINT_WARN("Invalid mask bits for ipato_addx/delx !\n"); 486 503 return -EINVAL; 487 504 } 488 505 return 0; ··· 501 520 502 521 ipatoe = kzalloc(sizeof(struct qeth_ipato_entry), GFP_KERNEL); 503 522 if (!ipatoe) { 504 - PRINT_WARN("No memory to allocate ipato entry\n"); 505 523 return -ENOMEM; 506 524 } 507 525 ipatoe->proto = proto; ··· 589 609 } else if (!strcmp(tmp, "0")) { 590 610 card->ipato.invert6 = 0; 591 611 } else { 592 - PRINT_WARN("ipato_invert6: write 0, 1 or 'toggle' to " 593 - "this file\n"); 594 612 return -EINVAL; 595 613 } 596 614 return count; ··· 702 724 u8 *addr) 703 725 { 704 726 if (qeth_l3_string_to_ipaddr(buf, proto, addr)) { 705 - PRINT_WARN("Invalid IP address format!\n"); 706 727 return -EINVAL; 707 728 } 708 729 return 0; ··· 868 891 u8 *addr) 869 892 { 870 893 if (qeth_l3_string_to_ipaddr(buf, proto, addr)) { 871 - PRINT_WARN("Invalid IP address format!\n"); 872 894 return -EINVAL; 873 895 } 874 896 return 0;
+3 -1
include/linux/ipv6.h
··· 396 396 { 397 397 struct request_sock *req = reqsk_alloc(ops); 398 398 399 - if (req != NULL) 399 + if (req != NULL) { 400 400 inet_rsk(req)->inet6_rsk_offset = inet6_rsk_offset(req); 401 + inet6_rsk(req)->pktopts = NULL; 402 + } 401 403 402 404 return req; 403 405 }
+1
include/linux/rtnetlink.h
··· 246 246 { 247 247 RT_TABLE_UNSPEC=0, 248 248 /* User defined values */ 249 + RT_TABLE_COMPAT=252, 249 250 RT_TABLE_DEFAULT=253, 250 251 RT_TABLE_MAIN=254, 251 252 RT_TABLE_LOCAL=255,
+1 -1
include/linux/ssb/ssb_driver_gige.h
··· 100 100 /* Get the device MAC address */ 101 101 static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) 102 102 { 103 - #ifdef CONFIG_BCM947XX 103 + #ifdef CONFIG_BCM47XX 104 104 char *res = nvram_get("et0macaddr"); 105 105 if (res) 106 106 memcpy(macaddr, res, 6);
+1 -1
include/linux/virtio_net.h
··· 38 38 #define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set 39 39 __u8 gso_type; 40 40 __u16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */ 41 - __u16 gso_size; /* Bytes to append to gso_hdr_len per frame */ 41 + __u16 gso_size; /* Bytes to append to hdr_len per frame */ 42 42 __u16 csum_start; /* Position to start checksumming from */ 43 43 __u16 csum_offset; /* Offset after that to place checksum */ 44 44 };
+10
include/net/inet_sock.h
··· 197 197 return skb->rtable->rt_iif; 198 198 } 199 199 200 + static inline struct request_sock *inet_reqsk_alloc(struct request_sock_ops *ops) 201 + { 202 + struct request_sock *req = reqsk_alloc(ops); 203 + 204 + if (req != NULL) 205 + inet_rsk(req)->opt = NULL; 206 + 207 + return req; 208 + } 209 + 200 210 #endif /* _INET_SOCK_H */
-1
include/net/tcp.h
··· 433 433 434 434 extern int tcp_disconnect(struct sock *sk, int flags); 435 435 436 - extern void tcp_unhash(struct sock *sk); 437 436 438 437 /* From syncookies.c */ 439 438 extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS];
+1 -2
net/dccp/ipv4.c
··· 589 589 if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) 590 590 goto drop; 591 591 592 - req = reqsk_alloc(&dccp_request_sock_ops); 592 + req = inet_reqsk_alloc(&dccp_request_sock_ops); 593 593 if (req == NULL) 594 594 goto drop; 595 595 ··· 605 605 ireq = inet_rsk(req); 606 606 ireq->loc_addr = ip_hdr(skb)->daddr; 607 607 ireq->rmt_addr = ip_hdr(skb)->saddr; 608 - ireq->opt = NULL; 609 608 610 609 /* 611 610 * Step 3: Process LISTEN state
-1
net/dccp/ipv6.c
··· 421 421 ireq6 = inet6_rsk(req); 422 422 ipv6_addr_copy(&ireq6->rmt_addr, &ipv6_hdr(skb)->saddr); 423 423 ipv6_addr_copy(&ireq6->loc_addr, &ipv6_hdr(skb)->daddr); 424 - ireq6->pktopts = NULL; 425 424 426 425 if (ipv6_opt_accepted(sk, skb) || 427 426 np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo ||
+4 -1
net/ipv4/fib_semantics.c
··· 960 960 rtm->rtm_dst_len = dst_len; 961 961 rtm->rtm_src_len = 0; 962 962 rtm->rtm_tos = tos; 963 - rtm->rtm_table = tb_id; 963 + if (tb_id < 256) 964 + rtm->rtm_table = tb_id; 965 + else 966 + rtm->rtm_table = RT_TABLE_COMPAT; 964 967 NLA_PUT_U32(skb, RTA_TABLE, tb_id); 965 968 rtm->rtm_type = type; 966 969 rtm->rtm_flags = fi->fib_flags;
+1 -2
net/ipv4/syncookies.c
··· 285 285 cookie_check_timestamp(&tcp_opt); 286 286 287 287 ret = NULL; 288 - req = reqsk_alloc(&tcp_request_sock_ops); /* for safety */ 288 + req = inet_reqsk_alloc(&tcp_request_sock_ops); /* for safety */ 289 289 if (!req) 290 290 goto out; 291 291 ··· 301 301 ireq->rmt_port = th->source; 302 302 ireq->loc_addr = ip_hdr(skb)->daddr; 303 303 ireq->rmt_addr = ip_hdr(skb)->saddr; 304 - ireq->opt = NULL; 305 304 ireq->snd_wscale = tcp_opt.snd_wscale; 306 305 ireq->rcv_wscale = tcp_opt.rcv_wscale; 307 306 ireq->sack_ok = tcp_opt.sack_ok;
+1 -1
net/ipv4/tcp_ipv4.c
··· 1285 1285 if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) 1286 1286 goto drop; 1287 1287 1288 - req = reqsk_alloc(&tcp_request_sock_ops); 1288 + req = inet_reqsk_alloc(&tcp_request_sock_ops); 1289 1289 if (!req) 1290 1290 goto drop; 1291 1291
+1 -1
net/ipv6/af_inet6.c
··· 191 191 np->mcast_hops = -1; 192 192 np->mc_loop = 1; 193 193 np->pmtudisc = IPV6_PMTUDISC_WANT; 194 - np->ipv6only = init_net.ipv6.sysctl.bindv6only; 194 + np->ipv6only = net->ipv6.sysctl.bindv6only; 195 195 196 196 /* Init the ipv4 part of the socket since we can have sockets 197 197 * using v6 API for ipv4.
-1
net/ipv6/syncookies.c
··· 198 198 ireq = inet_rsk(req); 199 199 ireq6 = inet6_rsk(req); 200 200 treq = tcp_rsk(req); 201 - ireq6->pktopts = NULL; 202 201 203 202 if (security_inet_conn_request(sk, skb, req)) { 204 203 reqsk_free(req);
-1
net/ipv6/tcp_ipv6.c
··· 1299 1299 treq = inet6_rsk(req); 1300 1300 ipv6_addr_copy(&treq->rmt_addr, &ipv6_hdr(skb)->saddr); 1301 1301 ipv6_addr_copy(&treq->loc_addr, &ipv6_hdr(skb)->daddr); 1302 - treq->pktopts = NULL; 1303 1302 if (!want_cookie) 1304 1303 TCP_ECN_create_request(req, tcp_hdr(skb)); 1305 1304
+3
net/key/af_key.c
··· 3030 3030 3031 3031 static int pfkey_send_notify(struct xfrm_state *x, struct km_event *c) 3032 3032 { 3033 + if (atomic_read(&pfkey_socks_nr) == 0) 3034 + return 0; 3035 + 3033 3036 switch (c->event) { 3034 3037 case XFRM_MSG_EXPIRE: 3035 3038 return key_notify_sa_expire(x, c);
+1 -1
net/mac80211/ieee80211_i.h
··· 899 899 900 900 901 901 /* ieee80211_ioctl.c */ 902 - int ieee80211_set_freq(struct ieee80211_local *local, int freq); 902 + int ieee80211_set_freq(struct net_device *dev, int freq); 903 903 /* ieee80211_sta.c */ 904 904 void ieee80211_sta_timer(unsigned long data); 905 905 void ieee80211_sta_work(struct work_struct *work);
+1
net/mac80211/main.c
··· 511 511 case IEEE80211_IF_TYPE_STA: 512 512 case IEEE80211_IF_TYPE_IBSS: 513 513 sdata->u.sta.state = IEEE80211_DISABLED; 514 + memset(sdata->u.sta.bssid, 0, ETH_ALEN); 514 515 del_timer_sync(&sdata->u.sta.timer); 515 516 /* 516 517 * When we get here, the interface is marked down.
+10 -8
net/mac80211/mlme.c
··· 44 44 #define IEEE80211_RETRY_AUTH_INTERVAL (1 * HZ) 45 45 #define IEEE80211_SCAN_INTERVAL (2 * HZ) 46 46 #define IEEE80211_SCAN_INTERVAL_SLOW (15 * HZ) 47 - #define IEEE80211_IBSS_JOIN_TIMEOUT (20 * HZ) 47 + #define IEEE80211_IBSS_JOIN_TIMEOUT (7 * HZ) 48 48 49 49 #define IEEE80211_PROBE_DELAY (HZ / 33) 50 50 #define IEEE80211_CHANNEL_TIME (HZ / 33) ··· 2336 2336 u8 *pos; 2337 2337 struct ieee80211_sub_if_data *sdata; 2338 2338 struct ieee80211_supported_band *sband; 2339 + union iwreq_data wrqu; 2339 2340 2340 2341 sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; 2341 2342 ··· 2359 2358 sdata->drop_unencrypted = bss->capability & 2360 2359 WLAN_CAPABILITY_PRIVACY ? 1 : 0; 2361 2360 2362 - res = ieee80211_set_freq(local, bss->freq); 2361 + res = ieee80211_set_freq(dev, bss->freq); 2363 2362 2364 - if (local->oper_channel->flags & IEEE80211_CHAN_NO_IBSS) { 2365 - printk(KERN_DEBUG "%s: IBSS not allowed on frequency " 2366 - "%d MHz\n", dev->name, local->oper_channel->center_freq); 2367 - return -1; 2368 - } 2363 + if (res) 2364 + return res; 2369 2365 2370 2366 /* Set beacon template */ 2371 2367 skb = dev_alloc_skb(local->hw.extra_tx_headroom + 400); ··· 2476 2478 2477 2479 ifsta->state = IEEE80211_IBSS_JOINED; 2478 2480 mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL); 2481 + 2482 + memset(&wrqu, 0, sizeof(wrqu)); 2483 + memcpy(wrqu.ap_addr.sa_data, bss->bssid, ETH_ALEN); 2484 + wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL); 2479 2485 2480 2486 return res; 2481 2487 } ··· 3488 3486 spin_unlock_bh(&local->sta_bss_lock); 3489 3487 3490 3488 if (selected) { 3491 - ieee80211_set_freq(local, selected->freq); 3489 + ieee80211_set_freq(dev, selected->freq); 3492 3490 if (!(ifsta->flags & IEEE80211_STA_SSID_SET)) 3493 3491 ieee80211_sta_set_ssid(dev, selected->ssid, 3494 3492 selected->ssid_len);
+11 -4
net/mac80211/wext.c
··· 290 290 return 0; 291 291 } 292 292 293 - int ieee80211_set_freq(struct ieee80211_local *local, int freqMHz) 293 + int ieee80211_set_freq(struct net_device *dev, int freqMHz) 294 294 { 295 295 int ret = -EINVAL; 296 296 struct ieee80211_channel *chan; 297 + struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); 298 + struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 297 299 298 300 chan = ieee80211_get_channel(local->hw.wiphy, freqMHz); 299 301 300 302 if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) { 303 + if (sdata->vif.type == IEEE80211_IF_TYPE_IBSS && 304 + chan->flags & IEEE80211_CHAN_NO_IBSS) { 305 + printk(KERN_DEBUG "%s: IBSS not allowed on frequency " 306 + "%d MHz\n", dev->name, chan->center_freq); 307 + return ret; 308 + } 301 309 local->oper_channel = chan; 302 310 303 311 if (local->sta_sw_scanning || local->sta_hw_scanning) ··· 323 315 struct iw_request_info *info, 324 316 struct iw_freq *freq, char *extra) 325 317 { 326 - struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); 327 318 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 328 319 329 320 if (sdata->vif.type == IEEE80211_IF_TYPE_STA) ··· 336 329 IEEE80211_STA_AUTO_CHANNEL_SEL; 337 330 return 0; 338 331 } else 339 - return ieee80211_set_freq(local, 332 + return ieee80211_set_freq(dev, 340 333 ieee80211_channel_to_frequency(freq->m)); 341 334 } else { 342 335 int i, div = 1000000; 343 336 for (i = 0; i < freq->e; i++) 344 337 div /= 10; 345 338 if (div > 0) 346 - return ieee80211_set_freq(local, freq->m / div); 339 + return ieee80211_set_freq(dev, freq->m / div); 347 340 else 348 341 return -EINVAL; 349 342 }