Skip to content

Commit b26e478

Browse files
committed
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
2 parents bcebcc4 + bb3c368 commit b26e478

16 files changed

Lines changed: 102 additions & 75 deletions

File tree

‎drivers/net/ethernet/freescale/fec.c‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ struct fec_enet_private {
232232
struct platform_device *pdev;
233233

234234
int opened;
235+
int dev_id;
235236

236237
/* Phylib and MDIO interface */
237238
struct mii_bus *mii_bus;
@@ -842,7 +843,7 @@ static void __inline__ fec_get_mac(struct net_device *ndev)
842843

843844
/* Adjust MAC if using macaddr */
844845
if (iap == macaddr)
845-
ndev->dev_addr[ETH_ALEN-1] = macaddr[ETH_ALEN-1] + fep->pdev->id;
846+
ndev->dev_addr[ETH_ALEN-1] = macaddr[ETH_ALEN-1] + fep->dev_id;
846847
}
847848

848849
/* ------------------------------------------------------------------------- */
@@ -960,7 +961,7 @@ static int fec_enet_mii_probe(struct net_device *ndev)
960961
char mdio_bus_id[MII_BUS_ID_SIZE];
961962
char phy_name[MII_BUS_ID_SIZE + 3];
962963
int phy_id;
963-
int dev_id = fep->pdev->id;
964+
int dev_id = fep->dev_id;
964965

965966
fep->phy_dev = NULL;
966967

