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

Configure Feed

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

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

* git://github.com/davem330/net:
ipv6-multicast: Fix memory leak in IPv6 multicast.
ipv6: check return value for dst_alloc
net: check return value for dst_alloc
ipv6-multicast: Fix memory leak in input path.
bnx2x: add missing break in bnx2x_dcbnl_get_cap
bnx2x: fix WOL by enablement PME in config space
bnx2x: fix hw attention handling
net: fix a typo in Documentation/networking/scaling.txt
ath9k: Fix a dma warning/memory leak
rtlwifi: rtl8192cu: Fix unitialized struct
iwlagn: fix dangling scan request
batman-adv: do_bcast has to be true for broadcast packets only
cfg80211: Fix validation of AKM suites
iwlegacy: do not use interruptible waits
iwlegacy: fix command queue timeout
ath9k_hw: Fix Rx DMA stuck for AR9003 chips

+93 -46
+1 -1
Documentation/networking/scaling.txt
··· 243 243 244 244 The number of entries in the per-queue flow table are set through: 245 245 246 - /sys/class/net/<dev>/queues/tx-<n>/rps_flow_cnt 246 + /sys/class/net/<dev>/queues/rx-<n>/rps_flow_cnt 247 247 248 248 == Suggested Configuration 249 249
+1
drivers/net/bnx2x/bnx2x_dcb.c
··· 2120 2120 break; 2121 2121 case DCB_CAP_ATTR_DCBX: 2122 2122 *cap = BNX2X_DCBX_CAPS; 2123 + break; 2123 2124 default: 2124 2125 rval = -EINVAL; 2125 2126 break;
+13 -3
drivers/net/bnx2x/bnx2x_main.c
··· 4943 4943 int igu_seg_id; 4944 4944 int port = BP_PORT(bp); 4945 4945 int func = BP_FUNC(bp); 4946 - int reg_offset; 4946 + int reg_offset, reg_offset_en5; 4947 4947 u64 section; 4948 4948 int index; 4949 4949 struct hc_sp_status_block_data sp_sb_data; ··· 4966 4966 4967 4967 reg_offset = (port ? MISC_REG_AEU_ENABLE1_FUNC_1_OUT_0 : 4968 4968 MISC_REG_AEU_ENABLE1_FUNC_0_OUT_0); 4969 + reg_offset_en5 = (port ? MISC_REG_AEU_ENABLE5_FUNC_1_OUT_0 : 4970 + MISC_REG_AEU_ENABLE5_FUNC_0_OUT_0); 4969 4971 for (index = 0; index < MAX_DYNAMIC_ATTN_GRPS; index++) { 4970 4972 int sindex; 4971 4973 /* take care of sig[0]..sig[4] */ ··· 4982 4980 * and not 16 between the different groups 4983 4981 */ 4984 4982 bp->attn_group[index].sig[4] = REG_RD(bp, 4985 - reg_offset + 0x10 + 0x4*index); 4983 + reg_offset_en5 + 0x4*index); 4986 4984 else 4987 4985 bp->attn_group[index].sig[4] = 0; 4988 4986 } ··· 7627 7625 u32 emac_base = port ? GRCBASE_EMAC1 : GRCBASE_EMAC0; 7628 7626 u8 *mac_addr = bp->dev->dev_addr; 7629 7627 u32 val; 7628 + u16 pmc; 7629 + 7630 7630 /* The mac address is written to entries 1-4 to 7631 - preserve entry 0 which is used by the PMF */ 7631 + * preserve entry 0 which is used by the PMF 7632 + */ 7632 7633 u8 entry = (BP_VN(bp) + 1)*8; 7633 7634 7634 7635 val = (mac_addr[0] << 8) | mac_addr[1]; ··· 7640 7635 val = (mac_addr[2] << 24) | (mac_addr[3] << 16) | 7641 7636 (mac_addr[4] << 8) | mac_addr[5]; 7642 7637 EMAC_WR(bp, EMAC_REG_EMAC_MAC_MATCH + entry + 4, val); 7638 + 7639 + /* Enable the PME and clear the status */ 7640 + pci_read_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL, &pmc); 7641 + pmc |= PCI_PM_CTRL_PME_ENABLE | PCI_PM_CTRL_PME_STATUS; 7642 + pci_write_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL, pmc); 7643 7643 7644 7644 reset_code = DRV_MSG_CODE_UNLOAD_REQ_WOL_EN; 7645 7645
+12
drivers/net/bnx2x/bnx2x_reg.h
··· 1384 1384 Latched ump_tx_parity; [31] MCP Latched scpad_parity; */ 1385 1385 #define MISC_REG_AEU_ENABLE4_PXP_0 0xa108 1386 1386 #define MISC_REG_AEU_ENABLE4_PXP_1 0xa1a8 1387 + /* [RW 32] fifth 32b for enabling the output for function 0 output0. Mapped 1388 + * as follows: [0] PGLUE config_space; [1] PGLUE misc_flr; [2] PGLUE B RBC 1389 + * attention [3] PGLUE B RBC parity; [4] ATC attention; [5] ATC parity; [6] 1390 + * mstat0 attention; [7] mstat0 parity; [8] mstat1 attention; [9] mstat1 1391 + * parity; [31-10] Reserved; */ 1392 + #define MISC_REG_AEU_ENABLE5_FUNC_0_OUT_0 0xa688 1393 + /* [RW 32] Fifth 32b for enabling the output for function 1 output0. Mapped 1394 + * as follows: [0] PGLUE config_space; [1] PGLUE misc_flr; [2] PGLUE B RBC 1395 + * attention [3] PGLUE B RBC parity; [4] ATC attention; [5] ATC parity; [6] 1396 + * mstat0 attention; [7] mstat0 parity; [8] mstat1 attention; [9] mstat1 1397 + * parity; [31-10] Reserved; */ 1398 + #define MISC_REG_AEU_ENABLE5_FUNC_1_OUT_0 0xa6b0 1387 1399 /* [RW 1] set/clr general attention 0; this will set/clr bit 94 in the aeu 1388 1400 128 bit vector */ 1389 1401 #define MISC_REG_AEU_GENERAL_ATTN_0 0xa000
+1 -1
drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
··· 1514 1514 {0x00008258, 0x00000000}, 1515 1515 {0x0000825c, 0x40000000}, 1516 1516 {0x00008260, 0x00080922}, 1517 - {0x00008264, 0x9bc00010}, 1517 + {0x00008264, 0x9d400010}, 1518 1518 {0x00008268, 0xffffffff}, 1519 1519 {0x0000826c, 0x0000ffff}, 1520 1520 {0x00008270, 0x00000000},
+9 -1
drivers/net/wireless/ath/ath9k/recv.c
··· 205 205 206 206 static void ath_rx_edma_cleanup(struct ath_softc *sc) 207 207 { 208 + struct ath_hw *ah = sc->sc_ah; 209 + struct ath_common *common = ath9k_hw_common(ah); 208 210 struct ath_buf *bf; 209 211 210 212 ath_rx_remove_buffer(sc, ATH9K_RX_QUEUE_LP); 211 213 ath_rx_remove_buffer(sc, ATH9K_RX_QUEUE_HP); 212 214 213 215 list_for_each_entry(bf, &sc->rx.rxbuf, list) { 214 - if (bf->bf_mpdu) 216 + if (bf->bf_mpdu) { 217 + dma_unmap_single(sc->dev, bf->bf_buf_addr, 218 + common->rx_bufsize, 219 + DMA_BIDIRECTIONAL); 215 220 dev_kfree_skb_any(bf->bf_mpdu); 221 + bf->bf_buf_addr = 0; 222 + bf->bf_mpdu = NULL; 223 + } 216 224 } 217 225 218 226 INIT_LIST_HEAD(&sc->rx.rxbuf);
+2 -2
drivers/net/wireless/iwlegacy/iwl-core.c
··· 937 937 &priv->contexts[IWL_RXON_CTX_BSS]); 938 938 #endif 939 939 940 - wake_up_interruptible(&priv->wait_command_queue); 940 + wake_up(&priv->wait_command_queue); 941 941 942 942 /* Keep the restart process from trying to send host 943 943 * commands by clearing the INIT status bit */ ··· 1746 1746 1747 1747 /* Set the FW error flag -- cleared on iwl_down */ 1748 1748 set_bit(STATUS_FW_ERROR, &priv->status); 1749 - wake_up_interruptible(&priv->wait_command_queue); 1749 + wake_up(&priv->wait_command_queue); 1750 1750 /* 1751 1751 * Keep the restart process from trying to send host 1752 1752 * commands by clearing the INIT status bit
+1 -1
drivers/net/wireless/iwlegacy/iwl-hcmd.c
··· 167 167 goto out; 168 168 } 169 169 170 - ret = wait_event_interruptible_timeout(priv->wait_command_queue, 170 + ret = wait_event_timeout(priv->wait_command_queue, 171 171 !test_bit(STATUS_HCMD_ACTIVE, &priv->status), 172 172 HOST_COMPLETE_TIMEOUT); 173 173 if (!ret) {
+3 -1
drivers/net/wireless/iwlegacy/iwl-tx.c
··· 625 625 cmd = txq->cmd[cmd_index]; 626 626 meta = &txq->meta[cmd_index]; 627 627 628 + txq->time_stamp = jiffies; 629 + 628 630 pci_unmap_single(priv->pci_dev, 629 631 dma_unmap_addr(meta, mapping), 630 632 dma_unmap_len(meta, len), ··· 647 645 clear_bit(STATUS_HCMD_ACTIVE, &priv->status); 648 646 IWL_DEBUG_INFO(priv, "Clearing HCMD_ACTIVE for command %s\n", 649 647 iwl_legacy_get_cmd_string(cmd->hdr.cmd)); 650 - wake_up_interruptible(&priv->wait_command_queue); 648 + wake_up(&priv->wait_command_queue); 651 649 } 652 650 653 651 /* Mark as unmapped */
+4 -4
drivers/net/wireless/iwlegacy/iwl3945-base.c
··· 841 841 wiphy_rfkill_set_hw_state(priv->hw->wiphy, 842 842 test_bit(STATUS_RF_KILL_HW, &priv->status)); 843 843 else 844 - wake_up_interruptible(&priv->wait_command_queue); 844 + wake_up(&priv->wait_command_queue); 845 845 } 846 846 847 847 /** ··· 2269 2269 iwl3945_reg_txpower_periodic(priv); 2270 2270 2271 2271 IWL_DEBUG_INFO(priv, "ALIVE processing complete.\n"); 2272 - wake_up_interruptible(&priv->wait_command_queue); 2272 + wake_up(&priv->wait_command_queue); 2273 2273 2274 2274 return; 2275 2275 ··· 2300 2300 iwl_legacy_clear_driver_stations(priv); 2301 2301 2302 2302 /* Unblock any waiting calls */ 2303 - wake_up_interruptible_all(&priv->wait_command_queue); 2303 + wake_up_all(&priv->wait_command_queue); 2304 2304 2305 2305 /* Wipe out the EXIT_PENDING status bit if we are not actually 2306 2306 * exiting the module */ ··· 2853 2853 2854 2854 /* Wait for START_ALIVE from ucode. Otherwise callbacks from 2855 2855 * mac80211 will not be run successfully. */ 2856 - ret = wait_event_interruptible_timeout(priv->wait_command_queue, 2856 + ret = wait_event_timeout(priv->wait_command_queue, 2857 2857 test_bit(STATUS_READY, &priv->status), 2858 2858 UCODE_READY_TIMEOUT); 2859 2859 if (!ret) {
+5 -5
drivers/net/wireless/iwlegacy/iwl4965-base.c
··· 576 576 wiphy_rfkill_set_hw_state(priv->hw->wiphy, 577 577 test_bit(STATUS_RF_KILL_HW, &priv->status)); 578 578 else 579 - wake_up_interruptible(&priv->wait_command_queue); 579 + wake_up(&priv->wait_command_queue); 580 580 } 581 581 582 582 /** ··· 926 926 handled |= CSR_INT_BIT_FH_TX; 927 927 /* Wake up uCode load routine, now that load is complete */ 928 928 priv->ucode_write_complete = 1; 929 - wake_up_interruptible(&priv->wait_command_queue); 929 + wake_up(&priv->wait_command_queue); 930 930 } 931 931 932 932 if (inta & ~handled) { ··· 1795 1795 iwl4965_rf_kill_ct_config(priv); 1796 1796 1797 1797 IWL_DEBUG_INFO(priv, "ALIVE processing complete.\n"); 1798 - wake_up_interruptible(&priv->wait_command_queue); 1798 + wake_up(&priv->wait_command_queue); 1799 1799 1800 1800 iwl_legacy_power_update_mode(priv, true); 1801 1801 IWL_DEBUG_INFO(priv, "Updated power mode\n"); ··· 1828 1828 iwl_legacy_clear_driver_stations(priv); 1829 1829 1830 1830 /* Unblock any waiting calls */ 1831 - wake_up_interruptible_all(&priv->wait_command_queue); 1831 + wake_up_all(&priv->wait_command_queue); 1832 1832 1833 1833 /* Wipe out the EXIT_PENDING status bit if we are not actually 1834 1834 * exiting the module */ ··· 2266 2266 2267 2267 /* Wait for START_ALIVE from Run Time ucode. Otherwise callbacks from 2268 2268 * mac80211 will not be run successfully. */ 2269 - ret = wait_event_interruptible_timeout(priv->wait_command_queue, 2269 + ret = wait_event_timeout(priv->wait_command_queue, 2270 2270 test_bit(STATUS_READY, &priv->status), 2271 2271 UCODE_READY_TIMEOUT); 2272 2272 if (!ret) {
+16 -14
drivers/net/wireless/iwlwifi/iwl-scan.c
··· 405 405 406 406 mutex_lock(&priv->mutex); 407 407 408 - if (test_bit(STATUS_SCANNING, &priv->status) && 409 - priv->scan_type != IWL_SCAN_NORMAL) { 410 - IWL_DEBUG_SCAN(priv, "Scan already in progress.\n"); 411 - ret = -EAGAIN; 412 - goto out_unlock; 413 - } 414 - 415 - /* mac80211 will only ask for one band at a time */ 416 - priv->scan_request = req; 417 - priv->scan_vif = vif; 418 - 419 408 /* 420 409 * If an internal scan is in progress, just set 421 410 * up the scan_request as per above. 422 411 */ 423 412 if (priv->scan_type != IWL_SCAN_NORMAL) { 424 - IWL_DEBUG_SCAN(priv, "SCAN request during internal scan\n"); 413 + IWL_DEBUG_SCAN(priv, 414 + "SCAN request during internal scan - defer\n"); 415 + priv->scan_request = req; 416 + priv->scan_vif = vif; 425 417 ret = 0; 426 - } else 418 + } else { 419 + priv->scan_request = req; 420 + priv->scan_vif = vif; 421 + /* 422 + * mac80211 will only ask for one band at a time 423 + * so using channels[0] here is ok 424 + */ 427 425 ret = iwl_scan_initiate(priv, vif, IWL_SCAN_NORMAL, 428 426 req->channels[0]->band); 427 + if (ret) { 428 + priv->scan_request = NULL; 429 + priv->scan_vif = NULL; 430 + } 431 + } 429 432 430 433 IWL_DEBUG_MAC80211(priv, "leave\n"); 431 434 432 - out_unlock: 433 435 mutex_unlock(&priv->mutex); 434 436 435 437 return ret;
+1
drivers/net/wireless/rtlwifi/usb.c
··· 863 863 u8 tid = 0; 864 864 u16 seq_number = 0; 865 865 866 + memset(&tcb_desc, 0, sizeof(struct rtl_tcb_desc)); 866 867 if (ieee80211_is_auth(fc)) { 867 868 RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, ("MAC80211_LINKING\n")); 868 869 rtl_ips_nic_on(hw);
+5 -5
net/batman-adv/soft-interface.c
··· 565 565 struct orig_node *orig_node = NULL; 566 566 int data_len = skb->len, ret; 567 567 short vid = -1; 568 - bool do_bcast = false; 568 + bool do_bcast; 569 569 570 570 if (atomic_read(&bat_priv->mesh_state) != MESH_ACTIVE) 571 571 goto dropped; ··· 598 598 tt_local_add(soft_iface, ethhdr->h_source); 599 599 600 600 orig_node = transtable_search(bat_priv, ethhdr->h_dest); 601 - if (is_multicast_ether_addr(ethhdr->h_dest) || 602 - (orig_node && orig_node->gw_flags)) { 601 + do_bcast = is_multicast_ether_addr(ethhdr->h_dest); 602 + if (do_bcast || (orig_node && orig_node->gw_flags)) { 603 603 ret = gw_is_target(bat_priv, skb, orig_node); 604 604 605 605 if (ret < 0) 606 606 goto dropped; 607 607 608 - if (ret == 0) 609 - do_bcast = true; 608 + if (ret) 609 + do_bcast = false; 610 610 } 611 611 612 612 /* ethernet packet should be broadcasted */
+6 -2
net/ipv6/ip6mr.c
··· 696 696 int err; 697 697 698 698 err = ip6mr_fib_lookup(net, &fl6, &mrt); 699 - if (err < 0) 699 + if (err < 0) { 700 + kfree_skb(skb); 700 701 return err; 702 + } 701 703 702 704 read_lock(&mrt_lock); 703 705 dev->stats.tx_bytes += skb->len; ··· 2054 2052 int err; 2055 2053 2056 2054 err = ip6mr_fib_lookup(net, &fl6, &mrt); 2057 - if (err < 0) 2055 + if (err < 0) { 2056 + kfree_skb(skb); 2058 2057 return err; 2058 + } 2059 2059 2060 2060 read_lock(&mrt_lock); 2061 2061 cache = ip6mr_cache_find(mrt,
+3 -1
net/ipv6/route.c
··· 244 244 { 245 245 struct rt6_info *rt = dst_alloc(ops, dev, 0, 0, flags); 246 246 247 - memset(&rt->rt6i_table, 0, sizeof(*rt) - sizeof(struct dst_entry)); 247 + if (rt != NULL) 248 + memset(&rt->rt6i_table, 0, 249 + sizeof(*rt) - sizeof(struct dst_entry)); 248 250 249 251 return rt; 250 252 }
+4 -1
net/wireless/nl80211.c
··· 4113 4113 if (len % sizeof(u32)) 4114 4114 return -EINVAL; 4115 4115 4116 + if (settings->n_akm_suites > NL80211_MAX_NR_AKM_SUITES) 4117 + return -EINVAL; 4118 + 4116 4119 memcpy(settings->akm_suites, data, len); 4117 4120 4118 - for (i = 0; i < settings->n_ciphers_pairwise; i++) 4121 + for (i = 0; i < settings->n_akm_suites; i++) 4119 4122 if (!nl80211_valid_akm_suite(settings->akm_suites[i])) 4120 4123 return -EINVAL; 4121 4124 }
+6 -4
net/xfrm/xfrm_policy.c
··· 1349 1349 BUG(); 1350 1350 } 1351 1351 xdst = dst_alloc(dst_ops, NULL, 0, 0, 0); 1352 - memset(&xdst->u.rt6.rt6i_table, 0, sizeof(*xdst) - sizeof(struct dst_entry)); 1353 - xfrm_policy_put_afinfo(afinfo); 1354 1352 1355 - if (likely(xdst)) 1353 + if (likely(xdst)) { 1354 + memset(&xdst->u.rt6.rt6i_table, 0, 1355 + sizeof(*xdst) - sizeof(struct dst_entry)); 1356 1356 xdst->flo.ops = &xfrm_bundle_fc_ops; 1357 - else 1357 + } else 1358 1358 xdst = ERR_PTR(-ENOBUFS); 1359 + 1360 + xfrm_policy_put_afinfo(afinfo); 1359 1361 1360 1362 return xdst; 1361 1363 }