diff -Nuarp a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c --- a/drivers/net/bonding/bond_3ad.c Sun Dec 21 16:08:38 2003 +++ b/drivers/net/bonding/bond_3ad.c Sun Dec 21 16:08:38 2003 @@ -2356,8 +2356,8 @@ int bond_3ad_get_active_agg_info(struct int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev) { - slave_t *slave, *start_at; - struct bonding *bond = (struct bonding *) dev->priv; + struct slave *slave, *start_at; + struct bonding *bond = (struct bonding *)dev->priv; struct ethhdr *data = (struct ethhdr *)skb->data; int slave_agg_no; int slaves_in_agg; @@ -2379,7 +2379,7 @@ int bond_3ad_xmit_xor(struct sk_buff *sk slave = bond->prev; /* check if bond is empty */ - if ((slave == (struct slave *) bond) || (bond->slave_cnt == 0)) { + if ((slave == (struct slave *)bond) || (bond->slave_cnt == 0)) { printk(KERN_DEBUG DRV_NAME ": Error: bond is empty\n"); dev_kfree_skb(skb); read_unlock(&bond->lock); @@ -2413,7 +2413,7 @@ int bond_3ad_xmit_xor(struct sk_buff *sk } slave_agg_no = (data->h_dest[5]^slave->dev->dev_addr[5]) % slaves_in_agg; - while (slave != (slave_t *)bond) { + while (slave != (struct slave *)bond) { struct aggregator *agg = SLAVE_AD_INFO(slave).port.aggregator; if (agg && (agg->aggregator_identifier == agg_id)) { @@ -2432,7 +2432,7 @@ int bond_3ad_xmit_xor(struct sk_buff *sk } } - if (slave == (slave_t *)bond) { + if (slave == (struct slave *)bond) { printk(KERN_ERR DRV_NAME ": Error: Couldn't find a slave to tx on for aggregator ID %d\n", agg_id); dev_kfree_skb(skb); read_unlock(&bond->lock); diff -Nuarp a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c --- a/drivers/net/bonding/bond_alb.c Sun Dec 21 16:08:38 2003 +++ b/drivers/net/bonding/bond_alb.c Sun Dec 21 16:08:38 2003 @@ -257,7 +257,7 @@ tlb_deinitialize(struct bonding *bond) } /* Caller must hold bond lock for read */ -static struct slave* +static struct slave * tlb_get_least_loaded_slave(struct bonding *bond) { struct slave *slave; @@ -299,7 +299,7 @@ tlb_get_least_loaded_slave(struct bondin } /* Caller must hold bond lock for read */ -struct slave* +struct slave * tlb_choose_channel(struct bonding *bond, u32 hash_index, u32 skb_len) { struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); @@ -397,7 +397,7 @@ rlb_update_entry_from_arp(struct bonding static int rlb_arp_recv(struct sk_buff *skb, struct net_device *dev, - struct packet_type* ptype) + struct packet_type *ptype) { struct bonding *bond = (struct bonding *)dev->priv; int ret = NET_RX_DROP; @@ -432,7 +432,7 @@ out: } /* Caller must hold bond lock for read */ -static struct slave* +static struct slave * rlb_next_rx_slave(struct bonding *bond) { struct slave *rx_slave = NULL, *slave = NULL; @@ -607,7 +607,7 @@ rlb_req_update_slave_clients(struct bond u8 ntt = 0; struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); u8 mac_bcast[ETH_ALEN] = {0xff,0xff,0xff,0xff,0xff,0xff}; - struct rlb_client_info* client_info = NULL; + struct rlb_client_info *client_info = NULL; _lock_rx_hashtbl(bond); @@ -680,7 +680,7 @@ rlb_req_update_subnet_clients(struct bon } /* Caller must hold both bond and ptr locks for read */ -struct slave* +struct slave * rlb_choose_channel(struct bonding *bond, struct arp_pkt *arp) { struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); @@ -768,7 +768,7 @@ rlb_choose_channel(struct bonding *bond, * does not choose channel for other arp types since they are * sent on the current_slave */ -static struct slave* +static struct slave * rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond) { struct arp_pkt *arp = (struct arp_pkt *)skb->nh.raw; @@ -1288,7 +1288,7 @@ bond_alb_deinitialize(struct bonding *bo int bond_alb_xmit(struct sk_buff *skb, struct net_device *dev) { - struct bonding *bond = (struct bonding *) dev->priv; + struct bonding *bond = (struct bonding *)dev->priv; struct ethhdr *eth_data = (struct ethhdr *)skb->data; struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); struct slave *tx_slave = NULL; @@ -1653,7 +1653,7 @@ bond_alb_assign_current_slave(struct bon int bond_alb_set_mac_address(struct net_device *dev, void *addr) { - struct bonding *bond = dev->priv; + struct bonding *bond = (struct bonding *)dev->priv; struct sockaddr *sa = addr; struct slave *swap_slave = NULL; int error = 0; diff -Nuarp a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c --- a/drivers/net/bonding/bond_main.c Sun Dec 21 16:08:38 2003 +++ b/drivers/net/bonding/bond_main.c Sun Dec 21 16:08:38 2003 @@ -593,14 +593,14 @@ static void bond_mii_monitor(struct net_ static void loadbalance_arp_monitor(struct net_device *dev); static void activebackup_arp_monitor(struct net_device *dev); static void bond_mc_list_destroy(struct bonding *bond); -static void bond_mc_add(bonding_t *bond, void *addr, int alen); -static void bond_mc_delete(bonding_t *bond, void *addr, int alen); +static void bond_mc_add(struct bonding *bond, void *addr, int alen); +static void bond_mc_delete(struct bonding *bond, void *addr, int alen); static int bond_mc_list_copy (struct dev_mc_list *src, struct bonding *dst, int gpf_flag); static inline int dmi_same(struct dev_mc_list *dmi1, struct dev_mc_list *dmi2); -static void bond_set_promiscuity(bonding_t *bond, int inc); -static void bond_set_allmulti(bonding_t *bond, int inc); -static struct dev_mc_list* bond_mc_list_find_dmi(struct dev_mc_list *dmi, struct dev_mc_list *mc_list); -static void bond_mc_update(bonding_t *bond, slave_t *new, slave_t *old); +static void bond_set_promiscuity(struct bonding *bond, int inc); +static void bond_set_allmulti(struct bonding *bond, int inc); +static struct dev_mc_list *bond_mc_list_find_dmi(struct dev_mc_list *dmi, struct dev_mc_list *mc_list); +static void bond_mc_update(struct bonding *bond, struct slave *new, struct slave *old); static int bond_enslave(struct net_device *master, struct net_device *slave); static int bond_release(struct net_device *master, struct net_device *slave); static int bond_release_all(struct net_device *master); @@ -610,7 +610,7 @@ static void reselect_active_interface(st static struct slave *find_best_interface(struct bonding *bond); -static void arp_send_all(slave_t *slave) +static void arp_send_all(struct slave *slave) { int i; @@ -660,13 +660,13 @@ multicast_mode_name(void) } } -void bond_set_slave_inactive_flags(slave_t *slave) +void bond_set_slave_inactive_flags(struct slave *slave) { slave->state = BOND_STATE_BACKUP; slave->dev->flags |= IFF_NOARP; } -void bond_set_slave_active_flags(slave_t *slave) +void bond_set_slave_active_flags(struct slave *slave) { slave->state = BOND_STATE_ACTIVE; slave->dev->flags &= ~IFF_NOARP; @@ -680,13 +680,13 @@ void bond_set_slave_active_flags(slave_t * consistency check. */ static inline void -update_slave_cnt(bonding_t *bond, int incr) +update_slave_cnt(struct bonding *bond, int incr) { - slave_t *slave = NULL; + struct slave *slave = NULL; int expect = bond->slave_cnt + incr; bond->slave_cnt = 0; - for (slave = bond->prev; slave != (slave_t*)bond; + for (slave = bond->prev; slave != (struct slave *)bond; slave = slave->prev) { bond->slave_cnt++; } @@ -705,8 +705,8 @@ update_slave_cnt(bonding_t *bond, int in * * bond->lock held for writing by caller. */ -static slave_t * -bond_detach_slave(bonding_t *bond, slave_t *slave) +static struct slave * +bond_detach_slave(struct bonding *bond, struct slave *slave) { if ((bond == NULL) || (slave == NULL) || ((void *)bond == (void *)slave)) { @@ -718,10 +718,10 @@ bond_detach_slave(bonding_t *bond, slave if (bond->next == slave) { /* is the slave at the head ? */ if (bond->prev == slave) { /* is the slave alone ? */ - bond->prev = bond->next = (slave_t *)bond; + bond->prev = bond->next = (struct slave *)bond; } else { /* not alone */ bond->next = slave->next; - slave->next->prev = (slave_t *)bond; + slave->next->prev = (struct slave *)bond; bond->prev->next = slave->next; } } else { @@ -918,7 +918,7 @@ bond_check_dev_link(struct net_device *d return reporting ? -1 : BMSR_LSTATUS; } -static u16 bond_check_mii_link(bonding_t *bond) +static u16 bond_check_mii_link(struct bonding *bond) { int has_active_interface = 0; @@ -934,7 +934,7 @@ static u16 bond_check_mii_link(bonding_t /* register to receive lacpdus on a bond */ static void bond_register_lacpdu(struct bonding *bond) { - struct packet_type* pk_type = &(BOND_AD_INFO(bond).ad_pkt_type); + struct packet_type *pk_type = &(BOND_AD_INFO(bond).ad_pkt_type); /* initialize packet type */ pk_type->type = PKT_TYPE_LACPDU; @@ -953,9 +953,9 @@ static void bond_unregister_lacpdu(struc static int bond_open(struct net_device *dev) { - struct bonding *bond = (struct bonding *)(dev->priv); - struct timer_list *timer = &((struct bonding *)(dev->priv))->mii_timer; - struct timer_list *arp_timer = &((struct bonding *)(dev->priv))->arp_timer; + struct bonding *bond = (struct bonding *)dev->priv; + struct timer_list *timer = &bond->mii_timer; + struct timer_list *arp_timer = &bond->arp_timer; if ((bond_mode == BOND_MODE_TLB) || (bond_mode == BOND_MODE_ALB)) { @@ -1013,7 +1013,7 @@ static int bond_open(struct net_device * static int bond_close(struct net_device *master) { - bonding_t *bond = (struct bonding *) master->priv; + struct bonding *bond = (struct bonding *)master->priv; write_lock_bh(&bond->lock); @@ -1088,9 +1088,9 @@ static void bond_mc_list_destroy(struct /* * Add a Multicast address to every slave in the bonding group */ -static void bond_mc_add(bonding_t *bond, void *addr, int alen) +static void bond_mc_add(struct bonding *bond, void *addr, int alen) { - slave_t *slave; + struct slave *slave; switch (multicast_mode) { case BOND_MULTICAST_ACTIVE : /* write lock already acquired */ @@ -1098,7 +1098,7 @@ static void bond_mc_add(bonding_t *bond, dev_mc_add(bond->current_slave->dev, addr, alen, 0); break; case BOND_MULTICAST_ALL : - for (slave = bond->prev; slave != (slave_t*)bond; slave = slave->prev) + for (slave = bond->prev; slave != (struct slave *)bond; slave = slave->prev) dev_mc_add(slave->dev, addr, alen, 0); break; case BOND_MULTICAST_DISABLED : @@ -1109,9 +1109,9 @@ static void bond_mc_add(bonding_t *bond, /* * Remove a multicast address from every slave in the bonding group */ -static void bond_mc_delete(bonding_t *bond, void *addr, int alen) +static void bond_mc_delete(struct bonding *bond, void *addr, int alen) { - slave_t *slave; + struct slave *slave; switch (multicast_mode) { case BOND_MULTICAST_ACTIVE : /* write lock already acquired */ @@ -1119,7 +1119,7 @@ static void bond_mc_delete(bonding_t *bo dev_mc_delete(bond->current_slave->dev, addr, alen, 0); break; case BOND_MULTICAST_ALL : - for (slave = bond->prev; slave != (slave_t*)bond; slave = slave->prev) + for (slave = bond->prev; slave != (struct slave *)bond; slave = slave->prev) dev_mc_delete(slave->dev, addr, alen, 0); break; case BOND_MULTICAST_DISABLED : @@ -1165,9 +1165,9 @@ static inline int dmi_same(struct dev_mc /* * Push the promiscuity flag down to appropriate slaves */ -static void bond_set_promiscuity(bonding_t *bond, int inc) +static void bond_set_promiscuity(struct bonding *bond, int inc) { - slave_t *slave; + struct slave *slave; if (USES_PRIMARY(bond_mode)) { if (bond->current_slave) { @@ -1175,7 +1175,7 @@ static void bond_set_promiscuity(bonding } } else { - for (slave = bond->prev; slave != (slave_t*)bond; + for (slave = bond->prev; slave != (struct slave *)bond; slave = slave->prev) { dev_set_promiscuity(slave->dev, inc); } @@ -1185,9 +1185,9 @@ static void bond_set_promiscuity(bonding /* * Push the allmulti flag down to all slaves */ -static void bond_set_allmulti(bonding_t *bond, int inc) +static void bond_set_allmulti(struct bonding *bond, int inc) { - slave_t *slave; + struct slave *slave; switch (multicast_mode) { case BOND_MULTICAST_ACTIVE : /* write lock already acquired */ @@ -1195,7 +1195,7 @@ static void bond_set_allmulti(bonding_t dev_set_allmulti(bond->current_slave->dev, inc); break; case BOND_MULTICAST_ALL : - for (slave = bond->prev; slave != (slave_t*)bond; slave = slave->prev) + for (slave = bond->prev; slave != (struct slave *)bond; slave = slave->prev) dev_set_allmulti(slave->dev, inc); break; case BOND_MULTICAST_DISABLED : @@ -1206,7 +1206,7 @@ static void bond_set_allmulti(bonding_t /* * returns dmi entry if found, NULL otherwise */ -static struct dev_mc_list* bond_mc_list_find_dmi(struct dev_mc_list *dmi, +static struct dev_mc_list *bond_mc_list_find_dmi(struct dev_mc_list *dmi, struct dev_mc_list *mc_list) { struct dev_mc_list *idmi; @@ -1221,7 +1221,7 @@ static struct dev_mc_list* bond_mc_list_ static void set_multicast_list(struct net_device *master) { - bonding_t *bond = master->priv; + struct bonding *bond = (struct bonding *)master->priv; struct dev_mc_list *dmi; write_lock_bh(&bond->lock); @@ -1275,7 +1275,7 @@ static void set_multicast_list(struct ne * old active slaves (if any) according to the multicast mode, and * promiscuous flags unconditionally. */ -static void bond_mc_update(bonding_t *bond, slave_t *new, slave_t *old) +static void bond_mc_update(struct bonding *bond, struct slave *new, struct slave *old) { struct dev_mc_list *dmi; @@ -1319,8 +1319,8 @@ static void bond_mc_update(bonding_t *bo static int bond_enslave(struct net_device *master_dev, struct net_device *slave_dev) { - bonding_t *bond = NULL; - slave_t *new_slave = NULL; + struct bonding *bond = NULL; + struct slave *new_slave = NULL; unsigned long rflags = 0; int err = 0; struct dev_mc_list *dmi; @@ -1332,7 +1332,7 @@ static int bond_enslave(struct net_devic if (master_dev == NULL || slave_dev == NULL) { return -ENODEV; } - bond = (struct bonding *) master_dev->priv; + bond = (struct bonding *)master_dev->priv; if (slave_dev->do_ioctl == NULL) { printk(KERN_WARNING DRV_NAME @@ -1396,10 +1396,10 @@ static int bond_enslave(struct net_devic } } - if ((new_slave = kmalloc(sizeof(slave_t), GFP_KERNEL)) == NULL) { + if ((new_slave = kmalloc(sizeof(struct slave), GFP_KERNEL)) == NULL) { return -ENOMEM; } - memset(new_slave, 0, sizeof(slave_t)); + memset(new_slave, 0, sizeof(struct slave)); /* save slave's original flags before calling * netdev_set_master and dev_open @@ -1719,10 +1719,10 @@ err_free: */ static int bond_change_active(struct net_device *master_dev, struct net_device *slave_dev) { - bonding_t *bond; - slave_t *slave; - slave_t *oldactive = NULL; - slave_t *newactive = NULL; + struct bonding *bond; + struct slave *slave; + struct slave *oldactive = NULL; + struct slave *newactive = NULL; int ret = 0; if (master_dev == NULL || slave_dev == NULL) { @@ -1736,12 +1736,12 @@ static int bond_change_active(struct net return -EINVAL; } - bond = (struct bonding *) master_dev->priv; + bond = (struct bonding *)master_dev->priv; write_lock_bh(&bond->lock); - slave = (slave_t *)bond; + slave = (struct slave *)bond; oldactive = bond->current_slave; - while ((slave = slave->prev) != (slave_t *)bond) { + while ((slave = slave->prev) != (struct slave *)bond) { if(slave_dev == slave->dev) { newactive = slave; break; @@ -1783,7 +1783,7 @@ static struct slave *find_best_interface newslave = oldslave = bond->current_slave; if (newslave == NULL) { /* there were no active slaves left */ - if (bond->next != (slave_t *)bond) { /* found one slave */ + if (bond->next != (struct slave *)bond) { /* found one slave */ newslave = bond->next; } else { return NULL; /* still no slave, return NULL */ @@ -1935,15 +1935,15 @@ static void reselect_active_interface(st */ static int bond_release(struct net_device *master, struct net_device *slave) { - bonding_t *bond; - slave_t *our_slave, *old_current; + struct bonding *bond; + struct slave *our_slave, *old_current; struct sockaddr addr; if (master == NULL || slave == NULL) { return -ENODEV; } - bond = (struct bonding *) master->priv; + bond = (struct bonding *)master->priv; /* master already enslaved, or slave not enslaved, or no slave for this master */ @@ -1956,9 +1956,9 @@ static int bond_release(struct net_devic write_lock_bh(&bond->lock); bond->current_arp_slave = NULL; - our_slave = (slave_t *)bond; + our_slave = (struct slave *)bond; old_current = bond->current_slave; - while ((our_slave = our_slave->prev) != (slave_t *)bond) { + while ((our_slave = our_slave->prev) != (struct slave *)bond) { if (our_slave->dev == slave) { int mac_addr_differ = memcmp(bond->device->dev_addr, our_slave->perm_hwaddr, @@ -2030,7 +2030,7 @@ static int bond_release(struct net_devic } write_unlock_bh(&bond->lock); - if (our_slave == (slave_t *)bond) { + if (our_slave == (struct slave *)bond) { /* if we get here, it's because the device was not found */ printk(KERN_INFO DRV_NAME ": %s: %s not enslaved\n", @@ -2085,7 +2085,7 @@ static int bond_release(struct net_devic * of the master so it will be set by the application * to the mac address of the first slave */ - if (bond->next == (slave_t*)bond) { + if (bond->next == (struct slave *)bond) { memset(master->dev_addr, 0, master->addr_len); } @@ -2097,8 +2097,8 @@ static int bond_release(struct net_devic */ static int bond_release_all(struct net_device *master) { - bonding_t *bond; - slave_t *our_slave, *old_current; + struct bonding *bond; + struct slave *our_slave, *old_current; struct net_device *slave_dev; struct sockaddr addr; int err = 0; @@ -2111,7 +2111,7 @@ static int bond_release_all(struct net_d return -EINVAL; } - bond = (struct bonding *) master->priv; + bond = (struct bonding *)master->priv; write_lock_bh(&bond->lock); if (bond->next == (struct slave *) bond) { @@ -2124,7 +2124,7 @@ static int bond_release_all(struct net_d bond->current_arp_slave = NULL; bond->primary_slave = NULL; - while ((our_slave = bond->prev) != (slave_t *)bond) { + while ((our_slave = bond->prev) != (struct slave *)bond) { /* Inform AD package of unbinding of slave * before slave is detached from the list. */ @@ -2209,8 +2209,8 @@ out: /* this function is called regularly to monitor each slave's link. */ static void bond_mii_monitor(struct net_device *master) { - bonding_t *bond = (struct bonding *) master->priv; - slave_t *slave, *oldcurrent; + struct bonding *bond = (struct bonding *)master->priv; + struct slave *slave, *oldcurrent; int slave_died = 0; int do_failover = 0; @@ -2222,13 +2222,13 @@ static void bond_mii_monitor(struct net_ * program could monitor the link itself if needed. */ - slave = (slave_t *)bond; + slave = (struct slave *)bond; read_lock(&bond->ptrlock); oldcurrent = bond->current_slave; read_unlock(&bond->ptrlock); - while ((slave = slave->prev) != (slave_t *)bond) { + while ((slave = slave->prev) != (struct slave *)bond) { struct net_device *dev = slave->dev; int link_state; u16 old_speed = slave->speed; @@ -2438,13 +2438,13 @@ static void bond_mii_monitor(struct net_ */ static void loadbalance_arp_monitor(struct net_device *master) { - bonding_t *bond; - slave_t *slave, *oldcurrent; + struct bonding *bond; + struct slave *slave, *oldcurrent; int the_delta_in_ticks = arp_interval * HZ / 1000; int next_timer = jiffies + (arp_interval * HZ / 1000); int do_failover = 0; - bond = (struct bonding *) master->priv; + bond = (struct bonding *)master->priv; if (master->priv == NULL) { mod_timer(&bond->arp_timer, next_timer); return; @@ -2478,8 +2478,8 @@ static void loadbalance_arp_monitor(stru * TODO: what about up/down delay in arp mode? it wasn't here before * so it can wait */ - slave = (slave_t *)bond; - while ((slave = slave->prev) != (slave_t *)bond) { + slave = (struct slave *)bond; + while ((slave = slave->prev) != (struct slave *)bond) { if (slave->link != BOND_LINK_UP) { @@ -2588,12 +2588,12 @@ static void loadbalance_arp_monitor(stru */ static void activebackup_arp_monitor(struct net_device *master) { - bonding_t *bond; - slave_t *slave; + struct bonding *bond; + struct slave *slave; int the_delta_in_ticks = arp_interval * HZ / 1000; int next_timer = jiffies + (arp_interval * HZ / 1000); - bond = (struct bonding *) master->priv; + bond = (struct bonding *)master->priv; if (master->priv == NULL) { mod_timer(&bond->arp_timer, next_timer); return; @@ -2611,8 +2611,8 @@ static void activebackup_arp_monitor(str * TODO: what about up/down delay in arp mode? it wasn't here before * so it can wait */ - slave = (slave_t *)bond; - while ((slave = slave->prev) != (slave_t *)bond) { + slave = (struct slave *)bond; + while ((slave = slave->prev) != (struct slave *)bond) { if (slave->link != BOND_LINK_UP) { if ((jiffies - slave->dev->last_rx) <= @@ -2758,11 +2758,11 @@ static void activebackup_arp_monitor(str if (slave == NULL) { if ((bond->current_arp_slave == NULL) || - (bond->current_arp_slave == (slave_t *)bond)) { + (bond->current_arp_slave == (struct slave *)bond)) { bond->current_arp_slave = bond->prev; } - if (bond->current_arp_slave != (slave_t *)bond) { + if (bond->current_arp_slave != (struct slave *)bond) { bond_set_slave_inactive_flags(bond->current_arp_slave); slave = bond->current_arp_slave->next; @@ -2818,15 +2818,15 @@ static int bond_sethwaddr(struct net_dev static int bond_info_query(struct net_device *master, struct ifbond *info) { - bonding_t *bond = (struct bonding *) master->priv; - slave_t *slave; + struct bonding *bond = (struct bonding *)master->priv; + struct slave *slave; info->bond_mode = bond_mode; info->num_slaves = 0; info->miimon = miimon; read_lock_bh(&bond->lock); - for (slave = bond->prev; slave != (slave_t *)bond; slave = slave->prev) { + for (slave = bond->prev; slave != (struct slave *)bond; slave = slave->prev) { info->num_slaves++; } read_unlock_bh(&bond->lock); @@ -2837,8 +2837,8 @@ static int bond_info_query(struct net_de static int bond_slave_info_query(struct net_device *master, struct ifslave *info) { - bonding_t *bond = (struct bonding *) master->priv; - slave_t *slave; + struct bonding *bond = (struct bonding *)master->priv; + struct slave *slave; int cur_ndx = 0; if (info->slave_id < 0) { @@ -2847,13 +2847,13 @@ static int bond_slave_info_query(struct read_lock_bh(&bond->lock); for (slave = bond->prev; - slave != (slave_t *)bond && cur_ndx < info->slave_id; + slave != (struct slave *)bond && cur_ndx < info->slave_id; slave = slave->prev) { cur_ndx++; } read_unlock_bh(&bond->lock); - if (slave != (slave_t *)bond) { + if (slave != (struct slave *)bond) { strcpy(info->slave_name, slave->dev->name); info->link = slave->link; info->state = slave->state; @@ -2870,7 +2870,7 @@ static int bond_ethtool_ioctl(struct net void *addr = ifr->ifr_data; uint32_t cmd; - if (get_user(cmd, (uint32_t *) addr)) + if (get_user(cmd, (uint32_t *)addr)) return -EFAULT; switch (cmd) { @@ -3061,8 +3061,8 @@ static int bond_accept_fastpath(struct n */ static int bond_xmit_broadcast(struct sk_buff *skb, struct net_device *dev) { - slave_t *slave, *start_at; - struct bonding *bond = (struct bonding *) dev->priv; + struct slave *slave, *start_at; + struct bonding *bond = (struct bonding *)dev->priv; struct net_device *device_we_should_send_to = 0; if (!IS_UP(dev)) { /* bond down */ @@ -3118,8 +3118,8 @@ static int bond_xmit_broadcast(struct sk static int bond_xmit_roundrobin(struct sk_buff *skb, struct net_device *dev) { - slave_t *slave, *start_at; - struct bonding *bond = (struct bonding *) dev->priv; + struct slave *slave, *start_at; + struct bonding *bond = (struct bonding *)dev->priv; if (!IS_UP(dev)) { /* bond down */ dev_kfree_skb(skb); @@ -3170,8 +3170,8 @@ static int bond_xmit_roundrobin(struct s */ static int bond_xmit_xor(struct sk_buff *skb, struct net_device *dev) { - slave_t *slave, *start_at; - struct bonding *bond = (struct bonding *) dev->priv; + struct slave *slave, *start_at; + struct bonding *bond = (struct bonding *)dev->priv; struct ethhdr *data = (struct ethhdr *)skb->data; int slave_no; @@ -3193,7 +3193,7 @@ static int bond_xmit_xor(struct sk_buff slave_no = (data->h_dest[5]^slave->dev->dev_addr[5]) % bond->slave_cnt; - while ( (slave_no > 0) && (slave != (slave_t *)bond) ) { + while ( (slave_no > 0) && (slave != (struct slave *)bond) ) { slave = slave->prev; slave_no--; } @@ -3225,7 +3225,7 @@ static int bond_xmit_xor(struct sk_buff */ static int bond_xmit_activebackup(struct sk_buff *skb, struct net_device *dev) { - struct bonding *bond = (struct bonding *) dev->priv; + struct bonding *bond = (struct bonding *)dev->priv; int ret; if (!IS_UP(dev)) { /* bond down */ @@ -3290,15 +3290,15 @@ static int bond_xmit_activebackup(struct static struct net_device_stats *bond_get_stats(struct net_device *dev) { - bonding_t *bond = dev->priv; + struct bonding *bond = (struct bonding *)dev->priv; struct net_device_stats *stats = &(bond->stats), *sstats; - slave_t *slave; + struct slave *slave; memset(stats, 0, sizeof(struct net_device_stats)); read_lock_bh(&bond->lock); - for (slave = bond->prev; slave != (slave_t *)bond; slave = slave->prev) { + for (slave = bond->prev; slave != (struct slave *)bond; slave = slave->prev) { sstats = slave->dev->get_stats(slave->dev); stats->rx_packets += sstats->rx_packets; @@ -3351,7 +3351,7 @@ static void *bond_info_seq_start(struct return SEQ_START_TOKEN; } - for (slave = bond->prev; slave != (slave_t *)bond; + for (slave = bond->prev; slave != (struct slave *)bond; slave = slave->prev) { if (++off == *pos) { @@ -3613,7 +3613,7 @@ static void bond_destroy_proc_dir(void) static inline int bond_set_mac_address(struct net_device *dev, void *addr) { - struct bonding *bond = dev->priv; + struct bonding *bond = (struct bonding *)dev->priv; struct sockaddr *sa = addr, tmp_sa; struct slave *slave; int error; @@ -3674,14 +3674,14 @@ unwind: static inline int bond_change_mtu(struct net_device *dev, int newmtu) { - bonding_t *bond = dev->priv; - slave_t *slave; + struct bonding *bond = (struct bonding *)dev->priv; + struct slave *slave; int error; dprintk("bond=%p, name=%s, new_mtu=%d\n", bond, (bond_dev ? bond_dev->name : "None"), new_mtu); - for (slave = bond->prev; slave != (slave_t *)bond; + for (slave = bond->prev; slave != (struct slave *)bond; slave = slave->prev) { dprintk("s %p s->p %p c_m %p\n", slave, slave->prev, slave->dev->change_mtu); @@ -3742,7 +3742,7 @@ static int bond_master_netdev_event(unsi struct bonding *bond, *event_bond = NULL; list_for_each_entry(bond, &bond_dev_list, bond_list) { - if (bond == event_dev->priv) { + if (bond == (struct bonding *)event_dev->priv) { event_bond = bond; break; } @@ -3856,7 +3856,7 @@ static struct notifier_block bond_netdev */ static inline void bond_deinit(struct net_device *dev) { - struct bonding *bond = dev->priv; + struct bonding *bond = (struct bonding *)dev->priv; list_del(&bond->bond_list); @@ -3896,14 +3896,14 @@ static int __init bond_init(struct net_d dprintk("Begin bond_init for %s\n", dev->name); - bond = dev->priv; + bond = (struct bonding *)dev->priv; /* initialize rwlocks */ rwlock_init(&bond->lock); rwlock_init(&bond->ptrlock); /* Initialize pointers */ - bond->next = bond->prev = (slave_t *)bond; + bond->next = bond->prev = (struct slave *)bond; bond->current_slave = NULL; bond->current_arp_slave = NULL; bond->device = dev; diff -Nuarp a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h --- a/drivers/net/bonding/bonding.h Sun Dec 21 16:08:38 2003 +++ b/drivers/net/bonding/bonding.h Sun Dec 21 16:08:38 2003 @@ -61,7 +61,7 @@ ((slave)->state == BOND_STATE_ACTIVE)) -typedef struct slave { +struct slave { struct slave *next; struct slave *prev; struct net_device *dev; @@ -76,7 +76,7 @@ typedef struct slave { u8 perm_hwaddr[ETH_ALEN]; struct ad_slave_info ad_info; /* HUGE - better to dynamically alloc */ struct tlb_slave_info tlb_info; -} slave_t; +}; /* * Here are the locking policies for the two bonding locks: @@ -87,12 +87,12 @@ typedef struct slave { * 3) When we lock with bond->ptrlock, we must lock with bond->lock * beforehand. */ -typedef struct bonding { - slave_t *next; - slave_t *prev; - slave_t *current_slave; - slave_t *primary_slave; - slave_t *current_arp_slave; +struct bonding { + struct slave *next; + struct slave *prev; + struct slave *current_slave; + struct slave *primary_slave; + struct slave *current_arp_slave; __s32 slave_cnt; rwlock_t lock; rwlock_t ptrlock; @@ -109,22 +109,22 @@ typedef struct bonding { unsigned short flags; struct ad_bond_info ad_info; struct alb_bond_info alb_info; -} bonding_t; +}; /* Forward declarations */ -void bond_set_slave_active_flags(slave_t *slave); -void bond_set_slave_inactive_flags(slave_t *slave); +void bond_set_slave_active_flags(struct slave *slave); +void bond_set_slave_inactive_flags(struct slave *slave); /** * These functions can be used for iterating the slave list * (which is circular) * Caller must hold bond lock for read */ -extern inline struct slave* +extern inline struct slave * bond_get_first_slave(struct bonding *bond) { /* if there are no slaves return NULL */ - if (bond->next == (slave_t *)bond) { + if (bond->next == (struct slave *)bond) { return NULL; } return bond->next; @@ -133,7 +133,7 @@ bond_get_first_slave(struct bonding *bon /** * Caller must hold bond lock for read */ -extern inline struct slave* +extern inline struct slave * bond_get_next_slave(struct bonding *bond, struct slave *slave) { /* If we have reached the last slave return NULL */ @@ -148,13 +148,13 @@ bond_get_next_slave(struct bonding *bond * * Caller must hold bond lock for read */ -extern inline struct slave* +extern inline struct slave * bond_get_slave_by_dev(struct bonding *bond, struct net_device *slave_dev) { struct slave *our_slave = bond->next; /* check if the list of slaves is empty */ - if (our_slave == (slave_t *)bond) { + if (our_slave == (struct slave *)bond) { return NULL; } @@ -166,14 +166,14 @@ bond_get_slave_by_dev(struct bonding *bo return our_slave; } -extern inline struct bonding* +extern inline struct bonding * bond_get_bond_by_slave(struct slave *slave) { if (!slave || !slave->dev->master) { return NULL; } - return (struct bonding *)(slave->dev->master->priv); + return (struct bonding *)slave->dev->master->priv; } #endif /* _LINUX_BONDING_H */