staging: et131x: Remove dead code in isr

Dan Carpenter reports:
The patch c2ebf58ba089: "staging: et131x: Implement NAPI support"
from Aug 21, 2014, leads to the following static checker warning:

        drivers/staging/et131x/et131x.c:4004 et131x_isr()
        warn: we tested 'status' before and it was 'true'

We don't actually need the dead code, as we're now using NAPI to
handle enabling interrupts - but we do need to enable interrupts if
NAPI is not scheduled - so enable interrupts if this is the case.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Einon <mark.einon@gmail.com>
staging: et131x: Remove spinlock fbr_lock

The spinlock fbr_lock is only used in a single call sequence staring
from et131x_poll. As this call is already locked by napi->poll_lock,
we can remove it.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
staging: et131x: Add auto-negotiation and 1000BT_Half as supported protocols

The driver supports auto-negotiation and 100BaetT_Half but doesn't
advertise or list it in it's phydev. Fix that.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
staging: et131x: Fix whitespace - alignment matching open parenthesis

Fix occurrences in et131x.c of:

CHECK: Alignment should match open parenthesis

Signed-off-by: Mark Einon <mark.einon@gmail.com>
staging: et131x: Remove et131x_send_packets() function

Remove et131x_send_packets() and replace the only use in et131x_tx
with the removed function's body.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
staging: et131x: In et131x_tx(), don't return NETDEV_TX_BUSY, just drop the packet

Memory allocation erorrs do not denote NETDEV_TX_BUSY, simply drop
the packet silently with kfree_skb() and return NETDEV_TX_OK.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
staging: et131x: Tidy up rx/tx dropped & bytes stats

Remove some fairly useless comments regarding rx/tx _bytes and
_dropped, and use rcvd_pkts_dropped stat value to provide rx_dropped.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
staging: et131x: Remove ununsed statistics

From struct ce_stats; unicast_pkts_rcvd, unicast_pkts_xmtd,
multicast_pkts_xmtd, broadcast_pkts_rcvd and broadcast_pkts_xmtd
are not returned or used for anything meaningful - remove the code
that collects them, and the struct members too.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
staging: et131x: Remove struct tcb->flags

'struct tcb' member 'flags' was only used to collect tx stats, now
we are no longer collecting those particular stats, we no longer
need tcb->flags or the code used to peek into the skb to set it's
value.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
staging: et131x: Combine two if statements with same effect

Both these if statements have the same effect when true, so combine
them and save a few lines.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
staging: et131x: Simplify code in nic_rx_pkts() for multicast_pkts_rcvd

In nic_rx_pkts(), we check that a multicast packet received (when using
a multicast list) is one that was requested - despite setting the list
up with the hardware. We shouldn't expect to get a mc packet we didn't
ask for, so remove these extra checks.

This also means that the surrounding code can be tiedied up a little.

Tested somewhat with omping, with no adverse effects seen.

Also remove this item from the TODO list.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
staging: et131x: Remove 'reduce number of spinlocks' TODO item

The number of spinlocks has been halved, from 8 to 4 since this
comment was made, let's see if this is enough.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
staging: et131x: Remove extra blank lines in et131x.h

Remove some blank lines from et131.h, including dounble blank lines.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
staging: et131x: Remove blank lines form et131x.c

Remove some unecessary blank lines from et131x.c

Signed-off-by: Mark Einon <mark.einon@gmail.com>
staging: et131x: Simplify unlocking tcb_send_qlock in et131x_tx_timeout()

The tcb_send_qlock spinlock is unlocked in all three paths at the end of
et131x_tx_timeout(). We can call it once before entering any of the paths,
saving ourselves a few lines of code.

This change puts tcb->count++ outside of the lock, but et131x_tx_timeout()
itself is protected by the tx_global_lock, so this shouldn't matter.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
staging: et131x: Remove send_hw_lock spinlock

We don't need to use this lock - the tx path is protected by the
networking subsystem xmit_lock, so we don't also need it in
nic_send_packet().

The other use of this spinlock in et1310_enable_phy_coma() to protect
a low power flag makes no sense, so can just be removed.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
staging: et131x: Remove useless assignment to NULL

The stack variable skb is no longer used after it's set to
NULL. Don't set it to NULL.

Reported-By: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Einon <mark.einon@gmail.com>
staging: et131x: Add spinlock definition comments

Checkpatch --strict advises that spinlocks should be described when
defined, seems a good idea so this change does that.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
staging: et131x: Fix indenting using mixed tabs and spaces

Fix two lines where mixed tabs and spaces were used for indenting.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
staging: et131x: Fix 'else is not generally useful after a break or return'

Fix this checkpatch warning:

WARNING: else is not generally useful after a break or return

Signed-off-by: Mark Einon <mark.einon@gmail.com>