Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/freescale/fsl_pq_mdio.c net/batman-adv/translation-table.c net/ipv6/route.c
This commit is contained in:
Коммит
b26e478f8f
|
@ -232,6 +232,7 @@ struct fec_enet_private {
|
|||
struct platform_device *pdev;
|
||||
|
||||
int opened;
|
||||
int dev_id;
|
||||
|
||||
/* Phylib and MDIO interface */
|
||||
struct mii_bus *mii_bus;
|
||||
|
@ -842,7 +843,7 @@ static void __inline__ fec_get_mac(struct net_device *ndev)
|
|||
|
||||
/* Adjust MAC if using macaddr */
|
||||
if (iap == macaddr)
|
||||
ndev->dev_addr[ETH_ALEN-1] = macaddr[ETH_ALEN-1] + fep->pdev->id;
|
||||
ndev->dev_addr[ETH_ALEN-1] = macaddr[ETH_ALEN-1] + fep->dev_id;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
@ -960,7 +961,7 @@ static int fec_enet_mii_probe(struct net_device *ndev)
|
|||
char mdio_bus_id[MII_BUS_ID_SIZE];
|
||||
char phy_name[MII_BUS_ID_SIZE + 3];
|
||||
int phy_id;
|
||||
int dev_id = fep->pdev->id;
|
||||
int dev_id = fep->dev_id;
|
||||
|
||||
fep->phy_dev = NULL;
|
||||
|
||||
|
@ -1040,7 +1041,7 @@ static int fec_enet_mii_init(struct platform_device *pdev)
|
|||
* mdio interface in board design, and need to be configured by
|
||||
* fec0 mii_bus.
|
||||
*/
|
||||
if ((id_entry->driver_data & FEC_QUIRK_ENET_MAC) && pdev->id > 0) {
|
||||
if ((id_entry->driver_data & FEC_QUIRK_ENET_MAC) && fep->dev_id > 0) {
|
||||
/* fec1 uses fec0 mii_bus */
|
||||
if (mii_cnt && fec0_mii_bus) {
|
||||
fep->mii_bus = fec0_mii_bus;
|
||||
|
@ -1076,7 +1077,7 @@ static int fec_enet_mii_init(struct platform_device *pdev)
|
|||
fep->mii_bus->read = fec_enet_mdio_read;
|
||||
fep->mii_bus->write = fec_enet_mdio_write;
|
||||
fep->mii_bus->reset = fec_enet_mdio_reset;
|
||||
snprintf(fep->mii_bus->id, MII_BUS_ID_SIZE, "%x", pdev->id + 1);
|
||||
snprintf(fep->mii_bus->id, MII_BUS_ID_SIZE, "%x", fep->dev_id + 1);
|
||||
fep->mii_bus->priv = fep;
|
||||
fep->mii_bus->parent = &pdev->dev;
|
||||
|
||||
|
@ -1536,6 +1537,7 @@ fec_probe(struct platform_device *pdev)
|
|||
int i, irq, ret = 0;
|
||||
struct resource *r;
|
||||
const struct of_device_id *of_id;
|
||||
static int dev_id;
|
||||
|
||||
of_id = of_match_device(fec_dt_ids, &pdev->dev);
|
||||
if (of_id)
|
||||
|
@ -1563,6 +1565,7 @@ fec_probe(struct platform_device *pdev)
|
|||
|
||||
fep->hwp = ioremap(r->start, resource_size(r));
|
||||
fep->pdev = pdev;
|
||||
fep->dev_id = dev_id++;
|
||||
|
||||
if (!fep->hwp) {
|
||||
ret = -ENOMEM;
|
||||
|
|
|
@ -356,14 +356,13 @@ static int fsl_pq_mdio_probe(struct platform_device *ofdev)
|
|||
|
||||
if (prop)
|
||||
tbiaddr = *prop;
|
||||
}
|
||||
|
||||
if (tbiaddr == -1) {
|
||||
err = -EBUSY;
|
||||
|
||||
goto err_free_irqs;
|
||||
} else {
|
||||
out_be32(tbipa, tbiaddr);
|
||||
}
|
||||
if (tbiaddr == -1) {
|
||||
err = -EBUSY;
|
||||
goto err_free_irqs;
|
||||
} else {
|
||||
out_be32(tbipa, tbiaddr);
|
||||
}
|
||||
|
||||
err = of_mdiobus_register(new_bus, np);
|
||||
|
|
|
@ -423,10 +423,8 @@ static int pptp_bind(struct socket *sock, struct sockaddr *uservaddr,
|
|||
lock_sock(sk);
|
||||
|
||||
opt->src_addr = sp->sa_addr.pptp;
|
||||
if (add_chan(po)) {
|
||||
release_sock(sk);
|
||||
if (add_chan(po))
|
||||
error = -EBUSY;
|
||||
}
|
||||
|
||||
release_sock(sk);
|
||||
return error;
|
||||
|
|
|
@ -286,7 +286,7 @@ static bool ath_complete_reset(struct ath_softc *sc, bool start)
|
|||
ath_start_ani(common);
|
||||
}
|
||||
|
||||
if (ath9k_hw_ops(ah)->antdiv_comb_conf_get && sc->ant_rx != 3) {
|
||||
if ((ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB) && sc->ant_rx != 3) {
|
||||
struct ath_hw_antcomb_conf div_ant_conf;
|
||||
u8 lna_conf;
|
||||
|
||||
|
|
|
@ -569,7 +569,7 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw,
|
|||
}
|
||||
case ERFSLEEP:{
|
||||
if (ppsc->rfpwr_state == ERFOFF)
|
||||
break;
|
||||
return false;
|
||||
for (queue_id = 0, i = 0;
|
||||
queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {
|
||||
ring = &pcipriv->dev.tx_ring[queue_id];
|
||||
|
|
|
@ -548,7 +548,7 @@ static bool _rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw,
|
|||
break;
|
||||
case ERFSLEEP:
|
||||
if (ppsc->rfpwr_state == ERFOFF)
|
||||
break;
|
||||
return false;
|
||||
for (queue_id = 0, i = 0;
|
||||
queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {
|
||||
ring = &pcipriv->dev.tx_ring[queue_id];
|
||||
|
|
|
@ -3374,7 +3374,7 @@ bool rtl92d_phy_set_rf_power_state(struct ieee80211_hw *hw,
|
|||
break;
|
||||
case ERFSLEEP:
|
||||
if (ppsc->rfpwr_state == ERFOFF)
|
||||
break;
|
||||
return false;
|
||||
|
||||
for (queue_id = 0, i = 0;
|
||||
queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {
|
||||
|
|
|
@ -602,7 +602,7 @@ bool rtl92s_phy_set_rf_power_state(struct ieee80211_hw *hw,
|
|||
}
|
||||
case ERFSLEEP:
|
||||
if (ppsc->rfpwr_state == ERFOFF)
|
||||
break;
|
||||
return false;
|
||||
|
||||
for (queue_id = 0, i = 0;
|
||||
queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {
|
||||
|
|
|
@ -517,10 +517,14 @@ static void ssb_pcicore_pcie_setup_workarounds(struct ssb_pcicore *pc)
|
|||
|
||||
static void __devinit ssb_pcicore_init_clientmode(struct ssb_pcicore *pc)
|
||||
{
|
||||
ssb_pcicore_fix_sprom_core_index(pc);
|
||||
struct ssb_device *pdev = pc->dev;
|
||||
struct ssb_bus *bus = pdev->bus;
|
||||
|
||||
if (bus->bustype == SSB_BUSTYPE_PCI)
|
||||
ssb_pcicore_fix_sprom_core_index(pc);
|
||||
|
||||
/* Disable PCI interrupts. */
|
||||
ssb_write32(pc->dev, SSB_INTVEC, 0);
|
||||
ssb_write32(pdev, SSB_INTVEC, 0);
|
||||
|
||||
/* Additional PCIe always once-executed workarounds */
|
||||
if (pc->dev->id.coreid == SSB_DEV_PCIE) {
|
||||
|
|
|
@ -242,9 +242,10 @@ void tt_local_add(struct net_device *soft_iface, const uint8_t *addr,
|
|||
if (tt_global_entry) {
|
||||
/* This node is probably going to update its tt table */
|
||||
tt_global_entry->orig_node->tt_poss_change = true;
|
||||
/* The global entry has to be marked as PENDING and has to be
|
||||
/* The global entry has to be marked as ROAMING and has to be
|
||||
* kept for consistency purpose */
|
||||
tt_global_entry->common.flags |= TT_CLIENT_PENDING;
|
||||
tt_global_entry->roam_at = jiffies;
|
||||
send_roam_adv(bat_priv, tt_global_entry->common.addr,
|
||||
tt_global_entry->orig_node);
|
||||
}
|
||||
|
@ -661,6 +662,7 @@ void tt_global_del(struct bat_priv *bat_priv,
|
|||
const char *message, bool roaming)
|
||||
{
|
||||
struct tt_global_entry *tt_global_entry = NULL;
|
||||
struct tt_local_entry *tt_local_entry = NULL;
|
||||
|
||||
tt_global_entry = tt_global_hash_find(bat_priv, addr);
|
||||
if (!tt_global_entry)
|
||||
|
@ -668,15 +670,29 @@ void tt_global_del(struct bat_priv *bat_priv,
|
|||
|
||||
if (tt_global_entry->orig_node == orig_node) {
|
||||
if (roaming) {
|
||||
tt_global_entry->common.flags |= TT_CLIENT_ROAM;
|
||||
tt_global_entry->roam_at = jiffies;
|
||||
goto out;
|
||||
/* if we are deleting a global entry due to a roam
|
||||
* event, there are two possibilities:
|
||||
* 1) the client roamed from node A to node B => we mark
|
||||
* it with TT_CLIENT_ROAM, we start a timer and we
|
||||
* wait for node B to claim it. In case of timeout
|
||||
* the entry is purged.
|
||||
* 2) the client roamed to us => we can directly delete
|
||||
* the global entry, since it is useless now. */
|
||||
tt_local_entry = tt_local_hash_find(bat_priv,
|
||||
tt_global_entry->common.addr);
|
||||
if (!tt_local_entry) {
|
||||
tt_global_entry->common.flags |= TT_CLIENT_ROAM;
|
||||
tt_global_entry->roam_at = jiffies;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
_tt_global_del(bat_priv, tt_global_entry, message);
|
||||
}
|
||||
out:
|
||||
if (tt_global_entry)
|
||||
tt_global_entry_free_ref(tt_global_entry);
|
||||
if (tt_local_entry)
|
||||
tt_local_entry_free_ref(tt_local_entry);
|
||||
}
|
||||
|
||||
void tt_global_del_orig(struct bat_priv *bat_priv,
|
||||
|
|
|
@ -285,6 +285,8 @@ static struct ip_tunnel * ipip_tunnel_locate(struct net *net,
|
|||
if (register_netdevice(dev) < 0)
|
||||
goto failed_free;
|
||||
|
||||
strcpy(nt->parms.name, dev->name);
|
||||
|
||||
dev_hold(dev);
|
||||
ipip_tunnel_link(ipn, nt);
|
||||
return nt;
|
||||
|
@ -759,7 +761,6 @@ static int ipip_tunnel_init(struct net_device *dev)
|
|||
struct ip_tunnel *tunnel = netdev_priv(dev);
|
||||
|
||||
tunnel->dev = dev;
|
||||
strcpy(tunnel->parms.name, dev->name);
|
||||
|
||||
memcpy(dev->dev_addr, &tunnel->parms.iph.saddr, 4);
|
||||
memcpy(dev->broadcast, &tunnel->parms.iph.daddr, 4);
|
||||
|
@ -825,6 +826,7 @@ static void ipip_destroy_tunnels(struct ipip_net *ipn, struct list_head *head)
|
|||
static int __net_init ipip_init_net(struct net *net)
|
||||
{
|
||||
struct ipip_net *ipn = net_generic(net, ipip_net_id);
|
||||
struct ip_tunnel *t;
|
||||
int err;
|
||||
|
||||
ipn->tunnels[0] = ipn->tunnels_wc;
|
||||
|
@ -848,6 +850,9 @@ static int __net_init ipip_init_net(struct net *net)
|
|||
if ((err = register_netdev(ipn->fb_tunnel_dev)))
|
||||
goto err_reg_dev;
|
||||
|
||||
t = netdev_priv(ipn->fb_tunnel_dev);
|
||||
|
||||
strcpy(t->parms.name, ipn->fb_tunnel_dev->name);
|
||||
return 0;
|
||||
|
||||
err_reg_dev:
|
||||
|
|
|
@ -1805,7 +1805,8 @@ static struct inet6_dev *addrconf_add_dev(struct net_device *dev)
|
|||
return ERR_PTR(-EACCES);
|
||||
|
||||
/* Add default multicast route */
|
||||
addrconf_add_mroute(dev);
|
||||
if (!(dev->flags & IFF_LOOPBACK))
|
||||
addrconf_add_mroute(dev);
|
||||
|
||||
/* Add link local route */
|
||||
addrconf_add_lroute(dev);
|
||||
|
|
|
@ -728,7 +728,7 @@ static struct rt6_info *rt6_alloc_cow(const struct rt6_info *ort,
|
|||
int attempts = !in_softirq();
|
||||
|
||||
if (!(rt->rt6i_flags & RTF_GATEWAY)) {
|
||||
if (rt->rt6i_dst.plen != 128 &&
|
||||
if (ort->rt6i_dst.plen != 128 &&
|
||||
ipv6_addr_equal(&ort->rt6i_dst.addr, daddr))
|
||||
rt->rt6i_flags |= RTF_ANYCAST;
|
||||
rt->rt6i_gateway = *daddr;
|
||||
|
|
|
@ -263,6 +263,8 @@ static struct ip_tunnel *ipip6_tunnel_locate(struct net *net,
|
|||
if (register_netdevice(dev) < 0)
|
||||
goto failed_free;
|
||||
|
||||
strcpy(nt->parms.name, dev->name);
|
||||
|
||||
dev_hold(dev);
|
||||
|
||||
ipip6_tunnel_link(sitn, nt);
|
||||
|
@ -1144,7 +1146,6 @@ static int ipip6_tunnel_init(struct net_device *dev)
|
|||
struct ip_tunnel *tunnel = netdev_priv(dev);
|
||||
|
||||
tunnel->dev = dev;
|
||||
strcpy(tunnel->parms.name, dev->name);
|
||||
|
||||
memcpy(dev->dev_addr, &tunnel->parms.iph.saddr, 4);
|
||||
memcpy(dev->broadcast, &tunnel->parms.iph.daddr, 4);
|
||||
|
@ -1207,6 +1208,7 @@ static void __net_exit sit_destroy_tunnels(struct sit_net *sitn, struct list_hea
|
|||
static int __net_init sit_init_net(struct net *net)
|
||||
{
|
||||
struct sit_net *sitn = net_generic(net, sit_net_id);
|
||||
struct ip_tunnel *t;
|
||||
int err;
|
||||
|
||||
sitn->tunnels[0] = sitn->tunnels_wc;
|
||||
|
@ -1231,6 +1233,9 @@ static int __net_init sit_init_net(struct net *net)
|
|||
if ((err = register_netdev(sitn->fb_tunnel_dev)))
|
||||
goto err_reg_dev;
|
||||
|
||||
t = netdev_priv(sitn->fb_tunnel_dev);
|
||||
|
||||
strcpy(t->parms.name, sitn->fb_tunnel_dev->name);
|
||||
return 0;
|
||||
|
||||
err_reg_dev:
|
||||
|
|
|
@ -307,6 +307,38 @@ ieee80211_wake_queue_agg(struct ieee80211_local *local, int tid)
|
|||
__release(agg_queue);
|
||||
}
|
||||
|
||||
/*
|
||||
* splice packets from the STA's pending to the local pending,
|
||||
* requires a call to ieee80211_agg_splice_finish later
|
||||
*/
|
||||
static void __acquires(agg_queue)
|
||||
ieee80211_agg_splice_packets(struct ieee80211_local *local,
|
||||
struct tid_ampdu_tx *tid_tx, u16 tid)
|
||||
{
|
||||
int queue = ieee80211_ac_from_tid(tid);
|
||||
unsigned long flags;
|
||||
|
||||
ieee80211_stop_queue_agg(local, tid);
|
||||
|
||||
if (WARN(!tid_tx, "TID %d gone but expected when splicing aggregates"
|
||||
" from the pending queue\n", tid))
|
||||
return;
|
||||
|
||||
if (!skb_queue_empty(&tid_tx->pending)) {
|
||||
spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
|
||||
/* copy over remaining packets */
|
||||
skb_queue_splice_tail_init(&tid_tx->pending,
|
||||
&local->pending[queue]);
|
||||
spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
|
||||
}
|
||||
}
|
||||
|
||||
static void __releases(agg_queue)
|
||||
ieee80211_agg_splice_finish(struct ieee80211_local *local, u16 tid)
|
||||
{
|
||||
ieee80211_wake_queue_agg(local, tid);
|
||||
}
|
||||
|
||||
void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
|
||||
{
|
||||
struct tid_ampdu_tx *tid_tx;
|
||||
|
@ -318,19 +350,17 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
|
|||
tid_tx = rcu_dereference_protected_tid_tx(sta, tid);
|
||||
|
||||
/*
|
||||
* While we're asking the driver about the aggregation,
|
||||
* stop the AC queue so that we don't have to worry
|
||||
* about frames that came in while we were doing that,
|
||||
* which would require us to put them to the AC pending
|
||||
* afterwards which just makes the code more complex.
|
||||
* Start queuing up packets for this aggregation session.
|
||||
* We're going to release them once the driver is OK with
|
||||
* that.
|
||||
*/
|
||||
ieee80211_stop_queue_agg(local, tid);
|
||||
|
||||
clear_bit(HT_AGG_STATE_WANT_START, &tid_tx->state);
|
||||
|
||||
/*
|
||||
* make sure no packets are being processed to get
|
||||
* valid starting sequence number
|
||||
* Make sure no packets are being processed. This ensures that
|
||||
* we have a valid starting sequence number and that in-flight
|
||||
* packets have been flushed out and no packets for this TID
|
||||
* will go into the driver during the ampdu_action call.
|
||||
*/
|
||||
synchronize_net();
|
||||
|
||||
|
@ -344,17 +374,15 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
|
|||
" tid %d\n", tid);
|
||||
#endif
|
||||
spin_lock_bh(&sta->lock);
|
||||
ieee80211_agg_splice_packets(local, tid_tx, tid);
|
||||
ieee80211_assign_tid_tx(sta, tid, NULL);
|
||||
ieee80211_agg_splice_finish(local, tid);
|
||||
spin_unlock_bh(&sta->lock);
|
||||
|
||||
ieee80211_wake_queue_agg(local, tid);
|
||||
kfree_rcu(tid_tx, rcu_head);
|
||||
return;
|
||||
}
|
||||
|
||||
/* we can take packets again now */
|
||||
ieee80211_wake_queue_agg(local, tid);
|
||||
|
||||
/* activate the timer for the recipient's addBA response */
|
||||
mod_timer(&tid_tx->addba_resp_timer, jiffies + ADDBA_RESP_INTERVAL);
|
||||
#ifdef CONFIG_MAC80211_HT_DEBUG
|
||||
|
@ -514,38 +542,6 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
|
|||
}
|
||||
EXPORT_SYMBOL(ieee80211_start_tx_ba_session);
|
||||
|
||||
/*
|
||||
* splice packets from the STA's pending to the local pending,
|
||||
* requires a call to ieee80211_agg_splice_finish later
|
||||
*/
|
||||
static void __acquires(agg_queue)
|
||||
ieee80211_agg_splice_packets(struct ieee80211_local *local,
|
||||
struct tid_ampdu_tx *tid_tx, u16 tid)
|
||||
{
|
||||
int queue = ieee80211_ac_from_tid(tid);
|
||||
unsigned long flags;
|
||||
|
||||
ieee80211_stop_queue_agg(local, tid);
|
||||
|
||||
if (WARN(!tid_tx, "TID %d gone but expected when splicing aggregates"
|
||||
" from the pending queue\n", tid))
|
||||
return;
|
||||
|
||||
if (!skb_queue_empty(&tid_tx->pending)) {
|
||||
spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
|
||||
/* copy over remaining packets */
|
||||
skb_queue_splice_tail_init(&tid_tx->pending,
|
||||
&local->pending[queue]);
|
||||
spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
|
||||
}
|
||||
}
|
||||
|
||||
static void __releases(agg_queue)
|
||||
ieee80211_agg_splice_finish(struct ieee80211_local *local, u16 tid)
|
||||
{
|
||||
ieee80211_wake_queue_agg(local, tid);
|
||||
}
|
||||
|
||||
static void ieee80211_agg_tx_operational(struct ieee80211_local *local,
|
||||
struct sta_info *sta, u16 tid)
|
||||
{
|
||||
|
|
|
@ -386,7 +386,7 @@ static inline int gred_change_vq(struct Qdisc *sch, int dp,
|
|||
struct gred_sched_data *q;
|
||||
|
||||
if (table->tab[dp] == NULL) {
|
||||
table->tab[dp] = kzalloc(sizeof(*q), GFP_KERNEL);
|
||||
table->tab[dp] = kzalloc(sizeof(*q), GFP_ATOMIC);
|
||||
if (table->tab[dp] == NULL)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче