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

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

Conflicts:
drivers/net/usb/qmi_wwan.c
net/batman-adv/translation-table.c
net/ipv6/route.c

qmi_wwan.c resolution provided by Bjørn Mork.

batman-adv conflict is dealing merely with the changes
of global function names to have a proper subsystem
prefix.

ipv6's route.c conflict is merely two side-by-side additions
of network namespace methods.

Signed-off-by: David S. Miller <davem@davemloft.net>

+306 -205
+3
drivers/bluetooth/ath3k.c
··· 63 63 64 64 /* Atheros AR3011 with sflash firmware*/ 65 65 { USB_DEVICE(0x0CF3, 0x3002) }, 66 + { USB_DEVICE(0x0CF3, 0xE019) }, 66 67 { USB_DEVICE(0x13d3, 0x3304) }, 67 68 { USB_DEVICE(0x0930, 0x0215) }, 68 69 { USB_DEVICE(0x0489, 0xE03D) }, ··· 78 77 { USB_DEVICE(0x04CA, 0x3005) }, 79 78 { USB_DEVICE(0x13d3, 0x3362) }, 80 79 { USB_DEVICE(0x0CF3, 0xE004) }, 80 + { USB_DEVICE(0x0930, 0x0219) }, 81 81 82 82 /* Atheros AR5BBU12 with sflash firmware */ 83 83 { USB_DEVICE(0x0489, 0xE02C) }, ··· 103 101 { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 }, 104 102 { USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 }, 105 103 { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 }, 104 + { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, 106 105 107 106 /* Atheros AR5BBU22 with sflash firmware */ 108 107 { USB_DEVICE(0x0489, 0xE03C), .driver_info = BTUSB_ATH3012 },
+1 -1
drivers/bluetooth/btmrvl_drv.h
··· 136 136 137 137 void btmrvl_interrupt(struct btmrvl_private *priv); 138 138 139 - void btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb); 139 + bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb); 140 140 int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb); 141 141 142 142 int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd);
+12 -2
drivers/bluetooth/btmrvl_main.c
··· 44 44 } 45 45 EXPORT_SYMBOL_GPL(btmrvl_interrupt); 46 46 47 - void btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb) 47 + bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb) 48 48 { 49 49 struct hci_event_hdr *hdr = (void *) skb->data; 50 50 struct hci_ev_cmd_complete *ec; 51 - u16 opcode, ocf; 51 + u16 opcode, ocf, ogf; 52 52 53 53 if (hdr->evt == HCI_EV_CMD_COMPLETE) { 54 54 ec = (void *) (skb->data + HCI_EVENT_HDR_SIZE); 55 55 opcode = __le16_to_cpu(ec->opcode); 56 56 ocf = hci_opcode_ocf(opcode); 57 + ogf = hci_opcode_ogf(opcode); 58 + 57 59 if (ocf == BT_CMD_MODULE_CFG_REQ && 58 60 priv->btmrvl_dev.sendcmdflag) { 59 61 priv->btmrvl_dev.sendcmdflag = false; 60 62 priv->adapter->cmd_complete = true; 61 63 wake_up_interruptible(&priv->adapter->cmd_wait_q); 62 64 } 65 + 66 + if (ogf == OGF) { 67 + BT_DBG("vendor event skipped: ogf 0x%4.4x", ogf); 68 + kfree_skb(skb); 69 + return false; 70 + } 63 71 } 72 + 73 + return true; 64 74 } 65 75 EXPORT_SYMBOL_GPL(btmrvl_check_evtpkt); 66 76
+5 -3
drivers/bluetooth/btmrvl_sdio.c
··· 565 565 skb_put(skb, buf_len); 566 566 skb_pull(skb, SDIO_HEADER_LEN); 567 567 568 - if (type == HCI_EVENT_PKT) 569 - btmrvl_check_evtpkt(priv, skb); 568 + if (type == HCI_EVENT_PKT) { 569 + if (btmrvl_check_evtpkt(priv, skb)) 570 + hci_recv_frame(skb); 571 + } else 572 + hci_recv_frame(skb); 570 573 571 - hci_recv_frame(skb); 572 574 hdev->stat.byte_rx += buf_len; 573 575 break; 574 576
+2
drivers/bluetooth/btusb.c
··· 117 117 118 118 /* Atheros 3011 with sflash firmware */ 119 119 { USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE }, 120 + { USB_DEVICE(0x0cf3, 0xe019), .driver_info = BTUSB_IGNORE }, 120 121 { USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE }, 121 122 { USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE }, 122 123 { USB_DEVICE(0x0489, 0xe03d), .driver_info = BTUSB_IGNORE }, ··· 132 131 { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 }, 133 132 { USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 }, 134 133 { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 }, 134 + { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, 135 135 136 136 /* Atheros AR5BBU12 with sflash firmware */ 137 137 { USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
+13 -2
drivers/net/bonding/bond_procfs.c
··· 150 150 } 151 151 } 152 152 153 + static const char *bond_slave_link_status(s8 link) 154 + { 155 + static const char * const status[] = { 156 + [BOND_LINK_UP] = "up", 157 + [BOND_LINK_FAIL] = "going down", 158 + [BOND_LINK_DOWN] = "down", 159 + [BOND_LINK_BACK] = "going back", 160 + }; 161 + 162 + return status[link]; 163 + } 164 + 153 165 static void bond_info_show_slave(struct seq_file *seq, 154 166 const struct slave *slave) 155 167 { 156 168 struct bonding *bond = seq->private; 157 169 158 170 seq_printf(seq, "\nSlave Interface: %s\n", slave->dev->name); 159 - seq_printf(seq, "MII Status: %s\n", 160 - (slave->link == BOND_LINK_UP) ? "up" : "down"); 171 + seq_printf(seq, "MII Status: %s\n", bond_slave_link_status(slave->link)); 161 172 if (slave->speed == SPEED_UNKNOWN) 162 173 seq_printf(seq, "Speed: %s\n", "Unknown"); 163 174 else
+30 -24
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
··· 40 40 #define I2C_BSC0 0 41 41 #define I2C_BSC1 1 42 42 #define I2C_WA_RETRY_CNT 3 43 + #define I2C_WA_PWR_ITER (I2C_WA_RETRY_CNT - 1) 43 44 #define MCPR_IMC_COMMAND_READ_OP 1 44 45 #define MCPR_IMC_COMMAND_WRITE_OP 2 45 46 ··· 7755 7754 return -EINVAL; 7756 7755 } 7757 7756 7757 + static void bnx2x_warpcore_power_module(struct link_params *params, 7758 + struct bnx2x_phy *phy, 7759 + u8 power) 7760 + { 7761 + u32 pin_cfg; 7762 + struct bnx2x *bp = params->bp; 7763 + 7764 + pin_cfg = (REG_RD(bp, params->shmem_base + 7765 + offsetof(struct shmem_region, 7766 + dev_info.port_hw_config[params->port].e3_sfp_ctrl)) & 7767 + PORT_HW_CFG_E3_PWR_DIS_MASK) >> 7768 + PORT_HW_CFG_E3_PWR_DIS_SHIFT; 7769 + 7770 + if (pin_cfg == PIN_CFG_NA) 7771 + return; 7772 + DP(NETIF_MSG_LINK, "Setting SFP+ module power to %d using pin cfg %d\n", 7773 + power, pin_cfg); 7774 + /* Low ==> corresponding SFP+ module is powered 7775 + * high ==> the SFP+ module is powered down 7776 + */ 7777 + bnx2x_set_cfg_pin(bp, pin_cfg, power ^ 1); 7778 + } 7758 7779 static int bnx2x_warpcore_read_sfp_module_eeprom(struct bnx2x_phy *phy, 7759 7780 struct link_params *params, 7760 7781 u16 addr, u8 byte_cnt, ··· 7797 7774 /* 4 byte aligned address */ 7798 7775 addr32 = addr & (~0x3); 7799 7776 do { 7777 + if (cnt == I2C_WA_PWR_ITER) { 7778 + bnx2x_warpcore_power_module(params, phy, 0); 7779 + /* Note that 100us are not enough here */ 7780 + usleep_range(1000,1000); 7781 + bnx2x_warpcore_power_module(params, phy, 1); 7782 + } 7800 7783 rc = bnx2x_bsc_read(params, phy, 0xa0, addr32, 0, byte_cnt, 7801 7784 data_array); 7802 7785 } while ((rc != 0) && (++cnt < I2C_WA_RETRY_CNT)); ··· 8339 8310 bnx2x_set_e3_module_fault_led(params, gpio_mode); 8340 8311 } else 8341 8312 bnx2x_set_e1e2_module_fault_led(params, gpio_mode); 8342 - } 8343 - 8344 - static void bnx2x_warpcore_power_module(struct link_params *params, 8345 - struct bnx2x_phy *phy, 8346 - u8 power) 8347 - { 8348 - u32 pin_cfg; 8349 - struct bnx2x *bp = params->bp; 8350 - 8351 - pin_cfg = (REG_RD(bp, params->shmem_base + 8352 - offsetof(struct shmem_region, 8353 - dev_info.port_hw_config[params->port].e3_sfp_ctrl)) & 8354 - PORT_HW_CFG_E3_PWR_DIS_MASK) >> 8355 - PORT_HW_CFG_E3_PWR_DIS_SHIFT; 8356 - 8357 - if (pin_cfg == PIN_CFG_NA) 8358 - return; 8359 - DP(NETIF_MSG_LINK, "Setting SFP+ module power to %d using pin cfg %d\n", 8360 - power, pin_cfg); 8361 - /* Low ==> corresponding SFP+ module is powered 8362 - * high ==> the SFP+ module is powered down 8363 - */ 8364 - bnx2x_set_cfg_pin(bp, pin_cfg, power ^ 1); 8365 8313 } 8366 8314 8367 8315 static void bnx2x_warpcore_hw_reset(struct bnx2x_phy *phy, ··· 9986 9980 9987 9981 usleep_range(1000, 2000); 9988 9982 9989 - if (!(CHIP_IS_E1(bp))) 9983 + if (!(CHIP_IS_E1x(bp))) 9990 9984 port = BP_PATH(bp); 9991 9985 else 9992 9986 port = params->port;
+6 -6
drivers/net/ethernet/emulex/benet/be_cmds.c
··· 122 122 goto done; 123 123 124 124 if (compl_status == MCC_STATUS_UNAUTHORIZED_REQUEST) { 125 - dev_warn(&adapter->pdev->dev, "This domain(VM) is not " 126 - "permitted to execute this cmd (opcode %d)\n", 127 - opcode); 125 + dev_warn(&adapter->pdev->dev, 126 + "opcode %d-%d is not permitted\n", 127 + opcode, subsystem); 128 128 } else { 129 129 extd_status = (compl->status >> CQE_STATUS_EXTD_SHIFT) & 130 130 CQE_STATUS_EXTD_MASK; 131 - dev_err(&adapter->pdev->dev, "Cmd (opcode %d) failed:" 132 - "status %d, extd-status %d\n", 133 - opcode, compl_status, extd_status); 131 + dev_err(&adapter->pdev->dev, 132 + "opcode %d-%d failed:status %d-%d\n", 133 + opcode, subsystem, compl_status, extd_status); 134 134 } 135 135 } 136 136 done:
+1 -1
drivers/net/ethernet/emulex/benet/be_cmds.h
··· 1566 1566 u32 rsvd0[BE_TXP_SW_SZ]; 1567 1567 struct be_erx_stats_v1 erx; 1568 1568 struct be_pmem_stats pmem; 1569 - u32 rsvd1[3]; 1569 + u32 rsvd1[18]; 1570 1570 }; 1571 1571 1572 1572 struct be_cmd_req_get_stats_v1 {
+1 -1
drivers/net/ethernet/emulex/benet/be_main.c
··· 3242 3242 3243 3243 netdev->flags |= IFF_MULTICAST; 3244 3244 3245 - netif_set_gso_max_size(netdev, 65535); 3245 + netif_set_gso_max_size(netdev, 65535 - ETH_HLEN); 3246 3246 3247 3247 netdev->netdev_ops = &be_netdev_ops; 3248 3248
+7 -3
drivers/net/ethernet/intel/Kconfig
··· 122 122 123 123 config IGB_PTP 124 124 bool "PTP Hardware Clock (PHC)" 125 - default y 126 - depends on IGB && PTP_1588_CLOCK 125 + default n 126 + depends on IGB && EXPERIMENTAL 127 + select PPS 128 + select PTP_1588_CLOCK 127 129 ---help--- 128 130 Say Y here if you want to use PTP Hardware Clock (PHC) in the 129 131 driver. Only the basic clock operations have been implemented. ··· 225 223 config IXGBE_PTP 226 224 bool "PTP Clock Support" 227 225 default n 228 - depends on IXGBE && PTP_1588_CLOCK 226 + depends on IXGBE && EXPERIMENTAL 227 + select PPS 228 + select PTP_1588_CLOCK 229 229 ---help--- 230 230 Say Y here if you want support for 1588 Timestamping with a 231 231 PHC device, using the PTP 1588 Clock support. This is
-2
drivers/net/ethernet/intel/igb/e1000_82575.c
··· 206 206 mac->rar_entry_count = E1000_RAR_ENTRIES_82580; 207 207 break; 208 208 case e1000_i350: 209 - case e1000_i210: 210 - case e1000_i211: 211 209 mac->rar_entry_count = E1000_RAR_ENTRIES_I350; 212 210 break; 213 211 default:
+1 -1
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
··· 1146 1146 1147 1147 /* alloc new page for storage */ 1148 1148 if (likely(!page)) { 1149 - page = alloc_pages(GFP_ATOMIC | __GFP_COLD, 1149 + page = alloc_pages(GFP_ATOMIC | __GFP_COLD | __GFP_COMP, 1150 1150 ixgbe_rx_pg_order(rx_ring)); 1151 1151 if (unlikely(!page)) { 1152 1152 rx_ring->rx_stats.alloc_rx_page_failed++;
+11 -2
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
··· 787 787 { 788 788 struct ixgbe_hw *hw = &adapter->hw; 789 789 u32 incval = 0; 790 + u32 timinca = 0; 790 791 u32 shift = 0; 791 792 u32 cycle_speed; 792 793 unsigned long flags; ··· 810 809 break; 811 810 } 812 811 813 - /* Bail if the cycle speed didn't change */ 814 - if (adapter->cycle_speed == cycle_speed) 812 + /* 813 + * grab the current TIMINCA value from the register so that it can be 814 + * double checked. If the register value has been cleared, it must be 815 + * reset to the correct value for generating a cyclecounter. If 816 + * TIMINCA is zero, the SYSTIME registers do not increment at all. 817 + */ 818 + timinca = IXGBE_READ_REG(hw, IXGBE_TIMINCA); 819 + 820 + /* Bail if the cycle speed didn't change and TIMINCA is non-zero */ 821 + if (adapter->cycle_speed == cycle_speed && timinca) 815 822 return; 816 823 817 824 /* disable the SDP clock out */
+1
drivers/net/ethernet/realtek/r8169.c
··· 3894 3894 case RTL_GIGA_MAC_VER_22: 3895 3895 case RTL_GIGA_MAC_VER_23: 3896 3896 case RTL_GIGA_MAC_VER_24: 3897 + case RTL_GIGA_MAC_VER_34: 3897 3898 RTL_W32(RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST); 3898 3899 break; 3899 3900 default:
+7 -5
drivers/net/ethernet/renesas/sh_eth.c
··· 1011 1011 } 1012 1012 1013 1013 /* Packet receive function */ 1014 - static int sh_eth_rx(struct net_device *ndev) 1014 + static int sh_eth_rx(struct net_device *ndev, u32 intr_status) 1015 1015 { 1016 1016 struct sh_eth_private *mdp = netdev_priv(ndev); 1017 1017 struct sh_eth_rxdesc *rxdesc; ··· 1102 1102 /* Restart Rx engine if stopped. */ 1103 1103 /* If we don't need to check status, don't. -KDU */ 1104 1104 if (!(sh_eth_read(ndev, EDRRR) & EDRRR_R)) { 1105 - /* fix the values for the next receiving */ 1106 - mdp->cur_rx = mdp->dirty_rx = (sh_eth_read(ndev, RDFAR) - 1107 - sh_eth_read(ndev, RDLAR)) >> 4; 1105 + /* fix the values for the next receiving if RDE is set */ 1106 + if (intr_status & EESR_RDE) 1107 + mdp->cur_rx = mdp->dirty_rx = 1108 + (sh_eth_read(ndev, RDFAR) - 1109 + sh_eth_read(ndev, RDLAR)) >> 4; 1108 1110 sh_eth_write(ndev, EDRRR_R, EDRRR); 1109 1111 } 1110 1112 ··· 1275 1273 EESR_RTSF | /* short frame recv */ 1276 1274 EESR_PRE | /* PHY-LSI recv error */ 1277 1275 EESR_CERF)){ /* recv frame CRC error */ 1278 - sh_eth_rx(ndev); 1276 + sh_eth_rx(ndev, intr_status); 1279 1277 } 1280 1278 1281 1279 /* Tx Check */
+4 -4
drivers/net/phy/micrel.c
··· 161 161 static struct phy_driver ks8001_driver = { 162 162 .phy_id = PHY_ID_KS8001, 163 163 .name = "Micrel KS8001 or KS8721", 164 - .phy_id_mask = 0x00fffff0, 164 + .phy_id_mask = 0x00ffffff, 165 165 .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause), 166 166 .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, 167 167 .config_init = kszphy_config_init, ··· 174 174 175 175 static struct phy_driver ksz9021_driver = { 176 176 .phy_id = PHY_ID_KSZ9021, 177 - .phy_id_mask = 0x000fff10, 177 + .phy_id_mask = 0x000ffffe, 178 178 .name = "Micrel KSZ9021 Gigabit PHY", 179 179 .features = (PHY_GBIT_FEATURES | SUPPORTED_Pause 180 180 | SUPPORTED_Asym_Pause), ··· 240 240 MODULE_LICENSE("GPL"); 241 241 242 242 static struct mdio_device_id __maybe_unused micrel_tbl[] = { 243 - { PHY_ID_KSZ9021, 0x000fff10 }, 244 - { PHY_ID_KS8001, 0x00fffff0 }, 243 + { PHY_ID_KSZ9021, 0x000ffffe }, 244 + { PHY_ID_KS8001, 0x00ffffff }, 245 245 { PHY_ID_KS8737, 0x00fffff0 }, 246 246 { PHY_ID_KS8041, 0x00fffff0 }, 247 247 { PHY_ID_KS8051, 0x00fffff0 },
+40 -43
drivers/net/usb/qmi_wwan.c
··· 269 269 return rv; 270 270 } 271 271 272 - /* Gobi devices uses identical class/protocol codes for all interfaces regardless 273 - * of function. Some of these are CDC ACM like and have the exact same endpoints 274 - * we are looking for. This leaves two possible strategies for identifying the 275 - * correct interface: 276 - * a) hardcoding interface number, or 277 - * b) use the fact that the wwan interface is the only one lacking additional 278 - * (CDC functional) descriptors 279 - * 280 - * Let's see if we can get away with the generic b) solution. 281 - */ 282 - static int qmi_wwan_bind_gobi(struct usbnet *dev, struct usb_interface *intf) 283 - { 284 - int rv = -EINVAL; 285 - 286 - /* ignore any interface with additional descriptors */ 287 - if (intf->cur_altsetting->extralen) 288 - goto err; 289 - 290 - rv = qmi_wwan_bind_shared(dev, intf); 291 - err: 292 - return rv; 293 - } 294 - 295 272 static void qmi_wwan_unbind(struct usbnet *dev, struct usb_interface *intf) 296 273 { 297 274 struct qmi_wwan_state *info = (void *)&dev->data; ··· 352 375 .manage_power = qmi_wwan_manage_power, 353 376 }; 354 377 355 - static const struct driver_info qmi_wwan_gobi = { 356 - .description = "Qualcomm Gobi wwan/QMI device", 378 + static const struct driver_info qmi_wwan_force_int0 = { 379 + .description = "Qualcomm WWAN/QMI device", 357 380 .flags = FLAG_WWAN, 358 - .bind = qmi_wwan_bind_gobi, 381 + .bind = qmi_wwan_bind_shared, 359 382 .unbind = qmi_wwan_unbind, 360 383 .manage_power = qmi_wwan_manage_power, 384 + .data = BIT(0), /* interface whitelist bitmap */ 361 385 }; 362 386 363 - /* ZTE suck at making USB descriptors */ 364 387 static const struct driver_info qmi_wwan_force_int1 = { 365 388 .description = "Qualcomm WWAN/QMI device", 366 389 .flags = FLAG_WWAN, ··· 368 391 .unbind = qmi_wwan_unbind, 369 392 .manage_power = qmi_wwan_manage_power, 370 393 .data = BIT(1), /* interface whitelist bitmap */ 394 + }; 395 + 396 + static const struct driver_info qmi_wwan_force_int3 = { 397 + .description = "Qualcomm WWAN/QMI device", 398 + .flags = FLAG_WWAN, 399 + .bind = qmi_wwan_bind_shared, 400 + .unbind = qmi_wwan_unbind, 401 + .manage_power = qmi_wwan_manage_power, 402 + .data = BIT(3), /* interface whitelist bitmap */ 371 403 }; 372 404 373 405 static const struct driver_info qmi_wwan_force_int4 = { ··· 404 418 static const struct driver_info qmi_wwan_sierra = { 405 419 .description = "Sierra Wireless wwan/QMI device", 406 420 .flags = FLAG_WWAN, 407 - .bind = qmi_wwan_bind_gobi, 421 + .bind = qmi_wwan_bind_shared, 408 422 .unbind = qmi_wwan_unbind, 409 423 .manage_power = qmi_wwan_manage_power, 410 424 .data = BIT(8) | BIT(19), /* interface whitelist bitmap */ 411 425 }; 412 426 413 427 #define HUAWEI_VENDOR_ID 0x12D1 428 + 429 + /* Gobi 1000 QMI/wwan interface number is 3 according to qcserial */ 430 + #define QMI_GOBI1K_DEVICE(vend, prod) \ 431 + USB_DEVICE(vend, prod), \ 432 + .driver_info = (unsigned long)&qmi_wwan_force_int3 433 + 434 + /* Gobi 2000 and Gobi 3000 QMI/wwan interface number is 0 according to qcserial */ 414 435 #define QMI_GOBI_DEVICE(vend, prod) \ 415 436 USB_DEVICE(vend, prod), \ 416 - .driver_info = (unsigned long)&qmi_wwan_gobi 437 + .driver_info = (unsigned long)&qmi_wwan_force_int0 417 438 418 439 static const struct usb_device_id products[] = { 419 440 { /* Huawei E392, E398 and possibly others sharing both device id and more... */ ··· 531 538 .bInterfaceProtocol = 0xff, 532 539 .driver_info = (unsigned long)&qmi_wwan_sierra, 533 540 }, 534 - {QMI_GOBI_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */ 535 - {QMI_GOBI_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */ 536 - {QMI_GOBI_DEVICE(0x03f0, 0x371d)}, /* HP un2430 Mobile Broadband Module */ 537 - {QMI_GOBI_DEVICE(0x04da, 0x250d)}, /* Panasonic Gobi Modem device */ 538 - {QMI_GOBI_DEVICE(0x413c, 0x8172)}, /* Dell Gobi Modem device */ 539 - {QMI_GOBI_DEVICE(0x1410, 0xa001)}, /* Novatel Gobi Modem device */ 540 - {QMI_GOBI_DEVICE(0x0b05, 0x1776)}, /* Asus Gobi Modem device */ 541 - {QMI_GOBI_DEVICE(0x19d2, 0xfff3)}, /* ONDA Gobi Modem device */ 542 - {QMI_GOBI_DEVICE(0x05c6, 0x9001)}, /* Generic Gobi Modem device */ 543 - {QMI_GOBI_DEVICE(0x05c6, 0x9002)}, /* Generic Gobi Modem device */ 544 - {QMI_GOBI_DEVICE(0x05c6, 0x9202)}, /* Generic Gobi Modem device */ 545 - {QMI_GOBI_DEVICE(0x05c6, 0x9203)}, /* Generic Gobi Modem device */ 546 - {QMI_GOBI_DEVICE(0x05c6, 0x9222)}, /* Generic Gobi Modem device */ 547 - {QMI_GOBI_DEVICE(0x05c6, 0x9009)}, /* Generic Gobi Modem device */ 541 + 542 + /* Gobi 1000 devices */ 543 + {QMI_GOBI1K_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */ 544 + {QMI_GOBI1K_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */ 545 + {QMI_GOBI1K_DEVICE(0x03f0, 0x371d)}, /* HP un2430 Mobile Broadband Module */ 546 + {QMI_GOBI1K_DEVICE(0x04da, 0x250d)}, /* Panasonic Gobi Modem device */ 547 + {QMI_GOBI1K_DEVICE(0x413c, 0x8172)}, /* Dell Gobi Modem device */ 548 + {QMI_GOBI1K_DEVICE(0x1410, 0xa001)}, /* Novatel Gobi Modem device */ 549 + {QMI_GOBI1K_DEVICE(0x0b05, 0x1776)}, /* Asus Gobi Modem device */ 550 + {QMI_GOBI1K_DEVICE(0x19d2, 0xfff3)}, /* ONDA Gobi Modem device */ 551 + {QMI_GOBI1K_DEVICE(0x05c6, 0x9001)}, /* Generic Gobi Modem device */ 552 + {QMI_GOBI1K_DEVICE(0x05c6, 0x9002)}, /* Generic Gobi Modem device */ 553 + {QMI_GOBI1K_DEVICE(0x05c6, 0x9202)}, /* Generic Gobi Modem device */ 554 + {QMI_GOBI1K_DEVICE(0x05c6, 0x9203)}, /* Generic Gobi Modem device */ 555 + {QMI_GOBI1K_DEVICE(0x05c6, 0x9222)}, /* Generic Gobi Modem device */ 556 + {QMI_GOBI1K_DEVICE(0x05c6, 0x9009)}, /* Generic Gobi Modem device */ 557 + 558 + /* Gobi 2000 and 3000 devices */ 548 559 {QMI_GOBI_DEVICE(0x413c, 0x8186)}, /* Dell Gobi 2000 Modem device (N0218, VU936) */ 549 560 {QMI_GOBI_DEVICE(0x05c6, 0x920b)}, /* Generic Gobi 2000 Modem device */ 550 561 {QMI_GOBI_DEVICE(0x05c6, 0x9225)}, /* Sony Gobi 2000 Modem device (N0279, VU730) */
+32 -19
drivers/net/usb/usbnet.c
··· 793 793 if (info->manage_power) { 794 794 retval = info->manage_power(dev, 1); 795 795 if (retval < 0) 796 - goto done; 796 + goto done_manage_power_error; 797 797 usb_autopm_put_interface(dev->intf); 798 798 } 799 799 return retval; 800 800 801 + done_manage_power_error: 802 + clear_bit(EVENT_DEV_OPEN, &dev->flags); 801 803 done: 802 804 usb_autopm_put_interface(dev->intf); 803 805 done_nopm: ··· 875 873 { 876 874 struct usbnet *dev = netdev_priv(net); 877 875 878 - strncpy (info->driver, dev->driver_name, sizeof info->driver); 879 - strncpy (info->version, DRIVER_VERSION, sizeof info->version); 880 - strncpy (info->fw_version, dev->driver_info->description, 876 + strlcpy (info->driver, dev->driver_name, sizeof info->driver); 877 + strlcpy (info->version, DRIVER_VERSION, sizeof info->version); 878 + strlcpy (info->fw_version, dev->driver_info->description, 881 879 sizeof info->fw_version); 882 880 usb_make_path (dev->udev, info->bus_info, sizeof info->bus_info); 883 881 } ··· 1201 1199 } 1202 1200 EXPORT_SYMBOL_GPL(usbnet_start_xmit); 1203 1201 1202 + static void rx_alloc_submit(struct usbnet *dev, gfp_t flags) 1203 + { 1204 + struct urb *urb; 1205 + int i; 1206 + 1207 + /* don't refill the queue all at once */ 1208 + for (i = 0; i < 10 && dev->rxq.qlen < RX_QLEN(dev); i++) { 1209 + urb = usb_alloc_urb(0, flags); 1210 + if (urb != NULL) { 1211 + if (rx_submit(dev, urb, flags) == -ENOLINK) 1212 + return; 1213 + } 1214 + } 1215 + } 1216 + 1204 1217 /*-------------------------------------------------------------------------*/ 1205 1218 1206 1219 // tasklet (work deferred from completions, in_irq) or timer ··· 1255 1238 !timer_pending (&dev->delay) && 1256 1239 !test_bit (EVENT_RX_HALT, &dev->flags)) { 1257 1240 int temp = dev->rxq.qlen; 1258 - int qlen = RX_QLEN (dev); 1259 1241 1260 - if (temp < qlen) { 1261 - struct urb *urb; 1262 - int i; 1263 - 1264 - // don't refill the queue all at once 1265 - for (i = 0; i < 10 && dev->rxq.qlen < qlen; i++) { 1266 - urb = usb_alloc_urb (0, GFP_ATOMIC); 1267 - if (urb != NULL) { 1268 - if (rx_submit (dev, urb, GFP_ATOMIC) == 1269 - -ENOLINK) 1270 - return; 1271 - } 1272 - } 1242 + if (temp < RX_QLEN(dev)) { 1243 + rx_alloc_submit(dev, GFP_ATOMIC); 1273 1244 if (temp != dev->rxq.qlen) 1274 1245 netif_dbg(dev, link, dev->net, 1275 1246 "rxqlen %d --> %d\n", 1276 1247 temp, dev->rxq.qlen); 1277 - if (dev->rxq.qlen < qlen) 1248 + if (dev->rxq.qlen < RX_QLEN(dev)) 1278 1249 tasklet_schedule (&dev->bh); 1279 1250 } 1280 1251 if (dev->txq.qlen < TX_QLEN (dev)) ··· 1511 1506 spin_lock_irq(&dev->txq.lock); 1512 1507 /* don't autosuspend while transmitting */ 1513 1508 if (dev->txq.qlen && PMSG_IS_AUTO(message)) { 1509 + dev->suspend_count--; 1514 1510 spin_unlock_irq(&dev->txq.lock); 1515 1511 return -EBUSY; 1516 1512 } else { ··· 1568 1562 spin_unlock_irq(&dev->txq.lock); 1569 1563 1570 1564 if (test_bit(EVENT_DEV_OPEN, &dev->flags)) { 1565 + /* handle remote wakeup ASAP */ 1566 + if (!dev->wait && 1567 + netif_device_present(dev->net) && 1568 + !timer_pending(&dev->delay) && 1569 + !test_bit(EVENT_RX_HALT, &dev->flags)) 1570 + rx_alloc_submit(dev, GFP_KERNEL); 1571 + 1571 1572 if (!(dev->txq.qlen >= TX_QLEN(dev))) 1572 1573 netif_tx_wake_all_queues(dev->net); 1573 1574 tasklet_schedule (&dev->bh);
+2 -2
drivers/net/wireless/airo.c
··· 7233 7233 } 7234 7234 } else { 7235 7235 dwrq->flags = 1; /* Should be define'd */ 7236 - memcpy(extra + sizeof(struct sockaddr)*i, 7237 - &qual, sizeof(struct iw_quality)*i); 7236 + memcpy(extra + sizeof(struct sockaddr) * i, qual, 7237 + sizeof(struct iw_quality) * i); 7238 7238 } 7239 7239 dwrq->length = i; 7240 7240
+2 -2
drivers/net/wireless/ath/ath5k/base.c
··· 1045 1045 1046 1046 ath5k_txbuf_free_skb(ah, bf); 1047 1047 1048 - spin_lock_bh(&ah->txbuflock); 1048 + spin_lock(&ah->txbuflock); 1049 1049 list_move_tail(&bf->list, &ah->txbuf); 1050 1050 ah->txbuf_len++; 1051 1051 txq->txq_len--; 1052 - spin_unlock_bh(&ah->txbuflock); 1052 + spin_unlock(&ah->txbuflock); 1053 1053 } 1054 1054 txq->link = NULL; 1055 1055 txq->txq_poll_mark = false;
+1
drivers/net/wireless/ath/ath9k/ath9k.h
··· 214 214 enum ath9k_key_type keytype; 215 215 u8 keyix; 216 216 u8 retries; 217 + u8 rtscts_rate; 217 218 }; 218 219 219 220 struct ath_buf_state {
+2 -3
drivers/net/wireless/ath/ath9k/htc_drv_main.c
··· 1496 1496 priv->num_sta_assoc_vif++ : priv->num_sta_assoc_vif--; 1497 1497 1498 1498 if (priv->ah->opmode == NL80211_IFTYPE_STATION) { 1499 + ath9k_htc_choose_set_bssid(priv); 1499 1500 if (bss_conf->assoc && (priv->num_sta_assoc_vif == 1)) 1500 1501 ath9k_htc_start_ani(priv); 1501 1502 else if (priv->num_sta_assoc_vif == 0) ··· 1504 1503 } 1505 1504 } 1506 1505 1507 - if (changed & BSS_CHANGED_BSSID) { 1506 + if (changed & BSS_CHANGED_IBSS) { 1508 1507 if (priv->ah->opmode == NL80211_IFTYPE_ADHOC) { 1509 1508 common->curaid = bss_conf->aid; 1510 1509 memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN); 1511 1510 ath9k_htc_set_bssid(priv); 1512 - } else if (priv->ah->opmode == NL80211_IFTYPE_STATION) { 1513 - ath9k_htc_choose_set_bssid(priv); 1514 1511 } 1515 1512 } 1516 1513
+13 -1
drivers/net/wireless/ath/ath9k/hw.c
··· 773 773 774 774 u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah) 775 775 { 776 + struct ath_common *common = ath9k_hw_common(ah); 777 + int i = 0; 778 + 776 779 REG_CLR_BIT(ah, PLL3, PLL3_DO_MEAS_MASK); 777 780 udelay(100); 778 781 REG_SET_BIT(ah, PLL3, PLL3_DO_MEAS_MASK); 779 782 780 - while ((REG_READ(ah, PLL4) & PLL4_MEAS_DONE) == 0) 783 + while ((REG_READ(ah, PLL4) & PLL4_MEAS_DONE) == 0) { 784 + 781 785 udelay(100); 786 + 787 + if (WARN_ON_ONCE(i >= 100)) { 788 + ath_err(common, "PLL4 meaurement not done\n"); 789 + break; 790 + } 791 + 792 + i++; 793 + } 782 794 783 795 return (REG_READ(ah, PLL3) & SQSUM_DVC_MASK) >> 3; 784 796 }
+18 -13
drivers/net/wireless/ath/ath9k/xmit.c
··· 938 938 struct ieee80211_tx_rate *rates; 939 939 const struct ieee80211_rate *rate; 940 940 struct ieee80211_hdr *hdr; 941 + struct ath_frame_info *fi = get_frame_info(bf->bf_mpdu); 941 942 int i; 942 943 u8 rix = 0; 943 944 ··· 949 948 950 949 /* set dur_update_en for l-sig computation except for PS-Poll frames */ 951 950 info->dur_update = !ieee80211_is_pspoll(hdr->frame_control); 952 - 953 - /* 954 - * We check if Short Preamble is needed for the CTS rate by 955 - * checking the BSS's global flag. 956 - * But for the rate series, IEEE80211_TX_RC_USE_SHORT_PREAMBLE is used. 957 - */ 958 - rate = ieee80211_get_rts_cts_rate(sc->hw, tx_info); 959 - info->rtscts_rate = rate->hw_value; 960 - 961 - if (tx_info->control.vif && 962 - tx_info->control.vif->bss_conf.use_short_preamble) 963 - info->rtscts_rate |= rate->hw_value_short; 951 + info->rtscts_rate = fi->rtscts_rate; 964 952 965 953 for (i = 0; i < 4; i++) { 966 954 bool is_40, is_sgi, is_sp; ··· 991 1001 } 992 1002 993 1003 /* legacy rates */ 1004 + rate = &sc->sbands[tx_info->band].bitrates[rates[i].idx]; 994 1005 if ((tx_info->band == IEEE80211_BAND_2GHZ) && 995 1006 !(rate->flags & IEEE80211_RATE_ERP_G)) 996 1007 phy = WLAN_RC_PHY_CCK; 997 1008 else 998 1009 phy = WLAN_RC_PHY_OFDM; 999 1010 1000 - rate = &sc->sbands[tx_info->band].bitrates[rates[i].idx]; 1001 1011 info->rates[i].Rate = rate->hw_value; 1002 1012 if (rate->hw_value_short) { 1003 1013 if (rates[i].flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE) ··· 1766 1776 struct ieee80211_sta *sta = tx_info->control.sta; 1767 1777 struct ieee80211_key_conf *hw_key = tx_info->control.hw_key; 1768 1778 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; 1779 + const struct ieee80211_rate *rate; 1769 1780 struct ath_frame_info *fi = get_frame_info(skb); 1770 1781 struct ath_node *an = NULL; 1771 1782 enum ath9k_key_type keytype; 1783 + bool short_preamble = false; 1772 1784 1785 + /* 1786 + * We check if Short Preamble is needed for the CTS rate by 1787 + * checking the BSS's global flag. 1788 + * But for the rate series, IEEE80211_TX_RC_USE_SHORT_PREAMBLE is used. 1789 + */ 1790 + if (tx_info->control.vif && 1791 + tx_info->control.vif->bss_conf.use_short_preamble) 1792 + short_preamble = true; 1793 + 1794 + rate = ieee80211_get_rts_cts_rate(hw, tx_info); 1773 1795 keytype = ath9k_cmn_get_hw_crypto_keytype(skb); 1774 1796 1775 1797 if (sta) ··· 1796 1794 fi->keyix = ATH9K_TXKEYIX_INVALID; 1797 1795 fi->keytype = keytype; 1798 1796 fi->framelen = framelen; 1797 + fi->rtscts_rate = rate->hw_value; 1798 + if (short_preamble) 1799 + fi->rtscts_rate |= rate->hw_value_short; 1799 1800 } 1800 1801 1801 1802 u8 ath_txchainmask_reduction(struct ath_softc *sc, u8 chainmask, u32 rate)
+6
drivers/net/wireless/iwlwifi/dvm/debugfs.c
··· 2228 2228 return count; 2229 2229 } 2230 2230 2231 + #ifdef CONFIG_IWLWIFI_DEBUG 2231 2232 static ssize_t iwl_dbgfs_log_event_read(struct file *file, 2232 2233 char __user *user_buf, 2233 2234 size_t count, loff_t *ppos) ··· 2266 2265 2267 2266 return count; 2268 2267 } 2268 + #endif 2269 2269 2270 2270 static ssize_t iwl_dbgfs_calib_disabled_read(struct file *file, 2271 2271 char __user *user_buf, ··· 2336 2334 DEBUGFS_READ_WRITE_FILE_OPS(protection_mode); 2337 2335 DEBUGFS_READ_FILE_OPS(reply_tx_error); 2338 2336 DEBUGFS_WRITE_FILE_OPS(echo_test); 2337 + #ifdef CONFIG_IWLWIFI_DEBUG 2339 2338 DEBUGFS_READ_WRITE_FILE_OPS(log_event); 2339 + #endif 2340 2340 DEBUGFS_READ_WRITE_FILE_OPS(calib_disabled); 2341 2341 2342 2342 /* ··· 2398 2394 DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR); 2399 2395 DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR); 2400 2396 DEBUGFS_ADD_FILE(echo_test, dir_debug, S_IWUSR); 2397 + #ifdef CONFIG_IWLWIFI_DEBUG 2401 2398 DEBUGFS_ADD_FILE(log_event, dir_debug, S_IWUSR | S_IRUSR); 2399 + #endif 2402 2400 2403 2401 if (iwl_advanced_bt_coexist(priv)) 2404 2402 DEBUGFS_ADD_FILE(bt_traffic, dir_debug, S_IRUSR);
+11 -14
drivers/net/wireless/mwifiex/cfg80211.c
··· 1484 1484 struct wireless_dev *wdev; 1485 1485 1486 1486 if (!adapter) 1487 - return NULL; 1487 + return ERR_PTR(-EFAULT); 1488 1488 1489 1489 switch (type) { 1490 1490 case NL80211_IFTYPE_UNSPECIFIED: ··· 1494 1494 if (priv->bss_mode) { 1495 1495 wiphy_err(wiphy, 1496 1496 "cannot create multiple sta/adhoc ifaces\n"); 1497 - return NULL; 1497 + return ERR_PTR(-EINVAL); 1498 1498 } 1499 1499 1500 1500 wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL); 1501 1501 if (!wdev) 1502 - return NULL; 1502 + return ERR_PTR(-ENOMEM); 1503 1503 1504 1504 wdev->wiphy = wiphy; 1505 1505 priv->wdev = wdev; ··· 1522 1522 1523 1523 if (priv->bss_mode) { 1524 1524 wiphy_err(wiphy, "Can't create multiple AP interfaces"); 1525 - return NULL; 1525 + return ERR_PTR(-EINVAL); 1526 1526 } 1527 1527 1528 1528 wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL); 1529 1529 if (!wdev) 1530 - return NULL; 1530 + return ERR_PTR(-ENOMEM); 1531 1531 1532 1532 priv->wdev = wdev; 1533 1533 wdev->wiphy = wiphy; ··· 1544 1544 break; 1545 1545 default: 1546 1546 wiphy_err(wiphy, "type not supported\n"); 1547 - return NULL; 1547 + return ERR_PTR(-EINVAL); 1548 1548 } 1549 1549 1550 1550 dev = alloc_netdev_mq(sizeof(struct mwifiex_private *), name, 1551 1551 ether_setup, 1); 1552 1552 if (!dev) { 1553 1553 wiphy_err(wiphy, "no memory available for netdevice\n"); 1554 - goto error; 1554 + priv->bss_mode = NL80211_IFTYPE_UNSPECIFIED; 1555 + return ERR_PTR(-ENOMEM); 1555 1556 } 1556 1557 1557 1558 mwifiex_init_priv_params(priv, dev); ··· 1583 1582 /* Register network device */ 1584 1583 if (register_netdevice(dev)) { 1585 1584 wiphy_err(wiphy, "cannot register virtual network device\n"); 1586 - goto error; 1585 + free_netdev(dev); 1586 + priv->bss_mode = NL80211_IFTYPE_UNSPECIFIED; 1587 + return ERR_PTR(-EFAULT); 1587 1588 } 1588 1589 1589 1590 sema_init(&priv->async_sem, 1); ··· 1597 1594 mwifiex_dev_debugfs_init(priv); 1598 1595 #endif 1599 1596 return dev; 1600 - error: 1601 - if (dev && (dev->reg_state == NETREG_UNREGISTERED)) 1602 - free_netdev(dev); 1603 - priv->bss_mode = NL80211_IFTYPE_UNSPECIFIED; 1604 - 1605 - return NULL; 1606 1597 } 1607 1598 EXPORT_SYMBOL_GPL(mwifiex_add_virtual_intf); 1608 1599
+3 -7
drivers/net/wireless/mwifiex/txrx.c
··· 161 161 goto done; 162 162 163 163 for (i = 0; i < adapter->priv_num; i++) { 164 - 165 164 tpriv = adapter->priv[i]; 166 165 167 - if ((GET_BSS_ROLE(tpriv) == MWIFIEX_BSS_ROLE_STA) && 168 - (tpriv->media_connected)) { 169 - if (netif_queue_stopped(tpriv->netdev)) 170 - mwifiex_wake_up_net_dev_queue(tpriv->netdev, 171 - adapter); 172 - } 166 + if (tpriv->media_connected && 167 + netif_queue_stopped(tpriv->netdev)) 168 + mwifiex_wake_up_net_dev_queue(tpriv->netdev, adapter); 173 169 } 174 170 done: 175 171 dev_kfree_skb_any(skb);
+1 -1
drivers/net/wireless/ti/wl1251/acx.c
··· 869 869 } 870 870 871 871 *mactime = tsf_info->current_tsf_lsb | 872 - (tsf_info->current_tsf_msb << 31); 872 + ((u64)tsf_info->current_tsf_msb << 32); 873 873 874 874 out: 875 875 kfree(tsf_info);
+1 -2
drivers/net/wireless/ti/wl1251/event.c
··· 76 76 } 77 77 } 78 78 79 - if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID && 80 - wl->station_mode != STATION_ACTIVE_MODE) { 79 + if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID) { 81 80 wl1251_debug(DEBUG_EVENT, "SYNCHRONIZATION_TIMEOUT_EVENT"); 82 81 83 82 /* indicate to the stack, that beacons have been lost */
+4
drivers/net/wireless/ti/wl1251/spi.c
··· 73 73 spi_sync(wl_to_spi(wl), &m); 74 74 75 75 wl1251_dump(DEBUG_SPI, "spi reset -> ", cmd, WSPI_INIT_CMD_LEN); 76 + 77 + kfree(cmd); 76 78 } 77 79 78 80 static void wl1251_spi_wake(struct wl1251 *wl) ··· 129 127 spi_sync(wl_to_spi(wl), &m); 130 128 131 129 wl1251_dump(DEBUG_SPI, "spi init -> ", cmd, WSPI_INIT_CMD_LEN); 130 + 131 + kfree(cmd); 132 132 } 133 133 134 134 static void wl1251_spi_reset_wake(struct wl1251 *wl)
+1 -1
include/net/phonet/gprs.h
··· 5 5 * 6 6 * Copyright (C) 2008 Nokia Corporation. 7 7 * 8 - * Author: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> 8 + * Author: Rémi Denis-Courmont 9 9 * 10 10 * This program is free software; you can redistribute it and/or 11 11 * modify it under the terms of the GNU General Public License
+6 -6
net/batman-adv/translation-table.c
··· 139 139 struct tt_orig_list_entry *orig_entry; 140 140 141 141 orig_entry = container_of(rcu, struct tt_orig_list_entry, rcu); 142 - atomic_dec(&orig_entry->orig_node->tt_size); 143 142 batadv_orig_node_free_ref(orig_entry->orig_node); 144 143 kfree(orig_entry); 145 144 } 146 145 147 146 static void tt_orig_list_entry_free_ref(struct tt_orig_list_entry *orig_entry) 148 147 { 148 + /* to avoid race conditions, immediately decrease the tt counter */ 149 + atomic_dec(&orig_entry->orig_node->tt_size); 149 150 call_rcu(&orig_entry->rcu, tt_orig_list_entry_free_rcu); 150 151 } 151 152 ··· 959 958 } 960 959 spin_unlock_bh(list_lock); 961 960 } 962 - atomic_set(&orig_node->tt_size, 0); 963 961 orig_node->tt_initialised = false; 964 962 } 965 963 ··· 2148 2148 { 2149 2149 struct tt_local_entry *tt_local_entry = NULL; 2150 2150 struct tt_global_entry *tt_global_entry = NULL; 2151 - bool ret = true; 2151 + bool ret = false; 2152 2152 2153 2153 if (!atomic_read(&bat_priv->ap_isolation)) 2154 - return false; 2154 + goto out; 2155 2155 2156 2156 tt_local_entry = tt_local_hash_find(bat_priv, dst); 2157 2157 if (!tt_local_entry) ··· 2161 2161 if (!tt_global_entry) 2162 2162 goto out; 2163 2163 2164 - if (_is_ap_isolated(tt_local_entry, tt_global_entry)) 2164 + if (!_is_ap_isolated(tt_local_entry, tt_global_entry)) 2165 2165 goto out; 2166 2166 2167 - ret = false; 2167 + ret = true; 2168 2168 2169 2169 out: 2170 2170 if (tt_global_entry)
+8 -6
net/bluetooth/l2cap_core.c
··· 3278 3278 while (len >= L2CAP_CONF_OPT_SIZE) { 3279 3279 len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val); 3280 3280 3281 - switch (type) { 3282 - case L2CAP_CONF_RFC: 3283 - if (olen == sizeof(rfc)) 3284 - memcpy(&rfc, (void *)val, olen); 3285 - goto done; 3286 - } 3281 + if (type != L2CAP_CONF_RFC) 3282 + continue; 3283 + 3284 + if (olen != sizeof(rfc)) 3285 + break; 3286 + 3287 + memcpy(&rfc, (void *)val, olen); 3288 + goto done; 3287 3289 } 3288 3290 3289 3291 /* Use sane default values in case a misbehaving remote device
+1 -1
net/bluetooth/mgmt.c
··· 1598 1598 else 1599 1599 conn = hci_conn_hash_lookup_ba(hdev, LE_LINK, &cp->addr.bdaddr); 1600 1600 1601 - if (!conn) { 1601 + if (!conn || conn->state == BT_OPEN || conn->state == BT_CLOSED) { 1602 1602 err = cmd_status(sk, hdev->id, MGMT_OP_DISCONNECT, 1603 1603 MGMT_STATUS_NOT_CONNECTED); 1604 1604 goto failed;
+1 -2
net/caif/caif_dev.c
··· 4 4 * Author: Sjur Brendeland/sjur.brandeland@stericsson.com 5 5 * License terms: GNU General Public License (GPL) version 2 6 6 * 7 - * Borrowed heavily from file: pn_dev.c. Thanks to 8 - * Remi Denis-Courmont <remi.denis-courmont@nokia.com> 7 + * Borrowed heavily from file: pn_dev.c. Thanks to Remi Denis-Courmont 9 8 * and Sakari Ailus <sakari.ailus@nokia.com> 10 9 */ 11 10
+2 -2
net/ipv6/ip6_fib.c
··· 1350 1350 if (w->leaf && fn->fn_flags & RTN_RTINFO) { 1351 1351 int err; 1352 1352 1353 - if (w->count < w->skip) { 1354 - w->count++; 1353 + if (w->skip) { 1354 + w->skip--; 1355 1355 continue; 1356 1356 } 1357 1357
+31 -10
net/ipv6/route.c
··· 2888 2888 net->ipv6.sysctl.ip6_rt_mtu_expires = 10*60*HZ; 2889 2889 net->ipv6.sysctl.ip6_rt_min_advmss = IPV6_MIN_MTU - 20 - 40; 2890 2890 2891 - #ifdef CONFIG_PROC_FS 2892 - proc_net_fops_create(net, "ipv6_route", 0, &ipv6_route_proc_fops); 2893 - proc_net_fops_create(net, "rt6_stats", S_IRUGO, &rt6_stats_seq_fops); 2894 - #endif 2895 2891 net->ipv6.ip6_rt_gc_expire = 30*HZ; 2896 2892 2897 2893 ret = 0; ··· 2908 2912 2909 2913 static void __net_exit ip6_route_net_exit(struct net *net) 2910 2914 { 2911 - #ifdef CONFIG_PROC_FS 2912 - proc_net_remove(net, "ipv6_route"); 2913 - proc_net_remove(net, "rt6_stats"); 2914 - #endif 2915 2915 kfree(net->ipv6.ip6_null_entry); 2916 2916 #ifdef CONFIG_IPV6_MULTIPLE_TABLES 2917 2917 kfree(net->ipv6.ip6_prohibit_entry); 2918 2918 kfree(net->ipv6.ip6_blk_hole_entry); 2919 2919 #endif 2920 2920 dst_entries_destroy(&net->ipv6.ip6_dst_ops); 2921 + } 2922 + 2923 + static int __net_init ip6_route_net_init_late(struct net *net) 2924 + { 2925 + #ifdef CONFIG_PROC_FS 2926 + proc_net_fops_create(net, "ipv6_route", 0, &ipv6_route_proc_fops); 2927 + proc_net_fops_create(net, "rt6_stats", S_IRUGO, &rt6_stats_seq_fops); 2928 + #endif 2929 + return 0; 2930 + } 2931 + 2932 + static void __net_exit ip6_route_net_exit_late(struct net *net) 2933 + { 2934 + #ifdef CONFIG_PROC_FS 2935 + proc_net_remove(net, "ipv6_route"); 2936 + proc_net_remove(net, "rt6_stats"); 2937 + #endif 2921 2938 } 2922 2939 2923 2940 static struct pernet_operations ip6_route_net_ops = { ··· 2961 2952 static struct pernet_operations ipv6_inetpeer_ops = { 2962 2953 .init = ipv6_inetpeer_init, 2963 2954 .exit = ipv6_inetpeer_exit, 2955 + }; 2956 + 2957 + static struct pernet_operations ip6_route_net_late_ops = { 2958 + .init = ip6_route_net_init_late, 2959 + .exit = ip6_route_net_exit_late, 2964 2960 }; 2965 2961 2966 2962 static struct notifier_block ip6_route_dev_notifier = { ··· 3021 3007 if (ret) 3022 3008 goto xfrm6_init; 3023 3009 3010 + ret = register_pernet_subsys(&ip6_route_net_late_ops); 3011 + if (ret) 3012 + goto fib6_rules_init; 3013 + 3024 3014 ret = -ENOBUFS; 3025 3015 if (__rtnl_register(PF_INET6, RTM_NEWROUTE, inet6_rtm_newroute, NULL, NULL) || 3026 3016 __rtnl_register(PF_INET6, RTM_DELROUTE, inet6_rtm_delroute, NULL, NULL) || 3027 3017 __rtnl_register(PF_INET6, RTM_GETROUTE, inet6_rtm_getroute, NULL, NULL)) 3028 - goto fib6_rules_init; 3018 + goto out_register_late_subsys; 3029 3019 3030 3020 ret = register_netdevice_notifier(&ip6_route_dev_notifier); 3031 3021 if (ret) 3032 - goto fib6_rules_init; 3022 + goto out_register_late_subsys; 3033 3023 3034 3024 out: 3035 3025 return ret; 3036 3026 3027 + out_register_late_subsys: 3028 + unregister_pernet_subsys(&ip6_route_net_late_ops); 3037 3029 fib6_rules_init: 3038 3030 fib6_rules_cleanup(); 3039 3031 xfrm6_init: ··· 3060 3040 void ip6_route_cleanup(void) 3061 3041 { 3062 3042 unregister_netdevice_notifier(&ip6_route_dev_notifier); 3043 + unregister_pernet_subsys(&ip6_route_net_late_ops); 3063 3044 fib6_rules_cleanup(); 3064 3045 xfrm6_fini(); 3065 3046 fib6_gc_cleanup();
+2 -2
net/phonet/af_phonet.c
··· 5 5 * 6 6 * Copyright (C) 2008 Nokia Corporation. 7 7 * 8 - * Contact: Remi Denis-Courmont <remi.denis-courmont@nokia.com> 9 - * Original author: Sakari Ailus <sakari.ailus@nokia.com> 8 + * Authors: Sakari Ailus <sakari.ailus@nokia.com> 9 + * Rémi Denis-Courmont 10 10 * 11 11 * This program is free software; you can redistribute it and/or 12 12 * modify it under the terms of the GNU General Public License
+2 -2
net/phonet/datagram.c
··· 5 5 * 6 6 * Copyright (C) 2008 Nokia Corporation. 7 7 * 8 - * Contact: Remi Denis-Courmont <remi.denis-courmont@nokia.com> 9 - * Original author: Sakari Ailus <sakari.ailus@nokia.com> 8 + * Authors: Sakari Ailus <sakari.ailus@nokia.com> 9 + * Rémi Denis-Courmont 10 10 * 11 11 * This program is free software; you can redistribute it and/or 12 12 * modify it under the terms of the GNU General Public License
+1 -1
net/phonet/pep-gprs.c
··· 5 5 * 6 6 * Copyright (C) 2008 Nokia Corporation. 7 7 * 8 - * Author: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> 8 + * Author: Rémi Denis-Courmont 9 9 * 10 10 * This program is free software; you can redistribute it and/or 11 11 * modify it under the terms of the GNU General Public License
+1 -1
net/phonet/pep.c
··· 5 5 * 6 6 * Copyright (C) 2008 Nokia Corporation. 7 7 * 8 - * Author: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> 8 + * Author: Rémi Denis-Courmont 9 9 * 10 10 * This program is free software; you can redistribute it and/or 11 11 * modify it under the terms of the GNU General Public License
+2 -2
net/phonet/pn_dev.c
··· 5 5 * 6 6 * Copyright (C) 2008 Nokia Corporation. 7 7 * 8 - * Contact: Remi Denis-Courmont <remi.denis-courmont@nokia.com> 9 - * Original author: Sakari Ailus <sakari.ailus@nokia.com> 8 + * Authors: Sakari Ailus <sakari.ailus@nokia.com> 9 + * Rémi Denis-Courmont 10 10 * 11 11 * This program is free software; you can redistribute it and/or 12 12 * modify it under the terms of the GNU General Public License
+2 -2
net/phonet/pn_netlink.c
··· 5 5 * 6 6 * Copyright (C) 2008 Nokia Corporation. 7 7 * 8 - * Contact: Remi Denis-Courmont <remi.denis-courmont@nokia.com> 9 - * Original author: Sakari Ailus <sakari.ailus@nokia.com> 8 + * Authors: Sakari Ailus <sakari.ailus@nokia.com> 9 + * Remi Denis-Courmont 10 10 * 11 11 * This program is free software; you can redistribute it and/or 12 12 * modify it under the terms of the GNU General Public License
+2 -2
net/phonet/socket.c
··· 5 5 * 6 6 * Copyright (C) 2008 Nokia Corporation. 7 7 * 8 - * Contact: Remi Denis-Courmont <remi.denis-courmont@nokia.com> 9 - * Original author: Sakari Ailus <sakari.ailus@nokia.com> 8 + * Authors: Sakari Ailus <sakari.ailus@nokia.com> 9 + * Rémi Denis-Courmont 10 10 * 11 11 * This program is free software; you can redistribute it and/or 12 12 * modify it under the terms of the GNU General Public License
+1 -1
net/phonet/sysctl.c
··· 5 5 * 6 6 * Copyright (C) 2008 Nokia Corporation. 7 7 * 8 - * Contact: Remi Denis-Courmont <remi.denis-courmont@nokia.com> 8 + * Author: Rémi Denis-Courmont 9 9 * 10 10 * This program is free software; you can redistribute it and/or 11 11 * modify it under the terms of the GNU General Public License
+2
net/sctp/protocol.c
··· 673 673 SCTP_DEBUG_PRINTK("sctp_addrwq_timo_handler: sctp_asconf_mgmt failed\n"); 674 674 sctp_bh_unlock_sock(sk); 675 675 } 676 + #if IS_ENABLED(CONFIG_IPV6) 676 677 free_next: 678 + #endif 677 679 list_del(&addrw->list); 678 680 kfree(addrw); 679 681 }