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

+390 -246
+25
Documentation/ABI/testing/sysfs-platform-at91
··· 1 + What: /sys/devices/platform/at91_can/net/<iface>/mb0_id 2 + Date: January 2011 3 + KernelVersion: 2.6.38 4 + Contact: Marc Kleine-Budde <kernel@pengutronix.de> 5 + Description: 6 + Value representing the can_id of mailbox 0. 7 + 8 + Default: 0x7ff (standard frame) 9 + 10 + Due to a chip bug (errata 50.2.6.3 & 50.3.5.3 in 11 + "AT91SAM9263 Preliminary 6249H-ATARM-27-Jul-09") the 12 + contents of mailbox 0 may be send under certain 13 + conditions (even if disabled or in rx mode). 14 + 15 + The workaround in the errata suggests not to use the 16 + mailbox and load it with an unused identifier. 17 + 18 + In order to use an extended can_id add the 19 + CAN_EFF_FLAG (0x80000000U) to the can_id. Example: 20 + 21 + - standard id 0x7ff: 22 + echo 0x7ff > /sys/class/net/can0/mb0_id 23 + 24 + - extended id 0x1fffffff: 25 + echo 0x9fffffff > /sys/class/net/can0/mb0_id
+71 -12
Documentation/networking/bonding.txt
··· 49 49 3.3 Configuring Bonding Manually with Ifenslave 50 50 3.3.1 Configuring Multiple Bonds Manually 51 51 3.4 Configuring Bonding Manually via Sysfs 52 - 3.5 Overriding Configuration for Special Cases 52 + 3.5 Configuration with Interfaces Support 53 + 3.6 Overriding Configuration for Special Cases 53 54 54 55 4. Querying Bonding Configuration 55 56 4.1 Bonding Configuration ··· 162 161 default kernel source include directory. 163 162 164 163 SECOND IMPORTANT NOTE: 165 - If you plan to configure bonding using sysfs, you do not need 166 - to use ifenslave. 164 + If you plan to configure bonding using sysfs or using the 165 + /etc/network/interfaces file, you do not need to use ifenslave. 167 166 168 167 2. Bonding Driver Options 169 168 ========================= ··· 780 779 781 780 You can configure bonding using either your distro's network 782 781 initialization scripts, or manually using either ifenslave or the 783 - sysfs interface. Distros generally use one of two packages for the 784 - network initialization scripts: initscripts or sysconfig. Recent 785 - versions of these packages have support for bonding, while older 782 + sysfs interface. Distros generally use one of three packages for the 783 + network initialization scripts: initscripts, sysconfig or interfaces. 784 + Recent versions of these packages have support for bonding, while older 786 785 versions do not. 787 786 788 787 We will first describe the options for configuring bonding for 789 - distros using versions of initscripts and sysconfig with full or 790 - partial support for bonding, then provide information on enabling 788 + distros using versions of initscripts, sysconfig and interfaces with full 789 + or partial support for bonding, then provide information on enabling 791 790 bonding without support from the network initialization scripts (i.e., 792 791 older versions of initscripts or sysconfig). 793 792 794 - If you're unsure whether your distro uses sysconfig or 795 - initscripts, or don't know if it's new enough, have no fear. 793 + If you're unsure whether your distro uses sysconfig, 794 + initscripts or interfaces, or don't know if it's new enough, have no fear. 796 795 Determining this is fairly straightforward. 797 796 798 - First, issue the command: 797 + First, look for a file called interfaces in /etc/network directory. 798 + If this file is present in your system, then your system use interfaces. See 799 + Configuration with Interfaces Support. 800 + 801 + Else, issue the command: 799 802 800 803 $ rpm -qf /sbin/ifup 801 804 ··· 1332 1327 echo +eth2 > /sys/class/net/bond1/bonding/slaves 1333 1328 echo +eth3 > /sys/class/net/bond1/bonding/slaves 1334 1329 1335 - 3.5 Overriding Configuration for Special Cases 1330 + 3.5 Configuration with Interfaces Support 1331 + ----------------------------------------- 1332 + 1333 + This section applies to distros which use /etc/network/interfaces file 1334 + to describe network interface configuration, most notably Debian and it's 1335 + derivatives. 1336 + 1337 + The ifup and ifdown commands on Debian don't support bonding out of 1338 + the box. The ifenslave-2.6 package should be installed to provide bonding 1339 + support. Once installed, this package will provide bond-* options to be used 1340 + into /etc/network/interfaces. 1341 + 1342 + Note that ifenslave-2.6 package will load the bonding module and use 1343 + the ifenslave command when appropriate. 1344 + 1345 + Example Configurations 1346 + ---------------------- 1347 + 1348 + In /etc/network/interfaces, the following stanza will configure bond0, in 1349 + active-backup mode, with eth0 and eth1 as slaves. 1350 + 1351 + auto bond0 1352 + iface bond0 inet dhcp 1353 + bond-slaves eth0 eth1 1354 + bond-mode active-backup 1355 + bond-miimon 100 1356 + bond-primary eth0 eth1 1357 + 1358 + If the above configuration doesn't work, you might have a system using 1359 + upstart for system startup. This is most notably true for recent 1360 + Ubuntu versions. The following stanza in /etc/network/interfaces will 1361 + produce the same result on those systems. 1362 + 1363 + auto bond0 1364 + iface bond0 inet dhcp 1365 + bond-slaves none 1366 + bond-mode active-backup 1367 + bond-miimon 100 1368 + 1369 + auto eth0 1370 + iface eth0 inet manual 1371 + bond-master bond0 1372 + bond-primary eth0 eth1 1373 + 1374 + auto eth1 1375 + iface eth1 inet manual 1376 + bond-master bond0 1377 + bond-primary eth0 eth1 1378 + 1379 + For a full list of bond-* supported options in /etc/network/interfaces and some 1380 + more advanced examples tailored to you particular distros, see the files in 1381 + /usr/share/doc/ifenslave-2.6. 1382 + 1383 + 3.6 Overriding Configuration for Special Cases 1336 1384 ---------------------------------------------- 1385 + 1337 1386 When using the bonding driver, the physical port which transmits a frame is 1338 1387 typically selected by the bonding driver, and is not relevant to the user or 1339 1388 system administrator. The output port is simply selected using the policies of
-1
MAINTAINERS
··· 3327 3327 F: include/linux/wimax/i2400m.h 3328 3328 3329 3329 INTEL WIRELESS WIFI LINK (iwlwifi) 3330 - M: Reinette Chatre <reinette.chatre@intel.com> 3331 3330 M: Wey-Yi Guy <wey-yi.w.guy@intel.com> 3332 3331 M: Intel Linux Wireless <ilw@linux.intel.com> 3333 3332 L: linux-wireless@vger.kernel.org
+21 -56
drivers/bluetooth/ath3k.c
··· 47 47 #define USB_REQ_DFU_DNLOAD 1 48 48 #define BULK_SIZE 4096 49 49 50 - struct ath3k_data { 51 - struct usb_device *udev; 52 - u8 *fw_data; 53 - u32 fw_size; 54 - u32 fw_sent; 55 - }; 56 - 57 - static int ath3k_load_firmware(struct ath3k_data *data, 58 - unsigned char *firmware, 59 - int count) 50 + static int ath3k_load_firmware(struct usb_device *udev, 51 + const struct firmware *firmware) 60 52 { 61 53 u8 *send_buf; 62 54 int err, pipe, len, size, sent = 0; 55 + int count = firmware->size; 63 56 64 - BT_DBG("ath3k %p udev %p", data, data->udev); 57 + BT_DBG("udev %p", udev); 65 58 66 - pipe = usb_sndctrlpipe(data->udev, 0); 67 - 68 - if ((usb_control_msg(data->udev, pipe, 69 - USB_REQ_DFU_DNLOAD, 70 - USB_TYPE_VENDOR, 0, 0, 71 - firmware, 20, USB_CTRL_SET_TIMEOUT)) < 0) { 72 - BT_ERR("Can't change to loading configuration err"); 73 - return -EBUSY; 74 - } 75 - sent += 20; 76 - count -= 20; 59 + pipe = usb_sndctrlpipe(udev, 0); 77 60 78 61 send_buf = kmalloc(BULK_SIZE, GFP_ATOMIC); 79 62 if (!send_buf) { ··· 64 81 return -ENOMEM; 65 82 } 66 83 84 + memcpy(send_buf, firmware->data, 20); 85 + if ((err = usb_control_msg(udev, pipe, 86 + USB_REQ_DFU_DNLOAD, 87 + USB_TYPE_VENDOR, 0, 0, 88 + send_buf, 20, USB_CTRL_SET_TIMEOUT)) < 0) { 89 + BT_ERR("Can't change to loading configuration err"); 90 + goto error; 91 + } 92 + sent += 20; 93 + count -= 20; 94 + 67 95 while (count) { 68 96 size = min_t(uint, count, BULK_SIZE); 69 - pipe = usb_sndbulkpipe(data->udev, 0x02); 70 - memcpy(send_buf, firmware + sent, size); 97 + pipe = usb_sndbulkpipe(udev, 0x02); 98 + memcpy(send_buf, firmware->data + sent, size); 71 99 72 - err = usb_bulk_msg(data->udev, pipe, send_buf, size, 100 + err = usb_bulk_msg(udev, pipe, send_buf, size, 73 101 &len, 3000); 74 102 75 103 if (err || (len != size)) { ··· 106 112 { 107 113 const struct firmware *firmware; 108 114 struct usb_device *udev = interface_to_usbdev(intf); 109 - struct ath3k_data *data; 110 - int size; 111 115 112 116 BT_DBG("intf %p id %p", intf, id); 113 117 114 118 if (intf->cur_altsetting->desc.bInterfaceNumber != 0) 115 119 return -ENODEV; 116 120 117 - data = kzalloc(sizeof(*data), GFP_KERNEL); 118 - if (!data) 119 - return -ENOMEM; 120 - 121 - data->udev = udev; 122 - 123 121 if (request_firmware(&firmware, "ath3k-1.fw", &udev->dev) < 0) { 124 - kfree(data); 125 122 return -EIO; 126 123 } 127 124 128 - size = max_t(uint, firmware->size, 4096); 129 - data->fw_data = kmalloc(size, GFP_KERNEL); 130 - if (!data->fw_data) { 125 + if (ath3k_load_firmware(udev, firmware)) { 131 126 release_firmware(firmware); 132 - kfree(data); 133 - return -ENOMEM; 134 - } 135 - 136 - memcpy(data->fw_data, firmware->data, firmware->size); 137 - data->fw_size = firmware->size; 138 - data->fw_sent = 0; 139 - release_firmware(firmware); 140 - 141 - usb_set_intfdata(intf, data); 142 - if (ath3k_load_firmware(data, data->fw_data, data->fw_size)) { 143 - usb_set_intfdata(intf, NULL); 144 - kfree(data->fw_data); 145 - kfree(data); 146 127 return -EIO; 147 128 } 129 + release_firmware(firmware); 148 130 149 131 return 0; 150 132 } 151 133 152 134 static void ath3k_disconnect(struct usb_interface *intf) 153 135 { 154 - struct ath3k_data *data = usb_get_intfdata(intf); 155 - 156 136 BT_DBG("ath3k_disconnect intf %p", intf); 157 - 158 - kfree(data->fw_data); 159 - kfree(data); 160 137 } 161 138 162 139 static struct usb_driver ath3k_driver = {
+4
drivers/net/bnx2.c
··· 7553 7553 !(data & ETH_FLAG_RXVLAN)) 7554 7554 return -EINVAL; 7555 7555 7556 + /* TSO with VLAN tag won't work with current firmware */ 7557 + if (!(data & ETH_FLAG_TXVLAN)) 7558 + return -EINVAL; 7559 + 7556 7560 rc = ethtool_op_set_flags(dev, data, ETH_FLAG_RXHASH | ETH_FLAG_RXVLAN | 7557 7561 ETH_FLAG_TXVLAN); 7558 7562 if (rc)
+112 -26
drivers/net/can/at91_can.c
··· 2 2 * at91_can.c - CAN network driver for AT91 SoC CAN controller 3 3 * 4 4 * (C) 2007 by Hans J. Koch <hjk@hansjkoch.de> 5 - * (C) 2008, 2009, 2010 by Marc Kleine-Budde <kernel@pengutronix.de> 5 + * (C) 2008, 2009, 2010, 2011 by Marc Kleine-Budde <kernel@pengutronix.de> 6 6 * 7 7 * This software may be distributed under the terms of the GNU General 8 8 * Public License ("GPL") version 2 as distributed in the 'COPYING' ··· 30 30 #include <linux/module.h> 31 31 #include <linux/netdevice.h> 32 32 #include <linux/platform_device.h> 33 + #include <linux/rtnetlink.h> 33 34 #include <linux/skbuff.h> 34 35 #include <linux/spinlock.h> 35 36 #include <linux/string.h> ··· 41 40 42 41 #include <mach/board.h> 43 42 44 - #define AT91_NAPI_WEIGHT 12 43 + #define AT91_NAPI_WEIGHT 11 45 44 46 45 /* 47 46 * RX/TX Mailbox split 48 47 * don't dare to touch 49 48 */ 50 - #define AT91_MB_RX_NUM 12 49 + #define AT91_MB_RX_NUM 11 51 50 #define AT91_MB_TX_SHIFT 2 52 51 53 - #define AT91_MB_RX_FIRST 0 52 + #define AT91_MB_RX_FIRST 1 54 53 #define AT91_MB_RX_LAST (AT91_MB_RX_FIRST + AT91_MB_RX_NUM - 1) 55 54 56 55 #define AT91_MB_RX_MASK(i) ((1 << (i)) - 1) 57 56 #define AT91_MB_RX_SPLIT 8 58 57 #define AT91_MB_RX_LOW_LAST (AT91_MB_RX_SPLIT - 1) 59 - #define AT91_MB_RX_LOW_MASK (AT91_MB_RX_MASK(AT91_MB_RX_SPLIT)) 58 + #define AT91_MB_RX_LOW_MASK (AT91_MB_RX_MASK(AT91_MB_RX_SPLIT) & \ 59 + ~AT91_MB_RX_MASK(AT91_MB_RX_FIRST)) 60 60 61 61 #define AT91_MB_TX_NUM (1 << AT91_MB_TX_SHIFT) 62 62 #define AT91_MB_TX_FIRST (AT91_MB_RX_LAST + 1) ··· 170 168 171 169 struct clk *clk; 172 170 struct at91_can_data *pdata; 171 + 172 + canid_t mb0_id; 173 173 }; 174 174 175 175 static struct can_bittiming_const at91_bittiming_const = { ··· 224 220 set_mb_mode_prio(priv, mb, mode, 0); 225 221 } 226 222 223 + static inline u32 at91_can_id_to_reg_mid(canid_t can_id) 224 + { 225 + u32 reg_mid; 226 + 227 + if (can_id & CAN_EFF_FLAG) 228 + reg_mid = (can_id & CAN_EFF_MASK) | AT91_MID_MIDE; 229 + else 230 + reg_mid = (can_id & CAN_SFF_MASK) << 18; 231 + 232 + return reg_mid; 233 + } 234 + 227 235 /* 228 236 * Swtich transceiver on or off 229 237 */ ··· 249 233 { 250 234 struct at91_priv *priv = netdev_priv(dev); 251 235 unsigned int i; 236 + u32 reg_mid; 252 237 253 238 /* 254 - * The first 12 mailboxes are used as a reception FIFO. The 255 - * last mailbox is configured with overwrite option. The 256 - * overwrite flag indicates a FIFO overflow. 239 + * Due to a chip bug (errata 50.2.6.3 & 50.3.5.3) the first 240 + * mailbox is disabled. The next 11 mailboxes are used as a 241 + * reception FIFO. The last mailbox is configured with 242 + * overwrite option. The overwrite flag indicates a FIFO 243 + * overflow. 257 244 */ 245 + reg_mid = at91_can_id_to_reg_mid(priv->mb0_id); 246 + for (i = 0; i < AT91_MB_RX_FIRST; i++) { 247 + set_mb_mode(priv, i, AT91_MB_MODE_DISABLED); 248 + at91_write(priv, AT91_MID(i), reg_mid); 249 + at91_write(priv, AT91_MCR(i), 0x0); /* clear dlc */ 250 + } 251 + 258 252 for (i = AT91_MB_RX_FIRST; i < AT91_MB_RX_LAST; i++) 259 253 set_mb_mode(priv, i, AT91_MB_MODE_RX); 260 254 set_mb_mode(priv, AT91_MB_RX_LAST, AT91_MB_MODE_RX_OVRWR); ··· 280 254 set_mb_mode_prio(priv, i, AT91_MB_MODE_TX, 0); 281 255 282 256 /* Reset tx and rx helper pointers */ 283 - priv->tx_next = priv->tx_echo = priv->rx_next = 0; 257 + priv->tx_next = priv->tx_echo = 0; 258 + priv->rx_next = AT91_MB_RX_FIRST; 284 259 } 285 260 286 261 static int at91_set_bittiming(struct net_device *dev) ··· 399 372 netdev_err(dev, "BUG! TX buffer full when queue awake!\n"); 400 373 return NETDEV_TX_BUSY; 401 374 } 402 - 403 - if (cf->can_id & CAN_EFF_FLAG) 404 - reg_mid = (cf->can_id & CAN_EFF_MASK) | AT91_MID_MIDE; 405 - else 406 - reg_mid = (cf->can_id & CAN_SFF_MASK) << 18; 407 - 375 + reg_mid = at91_can_id_to_reg_mid(cf->can_id); 408 376 reg_mcr = ((cf->can_id & CAN_RTR_FLAG) ? AT91_MCR_MRTR : 0) | 409 377 (cf->can_dlc << 16) | AT91_MCR_MTCR; 410 378 ··· 561 539 * 562 540 * Theory of Operation: 563 541 * 564 - * 12 of the 16 mailboxes on the chip are reserved for RX. we split 565 - * them into 2 groups. The lower group holds 8 and upper 4 mailboxes. 542 + * 11 of the 16 mailboxes on the chip are reserved for RX. we split 543 + * them into 2 groups. The lower group holds 7 and upper 4 mailboxes. 566 544 * 567 545 * Like it or not, but the chip always saves a received CAN message 568 546 * into the first free mailbox it finds (starting with the 569 547 * lowest). This makes it very difficult to read the messages in the 570 548 * right order from the chip. This is how we work around that problem: 571 549 * 572 - * The first message goes into mb nr. 0 and issues an interrupt. All 550 + * The first message goes into mb nr. 1 and issues an interrupt. All 573 551 * rx ints are disabled in the interrupt handler and a napi poll is 574 552 * scheduled. We read the mailbox, but do _not_ reenable the mb (to 575 553 * receive another message). 576 554 * 577 555 * lower mbxs upper 578 - * ______^______ __^__ 579 - * / \ / \ 556 + * ____^______ __^__ 557 + * / \ / \ 580 558 * +-+-+-+-+-+-+-+-++-+-+-+-+ 581 - * |x|x|x|x|x|x|x|x|| | | | | 559 + * | |x|x|x|x|x|x|x|| | | | | 582 560 * +-+-+-+-+-+-+-+-++-+-+-+-+ 583 561 * 0 0 0 0 0 0 0 0 0 0 1 1 \ mail 584 562 * 0 1 2 3 4 5 6 7 8 9 0 1 / box 563 + * ^ 564 + * | 565 + * \ 566 + * unused, due to chip bug 585 567 * 586 568 * The variable priv->rx_next points to the next mailbox to read a 587 569 * message from. As long we're in the lower mailboxes we just read the ··· 616 590 "order of incoming frames cannot be guaranteed\n"); 617 591 618 592 again: 619 - for (mb = find_next_bit(addr, AT91_MB_RX_NUM, priv->rx_next); 620 - mb < AT91_MB_RX_NUM && quota > 0; 593 + for (mb = find_next_bit(addr, AT91_MB_RX_LAST + 1, priv->rx_next); 594 + mb < AT91_MB_RX_LAST + 1 && quota > 0; 621 595 reg_sr = at91_read(priv, AT91_SR), 622 - mb = find_next_bit(addr, AT91_MB_RX_NUM, ++priv->rx_next)) { 596 + mb = find_next_bit(addr, AT91_MB_RX_LAST + 1, ++priv->rx_next)) { 623 597 at91_read_msg(dev, mb); 624 598 625 599 /* reactivate mailboxes */ ··· 636 610 637 611 /* upper group completed, look again in lower */ 638 612 if (priv->rx_next > AT91_MB_RX_LOW_LAST && 639 - quota > 0 && mb >= AT91_MB_RX_NUM) { 640 - priv->rx_next = 0; 613 + quota > 0 && mb > AT91_MB_RX_LAST) { 614 + priv->rx_next = AT91_MB_RX_FIRST; 641 615 goto again; 642 616 } 643 617 ··· 1063 1037 .ndo_start_xmit = at91_start_xmit, 1064 1038 }; 1065 1039 1040 + static ssize_t at91_sysfs_show_mb0_id(struct device *dev, 1041 + struct device_attribute *attr, char *buf) 1042 + { 1043 + struct at91_priv *priv = netdev_priv(to_net_dev(dev)); 1044 + 1045 + if (priv->mb0_id & CAN_EFF_FLAG) 1046 + return snprintf(buf, PAGE_SIZE, "0x%08x\n", priv->mb0_id); 1047 + else 1048 + return snprintf(buf, PAGE_SIZE, "0x%03x\n", priv->mb0_id); 1049 + } 1050 + 1051 + static ssize_t at91_sysfs_set_mb0_id(struct device *dev, 1052 + struct device_attribute *attr, const char *buf, size_t count) 1053 + { 1054 + struct net_device *ndev = to_net_dev(dev); 1055 + struct at91_priv *priv = netdev_priv(ndev); 1056 + unsigned long can_id; 1057 + ssize_t ret; 1058 + int err; 1059 + 1060 + rtnl_lock(); 1061 + 1062 + if (ndev->flags & IFF_UP) { 1063 + ret = -EBUSY; 1064 + goto out; 1065 + } 1066 + 1067 + err = strict_strtoul(buf, 0, &can_id); 1068 + if (err) { 1069 + ret = err; 1070 + goto out; 1071 + } 1072 + 1073 + if (can_id & CAN_EFF_FLAG) 1074 + can_id &= CAN_EFF_MASK | CAN_EFF_FLAG; 1075 + else 1076 + can_id &= CAN_SFF_MASK; 1077 + 1078 + priv->mb0_id = can_id; 1079 + ret = count; 1080 + 1081 + out: 1082 + rtnl_unlock(); 1083 + return ret; 1084 + } 1085 + 1086 + static DEVICE_ATTR(mb0_id, S_IWUGO | S_IRUGO, 1087 + at91_sysfs_show_mb0_id, at91_sysfs_set_mb0_id); 1088 + 1089 + static struct attribute *at91_sysfs_attrs[] = { 1090 + &dev_attr_mb0_id.attr, 1091 + NULL, 1092 + }; 1093 + 1094 + static struct attribute_group at91_sysfs_attr_group = { 1095 + .attrs = at91_sysfs_attrs, 1096 + }; 1097 + 1066 1098 static int __devinit at91_can_probe(struct platform_device *pdev) 1067 1099 { 1068 1100 struct net_device *dev; ··· 1166 1082 dev->netdev_ops = &at91_netdev_ops; 1167 1083 dev->irq = irq; 1168 1084 dev->flags |= IFF_ECHO; 1085 + dev->sysfs_groups[0] = &at91_sysfs_attr_group; 1169 1086 1170 1087 priv = netdev_priv(dev); 1171 1088 priv->can.clock.freq = clk_get_rate(clk); ··· 1178 1093 priv->dev = dev; 1179 1094 priv->clk = clk; 1180 1095 priv->pdata = pdev->dev.platform_data; 1096 + priv->mb0_id = 0x7ff; 1181 1097 1182 1098 netif_napi_add(dev, &priv->napi, at91_poll, AT91_NAPI_WEIGHT); 1183 1099
+1 -1
drivers/net/pch_gbe/pch_gbe_main.c
··· 2247 2247 struct net_device *netdev = pci_get_drvdata(pdev); 2248 2248 struct pch_gbe_adapter *adapter = netdev_priv(netdev); 2249 2249 2250 - flush_scheduled_work(); 2250 + cancel_work_sync(&adapter->reset_task); 2251 2251 unregister_netdev(netdev); 2252 2252 2253 2253 pch_gbe_hal_phy_hw_reset(&adapter->hw);
+1
drivers/net/usb/kaweth.c
··· 406 406 407 407 if (fw->size > KAWETH_FIRMWARE_BUF_SIZE) { 408 408 err("Firmware too big: %zu", fw->size); 409 + release_firmware(fw); 409 410 return -ENOSPC; 410 411 } 411 412 data_len = fw->size;
+5 -1
drivers/net/wireless/ath/ath9k/hw.c
··· 369 369 else 370 370 ah->config.ht_enable = 0; 371 371 372 + /* PAPRD needs some more work to be enabled */ 373 + ah->config.paprd_disable = 1; 374 + 372 375 ah->config.rx_intr_mitigation = true; 373 376 ah->config.pcieSerDesWrite = true; 374 377 ··· 1936 1933 pCap->rx_status_len = sizeof(struct ar9003_rxs); 1937 1934 pCap->tx_desc_len = sizeof(struct ar9003_txc); 1938 1935 pCap->txs_len = sizeof(struct ar9003_txs); 1939 - if (ah->eep_ops->get_eeprom(ah, EEP_PAPRD)) 1936 + if (!ah->config.paprd_disable && 1937 + ah->eep_ops->get_eeprom(ah, EEP_PAPRD)) 1940 1938 pCap->hw_caps |= ATH9K_HW_CAP_PAPRD; 1941 1939 } else { 1942 1940 pCap->tx_desc_len = sizeof(struct ath_desc);
+1
drivers/net/wireless/ath/ath9k/hw.h
··· 225 225 u32 pcie_waen; 226 226 u8 analog_shiftreg; 227 227 u8 ht_enable; 228 + u8 paprd_disable; 228 229 u32 ofdm_trig_low; 229 230 u32 ofdm_trig_high; 230 231 u32 cck_trig_high;
+5 -3
drivers/net/wireless/ath/ath9k/main.c
··· 592 592 u32 status = sc->intrstatus; 593 593 u32 rxmask; 594 594 595 - ath9k_ps_wakeup(sc); 596 - 597 595 if (status & ATH9K_INT_FATAL) { 598 596 ath_reset(sc, true); 599 - ath9k_ps_restore(sc); 600 597 return; 601 598 } 602 599 600 + ath9k_ps_wakeup(sc); 603 601 spin_lock(&sc->sc_pcu_lock); 604 602 605 603 if (!ath9k_hw_check_alive(ah)) ··· 967 969 /* Stop ANI */ 968 970 del_timer_sync(&common->ani.timer); 969 971 972 + ath9k_ps_wakeup(sc); 970 973 spin_lock_bh(&sc->sc_pcu_lock); 971 974 972 975 ieee80211_stop_queues(hw); ··· 1014 1015 1015 1016 /* Start ANI */ 1016 1017 ath_start_ani(common); 1018 + ath9k_ps_restore(sc); 1017 1019 1018 1020 return r; 1019 1021 } ··· 1701 1701 skip_chan_change: 1702 1702 if (changed & IEEE80211_CONF_CHANGE_POWER) { 1703 1703 sc->config.txpowlimit = 2 * conf->power_level; 1704 + ath9k_ps_wakeup(sc); 1704 1705 ath_update_txpow(sc); 1706 + ath9k_ps_restore(sc); 1705 1707 } 1706 1708 1707 1709 spin_lock_bh(&sc->wiphy_lock);
-2
drivers/net/wireless/ath/ath9k/xmit.c
··· 2113 2113 if (needreset) { 2114 2114 ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_RESET, 2115 2115 "tx hung, resetting the chip\n"); 2116 - ath9k_ps_wakeup(sc); 2117 2116 ath_reset(sc, true); 2118 - ath9k_ps_restore(sc); 2119 2117 } 2120 2118 2121 2119 ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work,
+1
drivers/net/wireless/iwlwifi/iwl-4965.c
··· 2624 2624 .fw_name_pre = IWL4965_FW_PRE, 2625 2625 .ucode_api_max = IWL4965_UCODE_API_MAX, 2626 2626 .ucode_api_min = IWL4965_UCODE_API_MIN, 2627 + .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, 2627 2628 .valid_tx_ant = ANT_AB, 2628 2629 .valid_rx_ant = ANT_ABC, 2629 2630 .eeprom_ver = EEPROM_4965_EEPROM_VERSION,
+7 -4
drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c
··· 152 152 153 153 eeprom_sku = iwl_eeprom_query16(priv, EEPROM_SKU_CAP); 154 154 155 - priv->cfg->sku = ((eeprom_sku & EEPROM_SKU_CAP_BAND_SELECTION) >> 155 + if (!priv->cfg->sku) { 156 + /* not using sku overwrite */ 157 + priv->cfg->sku = 158 + ((eeprom_sku & EEPROM_SKU_CAP_BAND_SELECTION) >> 156 159 EEPROM_SKU_CAP_BAND_POS); 157 - if (eeprom_sku & EEPROM_SKU_CAP_11N_ENABLE) 158 - priv->cfg->sku |= IWL_SKU_N; 159 - 160 + if (eeprom_sku & EEPROM_SKU_CAP_11N_ENABLE) 161 + priv->cfg->sku |= IWL_SKU_N; 162 + } 160 163 if (!priv->cfg->sku) { 161 164 IWL_ERR(priv, "Invalid device sku\n"); 162 165 return -EINVAL;
+1
drivers/net/wireless/rt2x00/rt73usb.c
··· 2446 2446 { USB_DEVICE(0x04bb, 0x093d), USB_DEVICE_DATA(&rt73usb_ops) }, 2447 2447 { USB_DEVICE(0x148f, 0x2573), USB_DEVICE_DATA(&rt73usb_ops) }, 2448 2448 { USB_DEVICE(0x148f, 0x2671), USB_DEVICE_DATA(&rt73usb_ops) }, 2449 + { USB_DEVICE(0x0812, 0x3101), USB_DEVICE_DATA(&rt73usb_ops) }, 2449 2450 /* Qcom */ 2450 2451 { USB_DEVICE(0x18e8, 0x6196), USB_DEVICE_DATA(&rt73usb_ops) }, 2451 2452 { USB_DEVICE(0x18e8, 0x6229), USB_DEVICE_DATA(&rt73usb_ops) },
+9 -2
drivers/net/wireless/rtlwifi/pci.c
··· 619 619 struct sk_buff *uskb = NULL; 620 620 u8 *pdata; 621 621 uskb = dev_alloc_skb(skb->len + 128); 622 + if (!uskb) { 623 + RT_TRACE(rtlpriv, 624 + (COMP_INTR | COMP_RECV), 625 + DBG_EMERG, 626 + ("can't alloc rx skb\n")); 627 + goto done; 628 + } 622 629 memcpy(IEEE80211_SKB_RXCB(uskb), 623 630 &rx_status, 624 631 sizeof(rx_status)); ··· 648 641 new_skb = dev_alloc_skb(rtlpci->rxbuffersize); 649 642 if (unlikely(!new_skb)) { 650 643 RT_TRACE(rtlpriv, (COMP_INTR | COMP_RECV), 651 - DBG_DMESG, 644 + DBG_EMERG, 652 645 ("can't alloc skb for rx\n")); 653 646 goto done; 654 647 } ··· 1073 1066 struct sk_buff *skb = 1074 1067 dev_alloc_skb(rtlpci->rxbuffersize); 1075 1068 u32 bufferaddress; 1076 - entry = &rtlpci->rx_ring[rx_queue_idx].desc[i]; 1077 1069 if (!skb) 1078 1070 return 0; 1071 + entry = &rtlpci->rx_ring[rx_queue_idx].desc[i]; 1079 1072 1080 1073 /*skb->dev = dev; */ 1081 1074
+1
include/net/bluetooth/hci_core.h
··· 184 184 __u32 link_mode; 185 185 __u8 auth_type; 186 186 __u8 sec_level; 187 + __u8 pending_sec_level; 187 188 __u8 power_save; 188 189 __u16 disc_timeout; 189 190 unsigned long pend;
+5 -5
lib/textsearch.c
··· 13 13 * 14 14 * INTRODUCTION 15 15 * 16 - * The textsearch infrastructure provides text searching facitilies for 16 + * The textsearch infrastructure provides text searching facilities for 17 17 * both linear and non-linear data. Individual search algorithms are 18 18 * implemented in modules and chosen by the user. 19 19 * ··· 43 43 * to the algorithm to store persistent variables. 44 44 * (4) Core eventually resets the search offset and forwards the find() 45 45 * request to the algorithm. 46 - * (5) Algorithm calls get_next_block() provided by the user continously 46 + * (5) Algorithm calls get_next_block() provided by the user continuously 47 47 * to fetch the data to be searched in block by block. 48 48 * (6) Algorithm invokes finish() after the last call to get_next_block 49 49 * to clean up any leftovers from get_next_block. (Optional) ··· 58 58 * the pattern to look for and flags. As a flag, you can set TS_IGNORECASE 59 59 * to perform case insensitive matching. But it might slow down 60 60 * performance of algorithm, so you should use it at own your risk. 61 - * The returned configuration may then be used for an arbitary 61 + * The returned configuration may then be used for an arbitrary 62 62 * amount of times and even in parallel as long as a separate struct 63 63 * ts_state variable is provided to every instance. 64 64 * 65 65 * The actual search is performed by either calling textsearch_find_- 66 66 * continuous() for linear data or by providing an own get_next_block() 67 67 * implementation and calling textsearch_find(). Both functions return 68 - * the position of the first occurrence of the patern or UINT_MAX if 69 - * no match was found. Subsequent occurences can be found by calling 68 + * the position of the first occurrence of the pattern or UINT_MAX if 69 + * no match was found. Subsequent occurrences can be found by calling 70 70 * textsearch_next() regardless of the linearity of the data. 71 71 * 72 72 * Once you're done using a configuration it must be given back via
+9 -7
net/bluetooth/hci_conn.c
··· 379 379 hci_conn_hold(acl); 380 380 381 381 if (acl->state == BT_OPEN || acl->state == BT_CLOSED) { 382 - acl->sec_level = sec_level; 382 + acl->sec_level = BT_SECURITY_LOW; 383 + acl->pending_sec_level = sec_level; 383 384 acl->auth_type = auth_type; 384 385 hci_acl_connect(acl); 385 - } else { 386 - if (acl->sec_level < sec_level) 387 - acl->sec_level = sec_level; 388 - if (acl->auth_type < auth_type) 389 - acl->auth_type = auth_type; 390 386 } 391 387 392 388 if (type == ACL_LINK) ··· 438 442 { 439 443 BT_DBG("conn %p", conn); 440 444 445 + if (conn->pending_sec_level > sec_level) 446 + sec_level = conn->pending_sec_level; 447 + 441 448 if (sec_level > conn->sec_level) 442 - conn->sec_level = sec_level; 449 + conn->pending_sec_level = sec_level; 443 450 else if (conn->link_mode & HCI_LM_AUTH) 444 451 return 1; 452 + 453 + /* Make sure we preserve an existing MITM requirement*/ 454 + auth_type |= (conn->auth_type & 0x01); 445 455 446 456 conn->auth_type = auth_type; 447 457
+4
net/bluetooth/hci_core.c
··· 1011 1011 1012 1012 destroy_workqueue(hdev->workqueue); 1013 1013 1014 + hci_dev_lock_bh(hdev); 1015 + hci_blacklist_clear(hdev); 1016 + hci_dev_unlock_bh(hdev); 1017 + 1014 1018 __hci_dev_put(hdev); 1015 1019 1016 1020 return 0;
+5 -4
net/bluetooth/hci_event.c
··· 692 692 if (conn->state != BT_CONFIG || !conn->out) 693 693 return 0; 694 694 695 - if (conn->sec_level == BT_SECURITY_SDP) 695 + if (conn->pending_sec_level == BT_SECURITY_SDP) 696 696 return 0; 697 697 698 698 /* Only request authentication for SSP connections or non-SSP 699 699 * devices with sec_level HIGH */ 700 700 if (!(hdev->ssp_mode > 0 && conn->ssp_mode > 0) && 701 - conn->sec_level != BT_SECURITY_HIGH) 701 + conn->pending_sec_level != BT_SECURITY_HIGH) 702 702 return 0; 703 703 704 704 return 1; ··· 1095 1095 1096 1096 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); 1097 1097 if (conn) { 1098 - if (!ev->status) 1098 + if (!ev->status) { 1099 1099 conn->link_mode |= HCI_LM_AUTH; 1100 - else 1100 + conn->sec_level = conn->pending_sec_level; 1101 + } else 1101 1102 conn->sec_level = BT_SECURITY_LOW; 1102 1103 1103 1104 clear_bit(HCI_CONN_AUTH_PEND, &conn->pend);
+37 -57
net/bluetooth/l2cap.c
··· 305 305 } 306 306 } 307 307 308 + static inline u8 l2cap_get_auth_type(struct sock *sk) 309 + { 310 + if (sk->sk_type == SOCK_RAW) { 311 + switch (l2cap_pi(sk)->sec_level) { 312 + case BT_SECURITY_HIGH: 313 + return HCI_AT_DEDICATED_BONDING_MITM; 314 + case BT_SECURITY_MEDIUM: 315 + return HCI_AT_DEDICATED_BONDING; 316 + default: 317 + return HCI_AT_NO_BONDING; 318 + } 319 + } else if (l2cap_pi(sk)->psm == cpu_to_le16(0x0001)) { 320 + if (l2cap_pi(sk)->sec_level == BT_SECURITY_LOW) 321 + l2cap_pi(sk)->sec_level = BT_SECURITY_SDP; 322 + 323 + if (l2cap_pi(sk)->sec_level == BT_SECURITY_HIGH) 324 + return HCI_AT_NO_BONDING_MITM; 325 + else 326 + return HCI_AT_NO_BONDING; 327 + } else { 328 + switch (l2cap_pi(sk)->sec_level) { 329 + case BT_SECURITY_HIGH: 330 + return HCI_AT_GENERAL_BONDING_MITM; 331 + case BT_SECURITY_MEDIUM: 332 + return HCI_AT_GENERAL_BONDING; 333 + default: 334 + return HCI_AT_NO_BONDING; 335 + } 336 + } 337 + } 338 + 308 339 /* Service level security */ 309 340 static inline int l2cap_check_security(struct sock *sk) 310 341 { 311 342 struct l2cap_conn *conn = l2cap_pi(sk)->conn; 312 343 __u8 auth_type; 313 344 314 - if (l2cap_pi(sk)->psm == cpu_to_le16(0x0001)) { 315 - if (l2cap_pi(sk)->sec_level == BT_SECURITY_HIGH) 316 - auth_type = HCI_AT_NO_BONDING_MITM; 317 - else 318 - auth_type = HCI_AT_NO_BONDING; 319 - 320 - if (l2cap_pi(sk)->sec_level == BT_SECURITY_LOW) 321 - l2cap_pi(sk)->sec_level = BT_SECURITY_SDP; 322 - } else { 323 - switch (l2cap_pi(sk)->sec_level) { 324 - case BT_SECURITY_HIGH: 325 - auth_type = HCI_AT_GENERAL_BONDING_MITM; 326 - break; 327 - case BT_SECURITY_MEDIUM: 328 - auth_type = HCI_AT_GENERAL_BONDING; 329 - break; 330 - default: 331 - auth_type = HCI_AT_NO_BONDING; 332 - break; 333 - } 334 - } 345 + auth_type = l2cap_get_auth_type(sk); 335 346 336 347 return hci_conn_security(conn->hcon, l2cap_pi(sk)->sec_level, 337 348 auth_type); ··· 1079 1068 1080 1069 err = -ENOMEM; 1081 1070 1082 - if (sk->sk_type == SOCK_RAW) { 1083 - switch (l2cap_pi(sk)->sec_level) { 1084 - case BT_SECURITY_HIGH: 1085 - auth_type = HCI_AT_DEDICATED_BONDING_MITM; 1086 - break; 1087 - case BT_SECURITY_MEDIUM: 1088 - auth_type = HCI_AT_DEDICATED_BONDING; 1089 - break; 1090 - default: 1091 - auth_type = HCI_AT_NO_BONDING; 1092 - break; 1093 - } 1094 - } else if (l2cap_pi(sk)->psm == cpu_to_le16(0x0001)) { 1095 - if (l2cap_pi(sk)->sec_level == BT_SECURITY_HIGH) 1096 - auth_type = HCI_AT_NO_BONDING_MITM; 1097 - else 1098 - auth_type = HCI_AT_NO_BONDING; 1099 - 1100 - if (l2cap_pi(sk)->sec_level == BT_SECURITY_LOW) 1101 - l2cap_pi(sk)->sec_level = BT_SECURITY_SDP; 1102 - } else { 1103 - switch (l2cap_pi(sk)->sec_level) { 1104 - case BT_SECURITY_HIGH: 1105 - auth_type = HCI_AT_GENERAL_BONDING_MITM; 1106 - break; 1107 - case BT_SECURITY_MEDIUM: 1108 - auth_type = HCI_AT_GENERAL_BONDING; 1109 - break; 1110 - default: 1111 - auth_type = HCI_AT_NO_BONDING; 1112 - break; 1113 - } 1114 - } 1071 + auth_type = l2cap_get_auth_type(sk); 1115 1072 1116 1073 hcon = hci_connect(hdev, ACL_LINK, dst, 1117 1074 l2cap_pi(sk)->sec_level, auth_type); ··· 1106 1127 if (sk->sk_type != SOCK_SEQPACKET && 1107 1128 sk->sk_type != SOCK_STREAM) { 1108 1129 l2cap_sock_clear_timer(sk); 1109 - sk->sk_state = BT_CONNECTED; 1130 + if (l2cap_check_security(sk)) 1131 + sk->sk_state = BT_CONNECTED; 1110 1132 } else 1111 1133 l2cap_do_start(sk); 1112 1134 } ··· 1873 1893 if (pi->mode == L2CAP_MODE_STREAMING) { 1874 1894 l2cap_streaming_send(sk); 1875 1895 } else { 1876 - if (pi->conn_state & L2CAP_CONN_REMOTE_BUSY && 1877 - pi->conn_state && L2CAP_CONN_WAIT_F) { 1896 + if ((pi->conn_state & L2CAP_CONN_REMOTE_BUSY) && 1897 + (pi->conn_state & L2CAP_CONN_WAIT_F)) { 1878 1898 err = len; 1879 1899 break; 1880 1900 }
+2 -1
net/bluetooth/rfcomm/core.c
··· 1164 1164 * initiator rfcomm_process_rx already calls 1165 1165 * rfcomm_session_put() */ 1166 1166 if (s->sock->sk->sk_state != BT_CLOSED) 1167 - rfcomm_session_put(s); 1167 + if (list_empty(&s->dlcs)) 1168 + rfcomm_session_put(s); 1168 1169 break; 1169 1170 } 1170 1171 }
+1 -1
net/core/ethtool.c
··· 817 817 if (regs.len > reglen) 818 818 regs.len = reglen; 819 819 820 - regbuf = vmalloc(reglen); 820 + regbuf = vzalloc(reglen); 821 821 if (!regbuf) 822 822 return -ENOMEM; 823 823
+6 -2
net/core/skbuff.c
··· 2744 2744 2745 2745 merge: 2746 2746 if (offset > headlen) { 2747 - skbinfo->frags[0].page_offset += offset - headlen; 2748 - skbinfo->frags[0].size -= offset - headlen; 2747 + unsigned int eat = offset - headlen; 2748 + 2749 + skbinfo->frags[0].page_offset += eat; 2750 + skbinfo->frags[0].size -= eat; 2751 + skb->data_len -= eat; 2752 + skb->len -= eat; 2749 2753 offset = headlen; 2750 2754 } 2751 2755
+11 -2
net/dcb/dcbnl.c
··· 583 583 u8 up, idtype; 584 584 int ret = -EINVAL; 585 585 586 - if (!tb[DCB_ATTR_APP] || !netdev->dcbnl_ops->getapp) 586 + if (!tb[DCB_ATTR_APP]) 587 587 goto out; 588 588 589 589 ret = nla_parse_nested(app_tb, DCB_APP_ATTR_MAX, tb[DCB_ATTR_APP], ··· 604 604 goto out; 605 605 606 606 id = nla_get_u16(app_tb[DCB_APP_ATTR_ID]); 607 - up = netdev->dcbnl_ops->getapp(netdev, idtype, id); 607 + 608 + if (netdev->dcbnl_ops->getapp) { 609 + up = netdev->dcbnl_ops->getapp(netdev, idtype, id); 610 + } else { 611 + struct dcb_app app = { 612 + .selector = idtype, 613 + .protocol = id, 614 + }; 615 + up = dcb_getapp(netdev, &app); 616 + } 608 617 609 618 /* send this back */ 610 619 dcbnl_skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
+1 -1
net/ipv4/inetpeer.c
··· 475 475 struct inet_peer *inet_getpeer(struct inetpeer_addr *daddr, int create) 476 476 { 477 477 struct inet_peer __rcu **stack[PEER_MAXDEPTH], ***stackptr; 478 - struct inet_peer_base *base = family_to_base(AF_INET); 478 + struct inet_peer_base *base = family_to_base(daddr->family); 479 479 struct inet_peer *p; 480 480 481 481 /* Look up for the address quickly, lockless.
+1 -1
net/ipv4/tcp_input.c
··· 4399 4399 if (!skb_copy_datagram_iovec(skb, 0, tp->ucopy.iov, chunk)) { 4400 4400 tp->ucopy.len -= chunk; 4401 4401 tp->copied_seq += chunk; 4402 - eaten = (chunk == skb->len && !th->fin); 4402 + eaten = (chunk == skb->len); 4403 4403 tcp_rcv_space_adjust(sk); 4404 4404 } 4405 4405 local_bh_disable();
-1
net/ipv4/tcp_ipv4.c
··· 1994 1994 } 1995 1995 req = req->dl_next; 1996 1996 } 1997 - st->offset = 0; 1998 1997 if (++st->sbucket >= icsk->icsk_accept_queue.listen_opt->nr_table_entries) 1999 1998 break; 2000 1999 get_req:
+33 -48
net/ipv6/addrconf.c
··· 2661 2661 struct net *net = dev_net(dev); 2662 2662 struct inet6_dev *idev; 2663 2663 struct inet6_ifaddr *ifa; 2664 - LIST_HEAD(keep_list); 2665 - int state; 2664 + int state, i; 2666 2665 2667 2666 ASSERT_RTNL(); 2668 2667 2669 - /* Flush routes if device is being removed or it is not loopback */ 2670 - if (how || !(dev->flags & IFF_LOOPBACK)) 2671 - rt6_ifdown(net, dev); 2668 + rt6_ifdown(net, dev); 2669 + neigh_ifdown(&nd_tbl, dev); 2672 2670 2673 2671 idev = __in6_dev_get(dev); 2674 2672 if (idev == NULL) ··· 2685 2687 /* Step 1.5: remove snmp6 entry */ 2686 2688 snmp6_unregister_dev(idev); 2687 2689 2690 + } 2691 + 2692 + /* Step 2: clear hash table */ 2693 + for (i = 0; i < IN6_ADDR_HSIZE; i++) { 2694 + struct hlist_head *h = &inet6_addr_lst[i]; 2695 + struct hlist_node *n; 2696 + 2697 + spin_lock_bh(&addrconf_hash_lock); 2698 + restart: 2699 + hlist_for_each_entry_rcu(ifa, n, h, addr_lst) { 2700 + if (ifa->idev == idev) { 2701 + hlist_del_init_rcu(&ifa->addr_lst); 2702 + addrconf_del_timer(ifa); 2703 + goto restart; 2704 + } 2705 + } 2706 + spin_unlock_bh(&addrconf_hash_lock); 2688 2707 } 2689 2708 2690 2709 write_lock_bh(&idev->lock); ··· 2737 2722 struct inet6_ifaddr, if_list); 2738 2723 addrconf_del_timer(ifa); 2739 2724 2740 - /* If just doing link down, and address is permanent 2741 - and not link-local, then retain it. */ 2742 - if (!how && 2743 - (ifa->flags&IFA_F_PERMANENT) && 2744 - !(ipv6_addr_type(&ifa->addr) & IPV6_ADDR_LINKLOCAL)) { 2745 - list_move_tail(&ifa->if_list, &keep_list); 2725 + list_del(&ifa->if_list); 2746 2726 2747 - /* If not doing DAD on this address, just keep it. */ 2748 - if ((dev->flags&(IFF_NOARP|IFF_LOOPBACK)) || 2749 - idev->cnf.accept_dad <= 0 || 2750 - (ifa->flags & IFA_F_NODAD)) 2751 - continue; 2727 + write_unlock_bh(&idev->lock); 2752 2728 2753 - /* If it was tentative already, no need to notify */ 2754 - if (ifa->flags & IFA_F_TENTATIVE) 2755 - continue; 2729 + spin_lock_bh(&ifa->state_lock); 2730 + state = ifa->state; 2731 + ifa->state = INET6_IFADDR_STATE_DEAD; 2732 + spin_unlock_bh(&ifa->state_lock); 2756 2733 2757 - /* Flag it for later restoration when link comes up */ 2758 - ifa->flags |= IFA_F_TENTATIVE; 2759 - ifa->state = INET6_IFADDR_STATE_DAD; 2760 - } else { 2761 - list_del(&ifa->if_list); 2762 - 2763 - /* clear hash table */ 2764 - spin_lock_bh(&addrconf_hash_lock); 2765 - hlist_del_init_rcu(&ifa->addr_lst); 2766 - spin_unlock_bh(&addrconf_hash_lock); 2767 - 2768 - write_unlock_bh(&idev->lock); 2769 - spin_lock_bh(&ifa->state_lock); 2770 - state = ifa->state; 2771 - ifa->state = INET6_IFADDR_STATE_DEAD; 2772 - spin_unlock_bh(&ifa->state_lock); 2773 - 2774 - if (state != INET6_IFADDR_STATE_DEAD) { 2775 - __ipv6_ifa_notify(RTM_DELADDR, ifa); 2776 - atomic_notifier_call_chain(&inet6addr_chain, 2777 - NETDEV_DOWN, ifa); 2778 - } 2779 - 2780 - in6_ifa_put(ifa); 2781 - write_lock_bh(&idev->lock); 2734 + if (state != INET6_IFADDR_STATE_DEAD) { 2735 + __ipv6_ifa_notify(RTM_DELADDR, ifa); 2736 + atomic_notifier_call_chain(&inet6addr_chain, NETDEV_DOWN, ifa); 2782 2737 } 2783 - } 2738 + in6_ifa_put(ifa); 2784 2739 2785 - list_splice(&keep_list, &idev->addr_list); 2740 + write_lock_bh(&idev->lock); 2741 + } 2786 2742 2787 2743 write_unlock_bh(&idev->lock); 2788 2744 ··· 4142 4156 addrconf_leave_solict(ifp->idev, &ifp->addr); 4143 4157 dst_hold(&ifp->rt->dst); 4144 4158 4145 - if (ifp->state == INET6_IFADDR_STATE_DEAD && 4146 - ip6_del_rt(ifp->rt)) 4159 + if (ip6_del_rt(ifp->rt)) 4147 4160 dst_free(&ifp->rt->dst); 4148 4161 break; 4149 4162 }
+1 -8
net/ipv6/route.c
··· 72 72 #define RT6_TRACE(x...) do { ; } while (0) 73 73 #endif 74 74 75 - #define CLONE_OFFLINK_ROUTE 0 76 - 77 75 static struct rt6_info * ip6_rt_copy(struct rt6_info *ort); 78 76 static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie); 79 77 static unsigned int ip6_default_advmss(const struct dst_entry *dst); ··· 736 738 737 739 if (!rt->rt6i_nexthop && !(rt->rt6i_flags & RTF_NONEXTHOP)) 738 740 nrt = rt6_alloc_cow(rt, &fl->fl6_dst, &fl->fl6_src); 739 - else { 740 - #if CLONE_OFFLINK_ROUTE 741 + else 741 742 nrt = rt6_alloc_clone(rt, &fl->fl6_dst); 742 - #else 743 - goto out2; 744 - #endif 745 - } 746 743 747 744 dst_release(&rt->dst); 748 745 rt = nrt ? : net->ipv6.ip6_null_entry;
+6
net/ipv6/xfrm6_policy.c
··· 98 98 if (!xdst->u.rt6.rt6i_idev) 99 99 return -ENODEV; 100 100 101 + xdst->u.rt6.rt6i_peer = rt->rt6i_peer; 102 + if (rt->rt6i_peer) 103 + atomic_inc(&rt->rt6i_peer->refcnt); 104 + 101 105 /* Sheit... I remember I did this right. Apparently, 102 106 * it was magically lost, so this code needs audit */ 103 107 xdst->u.rt6.rt6i_flags = rt->rt6i_flags & (RTF_ANYCAST | ··· 220 216 221 217 if (likely(xdst->u.rt6.rt6i_idev)) 222 218 in6_dev_put(xdst->u.rt6.rt6i_idev); 219 + if (likely(xdst->u.rt6.rt6i_peer)) 220 + inet_putpeer(xdst->u.rt6.rt6i_peer); 223 221 xfrm_dst_destroy(xdst); 224 222 } 225 223
+3
net/mac80211/tx.c
··· 2230 2230 2231 2231 sdata = vif_to_sdata(vif); 2232 2232 2233 + if (!ieee80211_sdata_running(sdata)) 2234 + goto out; 2235 + 2233 2236 if (tim_offset) 2234 2237 *tim_offset = 0; 2235 2238 if (tim_length)