@@ -1040,7 +1041,7 @@ static int fec_enet_mii_init(struct platform_device *pdev)
10401041
* mdio interface in board design, and need to be configured by
10411042
* fec0 mii_bus.
10421043
*/
1043-
if ((id_entry->driver_data & FEC_QUIRK_ENET_MAC) && pdev->id > 0) {
1044+
if ((id_entry->driver_data & FEC_QUIRK_ENET_MAC) && fep->dev_id > 0) {
10441045
/* fec1 uses fec0 mii_bus */
10451046
if (mii_cnt && fec0_mii_bus) {
10461047
fep->mii_bus = fec0_mii_bus;
@@ -1076,7 +1077,7 @@ static int fec_enet_mii_init(struct platform_device *pdev)
10761077
fep->mii_bus->read = fec_enet_mdio_read;
10771078
fep->mii_bus->write = fec_enet_mdio_write;
10781079
fep->mii_bus->reset = fec_enet_mdio_reset;
1079-
snprintf(fep->mii_bus->id, MII_BUS_ID_SIZE, "%x", pdev->id + 1);
1080+
snprintf(fep->mii_bus->id, MII_BUS_ID_SIZE, "%x", fep->dev_id + 1);
10801081
fep->mii_bus->priv = fep;
10811082
fep->mii_bus->parent = &pdev->dev;
10821083

@@ -1536,6 +1537,7 @@ fec_probe(struct platform_device *pdev)
15361537
int i, irq, ret = 0;
15371538
struct resource *r;
15381539
const struct of_device_id *of_id;
1540+
static int dev_id;
15391541

15401542
of_id = of_match_device(fec_dt_ids, &pdev->dev);
15411543
if (of_id)
@@ -1563,6 +1565,7 @@ fec_probe(struct platform_device *pdev)
15631565

15641566
fep->hwp = ioremap(r->start, resource_size(r));
15651567
fep->pdev = pdev;
1568+
fep->dev_id = dev_id++;
15661569

15671570
if (!fep->hwp) {
15681571
ret = -ENOMEM;

‎drivers/net/ethernet/freescale/fsl_pq_mdio.c‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -356,14 +356,13 @@ static int fsl_pq_mdio_probe(struct platform_device *ofdev)
356356

357357
if (prop)
358358
tbiaddr = *prop;
359+
}
359360

360-
if (tbiaddr == -1) {
361-
err = -EBUSY;
362-
363-
goto err_free_irqs;
364-
} else {
365-
out_be32(tbipa, tbiaddr);
366-
}
361+
if (tbiaddr == -1) {
362+
err = -EBUSY;
363+
goto err_free_irqs;
364+
} else {
365+
out_be32(tbipa, tbiaddr);
367366
}
368367

369368
err = of_mdiobus_register(new_bus, np);

‎drivers/net/ppp/pptp.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,10 +423,8 @@ static int pptp_bind(struct socket *sock, struct sockaddr *uservaddr,
423423
lock_sock(sk);
424424

425425
opt->src_addr = sp->sa_addr.pptp;
426-
if (add_chan(po)) {
427-
release_sock(sk);
426+
if (add_chan(po))
428427
error = -EBUSY;
429-
}
430428

431429
release_sock(sk);
432430
return error;

‎drivers/net/wireless/ath/ath9k/main.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ static bool ath_complete_reset(struct ath_softc *sc, bool start)
286286
ath_start_ani(common);
287287
}
288288

289-
if (ath9k_hw_ops(ah)->antdiv_comb_conf_get && sc->ant_rx != 3) {
289+
if ((ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB) && sc->ant_rx != 3) {
290290
struct ath_hw_antcomb_conf div_ant_conf;
291291
u8 lna_conf;
292292

‎drivers/net/wireless/rtlwifi/rtl8192ce/phy.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw,
569569
}
570570
case ERFSLEEP:{
571571
if (ppsc->rfpwr_state == ERFOFF)
572-
break;
572+
return false;
573573
for (queue_id = 0, i = 0;
574574
queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {
575575
ring = &pcipriv->dev.tx_ring[queue_id];

‎drivers/net/wireless/rtlwifi/rtl8192cu/phy.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ static bool _rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw,
548548
break;
549549
case ERFSLEEP:
550550
if (ppsc->rfpwr_state == ERFOFF)
551-
break;
551+
return false;
552552
for (queue_id = 0, i = 0;
553553
queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {
554554
ring = &pcipriv->dev.tx_ring[queue_id];

‎drivers/net/wireless/rtlwifi/rtl8192de/phy.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3374,7 +3374,7 @@ bool rtl92d_phy_set_rf_power_state(struct ieee80211_hw *hw,
33743374
break;
33753375
case ERFSLEEP:
33763376
if (ppsc->rfpwr_state == ERFOFF)
3377-
break;
3377+
return false;
33783378

33793379
for (queue_id = 0, i = 0;
33803380
queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {

‎drivers/net/wireless/rtlwifi/rtl8192se/phy.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ bool rtl92s_phy_set_rf_power_state(struct ieee80211_hw *hw,
602602
}
603603
case ERFSLEEP:
604604
if (ppsc->rfpwr_state == ERFOFF)
605-
break;
605+
return false;
606606

607607
for (queue_id = 0, i = 0;
608608
queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {

‎drivers/ssb/driver_pcicore.c‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,10 +517,14 @@ static void ssb_pcicore_pcie_setup_workarounds(struct ssb_pcicore *pc)
517517

518518
static void __devinit ssb_pcicore_init_clientmode(struct ssb_pcicore *pc)
519519
{
520-
ssb_pcicore_fix_sprom_core_index(pc);
520+
struct ssb_device *pdev = pc->dev;
521+
struct ssb_bus *bus = pdev->bus;
522+
523+
if (bus->bustype == SSB_BUSTYPE_PCI)
524+
ssb_pcicore_fix_sprom_core_index(pc);
521525

522526
/* Disable PCI interrupts. */
523-
ssb_write32(pc->dev, SSB_INTVEC, 0);
527+
ssb_write32(pdev, SSB_INTVEC, 0);
524528

525529
/* Additional PCIe always once-executed workarounds */
526530
if (pc->dev->id.coreid == SSB_DEV_PCIE) {

‎net/batman-adv/translation-table.c‎

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,10 @@ void tt_local_add(struct net_device *soft_iface, const uint8_t *addr,
242242
if (tt_global_entry) {
243243
/* This node is probably going to update its tt table */
244244
tt_global_entry->orig_node->tt_poss_change = true;
245-
/* The global entry has to be marked as PENDING and has to be
245+
/* The global entry has to be marked as ROAMING and has to be
246246
* kept for consistency purpose */
247247
tt_global_entry->common.flags |= TT_CLIENT_PENDING;
248+
tt_global_entry->roam_at = jiffies;
248249
send_roam_adv(bat_priv, tt_global_entry->common.addr,
249250
tt_global_entry->orig_node);
250251
}
@@ -661,22 +662,37 @@ void tt_global_del(struct bat_priv *bat_priv,
661662
const char *message, bool roaming)
662663
{
663664
struct tt_global_entry *tt_global_entry = NULL;
665+
struct tt_local_entry *tt_local_entry = NULL;
664666

665667
tt_global_entry = tt_global_hash_find(bat_priv, addr);
666668
if (!tt_global_entry)
667669
goto out;
668670

669671
if (tt_global_entry->orig_node == orig_node) {
670672
if (roaming) {
671-
tt_global_entry->common.flags |= TT_CLIENT_ROAM;
672-
tt_global_entry->roam_at = jiffies;
673-
goto out;
673+
/* if we are deleting a global entry due to a roam
674+
* event, there are two possibilities:
675+
* 1) the client roamed from node A to node B => we mark
676+
* it with TT_CLIENT_ROAM, we start a timer and we
677+
* wait for node B to claim it. In case of timeout
678+
* the entry is purged.
679+
* 2) the client roamed to us => we can directly delete
680+
* the global entry, since it is useless now. */
681+
tt_local_entry = tt_local_hash_find(bat_priv,
682+
tt_global_entry->common.addr);
683+
if (!tt_local_entry) {
684+
tt_global_entry->common.flags |= TT_CLIENT_ROAM;
685+
tt_global_entry->roam_at = jiffies;
686+
goto out;
687+
}
674688
}
675689
_tt_global_del(bat_priv, tt_global_entry, message);
676690
}
677691
out:
678692
if (tt_global_entry)
679693
tt_global_entry_free_ref(tt_global_entry);
694+
if (tt_local_entry)
695+
tt_local_entry_free_ref(tt_local_entry);
680696
}
681697

682698
void tt_global_del_orig(struct bat_priv *bat_priv,

0 commit comments

Comments
 (0)