Removing '_t' from ce_stats_t struct name and renaming et131x_adapter ce_stats member from
'Stats' to 'stats'
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
*/
void UpdateMacStatHostCounters(struct et131x_adapter *etdev)
{
- struct ce_stats_t *stats = &etdev->Stats;
+ struct ce_stats *stats = &etdev->stats;
struct macstat_regs __iomem *macstat =
&etdev->regs->macstat;
* block indicates that one of the counters has wrapped.
*/
if (Carry1 & (1 << 14))
- etdev->Stats.code_violations += COUNTER_WRAP_16_BIT;
+ etdev->stats.code_violations += COUNTER_WRAP_16_BIT;
if (Carry1 & (1 << 8))
- etdev->Stats.alignment_err += COUNTER_WRAP_12_BIT;
+ etdev->stats.alignment_err += COUNTER_WRAP_12_BIT;
if (Carry1 & (1 << 7))
- etdev->Stats.length_err += COUNTER_WRAP_16_BIT;
+ etdev->stats.length_err += COUNTER_WRAP_16_BIT;
if (Carry1 & (1 << 2))
- etdev->Stats.other_errors += COUNTER_WRAP_16_BIT;
+ etdev->stats.other_errors += COUNTER_WRAP_16_BIT;
if (Carry1 & (1 << 6))
- etdev->Stats.crc_err += COUNTER_WRAP_16_BIT;
+ etdev->stats.crc_err += COUNTER_WRAP_16_BIT;
if (Carry1 & (1 << 3))
- etdev->Stats.rx_ov_flow += COUNTER_WRAP_16_BIT;
+ etdev->stats.rx_ov_flow += COUNTER_WRAP_16_BIT;
if (Carry1 & (1 << 0))
- etdev->Stats.norcvbuf += COUNTER_WRAP_16_BIT;
+ etdev->stats.norcvbuf += COUNTER_WRAP_16_BIT;
if (Carry2 & (1 << 16))
- etdev->Stats.max_pkt_error += COUNTER_WRAP_12_BIT;
+ etdev->stats.max_pkt_error += COUNTER_WRAP_12_BIT;
if (Carry2 & (1 << 15))
- etdev->Stats.tx_uflo += COUNTER_WRAP_12_BIT;
+ etdev->stats.tx_uflo += COUNTER_WRAP_12_BIT;
if (Carry2 & (1 << 6))
- etdev->Stats.first_collision += COUNTER_WRAP_12_BIT;
+ etdev->stats.first_collision += COUNTER_WRAP_12_BIT;
if (Carry2 & (1 << 8))
- etdev->Stats.tx_deferred += COUNTER_WRAP_12_BIT;
+ etdev->stats.tx_deferred += COUNTER_WRAP_12_BIT;
if (Carry2 & (1 << 5))
- etdev->Stats.excessive_collisions += COUNTER_WRAP_12_BIT;
+ etdev->stats.excessive_collisions += COUNTER_WRAP_12_BIT;
if (Carry2 & (1 << 4))
- etdev->Stats.late_collisions += COUNTER_WRAP_12_BIT;
+ etdev->stats.late_collisions += COUNTER_WRAP_12_BIT;
if (Carry2 & (1 << 2))
- etdev->Stats.collisions += COUNTER_WRAP_12_BIT;
+ etdev->stats.collisions += COUNTER_WRAP_12_BIT;
}
void SetupDeviceForMulticast(struct et131x_adapter *etdev)
{
struct mac_regs __iomem *mac = &etdev->regs->mac;
int status = 0;
- u8 xcvrAddr = etdev->Stats.xcvr_addr;
+ u8 xcvrAddr = etdev->stats.xcvr_addr;
u32 delay;
u32 miiAddr;
u32 miiCmd;
xcvr_id = (u32) ((idr1 << 16) | idr2);
if (idr1 != 0 && idr1 != 0xffff) {
- etdev->Stats.xcvr_id = xcvr_id;
- etdev->Stats.xcvr_addr = xcvr_addr;
+ etdev->stats.xcvr_id = xcvr_id;
+ etdev->stats.xcvr_addr = xcvr_addr;
return 0;
}
}
* also counted here.
*/
if (len < (NIC_MIN_PACKET_SIZE + 4)) {
- etdev->Stats.other_errors++;
+ etdev->stats.other_errors++;
len = 0;
}
}
if (len > 0)
- etdev->Stats.multircv++;
+ etdev->stats.multircv++;
} else if (word0 & ALCATEL_BROADCAST_PKT)
- etdev->Stats.brdcstrcv++;
+ etdev->stats.brdcstrcv++;
else
/* Not sure what this counter measures in
* promiscuous mode. Perhaps we should check
* the MAC address to see if it is directed
* to us in promiscuous mode.
*/
- etdev->Stats.unircv++;
+ etdev->stats.unircv++;
}
if (len > 0) {
}
/* Increment the number of packets we received */
- etdev->Stats.ipackets++;
+ etdev->stats.ipackets++;
/* Set the status on the packet, either resources or success */
if (etdev->rx_ring.nReadyRecv < RFD_LOW_WATER_MARK) {
struct net_device_stats *stats = &etdev->net_stats;
if (tcb->flags & fMP_DEST_BROAD)
- atomic_inc(&etdev->Stats.brdcstxmt);
+ atomic_inc(&etdev->stats.brdcstxmt);
else if (tcb->flags & fMP_DEST_MULTI)
- atomic_inc(&etdev->Stats.multixmt);
+ atomic_inc(&etdev->stats.multixmt);
else
- atomic_inc(&etdev->Stats.unixmt);
+ atomic_inc(&etdev->stats.unixmt);
if (tcb->skb) {
stats->tx_bytes += tcb->skb->len;
/* Add the TCB to the Ready Q */
spin_lock_irqsave(&etdev->TCBReadyQLock, flags);
- etdev->Stats.opackets++;
+ etdev->stats.opackets++;
if (etdev->tx_ring.tcb_qtail)
etdev->tx_ring.tcb_qtail->next = tcb;
int PhyMiRead(struct et131x_adapter *adapter, u8 xcvrAddr,
u8 xcvrReg, u16 *value);
#define MiRead(adapter, xcvrReg, value) \
- PhyMiRead((adapter), (adapter)->Stats.xcvr_addr, (xcvrReg), (value))
+ PhyMiRead((adapter), (adapter)->stats.xcvr_addr, (xcvrReg), (value))
int32_t MiWrite(struct et131x_adapter *adapter,
u8 xcvReg, u16 value);
#define FLOW_NONE 3
/* Struct to define some device statistics */
-struct ce_stats_t {
+struct ce_stats {
/* Link Input/Output stats */
uint64_t ipackets; /* # of in packets */
uint64_t opackets; /* # of out packets */
u8 ReplicaPhyLoopbkPF; /* Replica Enable Pass/Fail */
/* Stats */
- struct ce_stats_t Stats;
+ struct ce_stats stats;
struct net_device_stats net_stats;
struct net_device_stats net_stats_prev;
* DPC. We will clear the software copy of that in that
* routine.
*/
- adapter->Stats.InterruptStatus = status;
+ adapter->stats.InterruptStatus = status;
/* Schedule the ISR handler as a bottom-half task in the
* kernel's tq_immediate queue, and mark the queue for
{
struct et131x_adapter *etdev =
container_of(work, struct et131x_adapter, task);
- u32 status = etdev->Stats.InterruptStatus;
+ u32 status = etdev->stats.InterruptStatus;
struct address_map __iomem *iomem = etdev->regs;
/*
{
struct et131x_adapter *adapter = netdev_priv(netdev);
struct net_device_stats *stats = &adapter->net_stats;
- struct ce_stats_t *devstat = &adapter->Stats;
+ struct ce_stats *devstat = &adapter->stats;
stats->rx_packets = devstat->ipackets;
stats->tx_packets = devstat->opackets;
switch (cmd) {
case SIOCGMIIPHY:
- data->phy_id = etdev->Stats.xcvr_addr;
+ data->phy_id = etdev->stats.xcvr_addr;
break;
case SIOCGMIIREG: