From: David S. Miller Date: Mon, 1 Apr 2013 17:36:50 +0000 (-0400) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a210576c;p=linux-beck.git Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Conflicts: net/mac80211/sta_info.c net/wireless/core.h Two minor conflicts in wireless. Overlapping additions of extern declarations in net/wireless/core.h and a bug fix overlapping with the addition of a boolean parameter to __ieee80211_key_free(). Signed-off-by: David S. Miller --- a210576cf891e9e6d2c238eabcf5c1286b1e7526 diff --cc drivers/net/ethernet/freescale/fec_main.c index 2b78a1ebe903,f292c3aa423f..a82a70345bbf --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@@ -1597,12 -1648,13 +1645,11 @@@ static int fec_enet_init(struct net_dev /* Allocate memory for buffer descriptors. */ cbd_base = dma_alloc_coherent(NULL, PAGE_SIZE, &fep->bd_dma, - GFP_KERNEL); - if (!cbd_base) { - printk("FEC: allocate descriptor memory failed?\n"); + GFP_KERNEL); + if (!cbd_base) return -ENOMEM; - } + memset(cbd_base, 0, PAGE_SIZE); spin_lock_init(&fep->hw_lock); fep->netdev = ndev; diff --cc drivers/net/ethernet/intel/e1000/e1000_ethtool.c index a9f9c7906769,ffd287196bf8..82a967c95598 --- a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c +++ b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c @@@ -1074,11 -1079,12 +1078,11 @@@ static int e1000_setup_desc_rings(struc rxdr->size = rxdr->count * sizeof(struct e1000_rx_desc); rxdr->desc = dma_alloc_coherent(&pdev->dev, rxdr->size, &rxdr->dma, - GFP_KERNEL); + GFP_KERNEL | __GFP_ZERO); if (!rxdr->desc) { - ret_val = 5; + ret_val = 6; goto err_nomem; } - memset(rxdr->desc, 0, rxdr->size); rxdr->next_to_use = rxdr->next_to_clean = 0; rctl = er32(RCTL); diff --cc drivers/net/ethernet/intel/e1000e/netdev.c index 858d2a3b3672,7e615e2bf7e6..b18fad5b579e --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@@ -846,11 -848,16 +846,16 @@@ check_page } } - if (!buffer_info->dma) + if (!buffer_info->dma) { buffer_info->dma = dma_map_page(&pdev->dev, - buffer_info->page, 0, - PAGE_SIZE, + buffer_info->page, 0, + PAGE_SIZE, DMA_FROM_DEVICE); + if (dma_mapping_error(&pdev->dev, buffer_info->dma)) { + adapter->alloc_rx_buff_failed++; + break; + } + } rx_desc = E1000_RX_DESC_EXT(*rx_ring, i); rx_desc->read.buffer_addr = cpu_to_le64(buffer_info->dma); diff --cc net/mac80211/sta_info.c index 3644ad79688a,238a0cca320e..85458a28ffa0 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@@ -798,14 -794,19 +799,22 @@@ int __must_check __sta_info_destroy(str list_del_rcu(&sta->list); mutex_lock(&local->key_mtx); - for (i = 0; i < NUM_DEFAULT_KEYS; i++) + for (i = 0; i < NUM_DEFAULT_KEYS; i++) { - __ieee80211_key_free(key_mtx_dereference(local, sta->gtk[i])); + __ieee80211_key_free(key_mtx_dereference(local, sta->gtk[i]), + true); - if (sta->ptk) + have_key = true; + } + if (sta->ptk) { - __ieee80211_key_free(key_mtx_dereference(local, sta->ptk)); + __ieee80211_key_free(key_mtx_dereference(local, sta->ptk), + true); + have_key = true; + } ++ mutex_unlock(&local->key_mtx); + if (!have_key) + synchronize_net(); + sta->dead = true; local->num_sta--; diff --cc net/wireless/core.h index d5d06fdea961,5845c2b37aa8..b5174f65cc9a --- a/net/wireless/core.h +++ b/net/wireless/core.h @@@ -500,9 -503,9 +500,14 @@@ int cfg80211_validate_beacon_int(struc void cfg80211_update_iface_num(struct cfg80211_registered_device *rdev, enum nl80211_iftype iftype, int num); ++ +void cfg80211_leave(struct cfg80211_registered_device *rdev, + struct wireless_dev *wdev); + + void cfg80211_stop_p2p_device(struct cfg80211_registered_device *rdev, + struct wireless_dev *wdev); + ++ #define CFG80211_MAX_NUM_DIFFERENT_CHANNELS 10 #ifdef CONFIG_CFG80211_DEVELOPER_WARNINGS