Merge git://github.com/davem330/net

* git://github.com/davem330/net: (27 commits)
xfrm: Perform a replay check after return from async codepaths
fib:fix BUG_ON in fib_nl_newrule when add new fib rule
ixgbe: fix possible null buffer error
tg3: fix VLAN tagging regression
net: pxa168: Fix build errors by including interrupt.h
netconsole: switch init_netconsole() to late_initcall
gianfar: Fix overflow check and return value for gfar_get_cls_all()
ppp_generic: fix multilink fragment MTU calculation (again)
GRETH: avoid overwrite IP-stack's IP-frags checksum
GRETH: RX/TX bytes were never increased
ipv6: fix a possible double free
b43: Fix beacon problem in ad-hoc mode
Bluetooth: add support for 2011 mac mini
Bluetooth: Add MacBookAir4,1 support
Bluetooth: Fixed BT ST Channel reg order
r8169: do not enable the TBI for anything but the original 8169.
r8169: remove erroneous processing of always set bit.
r8169: fix WOL setting for 8105 and 8111evl
r8169: add MODULE_FIRMWARE for the firmware of 8111evl
r8169: fix the reset setting for 8111evl
...

Changed files
+165 -80
drivers
net
bluetooth
core
ipv6
wireless
xfrm
+6
drivers/bluetooth/btusb.c
··· 72 72 /* Apple MacBookAir3,1, MacBookAir3,2 */ 73 73 { USB_DEVICE(0x05ac, 0x821b) }, 74 74 75 + /* Apple MacBookAir4,1 */ 76 + { USB_DEVICE(0x05ac, 0x821f) }, 77 + 75 78 /* Apple MacBookPro8,2 */ 76 79 { USB_DEVICE(0x05ac, 0x821a) }, 80 + 81 + /* Apple MacMini5,1 */ 82 + { USB_DEVICE(0x05ac, 0x8281) }, 77 83 78 84 /* AVM BlueFRITZ! USB v2.0 */ 79 85 { USB_DEVICE(0x057c, 0x3800) },
+8 -8
drivers/bluetooth/btwilink.c
··· 125 125 /* protocol structure registered with shared transport */ 126 126 static struct st_proto_s ti_st_proto[MAX_BT_CHNL_IDS] = { 127 127 { 128 + .chnl_id = HCI_EVENT_PKT, /* HCI Events */ 129 + .hdr_len = sizeof(struct hci_event_hdr), 130 + .offset_len_in_hdr = offsetof(struct hci_event_hdr, plen), 131 + .len_size = 1, /* sizeof(plen) in struct hci_event_hdr */ 132 + .reserve = 8, 133 + }, 134 + { 128 135 .chnl_id = HCI_ACLDATA_PKT, /* ACL */ 129 136 .hdr_len = sizeof(struct hci_acl_hdr), 130 137 .offset_len_in_hdr = offsetof(struct hci_acl_hdr, dlen), ··· 143 136 .hdr_len = sizeof(struct hci_sco_hdr), 144 137 .offset_len_in_hdr = offsetof(struct hci_sco_hdr, dlen), 145 138 .len_size = 1, /* sizeof(dlen) in struct hci_sco_hdr */ 146 - .reserve = 8, 147 - }, 148 - { 149 - .chnl_id = HCI_EVENT_PKT, /* HCI Events */ 150 - .hdr_len = sizeof(struct hci_event_hdr), 151 - .offset_len_in_hdr = offsetof(struct hci_event_hdr, plen), 152 - .len_size = 1, /* sizeof(plen) in struct hci_event_hdr */ 153 139 .reserve = 8, 154 140 }, 155 141 }; ··· 240 240 if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags)) 241 241 return 0; 242 242 243 - for (i = 0; i < MAX_BT_CHNL_IDS; i++) { 243 + for (i = MAX_BT_CHNL_IDS-1; i >= 0; i--) { 244 244 err = st_unregister(&ti_st_proto[i]); 245 245 if (err) 246 246 BT_ERR("st_unregister(%d) failed with error %d",
+4 -4
drivers/net/gianfar_ethtool.c
··· 1669 1669 u32 i = 0; 1670 1670 1671 1671 list_for_each_entry(comp, &priv->rx_list.list, list) { 1672 - if (i <= cmd->rule_cnt) { 1673 - rule_locs[i] = comp->fs.location; 1674 - i++; 1675 - } 1672 + if (i == cmd->rule_cnt) 1673 + return -EMSGSIZE; 1674 + rule_locs[i] = comp->fs.location; 1675 + i++; 1676 1676 } 1677 1677 1678 1678 cmd->data = MAX_FILER_IDX;
+10 -2
drivers/net/greth.c
··· 428 428 dma_sync_single_for_device(greth->dev, dma_addr, skb->len, DMA_TO_DEVICE); 429 429 430 430 status = GRETH_BD_EN | GRETH_BD_IE | (skb->len & GRETH_BD_LEN); 431 + greth->tx_bufs_length[greth->tx_next] = skb->len & GRETH_BD_LEN; 431 432 432 433 /* Wrap around descriptor ring */ 433 434 if (greth->tx_next == GRETH_TXBD_NUM_MASK) { ··· 491 490 if (nr_frags != 0) 492 491 status = GRETH_TXBD_MORE; 493 492 494 - status |= GRETH_TXBD_CSALL; 493 + if (skb->ip_summed == CHECKSUM_PARTIAL) 494 + status |= GRETH_TXBD_CSALL; 495 495 status |= skb_headlen(skb) & GRETH_BD_LEN; 496 496 if (greth->tx_next == GRETH_TXBD_NUM_MASK) 497 497 status |= GRETH_BD_WR; ··· 515 513 greth->tx_skbuff[curr_tx] = NULL; 516 514 bdp = greth->tx_bd_base + curr_tx; 517 515 518 - status = GRETH_TXBD_CSALL | GRETH_BD_EN; 516 + status = GRETH_BD_EN; 517 + if (skb->ip_summed == CHECKSUM_PARTIAL) 518 + status |= GRETH_TXBD_CSALL; 519 519 status |= frag->size & GRETH_BD_LEN; 520 520 521 521 /* Wrap around descriptor ring */ ··· 645 641 dev->stats.tx_fifo_errors++; 646 642 } 647 643 dev->stats.tx_packets++; 644 + dev->stats.tx_bytes += greth->tx_bufs_length[greth->tx_last]; 648 645 greth->tx_last = NEXT_TX(greth->tx_last); 649 646 greth->tx_free++; 650 647 } ··· 700 695 greth->tx_skbuff[greth->tx_last] = NULL; 701 696 702 697 greth_update_tx_stats(dev, stat); 698 + dev->stats.tx_bytes += skb->len; 703 699 704 700 bdp = greth->tx_bd_base + greth->tx_last; 705 701 ··· 802 796 memcpy(skb_put(skb, pkt_len), phys_to_virt(dma_addr), pkt_len); 803 797 804 798 skb->protocol = eth_type_trans(skb, dev); 799 + dev->stats.rx_bytes += pkt_len; 805 800 dev->stats.rx_packets++; 806 801 netif_receive_skb(skb); 807 802 } ··· 917 910 918 911 skb->protocol = eth_type_trans(skb, dev); 919 912 dev->stats.rx_packets++; 913 + dev->stats.rx_bytes += pkt_len; 920 914 netif_receive_skb(skb); 921 915 922 916 greth->rx_skbuff[greth->rx_cur] = newskb;
+1
drivers/net/greth.h
··· 103 103 104 104 unsigned char *tx_bufs[GRETH_TXBD_NUM]; 105 105 unsigned char *rx_bufs[GRETH_RXBD_NUM]; 106 + u16 tx_bufs_length[GRETH_TXBD_NUM]; 106 107 107 108 u16 tx_next; 108 109 u16 tx_last;
+2 -2
drivers/net/ixgbe/ixgbe_main.c
··· 1321 1321 if (ring_is_rsc_enabled(rx_ring)) 1322 1322 pkt_is_rsc = ixgbe_get_rsc_state(rx_desc); 1323 1323 1324 - /* if this is a skb from previous receive DMA will be 0 */ 1325 - if (rx_buffer_info->dma) { 1324 + /* linear means we are building an skb from multiple pages */ 1325 + if (!skb_is_nonlinear(skb)) { 1326 1326 u16 hlen; 1327 1327 if (pkt_is_rsc && 1328 1328 !(staterr & IXGBE_RXD_STAT_EOP) &&
+7 -1
drivers/net/netconsole.c
··· 799 799 } 800 800 } 801 801 802 - module_init(init_netconsole); 802 + /* 803 + * Use late_initcall to ensure netconsole is 804 + * initialized after network device driver if built-in. 805 + * 806 + * late_initcall() and module_init() are identical if built as module. 807 + */ 808 + late_initcall(init_netconsole); 803 809 module_exit(cleanup_netconsole);
+6 -1
drivers/net/ppp_generic.c
··· 1465 1465 continue; 1466 1466 } 1467 1467 1468 - mtu = pch->chan->mtu - hdrlen; 1468 + /* 1469 + * hdrlen includes the 2-byte PPP protocol field, but the 1470 + * MTU counts only the payload excluding the protocol field. 1471 + * (RFC1661 Section 2) 1472 + */ 1473 + mtu = pch->chan->mtu - (hdrlen - 2); 1469 1474 if (mtu < 4) 1470 1475 mtu = 4; 1471 1476 if (flen > mtu)
+1
drivers/net/pxa168_eth.c
··· 40 40 #include <linux/clk.h> 41 41 #include <linux/phy.h> 42 42 #include <linux/io.h> 43 + #include <linux/interrupt.h> 43 44 #include <linux/types.h> 44 45 #include <asm/pgtable.h> 45 46 #include <asm/system.h>
+27 -5
drivers/net/r8169.c
··· 407 407 RxOK = 0x0001, 408 408 409 409 /* RxStatusDesc */ 410 + RxBOVF = (1 << 24), 410 411 RxFOVF = (1 << 23), 411 412 RxRWT = (1 << 22), 412 413 RxRES = (1 << 21), ··· 683 682 struct mii_if_info mii; 684 683 struct rtl8169_counters counters; 685 684 u32 saved_wolopts; 685 + u32 opts1_mask; 686 686 687 687 struct rtl_fw { 688 688 const struct firmware *fw; ··· 712 710 MODULE_FIRMWARE(FIRMWARE_8168D_2); 713 711 MODULE_FIRMWARE(FIRMWARE_8168E_1); 714 712 MODULE_FIRMWARE(FIRMWARE_8168E_2); 713 + MODULE_FIRMWARE(FIRMWARE_8168E_3); 715 714 MODULE_FIRMWARE(FIRMWARE_8105E_1); 716 715 717 716 static int rtl8169_open(struct net_device *dev); ··· 3080 3077 netif_err(tp, link, dev, "PHY reset failed\n"); 3081 3078 } 3082 3079 3080 + static bool rtl_tbi_enabled(struct rtl8169_private *tp) 3081 + { 3082 + void __iomem *ioaddr = tp->mmio_addr; 3083 + 3084 + return (tp->mac_version == RTL_GIGA_MAC_VER_01) && 3085 + (RTL_R8(PHYstatus) & TBI_Enable); 3086 + } 3087 + 3083 3088 static void rtl8169_init_phy(struct net_device *dev, struct rtl8169_private *tp) 3084 3089 { 3085 3090 void __iomem *ioaddr = tp->mmio_addr; ··· 3120 3109 ADVERTISED_1000baseT_Half | 3121 3110 ADVERTISED_1000baseT_Full : 0)); 3122 3111 3123 - if (RTL_R8(PHYstatus) & TBI_Enable) 3112 + if (rtl_tbi_enabled(tp)) 3124 3113 netif_info(tp, link, dev, "TBI auto-negotiating\n"); 3125 3114 } 3126 3115 ··· 3330 3319 3331 3320 static void r810x_pll_power_down(struct rtl8169_private *tp) 3332 3321 { 3322 + void __iomem *ioaddr = tp->mmio_addr; 3323 + 3333 3324 if (__rtl8169_get_wol(tp) & WAKE_ANY) { 3334 3325 rtl_writephy(tp, 0x1f, 0x0000); 3335 3326 rtl_writephy(tp, MII_BMCR, 0x0000); 3327 + 3328 + if (tp->mac_version == RTL_GIGA_MAC_VER_29 || 3329 + tp->mac_version == RTL_GIGA_MAC_VER_30) 3330 + RTL_W32(RxConfig, RTL_R32(RxConfig) | AcceptBroadcast | 3331 + AcceptMulticast | AcceptMyPhys); 3336 3332 return; 3337 3333 } 3338 3334 ··· 3435 3417 rtl_writephy(tp, MII_BMCR, 0x0000); 3436 3418 3437 3419 if (tp->mac_version == RTL_GIGA_MAC_VER_32 || 3438 - tp->mac_version == RTL_GIGA_MAC_VER_33) 3420 + tp->mac_version == RTL_GIGA_MAC_VER_33 || 3421 + tp->mac_version == RTL_GIGA_MAC_VER_34) 3439 3422 RTL_W32(RxConfig, RTL_R32(RxConfig) | AcceptBroadcast | 3440 3423 AcceptMulticast | AcceptMyPhys); 3441 3424 return; ··· 3746 3727 tp->features |= rtl_try_msi(pdev, ioaddr, cfg); 3747 3728 RTL_W8(Cfg9346, Cfg9346_Lock); 3748 3729 3749 - if ((tp->mac_version <= RTL_GIGA_MAC_VER_06) && 3750 - (RTL_R8(PHYstatus) & TBI_Enable)) { 3730 + if (rtl_tbi_enabled(tp)) { 3751 3731 tp->set_speed = rtl8169_set_speed_tbi; 3752 3732 tp->get_settings = rtl8169_gset_tbi; 3753 3733 tp->phy_reset_enable = rtl8169_tbi_reset_enable; ··· 3794 3776 tp->hw_start = cfg->hw_start; 3795 3777 tp->intr_event = cfg->intr_event; 3796 3778 tp->napi_event = cfg->napi_event; 3779 + 3780 + tp->opts1_mask = (tp->mac_version != RTL_GIGA_MAC_VER_01) ? 3781 + ~(RxBOVF | RxFOVF) : ~0; 3797 3782 3798 3783 init_timer(&tp->timer); 3799 3784 tp->timer.data = (unsigned long) dev; ··· 4009 3988 while (RTL_R8(TxPoll) & NPQ) 4010 3989 udelay(20); 4011 3990 } else if (tp->mac_version == RTL_GIGA_MAC_VER_34) { 3991 + RTL_W8(ChipCmd, RTL_R8(ChipCmd) | StopReq); 4012 3992 while (!(RTL_R32(TxConfig) & TXCFG_EMPTY)) 4013 3993 udelay(100); 4014 3994 } else { ··· 5336 5314 u32 status; 5337 5315 5338 5316 rmb(); 5339 - status = le32_to_cpu(desc->opts1); 5317 + status = le32_to_cpu(desc->opts1) & tp->opts1_mask; 5340 5318 5341 5319 if (status & DescOwn) 5342 5320 break;
-2
drivers/net/tg3.c
··· 6234 6234 } 6235 6235 } 6236 6236 6237 - #ifdef BCM_KERNEL_SUPPORTS_8021Q 6238 6237 if (vlan_tx_tag_present(skb)) { 6239 6238 base_flags |= TXD_FLAG_VLAN; 6240 6239 vlan = vlan_tx_tag_get(skb); 6241 6240 } 6242 - #endif 6243 6241 6244 6242 if (tg3_flag(tp, USE_JUMBO_BDFLAG) && 6245 6243 !mss && skb->len > VLAN_ETH_FRAME_LEN)
+2 -1
drivers/net/wireless/b43/main.c
··· 1632 1632 u32 cmd, beacon0_valid, beacon1_valid; 1633 1633 1634 1634 if (!b43_is_mode(wl, NL80211_IFTYPE_AP) && 1635 - !b43_is_mode(wl, NL80211_IFTYPE_MESH_POINT)) 1635 + !b43_is_mode(wl, NL80211_IFTYPE_MESH_POINT) && 1636 + !b43_is_mode(wl, NL80211_IFTYPE_ADHOC)) 1636 1637 return; 1637 1638 1638 1639 /* This is the bottom half of the asynchronous beacon update. */
+14 -7
drivers/net/wireless/ipw2x00/ipw2100.c
··· 1903 1903 static int ipw2100_net_init(struct net_device *dev) 1904 1904 { 1905 1905 struct ipw2100_priv *priv = libipw_priv(dev); 1906 + 1907 + return ipw2100_up(priv, 1); 1908 + } 1909 + 1910 + static int ipw2100_wdev_init(struct net_device *dev) 1911 + { 1912 + struct ipw2100_priv *priv = libipw_priv(dev); 1906 1913 const struct libipw_geo *geo = libipw_get_geo(priv->ieee); 1907 1914 struct wireless_dev *wdev = &priv->ieee->wdev; 1908 - int ret; 1909 1915 int i; 1910 - 1911 - ret = ipw2100_up(priv, 1); 1912 - if (ret) 1913 - return ret; 1914 1916 1915 1917 memcpy(wdev->wiphy->perm_addr, priv->mac_addr, ETH_ALEN); 1916 1918 ··· 6352 6350 "Error calling register_netdev.\n"); 6353 6351 goto fail; 6354 6352 } 6353 + registered = 1; 6354 + 6355 + err = ipw2100_wdev_init(dev); 6356 + if (err) 6357 + goto fail; 6355 6358 6356 6359 mutex_lock(&priv->action_mutex); 6357 - registered = 1; 6358 6360 6359 6361 IPW_DEBUG_INFO("%s: Bound to %s\n", dev->name, pci_name(pci_dev)); 6360 6362 ··· 6395 6389 6396 6390 fail_unlock: 6397 6391 mutex_unlock(&priv->action_mutex); 6398 - 6392 + wiphy_unregister(priv->ieee->wdev.wiphy); 6393 + kfree(priv->ieee->bg_band.channels); 6399 6394 fail: 6400 6395 if (dev) { 6401 6396 if (registered)
+26 -13
drivers/net/wireless/ipw2x00/ipw2200.c
··· 11425 11425 /* Called by register_netdev() */ 11426 11426 static int ipw_net_init(struct net_device *dev) 11427 11427 { 11428 + int rc = 0; 11429 + struct ipw_priv *priv = libipw_priv(dev); 11430 + 11431 + mutex_lock(&priv->mutex); 11432 + if (ipw_up(priv)) 11433 + rc = -EIO; 11434 + mutex_unlock(&priv->mutex); 11435 + 11436 + return rc; 11437 + } 11438 + 11439 + static int ipw_wdev_init(struct net_device *dev) 11440 + { 11428 11441 int i, rc = 0; 11429 11442 struct ipw_priv *priv = libipw_priv(dev); 11430 11443 const struct libipw_geo *geo = libipw_get_geo(priv->ieee); 11431 11444 struct wireless_dev *wdev = &priv->ieee->wdev; 11432 - mutex_lock(&priv->mutex); 11433 - 11434 - if (ipw_up(priv)) { 11435 - rc = -EIO; 11436 - goto out; 11437 - } 11438 11445 11439 11446 memcpy(wdev->wiphy->perm_addr, priv->mac_addr, ETH_ALEN); 11440 11447 ··· 11526 11519 set_wiphy_dev(wdev->wiphy, &priv->pci_dev->dev); 11527 11520 11528 11521 /* With that information in place, we can now register the wiphy... */ 11529 - if (wiphy_register(wdev->wiphy)) { 11522 + if (wiphy_register(wdev->wiphy)) 11530 11523 rc = -EIO; 11531 - goto out; 11532 - } 11533 - 11534 11524 out: 11535 - mutex_unlock(&priv->mutex); 11536 11525 return rc; 11537 11526 } 11538 11527 ··· 11835 11832 goto out_remove_sysfs; 11836 11833 } 11837 11834 11835 + err = ipw_wdev_init(net_dev); 11836 + if (err) { 11837 + IPW_ERROR("failed to register wireless device\n"); 11838 + goto out_unregister_netdev; 11839 + } 11840 + 11838 11841 #ifdef CONFIG_IPW2200_PROMISCUOUS 11839 11842 if (rtap_iface) { 11840 11843 err = ipw_prom_alloc(priv); 11841 11844 if (err) { 11842 11845 IPW_ERROR("Failed to register promiscuous network " 11843 11846 "device (error %d).\n", err); 11844 - unregister_netdev(priv->net_dev); 11845 - goto out_remove_sysfs; 11847 + wiphy_unregister(priv->ieee->wdev.wiphy); 11848 + kfree(priv->ieee->a_band.channels); 11849 + kfree(priv->ieee->bg_band.channels); 11850 + goto out_unregister_netdev; 11846 11851 } 11847 11852 } 11848 11853 #endif ··· 11862 11851 11863 11852 return 0; 11864 11853 11854 + out_unregister_netdev: 11855 + unregister_netdev(priv->net_dev); 11865 11856 out_remove_sysfs: 11866 11857 sysfs_remove_group(&pdev->dev.kobj, &ipw_attribute_group); 11867 11858 out_release_irq:
+5
drivers/net/wireless/iwlwifi/iwl-agn.c
··· 2140 2140 IEEE80211_HW_SPECTRUM_MGMT | 2141 2141 IEEE80211_HW_REPORTS_TX_ACK_STATUS; 2142 2142 2143 + /* 2144 + * Including the following line will crash some AP's. This 2145 + * workaround removes the stimulus which causes the crash until 2146 + * the AP software can be fixed. 2143 2147 hw->max_tx_aggregation_subframes = LINK_QUAL_AGG_FRAME_LIMIT_DEF; 2148 + */ 2144 2149 2145 2150 hw->flags |= IEEE80211_HW_SUPPORTS_PS | 2146 2151 IEEE80211_HW_SUPPORTS_DYNAMIC_PS;
+26 -21
drivers/net/wireless/rt2x00/rt2800lib.c
··· 3697 3697 rt2800_regbusy_read(rt2x00dev, EFUSE_CTRL, EFUSE_CTRL_KICK, &reg); 3698 3698 3699 3699 /* Apparently the data is read from end to start */ 3700 - rt2800_register_read_lock(rt2x00dev, EFUSE_DATA3, 3701 - (u32 *)&rt2x00dev->eeprom[i]); 3702 - rt2800_register_read_lock(rt2x00dev, EFUSE_DATA2, 3703 - (u32 *)&rt2x00dev->eeprom[i + 2]); 3704 - rt2800_register_read_lock(rt2x00dev, EFUSE_DATA1, 3705 - (u32 *)&rt2x00dev->eeprom[i + 4]); 3706 - rt2800_register_read_lock(rt2x00dev, EFUSE_DATA0, 3707 - (u32 *)&rt2x00dev->eeprom[i + 6]); 3700 + rt2800_register_read_lock(rt2x00dev, EFUSE_DATA3, &reg); 3701 + /* The returned value is in CPU order, but eeprom is le */ 3702 + rt2x00dev->eeprom[i] = cpu_to_le32(reg); 3703 + rt2800_register_read_lock(rt2x00dev, EFUSE_DATA2, &reg); 3704 + *(u32 *)&rt2x00dev->eeprom[i + 2] = cpu_to_le32(reg); 3705 + rt2800_register_read_lock(rt2x00dev, EFUSE_DATA1, &reg); 3706 + *(u32 *)&rt2x00dev->eeprom[i + 4] = cpu_to_le32(reg); 3707 + rt2800_register_read_lock(rt2x00dev, EFUSE_DATA0, &reg); 3708 + *(u32 *)&rt2x00dev->eeprom[i + 6] = cpu_to_le32(reg); 3708 3709 3709 3710 mutex_unlock(&rt2x00dev->csr_mutex); 3710 3711 } ··· 3871 3870 return -ENODEV; 3872 3871 } 3873 3872 3874 - if (!rt2x00_rf(rt2x00dev, RF2820) && 3875 - !rt2x00_rf(rt2x00dev, RF2850) && 3876 - !rt2x00_rf(rt2x00dev, RF2720) && 3877 - !rt2x00_rf(rt2x00dev, RF2750) && 3878 - !rt2x00_rf(rt2x00dev, RF3020) && 3879 - !rt2x00_rf(rt2x00dev, RF2020) && 3880 - !rt2x00_rf(rt2x00dev, RF3021) && 3881 - !rt2x00_rf(rt2x00dev, RF3022) && 3882 - !rt2x00_rf(rt2x00dev, RF3052) && 3883 - !rt2x00_rf(rt2x00dev, RF3320) && 3884 - !rt2x00_rf(rt2x00dev, RF5370) && 3885 - !rt2x00_rf(rt2x00dev, RF5390)) { 3886 - ERROR(rt2x00dev, "Invalid RF chipset detected.\n"); 3873 + switch (rt2x00dev->chip.rf) { 3874 + case RF2820: 3875 + case RF2850: 3876 + case RF2720: 3877 + case RF2750: 3878 + case RF3020: 3879 + case RF2020: 3880 + case RF3021: 3881 + case RF3022: 3882 + case RF3052: 3883 + case RF3320: 3884 + case RF5370: 3885 + case RF5390: 3886 + break; 3887 + default: 3888 + ERROR(rt2x00dev, "Invalid RF chipset 0x%x detected.\n", 3889 + rt2x00dev->chip.rf); 3887 3890 return -ENODEV; 3888 3891 } 3889 3892
+8 -9
net/bluetooth/hci_event.c
··· 58 58 if (status) 59 59 return; 60 60 61 - if (test_bit(HCI_MGMT, &hdev->flags) && 62 - test_and_clear_bit(HCI_INQUIRY, &hdev->flags)) 61 + if (test_and_clear_bit(HCI_INQUIRY, &hdev->flags) && 62 + test_bit(HCI_MGMT, &hdev->flags)) 63 63 mgmt_discovering(hdev->id, 0); 64 64 65 65 hci_req_complete(hdev, HCI_OP_INQUIRY_CANCEL, status); ··· 76 76 if (status) 77 77 return; 78 78 79 - if (test_bit(HCI_MGMT, &hdev->flags) && 80 - test_and_clear_bit(HCI_INQUIRY, &hdev->flags)) 79 + if (test_and_clear_bit(HCI_INQUIRY, &hdev->flags) && 80 + test_bit(HCI_MGMT, &hdev->flags)) 81 81 mgmt_discovering(hdev->id, 0); 82 82 83 83 hci_conn_check_pending(hdev); ··· 959 959 return; 960 960 } 961 961 962 - if (test_bit(HCI_MGMT, &hdev->flags) && 963 - !test_and_set_bit(HCI_INQUIRY, 964 - &hdev->flags)) 962 + if (!test_and_set_bit(HCI_INQUIRY, &hdev->flags) && 963 + test_bit(HCI_MGMT, &hdev->flags)) 965 964 mgmt_discovering(hdev->id, 1); 966 965 } 967 966 ··· 1339 1340 1340 1341 BT_DBG("%s status %d", hdev->name, status); 1341 1342 1342 - if (test_bit(HCI_MGMT, &hdev->flags) && 1343 - test_and_clear_bit(HCI_INQUIRY, &hdev->flags)) 1343 + if (test_and_clear_bit(HCI_INQUIRY, &hdev->flags) && 1344 + test_bit(HCI_MGMT, &hdev->flags)) 1344 1345 mgmt_discovering(hdev->id, 0); 1345 1346 1346 1347 hci_req_complete(hdev, HCI_OP_INQUIRY, status);
+2 -2
net/core/fib_rules.c
··· 384 384 */ 385 385 list_for_each_entry(r, &ops->rules_list, list) { 386 386 if (r->action == FR_ACT_GOTO && 387 - r->target == rule->pref) { 388 - BUG_ON(rtnl_dereference(r->ctarget) != NULL); 387 + r->target == rule->pref && 388 + rtnl_dereference(r->ctarget) == NULL) { 389 389 rcu_assign_pointer(r->ctarget, rule); 390 390 if (--ops->unresolved_rules == 0) 391 391 break;
+2 -2
net/ipv6/addrconf.c
··· 374 374 "%s(): cannot allocate memory for statistics; dev=%s.\n", 375 375 __func__, dev->name)); 376 376 neigh_parms_release(&nd_tbl, ndev->nd_parms); 377 - ndev->dead = 1; 378 - in6_dev_finish_destroy(ndev); 377 + dev_put(dev); 378 + kfree(ndev); 379 379 return NULL; 380 380 } 381 381
+1
net/wireless/reg.c
··· 852 852 return; 853 853 } 854 854 855 + chan->beacon_found = false; 855 856 chan->flags = flags | bw_flags | map_regdom_flags(reg_rule->flags); 856 857 chan->max_antenna_gain = min(chan->orig_mag, 857 858 (int) MBI_TO_DBI(power_rule->max_antenna_gain));
+2
net/wireless/sme.c
··· 118 118 i++, j++) 119 119 request->channels[i] = 120 120 &wdev->wiphy->bands[band]->channels[j]; 121 + request->rates[band] = 122 + (1 << wdev->wiphy->bands[band]->n_bitrates) - 1; 121 123 } 122 124 } 123 125 request->n_channels = n_channels;
+5
net/xfrm/xfrm_input.c
··· 212 212 /* only the first xfrm gets the encap type */ 213 213 encap_type = 0; 214 214 215 + if (async && x->repl->check(x, skb, seq)) { 216 + XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATESEQERROR); 217 + goto drop_unlock; 218 + } 219 + 215 220 x->repl->advance(x, seq); 216 221 217 222 x->curlft.bytes += skb->len;