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

Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:

drivers/net/ehea/ehea_main.c
drivers/net/wireless/iwlwifi/Kconfig
drivers/net/wireless/rt2x00/rt61pci.c
net/ipv4/inet_timewait_sock.c
net/ipv6/raw.c
net/mac80211/ieee80211_sta.c

+835 -358
+1
drivers/isdn/i4l/isdn_net.c
··· 2010 2010 ndev->flags = IFF_NOARP|IFF_POINTOPOINT; 2011 2011 ndev->type = ARPHRD_ETHER; 2012 2012 ndev->addr_len = ETH_ALEN; 2013 + ndev->validate_addr = NULL; 2013 2014 2014 2015 /* for clients with MPPP maybe higher values better */ 2015 2016 ndev->tx_queue_len = 30;
+3 -3
drivers/net/bnx2x.c
··· 63 63 #include "bnx2x.h" 64 64 #include "bnx2x_init.h" 65 65 66 - #define DRV_MODULE_VERSION "1.42.3" 67 - #define DRV_MODULE_RELDATE "2008/3/9" 66 + #define DRV_MODULE_VERSION "1.42.4" 67 + #define DRV_MODULE_RELDATE "2008/4/9" 68 68 #define BNX2X_BC_VER 0x040200 69 69 70 70 /* Time in jiffies before concluding the transmitter is hung. */ ··· 6153 6153 func, mode); 6154 6154 REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, 6155 6155 0xffffffff); 6156 - REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, 6156 + REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, 6157 6157 0xfffc); 6158 6158 bnx2x_init_block(bp, MISC_COMMON_START, MISC_COMMON_END); 6159 6159
+2 -1
drivers/net/ehea/ehea.h
··· 40 40 #include <asm/io.h> 41 41 42 42 #define DRV_NAME "ehea" 43 - #define DRV_VERSION "EHEA_0089" 43 + #define DRV_VERSION "EHEA_0090" 44 44 45 45 /* eHEA capability flags */ 46 46 #define DLPAR_PORT_ADD_REM 1 ··· 371 371 struct ehea_q_skb_arr rq2_skba; 372 372 struct ehea_q_skb_arr rq3_skba; 373 373 struct ehea_q_skb_arr sq_skba; 374 + int sq_skba_size; 374 375 spinlock_t netif_queue; 375 376 int queue_stopped; 376 377 int swqe_refill_th;
+22 -2
drivers/net/ehea/ehea_main.c
··· 350 350 pr->rq1_skba.os_skbs = 0; 351 351 352 352 if (unlikely(test_bit(__EHEA_STOP_XFER, &ehea_driver_flags))) { 353 - pr->rq1_skba.index = index; 353 + if (nr_of_wqes > 0) 354 + pr->rq1_skba.index = index; 354 355 pr->rq1_skba.os_skbs = fill_wqes; 355 356 return; 356 357 } ··· 1466 1465 init_attr->act_nr_rwqes_rq2, 1467 1466 init_attr->act_nr_rwqes_rq3); 1468 1467 1469 - ret = ehea_init_q_skba(&pr->sq_skba, init_attr->act_nr_send_wqes + 1); 1468 + pr->sq_skba_size = init_attr->act_nr_send_wqes + 1; 1469 + 1470 + ret = ehea_init_q_skba(&pr->sq_skba, pr->sq_skba_size); 1470 1471 ret |= ehea_init_q_skba(&pr->rq1_skba, init_attr->act_nr_rwqes_rq1 + 1); 1471 1472 ret |= ehea_init_q_skba(&pr->rq2_skba, init_attr->act_nr_rwqes_rq2 + 1); 1472 1473 ret |= ehea_init_q_skba(&pr->rq3_skba, init_attr->act_nr_rwqes_rq3 + 1); ··· 2625 2622 } 2626 2623 } 2627 2624 2625 + void ehea_flush_sq(struct ehea_port *port) 2626 + { 2627 + int i; 2628 + 2629 + for (i = 0; i < port->num_def_qps + port->num_add_tx_qps; i++) { 2630 + struct ehea_port_res *pr = &port->port_res[i]; 2631 + int swqe_max = pr->sq_skba_size - 2 - pr->swqe_ll_count; 2632 + int k = 0; 2633 + while (atomic_read(&pr->swqe_avail) < swqe_max) { 2634 + msleep(5); 2635 + if (++k == 20) 2636 + break; 2637 + } 2638 + } 2639 + } 2640 + 2628 2641 int ehea_stop_qps(struct net_device *dev) 2629 2642 { 2630 2643 struct ehea_port *port = netdev_priv(dev); ··· 2868 2849 if (dev->flags & IFF_UP) { 2869 2850 mutex_lock(&port->port_lock); 2870 2851 netif_stop_queue(dev); 2852 + ehea_flush_sq(port); 2871 2853 ret = ehea_stop_qps(dev); 2872 2854 if (ret) { 2873 2855 mutex_unlock(&port->port_lock);
+26 -5
drivers/net/forcedeth.c
··· 2112 2112 2113 2113 np->tx_pkts_in_progress--; 2114 2114 if (np->tx_change_owner) { 2115 - __le32 flaglen = le32_to_cpu(np->tx_change_owner->first_tx_desc->flaglen); 2116 - flaglen |= NV_TX2_VALID; 2117 - np->tx_change_owner->first_tx_desc->flaglen = cpu_to_le32(flaglen); 2115 + np->tx_change_owner->first_tx_desc->flaglen |= 2116 + cpu_to_le32(NV_TX2_VALID); 2118 2117 np->tx_pkts_in_progress++; 2119 2118 2120 2119 np->tx_change_owner = np->tx_change_owner->next_tx_ctx; ··· 5318 5319 5319 5320 /* check the workaround bit for correct mac address order */ 5320 5321 txreg = readl(base + NvRegTransmitPoll); 5321 - if ((txreg & NVREG_TRANSMITPOLL_MAC_ADDR_REV) || 5322 - (id->driver_data & DEV_HAS_CORRECT_MACADDR)) { 5322 + if (id->driver_data & DEV_HAS_CORRECT_MACADDR) { 5323 5323 /* mac address is already in correct order */ 5324 5324 dev->dev_addr[0] = (np->orig_mac[0] >> 0) & 0xff; 5325 5325 dev->dev_addr[1] = (np->orig_mac[0] >> 8) & 0xff; ··· 5326 5328 dev->dev_addr[3] = (np->orig_mac[0] >> 24) & 0xff; 5327 5329 dev->dev_addr[4] = (np->orig_mac[1] >> 0) & 0xff; 5328 5330 dev->dev_addr[5] = (np->orig_mac[1] >> 8) & 0xff; 5331 + } else if (txreg & NVREG_TRANSMITPOLL_MAC_ADDR_REV) { 5332 + /* mac address is already in correct order */ 5333 + dev->dev_addr[0] = (np->orig_mac[0] >> 0) & 0xff; 5334 + dev->dev_addr[1] = (np->orig_mac[0] >> 8) & 0xff; 5335 + dev->dev_addr[2] = (np->orig_mac[0] >> 16) & 0xff; 5336 + dev->dev_addr[3] = (np->orig_mac[0] >> 24) & 0xff; 5337 + dev->dev_addr[4] = (np->orig_mac[1] >> 0) & 0xff; 5338 + dev->dev_addr[5] = (np->orig_mac[1] >> 8) & 0xff; 5339 + /* 5340 + * Set orig mac address back to the reversed version. 5341 + * This flag will be cleared during low power transition. 5342 + * Therefore, we should always put back the reversed address. 5343 + */ 5344 + np->orig_mac[0] = (dev->dev_addr[5] << 0) + (dev->dev_addr[4] << 8) + 5345 + (dev->dev_addr[3] << 16) + (dev->dev_addr[2] << 24); 5346 + np->orig_mac[1] = (dev->dev_addr[1] << 0) + (dev->dev_addr[0] << 8); 5329 5347 } else { 5330 5348 /* need to reverse mac address to correct order */ 5331 5349 dev->dev_addr[0] = (np->orig_mac[1] >> 8) & 0xff; ··· 5612 5598 static int nv_resume(struct pci_dev *pdev) 5613 5599 { 5614 5600 struct net_device *dev = pci_get_drvdata(pdev); 5601 + u8 __iomem *base = get_hwbase(dev); 5615 5602 int rc = 0; 5603 + u32 txreg; 5616 5604 5617 5605 if (!netif_running(dev)) 5618 5606 goto out; ··· 5624 5608 pci_set_power_state(pdev, PCI_D0); 5625 5609 pci_restore_state(pdev); 5626 5610 pci_enable_wake(pdev, PCI_D0, 0); 5611 + 5612 + /* restore mac address reverse flag */ 5613 + txreg = readl(base + NvRegTransmitPoll); 5614 + txreg |= NVREG_TRANSMITPOLL_MAC_ADDR_REV; 5615 + writel(txreg, base + NvRegTransmitPoll); 5627 5616 5628 5617 rc = nv_open(dev); 5629 5618 out:
+2 -1
drivers/net/fs_enet/fs_enet-main.c
··· 835 835 836 836 netif_stop_queue(dev); 837 837 netif_carrier_off(dev); 838 - napi_disable(&fep->napi); 838 + if (fep->fpi->use_napi) 839 + napi_disable(&fep->napi); 839 840 phy_stop(fep->phydev); 840 841 841 842 spin_lock_irqsave(&fep->lock, flags);
+8 -6
drivers/net/macb.c
··· 242 242 /* Enable managment port */ 243 243 macb_writel(bp, NCR, MACB_BIT(MPE)); 244 244 245 - bp->mii_bus.name = "MACB_mii_bus", 246 - bp->mii_bus.read = &macb_mdio_read, 247 - bp->mii_bus.write = &macb_mdio_write, 248 - bp->mii_bus.reset = &macb_mdio_reset, 249 - bp->mii_bus.id = bp->pdev->id, 250 - bp->mii_bus.priv = bp, 245 + bp->mii_bus.name = "MACB_mii_bus"; 246 + bp->mii_bus.read = &macb_mdio_read; 247 + bp->mii_bus.write = &macb_mdio_write; 248 + bp->mii_bus.reset = &macb_mdio_reset; 249 + bp->mii_bus.id = bp->pdev->id; 250 + bp->mii_bus.priv = bp; 251 251 bp->mii_bus.dev = &bp->dev->dev; 252 252 pdata = bp->pdev->dev.platform_data; 253 253 ··· 1257 1257 1258 1258 if (dev) { 1259 1259 bp = netdev_priv(dev); 1260 + if (bp->phy_dev) 1261 + phy_disconnect(bp->phy_dev); 1260 1262 mdiobus_unregister(&bp->mii_bus); 1261 1263 kfree(bp->mii_bus.irq); 1262 1264 unregister_netdev(dev);
-2
drivers/net/phy/marvell.c
··· 211 211 } 212 212 213 213 if (phydev->interface == PHY_INTERFACE_MODE_SGMII) { 214 - int temp; 215 - 216 214 temp = phy_read(phydev, MII_M1111_PHY_EXT_SR); 217 215 if (temp < 0) 218 216 return temp;
+1
drivers/net/sc92031.c
··· 1446 1446 } 1447 1447 1448 1448 pci_set_drvdata(pdev, dev); 1449 + SET_NETDEV_DEV(dev, &pdev->dev); 1449 1450 1450 1451 #if SC92031_USE_BAR == 0 1451 1452 dev->mem_start = pci_resource_start(pdev, SC92031_USE_BAR);
+1
drivers/net/sky2.c
··· 154 154 "EC", /* 0xb6 */ 155 155 "FE", /* 0xb7 */ 156 156 "FE+", /* 0xb8 */ 157 + "Supreme", /* 0xb9 */ 157 158 }; 158 159 159 160 static void sky2_set_multicast(struct net_device *dev);
+2
drivers/net/smc91x.c
··· 1326 1326 SMC_SET_INT_MASK(lp, mask); 1327 1327 spin_unlock(&lp->lock); 1328 1328 1329 + #ifndef CONFIG_NET_POLL_CONTROLLER 1329 1330 if (timeout == MAX_IRQ_LOOPS) 1330 1331 PRINTK("%s: spurious interrupt (mask = 0x%02x)\n", 1331 1332 dev->name, mask); 1333 + #endif 1332 1334 DBG(3, "%s: Interrupt done (%d loops)\n", 1333 1335 dev->name, MAX_IRQ_LOOPS - timeout); 1334 1336
+5 -6
drivers/net/starfire.c
··· 1472 1472 #ifndef final_version /* Remove after testing. */ 1473 1473 /* You will want this info for the initial debug. */ 1474 1474 if (debug > 5) { 1475 - DECLARE_MAC_BUF(mac); 1476 - DECLARE_MAC_BUF(mac2); 1477 - 1478 - printk(KERN_DEBUG " Rx data %s %s" 1475 + printk(KERN_DEBUG " Rx data " MAC_FMT " " MAC_FMT 1479 1476 " %2.2x%2.2x.\n", 1480 - print_mac(mac, &skb->data[0]), 1481 - print_mac(mac2, &skb->data[6]), 1477 + skb->data[0], skb->data[1], skb->data[2], 1478 + skb->data[3], skb->data[4], skb->data[5], 1479 + skb->data[6], skb->data[7], skb->data[8], 1480 + skb->data[9], skb->data[10], skb->data[11], 1482 1481 skb->data[12], skb->data[13]); 1483 1482 } 1484 1483 #endif
+145 -12
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.88" 68 - #define DRV_MODULE_RELDATE "March 20, 2008" 67 + #define DRV_MODULE_VERSION "3.90" 68 + #define DRV_MODULE_RELDATE "April 12, 2008" 69 69 70 70 #define TG3_DEF_MAC_MODE 0 71 71 #define TG3_DEF_RX_MODE 0 ··· 804 804 return ret; 805 805 } 806 806 807 + static void tg3_phydsp_write(struct tg3 *tp, u32 reg, u32 val) 808 + { 809 + tg3_writephy(tp, MII_TG3_DSP_ADDRESS, reg); 810 + tg3_writephy(tp, MII_TG3_DSP_RW_PORT, val); 811 + } 812 + 807 813 static void tg3_phy_toggle_automdix(struct tg3 *tp, int enable) 808 814 { 809 815 u32 phy; ··· 890 884 return -EBUSY; 891 885 892 886 return 0; 887 + } 888 + 889 + static void tg3_phy_apply_otp(struct tg3 *tp) 890 + { 891 + u32 otp, phy; 892 + 893 + if (!tp->phy_otp) 894 + return; 895 + 896 + otp = tp->phy_otp; 897 + 898 + /* Enable SM_DSP clock and tx 6dB coding. */ 899 + phy = MII_TG3_AUXCTL_SHDWSEL_AUXCTL | 900 + MII_TG3_AUXCTL_ACTL_SMDSP_ENA | 901 + MII_TG3_AUXCTL_ACTL_TX_6DB; 902 + tg3_writephy(tp, MII_TG3_AUX_CTRL, phy); 903 + 904 + phy = ((otp & TG3_OTP_AGCTGT_MASK) >> TG3_OTP_AGCTGT_SHIFT); 905 + phy |= MII_TG3_DSP_TAP1_AGCTGT_DFLT; 906 + tg3_phydsp_write(tp, MII_TG3_DSP_TAP1, phy); 907 + 908 + phy = ((otp & TG3_OTP_HPFFLTR_MASK) >> TG3_OTP_HPFFLTR_SHIFT) | 909 + ((otp & TG3_OTP_HPFOVER_MASK) >> TG3_OTP_HPFOVER_SHIFT); 910 + tg3_phydsp_write(tp, MII_TG3_DSP_AADJ1CH0, phy); 911 + 912 + phy = ((otp & TG3_OTP_LPFDIS_MASK) >> TG3_OTP_LPFDIS_SHIFT); 913 + phy |= MII_TG3_DSP_AADJ1CH3_ADCCKADJ; 914 + tg3_phydsp_write(tp, MII_TG3_DSP_AADJ1CH3, phy); 915 + 916 + phy = ((otp & TG3_OTP_VDAC_MASK) >> TG3_OTP_VDAC_SHIFT); 917 + tg3_phydsp_write(tp, MII_TG3_DSP_EXP75, phy); 918 + 919 + phy = ((otp & TG3_OTP_10BTAMP_MASK) >> TG3_OTP_10BTAMP_SHIFT); 920 + tg3_phydsp_write(tp, MII_TG3_DSP_EXP96, phy); 921 + 922 + phy = ((otp & TG3_OTP_ROFF_MASK) >> TG3_OTP_ROFF_SHIFT) | 923 + ((otp & TG3_OTP_RCOFF_MASK) >> TG3_OTP_RCOFF_SHIFT); 924 + tg3_phydsp_write(tp, MII_TG3_DSP_EXP97, phy); 925 + 926 + /* Turn off SM_DSP clock. */ 927 + phy = MII_TG3_AUXCTL_SHDWSEL_AUXCTL | 928 + MII_TG3_AUXCTL_ACTL_TX_6DB; 929 + tg3_writephy(tp, MII_TG3_AUX_CTRL, phy); 893 930 } 894 931 895 932 static int tg3_wait_macro_done(struct tg3 *tp) ··· 1122 1073 */ 1123 1074 static int tg3_phy_reset(struct tg3 *tp) 1124 1075 { 1076 + u32 cpmuctrl; 1125 1077 u32 phy_status; 1126 1078 int err; 1127 1079 ··· 1152 1102 goto out; 1153 1103 } 1154 1104 1105 + cpmuctrl = 0; 1106 + if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 && 1107 + GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5784_AX) { 1108 + cpmuctrl = tr32(TG3_CPMU_CTRL); 1109 + if (cpmuctrl & CPMU_CTRL_GPHY_10MB_RXONLY) 1110 + tw32(TG3_CPMU_CTRL, 1111 + cpmuctrl & ~CPMU_CTRL_GPHY_10MB_RXONLY); 1112 + } 1113 + 1155 1114 err = tg3_bmcr_reset(tp); 1156 1115 if (err) 1157 1116 return err; 1117 + 1118 + if (cpmuctrl & CPMU_CTRL_GPHY_10MB_RXONLY) { 1119 + u32 phy; 1120 + 1121 + phy = MII_TG3_DSP_EXP8_AEDW | MII_TG3_DSP_EXP8_REJ2MHz; 1122 + tg3_phydsp_write(tp, MII_TG3_DSP_EXP8, phy); 1123 + 1124 + tw32(TG3_CPMU_CTRL, cpmuctrl); 1125 + } 1158 1126 1159 1127 if (tp->tg3_flags3 & TG3_FLG3_5761_5784_AX_FIXES) { 1160 1128 u32 val; ··· 1191 1123 MII_TG3_MISC_SHDW_APD_SEL | 1192 1124 MII_TG3_MISC_SHDW_APD_WKTM_84MS); 1193 1125 } 1126 + 1127 + tg3_phy_apply_otp(tp); 1194 1128 1195 1129 out: 1196 1130 if (tp->tg3_flags2 & TG3_FLG2_PHY_ADC_BUG) { ··· 9534 9464 if (err) 9535 9465 return TG3_LOOPBACK_FAILED; 9536 9466 9537 - if (tp->tg3_flags3 & TG3_FLG3_5761_5784_AX_FIXES) { 9467 + if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 || 9468 + GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761) { 9538 9469 int i; 9539 9470 u32 status; 9540 9471 ··· 9552 9481 if (status != CPMU_MUTEX_GNT_DRIVER) 9553 9482 return TG3_LOOPBACK_FAILED; 9554 9483 9555 - /* Turn off power management based on link speed. */ 9484 + /* Turn off link-based power management. */ 9556 9485 cpmuctrl = tr32(TG3_CPMU_CTRL); 9557 - tw32(TG3_CPMU_CTRL, 9558 - cpmuctrl & ~(CPMU_CTRL_LINK_SPEED_MODE | 9559 - CPMU_CTRL_LINK_AWARE_MODE)); 9486 + if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 || 9487 + GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5761_AX) 9488 + tw32(TG3_CPMU_CTRL, 9489 + cpmuctrl & ~(CPMU_CTRL_LINK_SPEED_MODE | 9490 + CPMU_CTRL_LINK_AWARE_MODE)); 9491 + else 9492 + tw32(TG3_CPMU_CTRL, 9493 + cpmuctrl & ~CPMU_CTRL_LINK_AWARE_MODE); 9560 9494 } 9561 9495 9562 9496 if (tg3_run_loopback(tp, TG3_MAC_LOOPBACK)) 9563 9497 err |= TG3_MAC_LOOPBACK_FAILED; 9564 9498 9565 - if (tp->tg3_flags3 & TG3_FLG3_5761_5784_AX_FIXES) { 9499 + if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 || 9500 + GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761) { 9566 9501 tw32(TG3_CPMU_CTRL, cpmuctrl); 9567 9502 9568 9503 /* Release the mutex */ ··· 10801 10724 tp->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL) 10802 10725 tp->led_ctrl = LED_CTRL_MODE_PHY_2; 10803 10726 10804 - if (tp->pci_chip_rev_id == CHIPREV_ID_5784_A0 || 10805 - tp->pci_chip_rev_id == CHIPREV_ID_5784_A1) 10806 - tp->led_ctrl = LED_CTRL_MODE_MAC; 10727 + if (GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5784_AX) 10728 + tp->led_ctrl = LED_CTRL_MODE_PHY_1; 10807 10729 10808 10730 if (nic_cfg & NIC_SRAM_DATA_CFG_EEPROM_WP) { 10809 10731 tp->tg3_flags |= TG3_FLAG_EEPROM_WRITE_PROT; ··· 10847 10771 tp->tg3_flags |= TG3_FLAG_ASPM_WORKAROUND; 10848 10772 } 10849 10773 } 10774 + } 10775 + 10776 + static int __devinit tg3_issue_otp_command(struct tg3 *tp, u32 cmd) 10777 + { 10778 + int i; 10779 + u32 val; 10780 + 10781 + tw32(OTP_CTRL, cmd | OTP_CTRL_OTP_CMD_START); 10782 + tw32(OTP_CTRL, cmd); 10783 + 10784 + /* Wait for up to 1 ms for command to execute. */ 10785 + for (i = 0; i < 100; i++) { 10786 + val = tr32(OTP_STATUS); 10787 + if (val & OTP_STATUS_CMD_DONE) 10788 + break; 10789 + udelay(10); 10790 + } 10791 + 10792 + return (val & OTP_STATUS_CMD_DONE) ? 0 : -EBUSY; 10793 + } 10794 + 10795 + /* Read the gphy configuration from the OTP region of the chip. The gphy 10796 + * configuration is a 32-bit value that straddles the alignment boundary. 10797 + * We do two 32-bit reads and then shift and merge the results. 10798 + */ 10799 + static u32 __devinit tg3_read_otp_phycfg(struct tg3 *tp) 10800 + { 10801 + u32 bhalf_otp, thalf_otp; 10802 + 10803 + tw32(OTP_MODE, OTP_MODE_OTP_THRU_GRC); 10804 + 10805 + if (tg3_issue_otp_command(tp, OTP_CTRL_OTP_CMD_INIT)) 10806 + return 0; 10807 + 10808 + tw32(OTP_ADDRESS, OTP_ADDRESS_MAGIC1); 10809 + 10810 + if (tg3_issue_otp_command(tp, OTP_CTRL_OTP_CMD_READ)) 10811 + return 0; 10812 + 10813 + thalf_otp = tr32(OTP_READ_DATA); 10814 + 10815 + tw32(OTP_ADDRESS, OTP_ADDRESS_MAGIC2); 10816 + 10817 + if (tg3_issue_otp_command(tp, OTP_CTRL_OTP_CMD_READ)) 10818 + return 0; 10819 + 10820 + bhalf_otp = tr32(OTP_READ_DATA); 10821 + 10822 + return ((thalf_otp & 0x0000ffff) << 16) | (bhalf_otp >> 16); 10850 10823 } 10851 10824 10852 10825 static int __devinit tg3_phy_probe(struct tg3 *tp) ··· 11709 11584 tp->tg3_flags2 |= TG3_FLG2_PHY_ADJUST_TRIM; 11710 11585 } else if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5906) 11711 11586 tp->tg3_flags2 |= TG3_FLG2_PHY_BER_BUG; 11587 + } 11588 + 11589 + if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 && 11590 + GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5784_AX) { 11591 + tp->phy_otp = tg3_read_otp_phycfg(tp); 11592 + if (tp->phy_otp == 0) 11593 + tp->phy_otp = TG3_OTP_DEFAULT; 11712 11594 } 11713 11595 11714 11596 tp->coalesce_mode = 0; ··· 12578 12446 const struct pci_device_id *ent) 12579 12447 { 12580 12448 static int tg3_version_printed = 0; 12581 - unsigned long tg3reg_base, tg3reg_len; 12449 + resource_size_t tg3reg_base; 12450 + unsigned long tg3reg_len; 12582 12451 struct net_device *dev; 12583 12452 struct tg3 *tp; 12584 12453 int err, pm_cap;
+76 -3
drivers/net/tg3.h
··· 138 138 #define CHIPREV_5704_BX 0x21 139 139 #define CHIPREV_5750_AX 0x40 140 140 #define CHIPREV_5750_BX 0x41 141 + #define CHIPREV_5784_AX 0x57840 142 + #define CHIPREV_5761_AX 0x57610 141 143 #define GET_METAL_REV(CHIP_REV_ID) ((CHIP_REV_ID) & 0xff) 142 144 #define METAL_REV_A0 0x00 143 145 #define METAL_REV_A1 0x01 ··· 868 866 #define CPMU_CTRL_LINK_IDLE_MODE 0x00000200 869 867 #define CPMU_CTRL_LINK_AWARE_MODE 0x00000400 870 868 #define CPMU_CTRL_LINK_SPEED_MODE 0x00004000 869 + #define CPMU_CTRL_GPHY_10MB_RXONLY 0x00010000 871 870 #define TG3_CPMU_LSPD_10MB_CLK 0x00003604 872 871 #define CPMU_LSPD_10MB_MACCLK_MASK 0x001f0000 873 872 #define CPMU_LSPD_10MB_MACCLK_6_25 0x00130000 ··· 1562 1559 /* 0x702c unused */ 1563 1560 1564 1561 #define NVRAM_ADDR_LOCKOUT 0x00007030 1565 - /* 0x7034 --> 0x7c00 unused */ 1562 + /* 0x7034 --> 0x7500 unused */ 1563 + 1564 + #define OTP_MODE 0x00007500 1565 + #define OTP_MODE_OTP_THRU_GRC 0x00000001 1566 + #define OTP_CTRL 0x00007504 1567 + #define OTP_CTRL_OTP_PROG_ENABLE 0x00200000 1568 + #define OTP_CTRL_OTP_CMD_READ 0x00000000 1569 + #define OTP_CTRL_OTP_CMD_INIT 0x00000008 1570 + #define OTP_CTRL_OTP_CMD_START 0x00000001 1571 + #define OTP_STATUS 0x00007508 1572 + #define OTP_STATUS_CMD_DONE 0x00000001 1573 + #define OTP_ADDRESS 0x0000750c 1574 + #define OTP_ADDRESS_MAGIC1 0x000000a0 1575 + #define OTP_ADDRESS_MAGIC2 0x00000080 1576 + /* 0x7510 unused */ 1577 + 1578 + #define OTP_READ_DATA 0x00007514 1579 + /* 0x7518 --> 0x7c04 unused */ 1566 1580 1567 1581 #define PCIE_TRANSACTION_CFG 0x00007c04 1568 1582 #define PCIE_TRANS_CFG_1SHOT_MSI 0x20000000 ··· 1587 1567 1588 1568 #define PCIE_PWR_MGMT_THRESH 0x00007d28 1589 1569 #define PCIE_PWR_MGMT_L1_THRESH_MSK 0x0000ff00 1570 + 1571 + 1572 + /* OTP bit definitions */ 1573 + #define TG3_OTP_AGCTGT_MASK 0x000000e0 1574 + #define TG3_OTP_AGCTGT_SHIFT 1 1575 + #define TG3_OTP_HPFFLTR_MASK 0x00000300 1576 + #define TG3_OTP_HPFFLTR_SHIFT 1 1577 + #define TG3_OTP_HPFOVER_MASK 0x00000400 1578 + #define TG3_OTP_HPFOVER_SHIFT 1 1579 + #define TG3_OTP_LPFDIS_MASK 0x00000800 1580 + #define TG3_OTP_LPFDIS_SHIFT 11 1581 + #define TG3_OTP_VDAC_MASK 0xff000000 1582 + #define TG3_OTP_VDAC_SHIFT 24 1583 + #define TG3_OTP_10BTAMP_MASK 0x0000f000 1584 + #define TG3_OTP_10BTAMP_SHIFT 8 1585 + #define TG3_OTP_ROFF_MASK 0x00e00000 1586 + #define TG3_OTP_ROFF_SHIFT 11 1587 + #define TG3_OTP_RCOFF_MASK 0x001c0000 1588 + #define TG3_OTP_RCOFF_SHIFT 16 1589 + 1590 + #define TG3_OTP_DEFAULT 0x286c1640 1591 + 1590 1592 1591 1593 #define TG3_EEPROM_MAGIC 0x669955aa 1592 1594 #define TG3_EEPROM_MAGIC_FW 0xa5000000 ··· 1747 1705 1748 1706 #define MII_TG3_DSP_RW_PORT 0x15 /* DSP coefficient read/write port */ 1749 1707 1750 - #define MII_TG3_DSP_ADDRESS 0x17 /* DSP address register */ 1751 1708 #define MII_TG3_EPHY_PTEST 0x17 /* 5906 PHY register */ 1709 + #define MII_TG3_DSP_ADDRESS 0x17 /* DSP address register */ 1710 + 1711 + #define MII_TG3_DSP_TAP1 0x0001 1712 + #define MII_TG3_DSP_TAP1_AGCTGT_DFLT 0x0007 1713 + #define MII_TG3_DSP_AADJ1CH0 0x001f 1714 + #define MII_TG3_DSP_AADJ1CH3 0x601f 1715 + #define MII_TG3_DSP_AADJ1CH3_ADCCKADJ 0x0002 1716 + #define MII_TG3_DSP_EXP8 0x0708 1717 + #define MII_TG3_DSP_EXP8_REJ2MHz 0x0001 1718 + #define MII_TG3_DSP_EXP8_AEDW 0x0200 1719 + #define MII_TG3_DSP_EXP75 0x0f75 1720 + #define MII_TG3_DSP_EXP96 0x0f96 1721 + #define MII_TG3_DSP_EXP97 0x0f97 1752 1722 1753 1723 #define MII_TG3_AUX_CTRL 0x18 /* auxilliary control register */ 1754 1724 1755 1725 #define MII_TG3_AUXCTL_MISC_WREN 0x8000 1756 1726 #define MII_TG3_AUXCTL_MISC_FORCE_AMDIX 0x0200 1757 1727 #define MII_TG3_AUXCTL_MISC_RDSEL_MISC 0x7000 1758 - #define MII_TG3_AUXCTL_SHDWSEL_MISC 0x0007 1728 + #define MII_TG3_AUXCTL_SHDWSEL_MISC 0x0007 1729 + 1730 + #define MII_TG3_AUXCTL_ACTL_SMDSP_ENA 0x0800 1731 + #define MII_TG3_AUXCTL_ACTL_TX_6DB 0x0400 1732 + #define MII_TG3_AUXCTL_SHDWSEL_AUXCTL 0x0000 1759 1733 1760 1734 #define MII_TG3_AUX_STAT 0x19 /* auxilliary status register */ 1761 1735 #define MII_TG3_AUX_STAT_LPASS 0x0004 ··· 1800 1742 #define MII_TG3_INT_SPEEDCHG 0x0004 1801 1743 #define MII_TG3_INT_DUPLEXCHG 0x0008 1802 1744 #define MII_TG3_INT_ANEG_PAGE_RX 0x0400 1745 + 1746 + #define MII_TG3_MISC_SHDW 0x1c 1747 + #define MII_TG3_MISC_SHDW_WREN 0x8000 1748 + #define MII_TG3_MISC_SHDW_SCR5_SEL 0x1400 1749 + #define MII_TG3_MISC_SHDW_APD_SEL 0x2800 1750 + 1751 + #define MII_TG3_MISC_SHDW_SCR5_C125OE 0x0001 1752 + #define MII_TG3_MISC_SHDW_SCR5_DLLAPD 0x0002 1753 + #define MII_TG3_MISC_SHDW_SCR5_SDTL 0x0004 1754 + #define MII_TG3_MISC_SHDW_SCR5_DLPTLM 0x0008 1755 + #define MII_TG3_MISC_SHDW_SCR5_LPED 0x0010 1756 + 1757 + #define MII_TG3_MISC_SHDW_APD_WKTM_84MS 0x0001 1758 + #define MII_TG3_MISC_SHDW_APD_ENABLE 0x0020 1803 1759 1804 1760 #define MII_TG3_EPHY_TEST 0x1f /* 5906 PHY register */ 1805 1761 #define MII_TG3_EPHY_SHADOW_EN 0x80 ··· 2545 2473 #define PHY_REV_BCM5411_X0 0x1 /* Found on Netgear GA302T */ 2546 2474 2547 2475 u32 led_ctrl; 2476 + u32 phy_otp; 2548 2477 u16 pci_cmd; 2549 2478 2550 2479 char board_part_number[24];
+13 -8
drivers/net/tokenring/olympic.c
··· 117 117 * Official releases will only have an a.b.c version number format. 118 118 */ 119 119 120 - static char version[] __devinitdata = 120 + static char version[] = 121 121 "Olympic.c v1.0.5 6/04/02 - Peter De Schrijver & Mike Phillips" ; 122 122 123 123 static char *open_maj_error[] = {"No error", "Lobe Media Test", "Physical Insertion", ··· 290 290 return i; 291 291 } 292 292 293 - static int __devinit olympic_init(struct net_device *dev) 293 + static int olympic_init(struct net_device *dev) 294 294 { 295 295 struct olympic_private *olympic_priv; 296 296 u8 __iomem *olympic_mmio, *init_srb,*adapter_addr; ··· 434 434 435 435 } 436 436 437 - static int __devinit olympic_open(struct net_device *dev) 437 + static int olympic_open(struct net_device *dev) 438 438 { 439 439 struct olympic_private *olympic_priv=netdev_priv(dev); 440 440 u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio,*init_srb; ··· 1438 1438 1439 1439 if (olympic_priv->olympic_network_monitor) { 1440 1440 struct trh_hdr *mac_hdr; 1441 - DECLARE_MAC_BUF(mac); 1442 1441 printk(KERN_WARNING "%s: Received MAC Frame, details: \n",dev->name); 1443 1442 mac_hdr = tr_hdr(mac_frame); 1444 - printk(KERN_WARNING "%s: MAC Frame Dest. Addr: %s\n", 1445 - dev->name, print_mac(mac, mac_hdr->daddr)); 1446 - printk(KERN_WARNING "%s: MAC Frame Srce. Addr: %s\n", 1447 - dev->name, print_mac(mac, mac_hdr->saddr)); 1443 + printk(KERN_WARNING "%s: MAC Frame Dest. Addr: " 1444 + MAC_FMT " \n", dev->name, 1445 + mac_hdr->daddr[0], mac_hdr->daddr[1], 1446 + mac_hdr->daddr[2], mac_hdr->daddr[3], 1447 + mac_hdr->daddr[4], mac_hdr->daddr[5]); 1448 + printk(KERN_WARNING "%s: MAC Frame Srce. Addr: " 1449 + MAC_FMT " \n", dev->name, 1450 + mac_hdr->saddr[0], mac_hdr->saddr[1], 1451 + mac_hdr->saddr[2], mac_hdr->saddr[3], 1452 + mac_hdr->saddr[4], mac_hdr->saddr[5]); 1448 1453 } 1449 1454 netif_rx(mac_frame); 1450 1455 dev->last_rx = jiffies;
+37 -1
drivers/net/tun.c
··· 67 67 #include <asm/system.h> 68 68 #include <asm/uaccess.h> 69 69 70 + /* Uncomment to enable debugging */ 71 + /* #define TUN_DEBUG 1 */ 72 + 70 73 #ifdef TUN_DEBUG 71 74 static int debug; 75 + 76 + #define DBG if(tun->debug)printk 77 + #define DBG1 if(debug==2)printk 78 + #else 79 + #define DBG( a... ) 80 + #define DBG1( a... ) 72 81 #endif 82 + 83 + struct tun_struct { 84 + struct list_head list; 85 + unsigned long flags; 86 + int attached; 87 + uid_t owner; 88 + gid_t group; 89 + 90 + wait_queue_head_t read_wait; 91 + struct sk_buff_head readq; 92 + 93 + struct net_device *dev; 94 + 95 + struct fasync_struct *fasync; 96 + 97 + unsigned long if_flags; 98 + u8 dev_addr[ETH_ALEN]; 99 + u32 chr_filter[2]; 100 + u32 net_filter[2]; 101 + 102 + #ifdef TUN_DEBUG 103 + int debug; 104 + #endif 105 + }; 73 106 74 107 /* Network device part of the driver */ 75 108 ··· 286 253 return -EFAULT; 287 254 } 288 255 289 - if ((tun->flags & TUN_TYPE_MASK) == TUN_TAP_DEV) 256 + if ((tun->flags & TUN_TYPE_MASK) == TUN_TAP_DEV) { 290 257 align = NET_IP_ALIGN; 258 + if (unlikely(len < ETH_HLEN)) 259 + return -EINVAL; 260 + } 291 261 292 262 if (!(skb = alloc_skb(len + align, GFP_KERNEL))) { 293 263 tun->dev->stats.rx_dropped++;
+30 -23
drivers/net/ucc_geth.c
··· 3833 3833 struct device_node *phy; 3834 3834 int err, ucc_num, max_speed = 0; 3835 3835 const phandle *ph; 3836 + const u32 *fixed_link; 3836 3837 const unsigned int *prop; 3837 3838 const char *sprop; 3838 3839 const void *mac_addr; ··· 3924 3923 3925 3924 ug_info->uf_info.regs = res.start; 3926 3925 ug_info->uf_info.irq = irq_of_parse_and_map(np, 0); 3926 + fixed_link = of_get_property(np, "fixed-link", NULL); 3927 + if (fixed_link) { 3928 + ug_info->mdio_bus = 0; 3929 + ug_info->phy_address = fixed_link[0]; 3930 + phy = NULL; 3931 + } else { 3932 + ph = of_get_property(np, "phy-handle", NULL); 3933 + phy = of_find_node_by_phandle(*ph); 3927 3934 3928 - ph = of_get_property(np, "phy-handle", NULL); 3929 - phy = of_find_node_by_phandle(*ph); 3935 + if (phy == NULL) 3936 + return -ENODEV; 3930 3937 3931 - if (phy == NULL) 3932 - return -ENODEV; 3938 + /* set the PHY address */ 3939 + prop = of_get_property(phy, "reg", NULL); 3940 + if (prop == NULL) 3941 + return -1; 3942 + ug_info->phy_address = *prop; 3933 3943 3934 - /* set the PHY address */ 3935 - prop = of_get_property(phy, "reg", NULL); 3936 - if (prop == NULL) 3937 - return -1; 3938 - ug_info->phy_address = *prop; 3944 + /* Set the bus id */ 3945 + mdio = of_get_parent(phy); 3946 + 3947 + if (mdio == NULL) 3948 + return -1; 3949 + 3950 + err = of_address_to_resource(mdio, 0, &res); 3951 + of_node_put(mdio); 3952 + 3953 + if (err) 3954 + return -1; 3955 + 3956 + ug_info->mdio_bus = res.start; 3957 + } 3939 3958 3940 3959 /* get the phy interface type, or default to MII */ 3941 3960 prop = of_get_property(np, "phy-connection-type", NULL); ··· 3999 3978 ug_info->numThreadsTx = UCC_GETH_NUM_OF_THREADS_4; 4000 3979 ug_info->numThreadsRx = UCC_GETH_NUM_OF_THREADS_4; 4001 3980 } 4002 - 4003 - /* Set the bus id */ 4004 - mdio = of_get_parent(phy); 4005 - 4006 - if (mdio == NULL) 4007 - return -1; 4008 - 4009 - err = of_address_to_resource(mdio, 0, &res); 4010 - of_node_put(mdio); 4011 - 4012 - if (err) 4013 - return -1; 4014 - 4015 - ug_info->mdio_bus = res.start; 4016 3981 4017 3982 if (netif_msg_probe(&debug)) 4018 3983 printk(KERN_INFO "ucc_geth: UCC%1d at 0x%8x (irq = %d) \n",
+3 -2
drivers/net/virtio_net.c
··· 234 234 struct scatterlist sg[1+MAX_SKB_FRAGS]; 235 235 struct virtio_net_hdr *hdr; 236 236 const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest; 237 - DECLARE_MAC_BUF(mac); 238 237 239 238 sg_init_table(sg, 1+MAX_SKB_FRAGS); 240 239 241 - pr_debug("%s: xmit %p %s\n", dev->name, skb, print_mac(mac, dest)); 240 + pr_debug("%s: xmit %p " MAC_FMT "\n", dev->name, skb, 241 + dest[0], dest[1], dest[2], 242 + dest[3], dest[4], dest[5]); 242 243 243 244 /* Encode metadata header at front. */ 244 245 hdr = skb_vnet_hdr(skb);
+5 -1
drivers/net/wan/Kconfig
··· 150 150 151 151 config HDLC_PPP 152 152 tristate "Synchronous Point-to-Point Protocol (PPP) support" 153 - depends on HDLC 153 + depends on HDLC && BROKEN 154 154 help 155 155 Generic HDLC driver supporting PPP over WAN connections. 156 + This module is currently broken and will cause a kernel panic 157 + when a device configured in PPP mode is activated. 158 + 159 + It will be replaced by new PPP implementation in Linux 2.6.26. 156 160 157 161 If unsure, say N. 158 162
+24 -15
drivers/net/wireless/hostap/hostap_80211_rx.c
··· 635 635 { 636 636 struct ieee80211_hdr_4addr *hdr; 637 637 int res, hdrlen; 638 - DECLARE_MAC_BUF(mac); 639 638 640 639 if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL) 641 640 return 0; ··· 646 647 strcmp(crypt->ops->name, "TKIP") == 0) { 647 648 if (net_ratelimit()) { 648 649 printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " 649 - "received packet from %s\n", 650 - local->dev->name, print_mac(mac, hdr->addr2)); 650 + "received packet from " MAC_FMT "\n", 651 + local->dev->name, 652 + hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], 653 + hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]); 651 654 } 652 655 return -1; 653 656 } ··· 658 657 res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv); 659 658 atomic_dec(&crypt->refcnt); 660 659 if (res < 0) { 661 - printk(KERN_DEBUG "%s: decryption failed (SA=%s" 660 + printk(KERN_DEBUG "%s: decryption failed (SA=" MAC_FMT 662 661 ") res=%d\n", 663 - local->dev->name, print_mac(mac, hdr->addr2), res); 662 + local->dev->name, 663 + hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], 664 + hdr->addr2[3], hdr->addr2[4], hdr->addr2[5], 665 + res); 664 666 local->comm_tallies.rx_discards_wep_undecryptable++; 665 667 return -1; 666 668 } ··· 725 721 struct ieee80211_crypt_data *crypt = NULL; 726 722 void *sta = NULL; 727 723 int keyidx = 0; 728 - DECLARE_MAC_BUF(mac); 729 724 730 725 iface = netdev_priv(dev); 731 726 local = iface->local; ··· 801 798 * frames silently instead of filling system log with 802 799 * these reports. */ 803 800 printk(KERN_DEBUG "%s: WEP decryption failed (not set)" 804 - " (SA=%s)\n", 805 - local->dev->name, print_mac(mac, hdr->addr2)); 801 + " (SA=" MAC_FMT ")\n", 802 + local->dev->name, 803 + hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], 804 + hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]); 806 805 #endif 807 806 local->comm_tallies.rx_discards_wep_undecryptable++; 808 807 goto rx_dropped; ··· 818 813 (keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0) 819 814 { 820 815 printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth " 821 - "from %s\n", dev->name, 822 - print_mac(mac, hdr->addr2)); 816 + "from " MAC_FMT "\n", dev->name, 817 + hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], 818 + hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]); 823 819 /* TODO: could inform hostapd about this so that it 824 820 * could send auth failure report */ 825 821 goto rx_dropped; ··· 988 982 "unencrypted EAPOL frame\n", local->dev->name); 989 983 } else { 990 984 printk(KERN_DEBUG "%s: encryption configured, but RX " 991 - "frame not encrypted (SA=%s)\n", 992 - local->dev->name, print_mac(mac, hdr->addr2)); 985 + "frame not encrypted (SA=" MAC_FMT ")\n", 986 + local->dev->name, 987 + hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], 988 + hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]); 993 989 goto rx_dropped; 994 990 } 995 991 } ··· 1000 992 !hostap_is_eapol_frame(local, skb)) { 1001 993 if (net_ratelimit()) { 1002 994 printk(KERN_DEBUG "%s: dropped unencrypted RX data " 1003 - "frame from %s" 1004 - " (drop_unencrypted=1)\n", 1005 - dev->name, print_mac(mac, hdr->addr2)); 995 + "frame from " MAC_FMT " (drop_unencrypted=1)\n", 996 + dev->name, 997 + hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], 998 + hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]); 1006 999 } 1007 1000 goto rx_dropped; 1008 1001 }
+4 -3
drivers/net/wireless/hostap/hostap_80211_tx.c
··· 314 314 struct ieee80211_hdr_4addr *hdr; 315 315 u16 fc; 316 316 int prefix_len, postfix_len, hdr_len, res; 317 - DECLARE_MAC_BUF(mac); 318 317 319 318 iface = netdev_priv(skb->dev); 320 319 local = iface->local; ··· 328 329 hdr = (struct ieee80211_hdr_4addr *) skb->data; 329 330 if (net_ratelimit()) { 330 331 printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " 331 - "TX packet to %s\n", 332 - local->dev->name, print_mac(mac, hdr->addr1)); 332 + "TX packet to " MAC_FMT "\n", 333 + local->dev->name, 334 + hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], 335 + hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]); 333 336 } 334 337 kfree_skb(skb); 335 338 return NULL;
+127 -76
drivers/net/wireless/hostap/hostap_ap.c
··· 632 632 __le16 *pos; 633 633 struct sta_info *sta = NULL; 634 634 char *txt = NULL; 635 - DECLARE_MAC_BUF(mac); 636 635 637 636 if (ap->local->hostapd) { 638 637 dev_kfree_skb(skb); ··· 683 684 if (sta) 684 685 atomic_dec(&sta->users); 685 686 if (txt) { 686 - PDEBUG(DEBUG_AP, "%s: %s auth_cb - alg=%d " 687 + PDEBUG(DEBUG_AP, "%s: " MAC_FMT " auth_cb - alg=%d " 687 688 "trans#=%d status=%d - %s\n", 688 - dev->name, print_mac(mac, hdr->addr1), auth_alg, 689 - auth_transaction, status, txt); 689 + dev->name, 690 + hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], 691 + hdr->addr1[3], hdr->addr1[4], hdr->addr1[5], 692 + auth_alg, auth_transaction, status, txt); 690 693 } 691 694 dev_kfree_skb(skb); 692 695 } ··· 704 703 __le16 *pos; 705 704 struct sta_info *sta = NULL; 706 705 char *txt = NULL; 707 - DECLARE_MAC_BUF(mac); 708 706 709 707 if (ap->local->hostapd) { 710 708 dev_kfree_skb(skb); ··· 754 754 if (sta) 755 755 atomic_dec(&sta->users); 756 756 if (txt) { 757 - PDEBUG(DEBUG_AP, "%s: %s assoc_cb - %s\n", 758 - dev->name, print_mac(mac, hdr->addr1), txt); 757 + PDEBUG(DEBUG_AP, "%s: " MAC_FMT " assoc_cb - %s\n", 758 + dev->name, 759 + hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], 760 + hdr->addr1[3], hdr->addr1[4], hdr->addr1[5], 761 + txt); 759 762 } 760 763 dev_kfree_skb(skb); 761 764 } ··· 770 767 struct ap_data *ap = data; 771 768 struct ieee80211_hdr_4addr *hdr; 772 769 struct sta_info *sta; 773 - DECLARE_MAC_BUF(mac); 774 770 775 771 if (skb->len < 24) 776 772 goto fail; ··· 781 779 sta->flags &= ~WLAN_STA_PENDING_POLL; 782 780 spin_unlock(&ap->sta_table_lock); 783 781 } else { 784 - PDEBUG(DEBUG_AP, "%s: STA %s" 782 + PDEBUG(DEBUG_AP, "%s: STA " MAC_FMT 785 783 " did not ACK activity poll frame\n", 786 - ap->local->dev->name, print_mac(mac, hdr->addr1)); 784 + ap->local->dev->name, 785 + hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], 786 + hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]); 787 787 } 788 788 789 789 fail: ··· 1310 1306 struct sta_info *sta = NULL; 1311 1307 struct ieee80211_crypt_data *crypt; 1312 1308 char *txt = ""; 1313 - DECLARE_MAC_BUF(mac); 1314 1309 1315 1310 len = skb->len - IEEE80211_MGMT_HDR_LEN; 1316 1311 ··· 1318 1315 1319 1316 if (len < 6) { 1320 1317 PDEBUG(DEBUG_AP, "%s: handle_authen - too short payload " 1321 - "(len=%d) from %s\n", dev->name, len, 1322 - print_mac(mac, hdr->addr2)); 1318 + "(len=%d) from " MAC_FMT "\n", dev->name, len, 1319 + hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], 1320 + hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]); 1323 1321 return; 1324 1322 } 1325 1323 ··· 1385 1381 if (time_after(jiffies, sta->u.ap.last_beacon + 1386 1382 (10 * sta->listen_interval * HZ) / 1024)) { 1387 1383 PDEBUG(DEBUG_AP, "%s: no beacons received for a while," 1388 - " assuming AP %s is now STA\n", 1389 - dev->name, print_mac(mac, sta->addr)); 1384 + " assuming AP " MAC_FMT " is now STA\n", 1385 + dev->name, 1386 + sta->addr[0], sta->addr[1], sta->addr[2], 1387 + sta->addr[3], sta->addr[4], sta->addr[5]); 1390 1388 sta->ap = 0; 1391 1389 sta->flags = 0; 1392 1390 sta->u.sta.challenge = NULL; ··· 1503 1497 } 1504 1498 1505 1499 if (resp) { 1506 - PDEBUG(DEBUG_AP, "%s: %s auth (alg=%d " 1500 + PDEBUG(DEBUG_AP, "%s: " MAC_FMT " auth (alg=%d " 1507 1501 "trans#=%d stat=%d len=%d fc=%04x) ==> %d (%s)\n", 1508 - dev->name, print_mac(mac, hdr->addr2), auth_alg, 1509 - auth_transaction, status_code, len, fc, resp, txt); 1502 + dev->name, 1503 + hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], 1504 + hdr->addr2[3], hdr->addr2[4], hdr->addr2[5], 1505 + auth_alg, auth_transaction, status_code, len, 1506 + fc, resp, txt); 1510 1507 } 1511 1508 } 1512 1509 ··· 1528 1519 int send_deauth = 0; 1529 1520 char *txt = ""; 1530 1521 u8 prev_ap[ETH_ALEN]; 1531 - DECLARE_MAC_BUF(mac); 1532 1522 1533 1523 left = len = skb->len - IEEE80211_MGMT_HDR_LEN; 1534 1524 1535 1525 if (len < (reassoc ? 10 : 4)) { 1536 1526 PDEBUG(DEBUG_AP, "%s: handle_assoc - too short payload " 1537 - "(len=%d, reassoc=%d) from %s\n", 1538 - dev->name, len, reassoc, print_mac(mac, hdr->addr2)); 1527 + "(len=%d, reassoc=%d) from " MAC_FMT "\n", 1528 + dev->name, len, reassoc, 1529 + hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], 1530 + hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]); 1539 1531 return; 1540 1532 } 1541 1533 ··· 1613 1603 } 1614 1604 1615 1605 if (left > 0) { 1616 - PDEBUG(DEBUG_AP, "%s: assoc from %s" 1606 + PDEBUG(DEBUG_AP, "%s: assoc from " MAC_FMT 1617 1607 " with extra data (%d bytes) [", 1618 - dev->name, print_mac(mac, hdr->addr2), left); 1608 + dev->name, 1609 + hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], 1610 + hdr->addr2[3], hdr->addr2[4], hdr->addr2[5], 1611 + left); 1619 1612 while (left > 0) { 1620 1613 PDEBUG2(DEBUG_AP, "<%02x>", *u); 1621 1614 u++; left--; ··· 1717 1704 } 1718 1705 1719 1706 #if 0 1720 - PDEBUG(DEBUG_AP, "%s: %s %sassoc (len=%d " 1721 - "prev_ap=%s) => %d(%d) (%s)\n", 1722 - dev->name, print_mac(mac, hdr->addr2), reassoc ? "re" : "", len, 1723 - print_mac(mac, prev_ap), resp, send_deauth, txt); 1707 + PDEBUG(DEBUG_AP, "%s: " MAC_FMT" %sassoc (len=%d " 1708 + "prev_ap=" MAC_FMT") => %d(%d) (%s)\n", 1709 + dev->name, 1710 + hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], 1711 + hdr->addr2[3], hdr->addr2[4], hdr->addr2[5], 1712 + reassoc ? "re" : "", len, 1713 + prev_ap[0], prev_ap[1], prev_ap[2], 1714 + prev_ap[3], prev_ap[4], prev_ap[5], 1715 + resp, send_deauth, txt); 1724 1716 #endif 1725 1717 } 1726 1718 ··· 1753 1735 pos = (__le16 *) body; 1754 1736 reason_code = le16_to_cpu(*pos); 1755 1737 1756 - PDEBUG(DEBUG_AP, "%s: deauthentication: %s len=%d, " 1757 - "reason_code=%d\n", dev->name, print_mac(mac, hdr->addr2), len, 1758 - reason_code); 1738 + PDEBUG(DEBUG_AP, "%s: deauthentication: " MAC_FMT " len=%d, " 1739 + "reason_code=%d\n", dev->name, 1740 + hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], 1741 + hdr->addr2[3], hdr->addr2[4], hdr->addr2[5], 1742 + len, reason_code); 1759 1743 1760 1744 spin_lock_bh(&local->ap->sta_table_lock); 1761 1745 sta = ap_get_sta(local->ap, hdr->addr2); ··· 1768 1748 } 1769 1749 spin_unlock_bh(&local->ap->sta_table_lock); 1770 1750 if (sta == NULL) { 1771 - printk("%s: deauthentication from %s, " 1751 + printk("%s: deauthentication from " MAC_FMT ", " 1772 1752 "reason_code=%d, but STA not authenticated\n", dev->name, 1773 - print_mac(mac, hdr->addr2), reason_code); 1753 + hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], 1754 + hdr->addr2[3], hdr->addr2[4], hdr->addr2[5], 1755 + reason_code); 1774 1756 } 1775 1757 } 1776 1758 ··· 1788 1766 u16 reason_code; 1789 1767 __le16 *pos; 1790 1768 struct sta_info *sta = NULL; 1791 - DECLARE_MAC_BUF(mac); 1792 1769 1793 1770 len = skb->len - IEEE80211_MGMT_HDR_LEN; 1794 1771 ··· 1799 1778 pos = (__le16 *) body; 1800 1779 reason_code = le16_to_cpu(*pos); 1801 1780 1802 - PDEBUG(DEBUG_AP, "%s: disassociation: %s len=%d, " 1803 - "reason_code=%d\n", dev->name, print_mac(mac, hdr->addr2), len, 1804 - reason_code); 1781 + PDEBUG(DEBUG_AP, "%s: disassociation: " MAC_FMT " len=%d, " 1782 + "reason_code=%d\n", dev->name, 1783 + hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], 1784 + hdr->addr2[3], hdr->addr2[4], hdr->addr2[5], 1785 + len, reason_code); 1805 1786 1806 1787 spin_lock_bh(&local->ap->sta_table_lock); 1807 1788 sta = ap_get_sta(local->ap, hdr->addr2); ··· 1814 1791 } 1815 1792 spin_unlock_bh(&local->ap->sta_table_lock); 1816 1793 if (sta == NULL) { 1817 - printk("%s: disassociation from %s, " 1794 + printk("%s: disassociation from " MAC_FMT ", " 1818 1795 "reason_code=%d, but STA not authenticated\n", 1819 - dev->name, print_mac(mac, hdr->addr2), reason_code); 1796 + dev->name, 1797 + hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], 1798 + hdr->addr2[3], hdr->addr2[4], hdr->addr2[5], 1799 + reason_code); 1820 1800 } 1821 1801 } 1822 1802 ··· 1908 1882 struct sta_info *sta; 1909 1883 u16 aid; 1910 1884 struct sk_buff *skb; 1911 - DECLARE_MAC_BUF(mac); 1912 1885 1913 - PDEBUG(DEBUG_PS2, "handle_pspoll: BSSID=%s" 1914 - ", TA=%s PWRMGT=%d\n", 1915 - print_mac(mac, hdr->addr1), print_mac(mac, hdr->addr2), 1886 + PDEBUG(DEBUG_PS2, "handle_pspoll: BSSID=" MAC_FMT 1887 + ", TA=" MAC_FMT " PWRMGT=%d\n", 1888 + hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], 1889 + hdr->addr1[3], hdr->addr1[4], hdr->addr1[5], 1890 + hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], 1891 + hdr->addr2[3], hdr->addr2[4], hdr->addr2[5], 1916 1892 !!(le16_to_cpu(hdr->frame_ctl) & IEEE80211_FCTL_PM)); 1917 1893 1918 1894 if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { 1919 - PDEBUG(DEBUG_AP, "handle_pspoll - addr1(BSSID)=%s" 1920 - " not own MAC\n", print_mac(mac, hdr->addr1)); 1895 + PDEBUG(DEBUG_AP, "handle_pspoll - addr1(BSSID)=" MAC_FMT 1896 + " not own MAC\n", 1897 + hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], 1898 + hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]); 1921 1899 return; 1922 1900 } 1923 1901 ··· 1999 1969 wds_oper_queue); 2000 1970 local_info_t *local = ap->local; 2001 1971 struct wds_oper_data *entry, *prev; 2002 - DECLARE_MAC_BUF(mac); 2003 1972 2004 1973 spin_lock_bh(&local->lock); 2005 1974 entry = local->ap->wds_oper_entries; ··· 2007 1978 2008 1979 while (entry) { 2009 1980 PDEBUG(DEBUG_AP, "%s: %s automatic WDS connection " 2010 - "to AP %s\n", 1981 + "to AP " MAC_FMT "\n", 2011 1982 local->dev->name, 2012 1983 entry->type == WDS_ADD ? "adding" : "removing", 2013 - print_mac(mac, entry->addr)); 1984 + entry->addr[0], entry->addr[1], entry->addr[2], 1985 + entry->addr[3], entry->addr[4], entry->addr[5]); 2014 1986 if (entry->type == WDS_ADD) 2015 1987 prism2_wds_add(local, entry->addr, 0); 2016 1988 else if (entry->type == WDS_DEL) ··· 2188 2158 #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ 2189 2159 u16 fc, type, stype; 2190 2160 struct ieee80211_hdr_4addr *hdr; 2191 - DECLARE_MAC_BUF(mac); 2192 2161 2193 2162 /* FIX: should give skb->len to handler functions and check that the 2194 2163 * buffer is long enough */ ··· 2216 2187 2217 2188 if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { 2218 2189 PDEBUG(DEBUG_AP, "handle_ap_item - addr1(BSSID)=" 2219 - "%s not own MAC\n", 2220 - print_mac(mac, hdr->addr1)); 2190 + MAC_FMT " not own MAC\n", 2191 + hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], 2192 + hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]); 2221 2193 goto done; 2222 2194 } 2223 2195 ··· 2254 2224 } 2255 2225 2256 2226 if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { 2257 - PDEBUG(DEBUG_AP, "handle_ap_item - addr1(DA)=%s" 2258 - " not own MAC\n", print_mac(mac, hdr->addr1)); 2227 + PDEBUG(DEBUG_AP, "handle_ap_item - addr1(DA)=" MAC_FMT 2228 + " not own MAC\n", 2229 + hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], 2230 + hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]); 2259 2231 goto done; 2260 2232 } 2261 2233 2262 2234 if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN)) { 2263 - PDEBUG(DEBUG_AP, "handle_ap_item - addr3(BSSID)=%s" 2264 - " not own MAC\n", print_mac(mac, hdr->addr3)); 2235 + PDEBUG(DEBUG_AP, "handle_ap_item - addr3(BSSID)=" MAC_FMT 2236 + " not own MAC\n", 2237 + hdr->addr3[0], hdr->addr3[1], hdr->addr3[2], 2238 + hdr->addr3[3], hdr->addr3[4], hdr->addr3[5]); 2265 2239 goto done; 2266 2240 } 2267 2241 ··· 2346 2312 struct sk_buff *skb; 2347 2313 struct ieee80211_hdr_4addr *hdr; 2348 2314 struct hostap_80211_rx_status rx_stats; 2349 - DECLARE_MAC_BUF(mac); 2350 2315 2351 2316 if (skb_queue_empty(&sta->tx_buf)) 2352 2317 return; ··· 2367 2334 hdr->duration_id = cpu_to_le16(sta->aid | BIT(15) | BIT(14)); 2368 2335 2369 2336 PDEBUG(DEBUG_PS2, "%s: Scheduling buffered packet delivery for STA " 2370 - "%s\n", local->dev->name, print_mac(mac, sta->addr)); 2337 + MAC_FMT "\n", local->dev->name, 2338 + sta->addr[0], sta->addr[1], sta->addr[2], 2339 + sta->addr[3], sta->addr[4], sta->addr[5]); 2371 2340 2372 2341 skb->dev = local->dev; 2373 2342 ··· 2696 2661 int ret = sta->tx_rate; 2697 2662 struct hostap_interface *iface; 2698 2663 local_info_t *local; 2699 - DECLARE_MAC_BUF(mac); 2700 2664 2701 2665 iface = netdev_priv(dev); 2702 2666 local = iface->local; ··· 2723 2689 case 3: sta->tx_rate = 110; break; 2724 2690 default: sta->tx_rate = 0; break; 2725 2691 } 2726 - PDEBUG(DEBUG_AP, "%s: STA %s" 2692 + PDEBUG(DEBUG_AP, "%s: STA " MAC_FMT 2727 2693 " TX rate raised to %d\n", 2728 - dev->name, print_mac(mac, sta->addr), sta->tx_rate); 2694 + dev->name, 2695 + sta->addr[0], sta->addr[1], sta->addr[2], 2696 + sta->addr[3], sta->addr[4], sta->addr[5], 2697 + sta->tx_rate); 2729 2698 } 2730 2699 sta->tx_since_last_failure = 0; 2731 2700 } ··· 2746 2709 int set_tim, ret; 2747 2710 struct ieee80211_hdr_4addr *hdr; 2748 2711 struct hostap_skb_tx_data *meta; 2749 - DECLARE_MAC_BUF(mac); 2750 2712 2751 2713 meta = (struct hostap_skb_tx_data *) skb->cb; 2752 2714 ret = AP_TX_CONTINUE; ··· 2781 2745 * print out any errors here. */ 2782 2746 if (net_ratelimit()) { 2783 2747 printk(KERN_DEBUG "AP: drop packet to non-associated " 2784 - "STA %s\n", 2785 - print_mac(mac, hdr->addr1)); 2748 + "STA " MAC_FMT "\n", 2749 + hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], 2750 + hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]); 2786 2751 } 2787 2752 #endif 2788 2753 local->ap->tx_drop_nonassoc++; ··· 2821 2784 } 2822 2785 2823 2786 if (skb_queue_len(&sta->tx_buf) >= STA_MAX_TX_BUFFER) { 2824 - PDEBUG(DEBUG_PS, "%s: No more space in STA (%s" 2787 + PDEBUG(DEBUG_PS, "%s: No more space in STA (" MAC_FMT 2825 2788 ")'s PS mode buffer\n", 2826 - local->dev->name, print_mac(mac, sta->addr)); 2789 + local->dev->name, 2790 + sta->addr[0], sta->addr[1], sta->addr[2], 2791 + sta->addr[3], sta->addr[4], sta->addr[5]); 2827 2792 /* Make sure that TIM is set for the station (it might not be 2828 2793 * after AP wlan hw reset). */ 2829 2794 /* FIX: should fix hw reset to restore bits based on STA ··· 2889 2850 struct sta_info *sta; 2890 2851 struct ieee80211_hdr_4addr *hdr; 2891 2852 struct hostap_skb_tx_data *meta; 2892 - DECLARE_MAC_BUF(mac); 2893 2853 2894 2854 hdr = (struct ieee80211_hdr_4addr *) skb->data; 2895 2855 meta = (struct hostap_skb_tx_data *) skb->cb; ··· 2897 2859 sta = ap_get_sta(local->ap, hdr->addr1); 2898 2860 if (!sta) { 2899 2861 spin_unlock(&local->ap->sta_table_lock); 2900 - PDEBUG(DEBUG_AP, "%s: Could not find STA %s" 2862 + PDEBUG(DEBUG_AP, "%s: Could not find STA " MAC_FMT 2901 2863 " for this TX error (@%lu)\n", 2902 - local->dev->name, print_mac(mac, hdr->addr1), jiffies); 2864 + local->dev->name, 2865 + hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], 2866 + hdr->addr1[3], hdr->addr1[4], hdr->addr1[5], 2867 + jiffies); 2903 2868 return; 2904 2869 } 2905 2870 ··· 2929 2888 case 3: sta->tx_rate = 110; break; 2930 2889 default: sta->tx_rate = 0; break; 2931 2890 } 2932 - PDEBUG(DEBUG_AP, "%s: STA %s" 2891 + PDEBUG(DEBUG_AP, "%s: STA " MAC_FMT 2933 2892 " TX rate lowered to %d\n", 2934 - local->dev->name, print_mac(mac, sta->addr), 2893 + local->dev->name, 2894 + sta->addr[0], sta->addr[1], sta->addr[2], 2895 + sta->addr[3], sta->addr[4], sta->addr[5], 2935 2896 sta->tx_rate); 2936 2897 } 2937 2898 sta->tx_consecutive_exc = 0; ··· 2999 2956 struct sta_info *sta; 3000 2957 u16 fc, type, stype; 3001 2958 struct ieee80211_hdr_4addr *hdr; 3002 - DECLARE_MAC_BUF(mac); 3003 2959 3004 2960 if (local->ap == NULL) 3005 2961 return AP_RX_CONTINUE; ··· 3030 2988 } else { 3031 2989 printk(KERN_DEBUG "%s: dropped received packet" 3032 2990 " from non-associated STA " 3033 - "%s" 2991 + MAC_FMT 3034 2992 " (type=0x%02x, subtype=0x%02x)\n", 3035 - dev->name, print_mac(mac, hdr->addr2), 2993 + dev->name, 2994 + hdr->addr2[0], hdr->addr2[1], 2995 + hdr->addr2[2], hdr->addr2[3], 2996 + hdr->addr2[4], hdr->addr2[5], 3036 2997 type >> 2, stype >> 4); 3037 2998 hostap_rx(dev, skb, rx_stats); 3038 2999 #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ ··· 3070 3025 * being associated. */ 3071 3026 printk(KERN_DEBUG "%s: rejected received nullfunc " 3072 3027 "frame without ToDS from not associated STA " 3073 - "%s\n", 3074 - dev->name, print_mac(mac, hdr->addr2)); 3028 + MAC_FMT "\n", 3029 + dev->name, 3030 + hdr->addr2[0], hdr->addr2[1], 3031 + hdr->addr2[2], hdr->addr2[3], 3032 + hdr->addr2[4], hdr->addr2[5]); 3075 3033 hostap_rx(dev, skb, rx_stats); 3076 3034 #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ 3077 3035 } ··· 3091 3043 * If BSSID is own, report the dropping of this frame. */ 3092 3044 if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN) == 0) { 3093 3045 printk(KERN_DEBUG "%s: dropped received packet from " 3094 - "%s with no ToDS flag " 3046 + MAC_FMT " with no ToDS flag " 3095 3047 "(type=0x%02x, subtype=0x%02x)\n", dev->name, 3096 - print_mac(mac, hdr->addr2), type >> 2, stype >> 4); 3048 + hdr->addr2[0], hdr->addr2[1], 3049 + hdr->addr2[2], hdr->addr2[3], 3050 + hdr->addr2[4], hdr->addr2[5], 3051 + type >> 2, stype >> 4); 3097 3052 hostap_dump_rx_80211(dev->name, skb, rx_stats); 3098 3053 } 3099 3054 ret = AP_RX_DROP;
+5 -3
drivers/net/wireless/ipw2200.c
··· 10192 10192 u8 id, hdr_len, unicast; 10193 10193 u16 remaining_bytes; 10194 10194 int fc; 10195 - DECLARE_MAC_BUF(mac); 10196 10195 10197 10196 hdr_len = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl)); 10198 10197 switch (priv->ieee->iw_mode) { ··· 10202 10203 id = ipw_add_station(priv, hdr->addr1); 10203 10204 if (id == IPW_INVALID_STATION) { 10204 10205 IPW_WARNING("Attempt to send data to " 10205 - "invalid cell: %s\n", 10206 - print_mac(mac, hdr->addr1)); 10206 + "invalid cell: " MAC_FMT "\n", 10207 + hdr->addr1[0], hdr->addr1[1], 10208 + hdr->addr1[2], hdr->addr1[3], 10209 + hdr->addr1[4], hdr->addr1[5]); 10207 10210 goto drop; 10208 10211 } 10209 10212 } ··· 11575 11574 priv->prom_priv->priv = priv; 11576 11575 11577 11576 strcpy(priv->prom_net_dev->name, "rtap%d"); 11577 + memcpy(priv->prom_net_dev->dev_addr, priv->mac_addr, ETH_ALEN); 11578 11578 11579 11579 priv->prom_net_dev->type = ARPHRD_IEEE80211_RADIOTAP; 11580 11580 priv->prom_net_dev->open = ipw_prom_open;
+1 -1
drivers/net/wireless/libertas/assoc.c
··· 1004 1004 } 1005 1005 1006 1006 if (find_any_ssid) { 1007 - u8 new_mode; 1007 + u8 new_mode = assoc_req->mode; 1008 1008 1009 1009 ret = lbs_find_best_network_ssid(priv, assoc_req->ssid, 1010 1010 &assoc_req->ssid_len, assoc_req->mode, &new_mode);
+1 -3
drivers/net/wireless/rt2x00/rt61pci.c
··· 2379 2379 */ 2380 2380 if (skb_headroom(skb) < intf->beacon->queue->desc_size) { 2381 2381 if (pskb_expand_head(skb, intf->beacon->queue->desc_size, 2382 - 0, GFP_ATOMIC)) { 2383 - dev_kfree_skb(skb); 2382 + 0, GFP_ATOMIC)) 2384 2383 return -ENOMEM; 2385 - } 2386 2384 } 2387 2385 2388 2386 /*
+7 -6
drivers/ssb/driver_mipscore.c
··· 109 109 clear_irq(bus, oldirq); 110 110 111 111 /* assign the new one */ 112 - if (irq == 0) 113 - ssb_write32(mdev, SSB_INTVEC, ((1 << irqflag) & ssb_read32(mdev, SSB_INTVEC))); 114 - 115 - irqflag <<= ipsflag_irq_shift[irq]; 116 - irqflag |= (ssb_read32(mdev, SSB_IPSFLAG) & ~ipsflag_irq_mask[irq]); 117 - ssb_write32(mdev, SSB_IPSFLAG, irqflag); 112 + if (irq == 0) { 113 + ssb_write32(mdev, SSB_INTVEC, ((1 << irqflag) | ssb_read32(mdev, SSB_INTVEC))); 114 + } else { 115 + irqflag <<= ipsflag_irq_shift[irq]; 116 + irqflag |= (ssb_read32(mdev, SSB_IPSFLAG) & ~ipsflag_irq_mask[irq]); 117 + ssb_write32(mdev, SSB_IPSFLAG, irqflag); 118 + } 118 119 } 119 120 120 121 static void ssb_mips_serial_init(struct ssb_mipscore *mcore)
+1 -1
drivers/ssb/driver_pcicore.c
··· 569 569 } else { 570 570 tmp = ssb_read32(dev, SSB_TPSFLAG); 571 571 tmp &= SSB_TPSFLAG_BPFLAG; 572 - intvec |= tmp; 572 + intvec |= (1 << tmp); 573 573 } 574 574 ssb_write32(pdev, SSB_INTVEC, intvec); 575 575 }
+6
drivers/ssb/main.c
··· 1190 1190 goto out; 1191 1191 1192 1192 cc = &bus->chipco; 1193 + 1194 + if (!cc->dev) 1195 + goto out; 1196 + if (cc->dev->id.revision < 5) 1197 + goto out; 1198 + 1193 1199 ssb_chipco_set_clockmode(cc, SSB_CLKMODE_SLOW); 1194 1200 err = ssb_pci_xtal(bus, SSB_GPIO_XTAL | SSB_GPIO_PLL, 0); 1195 1201 if (err)
+1 -1
include/linux/Kbuild
··· 86 86 header-y += if_ppp.h 87 87 header-y += if_slip.h 88 88 header-y += if_strip.h 89 + header-y += if_tun.h 89 90 header-y += if_tunnel.h 90 91 header-y += in6.h 91 92 header-y += in_route.h ··· 230 229 unifdef-y += if_pppol2tp.h 231 230 unifdef-y += if_pppox.h 232 231 unifdef-y += if_tr.h 233 - unifdef-y += if_tun.h 234 232 unifdef-y += if_vlan.h 235 233 unifdef-y += if_wanpipe.h 236 234 unifdef-y += igmp.h
-39
include/linux/if_tun.h
··· 18 18 #ifndef __IF_TUN_H 19 19 #define __IF_TUN_H 20 20 21 - /* Uncomment to enable debugging */ 22 - /* #define TUN_DEBUG 1 */ 23 - 24 21 #include <linux/types.h> 25 - 26 - #ifdef __KERNEL__ 27 - 28 - #ifdef TUN_DEBUG 29 - #define DBG if(tun->debug)printk 30 - #define DBG1 if(debug==2)printk 31 - #else 32 - #define DBG( a... ) 33 - #define DBG1( a... ) 34 - #endif 35 - 36 - struct tun_struct { 37 - struct list_head list; 38 - unsigned long flags; 39 - int attached; 40 - uid_t owner; 41 - gid_t group; 42 - 43 - wait_queue_head_t read_wait; 44 - struct sk_buff_head readq; 45 - 46 - struct net_device *dev; 47 - 48 - struct fasync_struct *fasync; 49 - 50 - unsigned long if_flags; 51 - u8 dev_addr[ETH_ALEN]; 52 - u32 chr_filter[2]; 53 - u32 net_filter[2]; 54 - 55 - #ifdef TUN_DEBUG 56 - int debug; 57 - #endif 58 - }; 59 - 60 - #endif /* __KERNEL__ */ 61 22 62 23 /* Read queue size */ 63 24 #define TUN_READQ_SIZE 500
+1 -1
include/linux/ipv6.h
··· 53 53 /* 54 54 * TLV encoded option data follows. 55 55 */ 56 - }; 56 + } __attribute__ ((packed)); /* required for some archs */ 57 57 58 58 #define ipv6_destopt_hdr ipv6_opt_hdr 59 59 #define ipv6_hopopt_hdr ipv6_opt_hdr
+1 -1
include/net/inet_ecn.h
··· 47 47 } while (0) 48 48 49 49 #define IP6_ECN_flow_xmit(sk, label) do { \ 50 - if (INET_ECN_is_capable(inet_sk(sk)->tos)) \ 50 + if (INET_ECN_is_capable(inet6_sk(sk)->tclass)) \ 51 51 (label) |= htonl(INET_ECN_ECT_0 << 20); \ 52 52 } while (0) 53 53
+1
include/net/sctp/command.h
··· 104 104 SCTP_CMD_ADAPTATION_IND, /* generate and send adaptation event */ 105 105 SCTP_CMD_ASSOC_SHKEY, /* generate the association shared keys */ 106 106 SCTP_CMD_T1_RETRAN, /* Mark for retransmission after T1 timeout */ 107 + SCTP_CMD_UPDATE_INITTAG, /* Update peer inittag */ 107 108 SCTP_CMD_LAST 108 109 } sctp_verb_t; 109 110
+1 -1
include/net/sctp/ulpevent.h
··· 67 67 }; 68 68 69 69 /* Retrieve the skb this event sits inside of. */ 70 - static inline struct sk_buff *sctp_event2skb(struct sctp_ulpevent *ev) 70 + static inline struct sk_buff *sctp_event2skb(const struct sctp_ulpevent *ev) 71 71 { 72 72 return container_of((void *)ev, struct sk_buff, cb); 73 73 }
+2
include/net/tcp.h
··· 763 763 return tp->packets_out - tcp_left_out(tp) + tp->retrans_out; 764 764 } 765 765 766 + extern int tcp_limit_reno_sacked(struct tcp_sock *tp); 767 + 766 768 /* If cwnd > ssthresh, we may raise ssthresh to be half-way to cwnd. 767 769 * The exception is rate halving phase, when cwnd is decreasing towards 768 770 * ssthresh.
+9 -4
lib/random32.c
··· 97 97 * @seed: seed value 98 98 * 99 99 * Add some additional seeding to the random32() pool. 100 - * Note: this pool is per cpu so it only affects current CPU. 101 100 */ 102 101 void srandom32(u32 entropy) 103 102 { 104 - struct rnd_state *state = &get_cpu_var(net_rand_state); 105 - __set_random32(state, state->s1 ^ entropy); 106 - put_cpu_var(state); 103 + int i; 104 + /* 105 + * No locking on the CPUs, but then somewhat random results are, well, 106 + * expected. 107 + */ 108 + for_each_possible_cpu (i) { 109 + struct rnd_state *state = &per_cpu(net_rand_state, i); 110 + __set_random32(state, state->s1 ^ entropy); 111 + } 107 112 } 108 113 EXPORT_SYMBOL(srandom32); 109 114
+15
net/8021q/vlan_dev.c
··· 692 692 return 0; 693 693 } 694 694 695 + static void vlan_dev_uninit(struct net_device *dev) 696 + { 697 + struct vlan_priority_tci_mapping *pm; 698 + struct vlan_dev_info *vlan = vlan_dev_info(dev); 699 + int i; 700 + 701 + for (i = 0; i < ARRAY_SIZE(vlan->egress_priority_map); i++) { 702 + while ((pm = vlan->egress_priority_map[i]) != NULL) { 703 + vlan->egress_priority_map[i] = pm->next; 704 + kfree(pm); 705 + } 706 + } 707 + } 708 + 695 709 void vlan_setup(struct net_device *dev) 696 710 { 697 711 ether_setup(dev); ··· 715 701 716 702 dev->change_mtu = vlan_dev_change_mtu; 717 703 dev->init = vlan_dev_init; 704 + dev->uninit = vlan_dev_uninit; 718 705 dev->open = vlan_dev_open; 719 706 dev->stop = vlan_dev_stop; 720 707 dev->set_mac_address = vlan_dev_set_mac_address;
+19 -10
net/atm/lec.c
··· 266 266 char buf[300]; 267 267 int i = 0; 268 268 #endif /* DUMP_PACKETS >0 */ 269 - DECLARE_MAC_BUF(mac); 270 269 271 270 pr_debug("lec_start_xmit called\n"); 272 271 if (!priv->lecd) { ··· 373 374 if (entry && (entry->tx_wait.qlen < LEC_UNRES_QUE_LEN)) { 374 375 pr_debug("%s:lec_start_xmit: queuing packet, ", 375 376 dev->name); 376 - pr_debug("MAC address %s\n", 377 - print_mac(mac, lec_h->h_dest)); 377 + pr_debug("MAC address " MAC_FMT "\n", 378 + lec_h->h_dest[0], lec_h->h_dest[1], 379 + lec_h->h_dest[2], lec_h->h_dest[3], 380 + lec_h->h_dest[4], lec_h->h_dest[5]); 378 381 skb_queue_tail(&entry->tx_wait, skb); 379 382 } else { 380 383 pr_debug 381 384 ("%s:lec_start_xmit: tx queue full or no arp entry, dropping, ", 382 385 dev->name); 383 - pr_debug("MAC address %s\n", 384 - print_mac(mac, lec_h->h_dest)); 386 + pr_debug("MAC address " MAC_FMT "\n", 387 + lec_h->h_dest[0], lec_h->h_dest[1], 388 + lec_h->h_dest[2], lec_h->h_dest[3], 389 + lec_h->h_dest[4], lec_h->h_dest[5]); 385 390 priv->stats.tx_dropped++; 386 391 dev_kfree_skb(skb); 387 392 } ··· 397 394 398 395 while (entry && (skb2 = skb_dequeue(&entry->tx_wait))) { 399 396 pr_debug("lec.c: emptying tx queue, "); 400 - pr_debug("MAC address %s\n", 401 - print_mac(mac, lec_h->h_dest)); 397 + pr_debug("MAC address " MAC_FMT "\n", 398 + lec_h->h_dest[0], lec_h->h_dest[1], 399 + lec_h->h_dest[2], lec_h->h_dest[3], 400 + lec_h->h_dest[4], lec_h->h_dest[5]); 402 401 lec_send(vcc, skb2, priv); 403 402 } 404 403 ··· 454 449 struct lec_arp_table *entry; 455 450 int i; 456 451 char *tmp; /* FIXME */ 457 - DECLARE_MAC_BUF(mac); 458 452 459 453 atomic_sub(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); 460 454 mesg = (struct atmlec_msg *)skb->data; ··· 540 536 struct net_bridge_fdb_entry *f; 541 537 542 538 pr_debug 543 - ("%s: bridge zeppelin asks about %s\n", 539 + ("%s: bridge zeppelin asks about " MAC_FMT "\n", 544 540 dev->name, 545 - print_mac(mac, mesg->content.proxy.mac_addr)); 541 + mesg->content.proxy.mac_addr[0], 542 + mesg->content.proxy.mac_addr[1], 543 + mesg->content.proxy.mac_addr[2], 544 + mesg->content.proxy.mac_addr[3], 545 + mesg->content.proxy.mac_addr[4], 546 + mesg->content.proxy.mac_addr[5]); 546 547 547 548 if (br_fdb_get_hook == NULL || dev->br_port == NULL) 548 549 break;
+2
net/ax25/ax25_uid.c
··· 218 218 struct hlist_node *node; 219 219 220 220 write_lock(&ax25_uid_lock); 221 + again: 221 222 ax25_uid_for_each(ax25_uid, node, &ax25_uid_list) { 222 223 hlist_del_init(&ax25_uid->uid_node); 223 224 ax25_uid_put(ax25_uid); 225 + goto again; 224 226 } 225 227 write_unlock(&ax25_uid_lock); 226 228 }
+4 -1
net/bridge/br_netfilter.c
··· 110 110 * ipt_REJECT needs it. Future netfilter modules might 111 111 * require us to fill additional fields. */ 112 112 static struct net_device __fake_net_device = { 113 - .hard_header_len = ETH_HLEN 113 + .hard_header_len = ETH_HLEN, 114 + #ifdef CONFIG_NET_NS 115 + .nd_net = &init_net, 116 + #endif 114 117 }; 115 118 116 119 static struct rtable __fake_rtable = {
+2 -2
net/core/skbuff.c
··· 2225 2225 * @features: features for the output path (see dev->features) 2226 2226 * 2227 2227 * This function performs segmentation on the given skb. It returns 2228 - * the segment at the given position. It returns NULL if there are 2229 - * no more segments to generate, or when an error is encountered. 2228 + * a pointer to the first in a list of new skbs for the segments. 2229 + * In case of error it returns ERR_PTR(err). 2230 2230 */ 2231 2231 struct sk_buff *skb_segment(struct sk_buff *skb, int features) 2232 2232 {
+1 -1
net/core/sock.c
··· 1746 1746 sk->sk_rcvtimeo = MAX_SCHEDULE_TIMEOUT; 1747 1747 sk->sk_sndtimeo = MAX_SCHEDULE_TIMEOUT; 1748 1748 1749 - sk->sk_stamp = ktime_set(-1L, -1L); 1749 + sk->sk_stamp = ktime_set(-1L, 0); 1750 1750 1751 1751 atomic_set(&sk->sk_refcnt, 1); 1752 1752 atomic_set(&sk->sk_drops, 0);
+6
net/dccp/dccp.h
··· 325 325 * This is used for transmission as well as for reception. 326 326 */ 327 327 struct dccp_skb_cb { 328 + union { 329 + struct inet_skb_parm h4; 330 + #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) 331 + struct inet6_skb_parm h6; 332 + #endif 333 + } header; 328 334 __u8 dccpd_type:4; 329 335 __u8 dccpd_ccval:4; 330 336 __u8 dccpd_reset_code,
-1
net/dccp/ipv4.c
··· 488 488 489 489 dh->dccph_checksum = dccp_v4_csum_finish(skb, ireq->loc_addr, 490 490 ireq->rmt_addr); 491 - memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); 492 491 err = ip_build_and_send_pkt(skb, sk, ireq->loc_addr, 493 492 ireq->rmt_addr, 494 493 ireq->opt);
-1
net/dccp/output.c
··· 126 126 127 127 DCCP_INC_STATS(DCCP_MIB_OUTSEGS); 128 128 129 - memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); 130 129 err = icsk->icsk_af_ops->queue_xmit(skb, 0); 131 130 return net_xmit_eval(err); 132 131 }
+3
net/dccp/proto.c
··· 1038 1038 int ehash_order, bhash_order, i; 1039 1039 int rc = -ENOBUFS; 1040 1040 1041 + BUILD_BUG_ON(sizeof(struct dccp_skb_cb) > 1042 + FIELD_SIZEOF(struct sk_buff, cb)); 1043 + 1041 1044 dccp_hashinfo.bind_bucket_cachep = 1042 1045 kmem_cache_create("dccp_bind_bucket", 1043 1046 sizeof(struct inet_bind_bucket), 0,
+1 -1
net/ethernet/eth.c
··· 301 301 static int eth_validate_addr(struct net_device *dev) 302 302 { 303 303 if (!is_valid_ether_addr(dev->dev_addr)) 304 - return -EINVAL; 304 + return -EADDRNOTAVAIL; 305 305 306 306 return 0; 307 307 }
+29 -14
net/ieee80211/ieee80211_rx.c
··· 271 271 { 272 272 struct ieee80211_hdr_3addr *hdr; 273 273 int res, hdrlen; 274 - DECLARE_MAC_BUF(mac); 275 274 276 275 if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL) 277 276 return 0; ··· 282 283 res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv); 283 284 atomic_dec(&crypt->refcnt); 284 285 if (res < 0) { 285 - IEEE80211_DEBUG_DROP("decryption failed (SA=%s" 286 - ") res=%d\n", print_mac(mac, hdr->addr2), res); 286 + IEEE80211_DEBUG_DROP("decryption failed (SA=" MAC_FMT 287 + ") res=%d\n", 288 + hdr->addr2[0], hdr->addr2[1], 289 + hdr->addr2[2], hdr->addr2[3], 290 + hdr->addr2[4], hdr->addr2[5], 291 + res); 287 292 if (res == -2) 288 293 IEEE80211_DEBUG_DROP("Decryption failed ICV " 289 294 "mismatch (key %d)\n", ··· 307 304 { 308 305 struct ieee80211_hdr_3addr *hdr; 309 306 int res, hdrlen; 310 - DECLARE_MAC_BUF(mac); 311 307 312 308 if (crypt == NULL || crypt->ops->decrypt_msdu == NULL) 313 309 return 0; ··· 319 317 atomic_dec(&crypt->refcnt); 320 318 if (res < 0) { 321 319 printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed" 322 - " (SA=%s keyidx=%d)\n", 323 - ieee->dev->name, print_mac(mac, hdr->addr2), keyidx); 320 + " (SA=" MAC_FMT " keyidx=%d)\n", 321 + ieee->dev->name, 322 + hdr->addr2[0], hdr->addr2[1], 323 + hdr->addr2[2], hdr->addr2[3], 324 + hdr->addr2[4], hdr->addr2[5], 325 + keyidx); 324 326 return -1; 325 327 } 326 328 ··· 468 462 * frames silently instead of filling system log with 469 463 * these reports. */ 470 464 IEEE80211_DEBUG_DROP("Decryption failed (not set)" 471 - " (SA=%s)\n", 472 - print_mac(mac, hdr->addr2)); 465 + " (SA=" MAC_FMT ")\n", 466 + hdr->addr2[0], hdr->addr2[1], 467 + hdr->addr2[2], hdr->addr2[3], 468 + hdr->addr2[4], hdr->addr2[5]); 473 469 ieee->ieee_stats.rx_discards_undecryptable++; 474 470 goto rx_dropped; 475 471 } ··· 482 474 fc & IEEE80211_FCTL_PROTECTED && ieee->host_decrypt && 483 475 (keyidx = hostap_rx_frame_decrypt(ieee, skb, crypt)) < 0) { 484 476 printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth " 485 - "from %s\n", dev->name, 486 - print_mac(mac, hdr->addr2)); 477 + "from " MAC_FMT "\n", dev->name, 478 + hdr->addr2[0], hdr->addr2[1], 479 + hdr->addr2[2], hdr->addr2[3], 480 + hdr->addr2[4], hdr->addr2[5]); 487 481 /* TODO: could inform hostapd about this so that it 488 482 * could send auth failure report */ 489 483 goto rx_dropped; ··· 663 653 * configured */ 664 654 } else { 665 655 IEEE80211_DEBUG_DROP("encryption configured, but RX " 666 - "frame not encrypted (SA=%s" 667 - ")\n", print_mac(mac, hdr->addr2)); 656 + "frame not encrypted (SA=" 657 + MAC_FMT ")\n", 658 + hdr->addr2[0], hdr->addr2[1], 659 + hdr->addr2[2], hdr->addr2[3], 660 + hdr->addr2[4], hdr->addr2[5]); 668 661 goto rx_dropped; 669 662 } 670 663 } ··· 675 662 if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !ieee->open_wep && 676 663 !ieee80211_is_eapol_frame(ieee, skb)) { 677 664 IEEE80211_DEBUG_DROP("dropped unencrypted RX data " 678 - "frame from %s" 665 + "frame from " MAC_FMT 679 666 " (drop_unencrypted=1)\n", 680 - print_mac(mac, hdr->addr2)); 667 + hdr->addr2[0], hdr->addr2[1], 668 + hdr->addr2[2], hdr->addr2[3], 669 + hdr->addr2[4], hdr->addr2[5]); 681 670 goto rx_dropped; 682 671 } 683 672
+13 -11
net/ipv4/icmp.c
··· 578 578 } 579 579 580 580 if (xfrm_decode_session_reverse(skb_in, &fl, AF_INET)) 581 - goto ende; 581 + goto relookup_failed; 582 582 583 583 if (inet_addr_type(net, fl.fl4_src) == RTN_LOCAL) 584 584 err = __ip_route_output_key(net, &rt2, &fl); ··· 588 588 589 589 fl2.fl4_dst = fl.fl4_src; 590 590 if (ip_route_output_key(net, &rt2, &fl2)) 591 - goto ende; 591 + goto relookup_failed; 592 592 593 593 /* Ugh! */ 594 594 odst = skb_in->dst; ··· 601 601 } 602 602 603 603 if (err) 604 - goto ende; 604 + goto relookup_failed; 605 605 606 606 err = xfrm_lookup((struct dst_entry **)&rt2, &fl, NULL, 607 607 XFRM_LOOKUP_ICMP); 608 - if (err == -ENOENT) { 608 + switch (err) { 609 + case 0: 610 + dst_release(&rt->u.dst); 611 + rt = rt2; 612 + break; 613 + case -EPERM: 614 + goto ende; 615 + default: 616 + relookup_failed: 609 617 if (!rt) 610 618 goto out_unlock; 611 - goto route_done; 619 + break; 612 620 } 613 - 614 - dst_release(&rt->u.dst); 615 - rt = rt2; 616 - 617 - if (err) 618 - goto out_unlock; 619 621 } 620 622 621 623 route_done:
+1 -1
net/ipv4/ip_sockglue.c
··· 1133 1133 } 1134 1134 release_sock(sk); 1135 1135 1136 - if (len < sizeof(int) && len > 0 && val>=0 && val<255) { 1136 + if (len < sizeof(int) && len > 0 && val>=0 && val<=255) { 1137 1137 unsigned char ucval = (unsigned char)val; 1138 1138 len = 1; 1139 1139 if (put_user(len, optlen))
+3 -1
net/ipv4/netfilter/ipt_CLUSTERIP.c
··· 82 82 static inline void 83 83 clusterip_config_entry_put(struct clusterip_config *c) 84 84 { 85 + write_lock_bh(&clusterip_lock); 85 86 if (atomic_dec_and_test(&c->entries)) { 86 - write_lock_bh(&clusterip_lock); 87 87 list_del(&c->list); 88 88 write_unlock_bh(&clusterip_lock); 89 89 ··· 96 96 #ifdef CONFIG_PROC_FS 97 97 remove_proc_entry(c->pde->name, c->pde->parent); 98 98 #endif 99 + return; 99 100 } 101 + write_unlock_bh(&clusterip_lock); 100 102 } 101 103 102 104 static struct clusterip_config *
+2
net/ipv4/netfilter/nf_nat_core.c
··· 629 629 size_t i; 630 630 int ret; 631 631 632 + need_ipv4_conntrack(); 633 + 632 634 ret = nf_ct_extend_register(&nat_extend); 633 635 if (ret < 0) { 634 636 printk(KERN_ERR "nf_nat_core: Unable to register extension\n");
+48 -17
net/ipv4/tcp_input.c
··· 1625 1625 return flag; 1626 1626 } 1627 1627 1628 - /* If we receive more dupacks than we expected counting segments 1629 - * in assumption of absent reordering, interpret this as reordering. 1630 - * The only another reason could be bug in receiver TCP. 1628 + /* Limits sacked_out so that sum with lost_out isn't ever larger than 1629 + * packets_out. Returns zero if sacked_out adjustement wasn't necessary. 1631 1630 */ 1632 - static void tcp_check_reno_reordering(struct sock *sk, const int addend) 1631 + int tcp_limit_reno_sacked(struct tcp_sock *tp) 1633 1632 { 1634 - struct tcp_sock *tp = tcp_sk(sk); 1635 1633 u32 holes; 1636 1634 1637 1635 holes = max(tp->lost_out, 1U); ··· 1637 1639 1638 1640 if ((tp->sacked_out + holes) > tp->packets_out) { 1639 1641 tp->sacked_out = tp->packets_out - holes; 1640 - tcp_update_reordering(sk, tp->packets_out + addend, 0); 1642 + return 1; 1641 1643 } 1644 + return 0; 1645 + } 1646 + 1647 + /* If we receive more dupacks than we expected counting segments 1648 + * in assumption of absent reordering, interpret this as reordering. 1649 + * The only another reason could be bug in receiver TCP. 1650 + */ 1651 + static void tcp_check_reno_reordering(struct sock *sk, const int addend) 1652 + { 1653 + struct tcp_sock *tp = tcp_sk(sk); 1654 + if (tcp_limit_reno_sacked(tp)) 1655 + tcp_update_reordering(sk, tp->packets_out + addend, 0); 1642 1656 } 1643 1657 1644 1658 /* Emulate SACKs for SACKless connection: account for a new dupack. */ ··· 1691 1681 int tcp_use_frto(struct sock *sk) 1692 1682 { 1693 1683 const struct tcp_sock *tp = tcp_sk(sk); 1684 + const struct inet_connection_sock *icsk = inet_csk(sk); 1694 1685 struct sk_buff *skb; 1695 1686 1696 1687 if (!sysctl_tcp_frto) 1688 + return 0; 1689 + 1690 + /* MTU probe and F-RTO won't really play nicely along currently */ 1691 + if (icsk->icsk_mtup.probe_size) 1697 1692 return 0; 1698 1693 1699 1694 if (IsSackFrto()) ··· 2149 2134 /* Mark head of queue up as lost. With RFC3517 SACK, the packets is 2150 2135 * is against sacked "cnt", otherwise it's against facked "cnt" 2151 2136 */ 2152 - static void tcp_mark_head_lost(struct sock *sk, int packets, int fast_rexmit) 2137 + static void tcp_mark_head_lost(struct sock *sk, int packets) 2153 2138 { 2154 2139 struct tcp_sock *tp = tcp_sk(sk); 2155 2140 struct sk_buff *skb; 2156 - int cnt; 2141 + int cnt, oldcnt; 2142 + int err; 2143 + unsigned int mss; 2157 2144 2158 2145 BUG_TRAP(packets <= tp->packets_out); 2159 2146 if (tp->lost_skb_hint) { ··· 2174 2157 tp->lost_skb_hint = skb; 2175 2158 tp->lost_cnt_hint = cnt; 2176 2159 2160 + if (after(TCP_SKB_CB(skb)->end_seq, tp->high_seq)) 2161 + break; 2162 + 2163 + oldcnt = cnt; 2177 2164 if (tcp_is_fack(tp) || tcp_is_reno(tp) || 2178 2165 (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED)) 2179 2166 cnt += tcp_skb_pcount(skb); 2180 2167 2181 - if (((!fast_rexmit || (tp->lost_out > 0)) && (cnt > packets)) || 2182 - after(TCP_SKB_CB(skb)->end_seq, tp->high_seq)) 2183 - break; 2168 + if (cnt > packets) { 2169 + if (tcp_is_sack(tp) || (oldcnt >= packets)) 2170 + break; 2171 + 2172 + mss = skb_shinfo(skb)->gso_size; 2173 + err = tcp_fragment(sk, skb, (packets - oldcnt) * mss, mss); 2174 + if (err < 0) 2175 + break; 2176 + cnt = packets; 2177 + } 2178 + 2184 2179 if (!(TCP_SKB_CB(skb)->sacked & (TCPCB_SACKED_ACKED|TCPCB_LOST))) { 2185 2180 TCP_SKB_CB(skb)->sacked |= TCPCB_LOST; 2186 2181 tp->lost_out += tcp_skb_pcount(skb); ··· 2209 2180 struct tcp_sock *tp = tcp_sk(sk); 2210 2181 2211 2182 if (tcp_is_reno(tp)) { 2212 - tcp_mark_head_lost(sk, 1, fast_rexmit); 2183 + tcp_mark_head_lost(sk, 1); 2213 2184 } else if (tcp_is_fack(tp)) { 2214 2185 int lost = tp->fackets_out - tp->reordering; 2215 2186 if (lost <= 0) 2216 2187 lost = 1; 2217 - tcp_mark_head_lost(sk, lost, fast_rexmit); 2188 + tcp_mark_head_lost(sk, lost); 2218 2189 } else { 2219 2190 int sacked_upto = tp->sacked_out - tp->reordering; 2220 - if (sacked_upto < 0) 2221 - sacked_upto = 0; 2222 - tcp_mark_head_lost(sk, sacked_upto, fast_rexmit); 2191 + if (sacked_upto < fast_rexmit) 2192 + sacked_upto = fast_rexmit; 2193 + tcp_mark_head_lost(sk, sacked_upto); 2223 2194 } 2224 2195 2225 2196 /* New heuristics: it is possible only after we switched ··· 2553 2524 before(tp->snd_una, tp->high_seq) && 2554 2525 icsk->icsk_ca_state != TCP_CA_Open && 2555 2526 tp->fackets_out > tp->reordering) { 2556 - tcp_mark_head_lost(sk, tp->fackets_out - tp->reordering, 0); 2527 + tcp_mark_head_lost(sk, tp->fackets_out - tp->reordering); 2557 2528 NET_INC_STATS_BH(LINUX_MIB_TCPLOSS); 2558 2529 } 2559 2530 ··· 2615 2586 case TCP_CA_Loss: 2616 2587 if (flag & FLAG_DATA_ACKED) 2617 2588 icsk->icsk_retransmits = 0; 2589 + if (tcp_is_reno(tp) && flag & FLAG_SND_UNA_ADVANCED) 2590 + tcp_reset_reno_sack(tp); 2618 2591 if (!tcp_try_undo_loss(sk)) { 2619 2592 tcp_moderate_cwnd(tp); 2620 2593 tcp_xmit_retransmit_queue(sk);
+3
net/ipv4/tcp_output.c
··· 1808 1808 if (!lost) 1809 1809 return; 1810 1810 1811 + if (tcp_is_reno(tp)) 1812 + tcp_limit_reno_sacked(tp); 1813 + 1811 1814 tcp_verify_left_out(tp); 1812 1815 1813 1816 /* Don't muck with the congestion window here.
+16 -15
net/ipv6/addrconf.c
··· 372 372 */ 373 373 in6_dev_hold(ndev); 374 374 375 + #if defined(CONFIG_IPV6_SIT) || defined(CONFIG_IPV6_SIT_MODULE) 376 + if (dev->type == ARPHRD_SIT && (dev->priv_flags & IFF_ISATAP)) { 377 + printk(KERN_INFO 378 + "%s: Disabled Multicast RS\n", 379 + dev->name); 380 + ndev->cnf.rtr_solicits = 0; 381 + } 382 + #endif 383 + 375 384 #ifdef CONFIG_IPV6_PRIVACY 376 385 setup_timer(&ndev->regen_timer, ipv6_regen_rndid, (unsigned long)ndev); 377 386 if ((dev->flags&IFF_LOOPBACK) || 378 387 dev->type == ARPHRD_TUNNEL || 379 - #if defined(CONFIG_IPV6_SIT) || defined(CONFIG_IPV6_SIT_MODULE) 388 + dev->type == ARPHRD_TUNNEL6 || 380 389 dev->type == ARPHRD_SIT || 381 - #endif 382 390 dev->type == ARPHRD_NONE) { 383 391 printk(KERN_INFO 384 392 "%s: Disabled Privacy Extensions\n", 385 393 dev->name); 386 394 ndev->cnf.use_tempaddr = -1; 387 - 388 - if (dev->type == ARPHRD_SIT && (dev->priv_flags & IFF_ISATAP)) { 389 - printk(KERN_INFO 390 - "%s: Disabled Multicast RS\n", 391 - dev->name); 392 - ndev->cnf.rtr_solicits = 0; 393 - } 394 395 } else { 395 396 in6_dev_hold(ndev); 396 397 ipv6_regen_rndid((unsigned long) ndev); ··· 2530 2529 2531 2530 ASSERT_RTNL(); 2532 2531 2533 - if (dev == init_net.loopback_dev && how == 1) 2532 + if ((dev->flags & IFF_LOOPBACK) && how == 1) 2534 2533 how = 0; 2535 2534 2536 2535 rt6_ifdown(net, dev); ··· 2543 2542 /* Step 1: remove reference to ipv6 device from parent device. 2544 2543 Do not dev_put! 2545 2544 */ 2546 - if (how == 1) { 2545 + if (how) { 2547 2546 idev->dead = 1; 2548 2547 2549 2548 /* protected by rtnl_lock */ ··· 2575 2574 write_lock_bh(&idev->lock); 2576 2575 2577 2576 /* Step 3: clear flags for stateless addrconf */ 2578 - if (how != 1) 2577 + if (!how) 2579 2578 idev->if_flags &= ~(IF_RS_SENT|IF_RA_RCVD|IF_READY); 2580 2579 2581 2580 /* Step 4: clear address list */ 2582 2581 #ifdef CONFIG_IPV6_PRIVACY 2583 - if (how == 1 && del_timer(&idev->regen_timer)) 2582 + if (how && del_timer(&idev->regen_timer)) 2584 2583 in6_dev_put(idev); 2585 2584 2586 2585 /* clear tempaddr list */ ··· 2617 2616 2618 2617 /* Step 5: Discard multicast list */ 2619 2618 2620 - if (how == 1) 2619 + if (how) 2621 2620 ipv6_mc_destroy_dev(idev); 2622 2621 else 2623 2622 ipv6_mc_down(idev); ··· 2626 2625 2627 2626 /* Shot the device (if unregistered) */ 2628 2627 2629 - if (how == 1) { 2628 + if (how) { 2630 2629 addrconf_sysctl_unregister(idev); 2631 2630 neigh_parms_release(&nd_tbl, idev->nd_parms); 2632 2631 neigh_ifdown(&nd_tbl, dev);
+2 -7
net/ipv6/anycast.c
··· 314 314 idev->ac_list = aca; 315 315 write_unlock_bh(&idev->lock); 316 316 317 - dst_hold(&rt->u.dst); 318 - if (ip6_ins_rt(rt)) 319 - dst_release(&rt->u.dst); 317 + ip6_ins_rt(rt); 320 318 321 319 addrconf_join_solict(dev, &aca->aca_addr); 322 320 ··· 356 358 addrconf_leave_solict(idev, &aca->aca_addr); 357 359 358 360 dst_hold(&aca->aca_rt->u.dst); 359 - if (ip6_del_rt(aca->aca_rt)) 360 - dst_free(&aca->aca_rt->u.dst); 361 - else 362 - dst_release(&aca->aca_rt->u.dst); 361 + ip6_del_rt(aca->aca_rt); 363 362 364 363 aca_put(aca); 365 364 return 0;
+12 -10
net/ipv6/icmp.c
··· 441 441 } 442 442 443 443 if (xfrm_decode_session_reverse(skb, &fl2, AF_INET6)) 444 - goto out_dst_release; 444 + goto relookup_failed; 445 445 446 446 if (ip6_dst_lookup(sk, &dst2, &fl)) 447 - goto out_dst_release; 447 + goto relookup_failed; 448 448 449 449 err = xfrm_lookup(&dst2, &fl, sk, XFRM_LOOKUP_ICMP); 450 - if (err == -ENOENT) { 450 + switch (err) { 451 + case 0: 452 + dst_release(dst); 453 + dst = dst2; 454 + break; 455 + case -EPERM: 456 + goto out_dst_release; 457 + default: 458 + relookup_failed: 451 459 if (!dst) 452 460 goto out; 453 - goto route_done; 461 + break; 454 462 } 455 - 456 - dst_release(dst); 457 - dst = dst2; 458 - 459 - if (err) 460 - goto out; 461 463 462 464 route_done: 463 465 if (ipv6_addr_is_multicast(&fl.fl6_dst))
+5 -18
net/netfilter/xt_hashlimit.c
··· 466 466 467 467 static inline __be32 maskl(__be32 a, unsigned int l) 468 468 { 469 - return htonl(ntohl(a) & ~(~(u_int32_t)0 >> l)); 469 + return l ? htonl(ntohl(a) & ~0 << (32 - l)) : 0; 470 470 } 471 471 472 472 #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 473 473 static void hashlimit_ipv6_mask(__be32 *i, unsigned int p) 474 474 { 475 475 switch (p) { 476 - case 0: 477 - i[0] = i[1] = 0; 478 - i[2] = i[3] = 0; 479 - break; 480 - case 1 ... 31: 476 + case 0 ... 31: 481 477 i[0] = maskl(i[0], p); 482 478 i[1] = i[2] = i[3] = 0; 483 479 break; 484 - case 32: 485 - i[1] = i[2] = i[3] = 0; 486 - break; 487 - case 33 ... 63: 480 + case 32 ... 63: 488 481 i[1] = maskl(i[1], p - 32); 489 482 i[2] = i[3] = 0; 490 483 break; 491 - case 64: 492 - i[2] = i[3] = 0; 493 - break; 494 - case 65 ... 95: 484 + case 64 ... 95: 495 485 i[2] = maskl(i[2], p - 64); 496 486 i[3] = 0; 497 - case 96: 498 - i[3] = 0; 499 - break; 500 - case 97 ... 127: 487 + case 96 ... 127: 501 488 i[3] = maskl(i[3], p - 96); 502 489 break; 503 490 case 128:
+9 -3
net/sched/cls_u32.c
··· 411 411 } 412 412 } 413 413 414 - for (ht=tp_c->hlist; ht; ht = ht->next) 414 + for (ht = tp_c->hlist; ht; ht = ht->next) { 415 + ht->refcnt--; 415 416 u32_clear_hnode(tp, ht); 417 + } 416 418 417 419 while ((ht = tp_c->hlist) != NULL) { 418 420 tp_c->hlist = ht->next; ··· 443 441 if (tp->root == ht) 444 442 return -EINVAL; 445 443 446 - if (--ht->refcnt == 0) 444 + if (ht->refcnt == 1) { 445 + ht->refcnt--; 447 446 u32_destroy_hnode(tp, ht); 447 + } else { 448 + return -EBUSY; 449 + } 448 450 449 451 return 0; 450 452 } ··· 574 568 if (ht == NULL) 575 569 return -ENOBUFS; 576 570 ht->tp_c = tp_c; 577 - ht->refcnt = 0; 571 + ht->refcnt = 1; 578 572 ht->divisor = divisor; 579 573 ht->handle = handle; 580 574 ht->prio = tp->prio;
+3 -2
net/sctp/ipv6.c
··· 110 110 spin_lock_bh(&sctp_local_addr_lock); 111 111 list_for_each_entry_safe(addr, temp, 112 112 &sctp_local_addr_list, list) { 113 - if (ipv6_addr_equal(&addr->a.v6.sin6_addr, 114 - &ifa->addr)) { 113 + if (addr->a.sa.sa_family == AF_INET6 && 114 + ipv6_addr_equal(&addr->a.v6.sin6_addr, 115 + &ifa->addr)) { 115 116 found = 1; 116 117 addr->valid = 0; 117 118 list_del_rcu(&addr->list);
+3
net/sctp/outqueue.c
··· 794 794 break; 795 795 796 796 case SCTP_CID_ABORT: 797 + if (sctp_test_T_bit(chunk)) { 798 + packet->vtag = asoc->c.my_vtag; 799 + } 797 800 case SCTP_CID_SACK: 798 801 case SCTP_CID_HEARTBEAT: 799 802 case SCTP_CID_HEARTBEAT_ACK:
+3 -1
net/sctp/protocol.c
··· 650 650 spin_lock_bh(&sctp_local_addr_lock); 651 651 list_for_each_entry_safe(addr, temp, 652 652 &sctp_local_addr_list, list) { 653 - if (addr->a.v4.sin_addr.s_addr == ifa->ifa_local) { 653 + if (addr->a.sa.sa_family == AF_INET && 654 + addr->a.v4.sin_addr.s_addr == 655 + ifa->ifa_local) { 654 656 found = 1; 655 657 addr->valid = 0; 656 658 list_del_rcu(&addr->list);
+26 -3
net/sctp/sm_make_chunk.c
··· 1982 1982 struct sctp_chunk *chunk, 1983 1983 struct sctp_chunk **err_chunk) 1984 1984 { 1985 + struct sctp_hmac_algo_param *hmacs; 1985 1986 int retval = SCTP_IERROR_NO_ERROR; 1987 + __u16 n_elt, id = 0; 1988 + int i; 1986 1989 1987 1990 /* FIXME - This routine is not looking at each parameter per the 1988 1991 * chunk type, i.e., unrecognized parameters should be further ··· 2059 2056 break; 2060 2057 2061 2058 case SCTP_PARAM_HMAC_ALGO: 2062 - if (sctp_auth_enable) 2063 - break; 2064 - /* Fall Through */ 2059 + if (!sctp_auth_enable) 2060 + goto fallthrough; 2061 + 2062 + hmacs = (struct sctp_hmac_algo_param *)param.p; 2063 + n_elt = (ntohs(param.p->length) - sizeof(sctp_paramhdr_t)) >> 1; 2064 + 2065 + /* SCTP-AUTH: Section 6.1 2066 + * The HMAC algorithm based on SHA-1 MUST be supported and 2067 + * included in the HMAC-ALGO parameter. 2068 + */ 2069 + for (i = 0; i < n_elt; i++) { 2070 + id = ntohs(hmacs->hmac_ids[i]); 2071 + 2072 + if (id == SCTP_AUTH_HMAC_ID_SHA1) 2073 + break; 2074 + } 2075 + 2076 + if (id != SCTP_AUTH_HMAC_ID_SHA1) { 2077 + sctp_process_inv_paramlength(asoc, param.p, chunk, 2078 + err_chunk); 2079 + retval = SCTP_IERROR_ABORT; 2080 + } 2081 + break; 2065 2082 fallthrough: 2066 2083 default: 2067 2084 SCTP_DEBUG_PRINTK("Unrecognized param: %d for chunk %d.\n",
+3
net/sctp/sm_sideeffect.c
··· 1529 1529 error = sctp_auth_asoc_init_active_key(asoc, 1530 1530 GFP_ATOMIC); 1531 1531 break; 1532 + case SCTP_CMD_UPDATE_INITTAG: 1533 + asoc->peer.i.init_tag = cmd->obj.u32; 1534 + break; 1532 1535 1533 1536 default: 1534 1537 printk(KERN_WARNING "Impossible command: %u, %p\n",
+21 -2
net/sctp/sm_statefuns.c
··· 4138 4138 goto nomem; 4139 4139 4140 4140 if (asoc) { 4141 + /* Treat INIT-ACK as a special case during COOKIE-WAIT. */ 4142 + if (chunk->chunk_hdr->type == SCTP_CID_INIT_ACK && 4143 + !asoc->peer.i.init_tag) { 4144 + sctp_initack_chunk_t *initack; 4145 + 4146 + initack = (sctp_initack_chunk_t *)chunk->chunk_hdr; 4147 + if (!sctp_chunk_length_valid(chunk, 4148 + sizeof(sctp_initack_chunk_t))) 4149 + abort->chunk_hdr->flags |= SCTP_CHUNK_FLAG_T; 4150 + else { 4151 + unsigned int inittag; 4152 + 4153 + inittag = ntohl(initack->init_hdr.init_tag); 4154 + sctp_add_cmd_sf(commands, SCTP_CMD_UPDATE_INITTAG, 4155 + SCTP_U32(inittag)); 4156 + } 4157 + } 4158 + 4141 4159 sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort)); 4142 4160 SCTP_INC_STATS(SCTP_MIB_OUTCTRLCHUNKS); 4143 4161 ··· 4361 4343 sctp_cmd_seq_t *commands) 4362 4344 { 4363 4345 struct sctp_chunk *repl; 4346 + struct sctp_association* my_asoc; 4364 4347 4365 4348 /* The comment below says that we enter COOKIE-WAIT AFTER 4366 4349 * sending the INIT, but that doesn't actually work in our ··· 4385 4366 /* Cast away the const modifier, as we want to just 4386 4367 * rerun it through as a sideffect. 4387 4368 */ 4388 - sctp_add_cmd_sf(commands, SCTP_CMD_NEW_ASOC, 4389 - SCTP_ASOC((struct sctp_association *) asoc)); 4369 + my_asoc = (struct sctp_association *)asoc; 4370 + sctp_add_cmd_sf(commands, SCTP_CMD_NEW_ASOC, SCTP_ASOC(my_asoc)); 4390 4371 4391 4372 /* Choose transport for INIT. */ 4392 4373 sctp_add_cmd_sf(commands, SCTP_CMD_INIT_CHOOSE_TRANSPORT,
+3 -2
net/sctp/socket.c
··· 5848 5848 sctp_cmsgs_t *cmsgs) 5849 5849 { 5850 5850 struct cmsghdr *cmsg; 5851 + struct msghdr *my_msg = (struct msghdr *)msg; 5851 5852 5852 5853 for (cmsg = CMSG_FIRSTHDR(msg); 5853 5854 cmsg != NULL; 5854 - cmsg = CMSG_NXTHDR((struct msghdr*)msg, cmsg)) { 5855 - if (!CMSG_OK(msg, cmsg)) 5855 + cmsg = CMSG_NXTHDR(my_msg, cmsg)) { 5856 + if (!CMSG_OK(my_msg, cmsg)) 5856 5857 return -EINVAL; 5857 5858 5858 5859 /* Should we parse this header or ignore? */
+1 -1
net/sctp/ulpevent.c
··· 859 859 union sctp_notification *notification; 860 860 struct sk_buff *skb; 861 861 862 - skb = sctp_event2skb((struct sctp_ulpevent *)event); 862 + skb = sctp_event2skb(event); 863 863 notification = (union sctp_notification *) skb->data; 864 864 return notification->sn_header.sn_type; 865 865 }
+1 -1
net/wireless/nl80211.c
··· 1161 1161 nla_len(info->attrs[NL80211_ATTR_STA_SUPPORTED_RATES]); 1162 1162 params.listen_interval = 1163 1163 nla_get_u16(info->attrs[NL80211_ATTR_STA_LISTEN_INTERVAL]); 1164 - params.listen_interval = nla_get_u16(info->attrs[NL80211_ATTR_STA_AID]); 1164 + params.aid = nla_get_u16(info->attrs[NL80211_ATTR_STA_AID]); 1165 1165 1166 1166 if (parse_station_flags(info->attrs[NL80211_ATTR_STA_FLAGS], 1167 1167 &params.station_flags))
+1 -1
net/xfrm/xfrm_user.c
··· 288 288 memcpy(&x->props.saddr, &p->saddr, sizeof(x->props.saddr)); 289 289 x->props.flags = p->flags; 290 290 291 - if (x->props.mode == XFRM_MODE_TRANSPORT) 291 + if (!x->sel.family) 292 292 x->sel.family = p->family; 293 293 294 294 }