Replace dev_kfree_skb with dev_consume_skb_any in gem_tx which can be
called in hard irq and other contexts. gem_tx handles successfully
transmitted packets.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_consume_skb_any in stmmac_tx_clean that can
be called in hard irq and other contexts. stmmac_tx_clean handles
freeing successfully transmitted packets.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_consume_skb_any in smsc911x_hard_xmit
which can be called in hard irq and other contexts. smsc911x_hard_xmit
always transmits and consumes the specified skb.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_consume_skb_any in
smc_hardware_send_pkt that can be called in hard irq and other
contexts, and handles successfully transmitted packets.
Replace dev_kfree_skb with dev_kfree_skb_any in smc_hard_start_xmit which
can be called in hard irq and other contexts, and only frees skbs
when dropping them.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_kfree_skb_any in functions that can
be called in hard irq and other contexts.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_kfree_skb_any in functions that can
be called in hard irq and other contexts.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_consume_skb_any in sc92031_start_xmit
that can be called in hard irq and other contexts.
Using dev_consume_skb_any preserves the current semantics (as
dev_kfree_skb is just consume_skb) and since packet drops
are rare is usually accurate.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace kfree_skb with dev_kfree_skb_any in functions that can
be called in hard irq and other contexts.
Every location changes is a drop making dev_kfree_skby_any appropriate.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_kfree_skb_any in vxge_xmit that can
be called in hard irq and other contexts.
vxge_xmit only calls dev_kfree_skb_any when errors result in dropping
skbs.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_kfree_skb_any in s2io_xmit that can
be called in hard irq and other contexts.
All instances that are changed are packet drops.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_consume_skb_any in copy_old_skb that can
be called in hard irq and other contexts.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_kfree_skb_any in sky2_xmit_frame that
can be called in hard irq and other contexts.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_kfree_skb_any skge_xmit_free that can
be called in hard irq and other contexts, on the path that
handles dropped packets.
Replace dev_kfree_skb with dev_consume_skb_any in skge_tx_done that can
be called in hard irq and other contexts, on the path that handles
successfully transmitted skbs.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_kfree_skb_any in mv643xx_eth_xmit and
txq_submit_skb that can be called in hard irq and other contexts,
on paths where the skbs are dropped.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_kfree_skb_any in jme_expand_header that
can be called in hard irq and other contexts, on the failure
path where the skb is dropped.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_consume_skb_any in ibmveth_start_xmit
that can be called in hard irq and other contexts.
In this code path the packet can have either been transmitted
or dropped, dev_consume_skb_any was choosen because that preserves
the existing semantics of the code, and a transmitted packet is
more likely.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_consume_skb_any in functions that can
be called in hard irq and other contexts.
None of the locations was a packet drop so dev_kfree_skb_any is
inappropriate.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_kfree_skb_any in i596_start_xmit that
can be called in hard irq and other contexts, when the skb is dropped.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_consume_skb_any in ucc_geth_tx that can
be called in hard irq and other contexts, when processing the
tx completion event.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace kfree_skb with dev_kfree_skb_any in fec_enet_start_xmit that
can be called in hard irq and other contexts, when the packet is
dropped.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_kfree_skb_any in start_tx that can
be called in hard irq and other contexts, when the skb is dropped.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_kfree_skb_any in uli562x_start_xmit
that can be called in hard irq and other contexts, when the packet is
dropped.
Replace dev_kfree_skb with dev_consume_skb_any in uli562x_start_xmit
that can be called in hard irq and other contexts, when the packet is
transmitted.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_kfree_skb_any in dmfe_start_xmit that
can be called in hard irq and other contexts, when the packet is
dropped.
Replace dev_kfree_skb with dev_consume_skb_any in dmfe_start_xmit that
can be called in hard irq and other contexts, when the packet is
transmitted.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_consume_skb_any in dm9000_start_xmit
that can be called in hard irq and other contexts, on the path
that successfully transmits the packet.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_kfree_skb_any in enic_hard_start_xmit
that can be called in hard irq and other contexts.
enic_hard_start_xmit only frees the skb when dropping it.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_consume_skb_any in net_send_packet that
can be called in hard irq and other contexts.
net_send_packet consumes (not drops) the skb of interest.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace kfree_skb with dev_consume_skb_any in free_tx_desc that can be
called in hard irq and other contexts. dev_consume_skb_any is used
as this function consumes successfully transmitted skbs.
Replace dev_kfree_skb with dev_kfree_skb_any in t4vf_eth_xmit that can
be called in hard irq and other contexts, on paths that drop the skb.
Replace dev_kfree_skb with dev_consume_skb_any in t4vf_eth_xmit that can
be called in hard irq and other contexts, on paths that successfully
transmit the skb.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace kfree_skb with dev_consume_skb_any in free_tx_desc that can be
called in hard irq and other contexts. dev_consume_skb_any is used
as this function consumes successfully transmitted skbs.
Replace dev_kfree_skb with dev_kfree_skb_any in t4_eth_xmit that can
be called in hard irq and other contexts, on paths that drop the skb.
Replace dev_kfree_skb with dev_consume_skb_any in t4_eth_xmit that can
be called in hard irq and other contexts, on paths that successfully
transmit the skb.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace kfree_skb with dev_consume_skb_any in free_tx_desc, and
write_tx_pkt_wr that can be called in hard irq and other contexts.
Replace dev_kfree_skb with dev_kfree_skb_any in t3_eth_xmit that can
be called in hard irq and other contexts.
dev_kfree_skb is replaced with dev_kfree_skb_any in t3_eth_xmit as
that location is a packet drop, while kfree_skb in free_tx_desc,
and in write_tx_pkt_wr are places where packets are consumed
in a healthy manner.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_consume_skb_any in xgmac_tx_complete
that can be called in hard irq and other contexts.
Replace dev_kfree_skb with dev_kfree_skb_any in xgmac_xmit that can
be called in hard irq and other contexts.
dev_consume_skb_any is used in xgamc_tx_complete as skbs that reach
there have been successfully transmitted, dev_kfree_skby_any is used
in xgmac_xmit as skbs that are freed there are being dropped.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace kfree_skb with dev_kfree_skb_any in macb_start_xmit that can
be called in hard irq and other contexts.
macb_start_xmit only frees skbs when dropping them so
dev_kfree_skb_any is used.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_kfree_skb_any in bnad_start_xmit that
can be called in hard irq and other contexts.
dev_kfree_skb_any is used as bnad_start_xmit only frees skbs when to
drop them, normally transmitted packets are handled elsewhere.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
The call path: atl1c_xmit_frame, atlc_tx_rollback, atl1c_clean_buffer
can not be tell at compile time if it will be invoked from hard irq
or other context, as atl1c_xmit_frame does not know. So remove
the logic that passes the compile time knowledge into al1c_clean_buffer
and figure out it out at runtime with dev_consume_skb_any.
Replace dev_kfree_skb with dev_kfree_skb_any in atl1c_xmit_frame that
can be called in hard irq and other contexts.
Replace dev_kfree_skb and dev_kfree_skb_irq with dev_consume_skb_any
in atl1c_clean_buffer that can be called in hard irq and other
contexts.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_kfree_skb_any in alx_start_xmit that
can be called in hard irq and other contexts.
dev_kfree_skb_any is used as alx_start_xmit only frees skbs
when dropping them.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_kfree_skb_any in pcnet32_start_xmit
that can be called in hard irq and other contexts.
dev_kfree_skb_any is used as pcnet32_start_xmit only frees an
skb when it drops a packet during transmit.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_consume_skb_any in lance_start_xmit
that can be called in hard irq and other contexts.
dev_consume_skb_any is used as lance_start_xmit always immediately
consumes the skb.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_consume_skb_any in am79c961 that can
be called in hard irq and other contexts.
dev_consume_skb_any is used as am79c961_sendpacket always
immediately consumes the skb.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_consume_skb_any in emacs_start_xmit
which can be called in hard irq and other contexts.
emac_start_xmit always transmits the packet making dev_consume_skb
the appropriate function to call.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_consume_skb_any in _tx_reclaim_skb that
can be called in hard irq and other contexts.
dev_consume_skb is used as _tx_reclaim_skb is called after a packet
has been successfully transmitted.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_consume_skb_any in __ei_start_xmit that
can be called in hard irq and other contexts.
dev_consume_skb is used as in this simple driver the skb is always
immediately consumed, there are no drops.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_consume_skb_any in vortex_start_xmit
as it can be called in hard irq and other contexts.
dev_consume_skb_any is used when vortext_start_xmit directly consumes
the packet instead of dmaing it to the device.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Replace dev_kfree_skb with dev_consume_skb_any in el3_start_xmit
as it can be called in hard irq and other contexts.
dev_consume_skb_any is used as on this simple hardware the
skb is consumed directly by the start_xmit function.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
The VXLAN neigh_reduce() code is completely non-functional since
check-in. Specific errors:
1) The original code drops all packets with a multicast destination address,
even though neighbor solicitations are sent to the solicited-node
address, a multicast address. The code after this check was never run.
2) The neighbor table lookup used the IPv6 header destination, which is the
solicited node address, rather than the target address from the
neighbor solicitation. So neighbor lookups would always fail if it
got this far. Also for L3MISSes.
3) The code calls ndisc_send_na(), which does a send on the tunnel device.
The context for neigh_reduce() is the transmit path, vxlan_xmit(),
where the host or a bridge-attached neighbor is trying to transmit
a neighbor solicitation. To respond to it, the tunnel endpoint needs
to do a *receive* of the appropriate neighbor advertisement. Doing a
send, would only try to send the advertisement, encapsulated, to the
remote destinations in the fdb -- hosts that definitely did not do the
corresponding solicitation.
4) The code uses the tunnel endpoint IPv6 forwarding flag to determine the
isrouter flag in the advertisement. This has nothing to do with whether
or not the target is a router, and generally won't be set since the
tunnel endpoint is bridging, not routing, traffic.
The patch below creates a proxy neighbor advertisement to respond to
neighbor solicitions as intended, providing proper IPv6 support for neighbor
reduction.
Signed-off-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
If an error occurs during the initialization in emac_dev_open() (the
driver's ndo_open function), interrupts, DMA descriptors etc. must be freed.
The current rollback code is buggy in several ways.
1) Freeing the interrupts. The current code will not free all interrupts
that were requested by the driver. Furthermore, the code tries to do a
platform_get_resource(priv->pdev, IORESOURCE_IRQ, -1) in its last
iteration.
This patch fixes these bugs.
2) Wrong order of err: and rollback: labels. If the setup of the PHY in
the code fails, the interrupts that have been requested before are
not freed:
request irq
if requesting irqs fails, goto rollback
setup phy
if phy setup fails, goto err
return 0
rollback:
free irqs
err:
This patch brings the code into the correct order.
3) The code calls napi_enable() and emac_int_enable(), but does not
undo both in case of an error.
This patch adds calls of emac_int_disable() and napi_disable() to the
rollback code.
4) RX DMA descriptors are not freed in case of an error: Right before
requesting the irqs, the function creates DMA descriptors for the
RX channel. These RX descriptors are never freed when we jump to either
rollback or err.
This patch adds code for freeing the DMA descriptors in the case of
an initialization error. This required a modification of
cpdma_ctrl_stop() in davinci_cpdma.c: We must be able to call this
function to free the DMA descriptors while the DMA channels are
in IDLE state (before cpdma_ctlr_start() was called).
Tested on a custom board with the Texas Instruments AM1808.
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
In commit 6892b41d97
Author: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Date: Tue Jun 25 21:24:51 2013 +0530
net: davinci: emac: Convert to devm_* api
the call of request_irq is replaced by devm_request_irq and the call
of free_irq is removed. But since interrupts are requested in
emac_dev_open, doing ifconfig up/down on the board requests the
interrupts again each time, causing devm_request_irq to fail. The
interface is dead until the device is rebooted.
This patch reverts said commit partially: It changes the driver back
to use request_irq instead of devm_request_irq, puts free_irq back in
place, but keeps the remaining changes of the original patch.
Reported-by: Jon Ringle <jon@ringle.org>
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jeff Kirsher says:
====================
Intel Wired LAN Driver Updates
This series contains updates to igb, ixgbe, ixgbevf, i40e and i40evf.
Anjali provides a i40e/i40evf patch to add Energy Efficient Ethernet
Low Power Idle stats and a fix for i40e to change the string
"Side Band" to "Sideband" for consistency.
Mitch provides 2 patches for i40evf to fix if the driver encounters
an error while communicating with the PF driver, do not shut down the
admin queue unconditionally. Add an error message when the admin
queue message never completes and fix formatting on another message
that was unnecessarily wrapped.
Mark provides a ixgbe patch and five ixgbevf patches. Fix a possible
infinite recursion when an adapter is removed and registers all read
as all one's in ixgbe_clear_vmdq_generic() and ixgbe_clear_rar_generic().
Converts macros to static inline functions to align kernel coding standard
and prepare for adding Live Error Recovery (LER) to ixgbevf. Change the
ethtool register test to use the normal register accessor functions and
eliminate macors used for calling register test functions to make error
exits more clear. Checks all register reads for adapter removal by checking
the status register after any register read that returns all F's since the
status register will never return 0xFFFFFFFF unless the adapter is removed.
Jacob implements SIOCGHWTSTAMP ioctl for igb which enables user processes
to read the current hardware stamp config settings non-destructively.
Todd adds the initial register read and write for surprise removal (LER)
for igb.
Christian Engelmayer fixes an igb memory leak in the igb_get_module_eeprom()
error handling path.
Ken Ichikawa provides a fix for igb, specifically for 82575 hardware to
specify -1 to the phc_index for ethtool's get_ts_info, otherwise a wrong
value will be set to the phc_index.
Christopher Paasch fixes a null pointer dereference in igb and makes sure
to unset the HAS_MSIX flag when the driver falls back to MSI only.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
As commit a6e28b34205b("staging/et131x: use SET_ETHTOOL_OPS
directly"), using a wrapper around SET_ETHTOOL_OPS macro is
not actually required, remove and use SET_ETHTOOL_OPS directly.
Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch addresses two typos in the original driver submission. One derived
from a cut & paste error, and another is a misspelling.
Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch addresses a portable pointer arithmetic issue in the
original submission found by the kbuild test robot.
config: make ARCH=i386 allyesconfig
altera_sgdma.c: In function 'sgdma_txphysaddr':
>> altera_sgdma.c:393:33: warning: cast from
>> pointer to integer of different size [-Wpointer-to-int-cast]
dma_addr_t offs = (dma_addr_t)((dma_addr_t)desc -
^
>> altera_sgdma.c:394:5: warning: cast from
>> pointer to integer of different size [-Wpointer-to-int-cast]
(dma_addr_t)priv->tx_dma_desc);
^
altera_sgdma.c: In function 'sgdma_rxphysaddr':
>> altera_sgdma.c:403:33: warning: cast from
>> pointer to integer of different size [-Wpointer-to-int-cast]
dma_addr_t offs = (dma_addr_t)((dma_addr_t)desc -
^
>> altera_sgdma.c:404:5: warning: cast from
>> pointer to integer of different size [-Wpointer-to-int-cast]
(dma_addr_t)priv->rx_dma_desc);
^
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Set the version number returned by the driver's get regs routine
invoked by ethtool so formatting can be dependent on the version
number returned, and any interesting formatted output can check
the version number for specific types of register data returned.
Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch adds Rx checksum offload support for VXLAN.
Implements .ndo_{add|del}_vxlan_port netdev ops.
Adapter supports only one VXLAN port, so program adapter with
very first UDP port which VXLAN driver is listening to.
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch adds LSO, LSO6 and Tx checksum offload support for VXLAN
encapsulated packets on 83xx/84xx series adapters.
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
The P1010 device tree restricts the number of
supported interrupt groups to 1, although the eth
controller can support 2 interrupt groups and the
driver assumes the Multi-Group mode ("fsl,etsec2" model).
So, in this case the assumption that the Multi-Group
mode (MQ_MG_MODE) devices always support 2 interrupt
groups is false. To fix this, a check for the actual
number of interrupt groups enabled in the board's
device tree has been added in gfar_probe for the
"fsl,etsec2" devices.
Without this fix, P1010 based boards claim support for
2 Tx queues to the net stack but only one is actually
allocated, leading to NULL access in xmit. This issue
was introduced by enabling Single-Queue polling for
the P1010 devices.
(71ff9e3 gianfar: Use Single-Queue polling for
"fsl,etsec2")
Fixes: 71ff9e3df7
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Few platforms use external regulator to keep the ethernet MAC supplied.
So, request and enable the regulator for driver functionality.
Fixes: 66fda75f47 (regulator: core: Replace direct ops->disable usage)
Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Suggested-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch changes the driver use the new pin configuration method when
programming the periodic output signal.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch changes the driver to use the new pin configuration method when
programming the external time stamp input signals.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch adapts the dp83640 driver to allow reconfiguration of which
auxiliary function goes on which pin. The functions may be reassigned
freely with the one exception of the calibration function.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
The phyter driver incorrectly feeds the value of the period into what
is in fact a pulse width register, resulting in the actual period
being twice the dialed value. This patch fixes the issue and renames a
variable to make the code at bit more clear.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch cleans up the input checking code on the external time stamp
function by using an unsigned rather than a signed channel index.
Also, this patch corrects the author's email address. When this macro
was last changed, the top level domain part of the email address was
left behind.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch updates the many PTP Hardware Clock drivers with the
newly introduced field that advertises the number of programmable
pins. Some of these devices do have programmable pins, but the
implementation will have to wait for follow on patches.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
When igb_set_interrupt_capability() calls
igb_reset_interrupt_capability() (e.g., because CONFIG_PCI_MSI is unset),
num_q_vectors has been set but no vector has yet been allocated.
igb_reset_interrupt_capability() will then call igb_reset_q_vector,
which assumes that the vector is allocated. As this is not the case, we
are accessing a NULL-pointer.
This patch fixes it by checking that q_vector is indeed different from
NULL.
Fixes: 02ef6e1d0b (igb: Fix queue allocation method to accommodate changing during runtime)
Cc: Carolyn Wyborny <carolyn.wyborny@intel.com>
Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
82575 has only software timestamping capability and it has
no PTP Hardware Clocks. Therefore, -1 has to be specified
to the phc_index for ethtool's get_ts_info, otherwise a wrong
value will be set to the phc_index.
v2: move the if (adapter->ptp_clock) section specifying phc_index
to above the switch statement as suggested by Matthew Vick.
adapter->ptpclock will always be NULL for 82575.
Signed-off-by: Ken ICHIKAWA <ichikawa.ken@jp.fujitsu.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Fix a memory leak in the igb_get_module_eeprom() error handling path.
Detected by Coverity: CID 1016508.
Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This patch adds support for the SIOCGHWTSTAMP ioctl which enables user
processes to read the current hwtstamp_config settings
non-destructively. Previously a process had to be privileged and could
only set values, it couldn't return what is currently set without
possibly overwriting the value.
This patch adds support for this new operation into igb by keeping a
shadow copy of the config in the adapter structure, which is returned
upon request.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Additional checks are needed for a detected removal not to cause
problems. Some involve simply avoiding a lot of stuff that can't
do anything good, and also cases where the phony return value can
cause problems. In addition, down the adapter when the removal is
sensed.
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Prevent writes to an adapter that has been detected as removed
by a previous failing read.
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Check all register reads for adapter removal by checking the status
register after any register read that returns 0xFFFFFFFF. Since the
status register will never return 0xFFFFFFFF unless the adapter is
removed, such a value from a status register read confirms the
removal. Since this patch adds so much to ixgbe_read_reg, stop
inlining it, to reduce driver bloat.
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Make the ethtool register test use the normal register accessor
functions. Also eliminate macros used for calling register test
functions to make error exits clearer.
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Kernel coding standard prefers static inline functions instead
of macros, so use them for register accessors. This is to prepare
for adding LER, Live Error Recovery, checks to those accessors.
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
When an adapter is removed and registers all read as all one's,
an infinite recursion can happen between ixgbe_clear_vmdq_generic
and ixgbe_clear_rar_generic. Adding a check for removal breaks
this recursion.
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Add an error message when the admin queue message never completes, and
fix formatting on another one that was unnecessarily wrapped.
Change-ID: I8b8a4eb7629d741f09357250144023cd4a72231f
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
If the driver encounters an error while communicating with the PF
driver, don't just shut down the admin queue unconditionally. The PF
may be delayed, and shutting down the admin queue causes it to fail
completely. If this happens, the VF will never complete initialization.
Change-ID: I6192e9d8caeefb738428c3597fa2f54fa400ce7f
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Instead of always invoking netdev_get_tx_queue() in bcmgenet_xmit() and
bcmgenet_tx_reclaim(), just get the corresponding netdev_queue pointer
once and for all and manipulate it throughout bcmgenet_xmit() and
bcmgenet_tx_reclaim().
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
netdev_pick_tx already takes care of making sure that a given
skb->queue_mapping value will remain within the number of advertised
hardware queue number, there is no need to re-do this again in the
driver.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
The BCMGENET driver was not TX timestamping the SKBs it queued for
transmission, do this in bcmgenet_xmit() right before kicking the
Transmit DMA engine.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
The spinlock cookie in bcmgenet_priv is never used, get rid of it.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
"goto" is well accepted for error paths in the kernel but should not be
used unnecessarily. Return the correct value directly instead of using a
goto when possible.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Network API functions that rely on the MDIO bus can be called as soon as
the driver calls register_netdev(). Register the MDIO bus before the
network device to avoid race conditions.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
The network device passed to the sh_mdio_init and sh_mdio_release
functions is only used to access the sh_eth_private instance. Pass it
directly to those functions.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
The MDIO bus parent is set to the network device. Beside not reflecting
the hardware topology, this prevents registering the MDIO bus before
initializing the network device. Fix it by setting the MDIO bus parent
to the platform device.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Memory allocated for the MDIO bus with the devm_kzalloc() API is
associated with the network device. While this will cause memory to be
freed at the right time, it doesn't allow allocating memory before the
network device is initialized.
Replace the network device with the parent platform device for memory
allocation to remove that dependency. This also improves consistency
with the other devm_* calls in the driver that all use the platform
device.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
According to "Universal Serial Bus Communications Class Subclass
Specification for Mobile Broadband Interface Model, Revision 1.0,
Errata-1" published by USB-IF, the wMTU field of the MBIM extended
functional descriptor indicates the operator preferred MTU for IP data
streams.
This patch modifies cdc_ncm_setup to ensure that the MTU value set on
the usbnet device does not exceed the operator preferred MTU indicated
by wMTU if the MBIM device exposes a MBIM extended functional
descriptor.
Signed-off-by: Ben Chan <benchan@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
A new syntax is added for the module parameters num_vfs and probe_vf.
num_vfs=p1,p2,p1+p2
probe_bf=p1,p2,p1+p2
Where p1(2) is the number of VFs on / probed VFs for physical
port1(2) and p1+p2 is the number of dual port VFs.
Single port VFs are currently supported only when the link type
for both ports of the device is Ethernet.
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Adds support for N-Port VFs, this includes:
1. Adding support in the wrapped FW command
In wrapped commands, we need to verify and convert
the slave's port into the real physical port.
Furthermore, when sending the response back to the slave,
a reverse conversion should be made.
2. Adjusting sqpn for QP1 para-virtualization
The slave assumes that sqpn is used for QP1 communication.
If the slave is assigned to a port != (first port), we need
to adjust the sqpn that will direct its QP1 packets into the
correct endpoint.
3. Adjusting gid[5] to modify the port for raw ethernet
In B0 steering, gid[5] contains the port. It needs
to be adjusted into the physical port.
4. Adjusting number of ports in the query / ports caps in the FW commands
When a slave queries the hardware, it needs to view only
the physical ports it's assigned to.
5. Adjusting the sched_qp according to the port number
The QP port is encoded in the sched_qp, thus in modify_qp we need
to encode the correct port in sched_qp.
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch adds the following utils:
1. Convert slave_id -> VF
2. Get the active ports by slave_id
3. Convert slave's port to real port
4. Get the slave's port from real port
5. Get all slaves that uses the i'th real port
6. Get all slaves that uses the i'th real port exclusively
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Adds the required data structures to support VFs with N (1 or 2)
ports instead of always using the number of physical ports.
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Since passing the clock is not mandatory, change the warning message to debug,
so that we avoid getting the following clock failure message on every boot:
smsc911x: Driver version 2008-10-21
smsc911x smsc911x (unregistered net_device): couldn't get clock -2
libphy: smsc911x-mdio: probed
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
In order to support the driver behaviour introduced by:
commit d0575a5a703978c43e25128421158c78534ba100
Author: Daniel Kim <dekim@broadcom.com>
Date: Wed Mar 12 18:12:14 2014 -0700
brcmfmac: Enable 40MHz bandwidth in 2GHz band and OBSS scanning
in devices that do not support bwcap firmware command a fallback
is added.
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
In the function brcmf_sdiod_request_data() an error message is logged,
but the calling function retries it. This patch will only log an error
message when retry limit is reached. The low-level error is still
logged by a SDIO debug message.
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The watchdog thread waits on completion that is set from a timer. As
the completion is count based this could mean that on a busy system
the watchdog is handled multiple times with a very short interval.
This is not the intended behaviour. After handling the watchdog it
should wait for the next timer expiry. This is accomplished by
reinitializing the completion.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch enables 40MHz bandwidth in 2GHz band after checking whether
cfg80211 allows it or not, and enables OBSS scanning operations to
to support 20/40 BSS coexistence.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Daniel Kim <dekim@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch moves the call to enable Tx queues after the link is established.
Previously there was a chance for aggressive start_ndo_xmit() callers to
sneak packets between enabling the Tx queues and the link coming up.
In addition it replaces netif_tx_start_all_queues() with
netif_tx_wake_all_queues() to allow for flushing of the qdisc.
CC: Arun Sharma <asharma@fb.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
We use to cache whether the MNG FW was enabled, how since this isn't
static we really need to verify with each check. This patch makes that
change.
CC: Arun Sharma <asharma@fb.com>
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Rather than assign several parameters in a row, we should use a for
loop, which reduces code size.
CC: Arun Sharma <asharma@fb.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This patch replaces some direct uses of pci_read_config_word with the
protected ixgbe_read_pci_cfg_word function, which checks for whether the
adapter is removed when LER is enabled. We shouldn't use the
pci_read_config_word calls directly because of these checks.
This patch also cleans up an unnecessary save of a pointer to the mac
object, as our standard style is to just use the hw pointer.
CC: Arun Sharma <asharma@fb.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This patch reverts the addition of the fiber_fixed type, which ended up
never being used. We don't have plans to support this type going
forward, and there is no reason to keep an unused type around polluting
the code.
Reverts: 4e8e1bca6e ("ixgbe: add new media type")
CC: Arun Sharma <asharma@fb.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This patch fixes flow control autonegotiation for KR/KX/K4 interfaces.
When setting up MAC link, the cached autoc value and current autoc value
were being incorrectly used to determine whether link reset is required.
This resulted in the driver ignoring and discarding flow control
negotiation changes that occur since the caching happened, as well as
when the mac was being setup.
This patch also splits the assignments for the 3 autoc variables into
their own block, and adds a comment explaining what each one means, in
order to help keep logic more straightforward while reading the code.
CC: Arun Sharma <asharma@fb.com>
Reported-by: Sourav Chatterjee <sourav.chatterjee@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Previously, we did a full check to see if MNG FW was running. Instead,
we should only check to see whether it could be enabled. Since it may
become active while down, we don't want to bring the link down.
CC: Arun Sharma <asharma@fb.com>
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This patch corrects the stop_mac_link_on_d3 function in ixgbe_82599 by
checking the Core Clock Disable bit before stopping link.
CC: Arun Sharma <asharma@fb.com>
Reported-by: Chris Pavlas <chris.pavlas@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Found several incorrect conditionals after calling the prot_autoc_*
functions. Likewise we weren't always freeing the FWSW semaphore after
grabbing it. This would lead to DA cables being unable to link along with
possible other errors.
CC: Arun Sharma <asharma@fb.com>
CC: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
The use of __constant_<foo> has been unnecessary for quite awhile now.
Make these uses consistent with the rest of the kernel.
Signed-off-by: Joe Perches <joe@perches.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
The use of __constant_<foo> has been unnecessary for quite awhile now.
Make these uses consistent with the rest of the kernel.
Signed-off-by: Joe Perches <joe@perches.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
The use of __constant_<foo> has been unnecessary for quite awhile now.
Make these uses consistent with the rest of the kernel.
Signed-off-by: Joe Perches <joe@perches.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
The use of __constant_<foo> has been unnecessary for quite awhile now.
Make these uses consistent with the rest of the kernel.
Signed-off-by: Joe Perches <joe@perches.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
The use of __constant_<foo> has been unnecessary for quite awhile now.
Make these uses consistent with the rest of the kernel.
Signed-off-by: Joe Perches <joe@perches.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
For i350 VLAN stripping for VMs is not enabled in the VMOLR register but in
the DVMOLR register. Making the changes accordingly. It's not necessary to
unset the E1000_VMOLR_STRVLAN bit on i350 as the hardware will simply ignore
it.
Without this change if a VLAN is configured for a VF assigned to a guest
via (i.e.)
ip link set p1p1 vf 0 vlan 10
the VLAN tag will not be stripped from packets going into the VM. Which they
should be because the VM itself is not aware of the VLAN at all.
Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Jeff Kirsher says:
====================
Intel Wired LAN Driver Updates
This series contains updates to i40e, i40evf, e1000e, ixgbe and ixgbevf.
Mitch adds support for the VF link state ndo which allows the PF driver
to control the virtual link state of the VF devices. Added
support for viewing and modifying RSS hash options and RSS hash look-up
table programming through ethtool for i40evf. Fixed complaint about
the use of min() where min_t() should be used in i40evf.
Anjali adds support for ethtool -k option for NTUPLE control for i40e.
Elizabeth cleans up and refactors i40e_open() to separate out the VSI
code into its own i40e_vsi_open().
Jesse enables the hardware feature head write back to avoid updating the
descriptor ring by marking each descriptor with a DD bit and instead
writes a memory location with an update to where the driver should clean
up to in i40e and i40evf. Reduces context descriptors for i40e/i40evf
since we do not need context descriptors for every packet, only for
TSO or timesync.
Dan Carpenter fixes a potential array underflow in i40e_vc_process_vf_msg().
Dave fixes an e1000e hardware unit hang where the check for pending Tx work
when link is lost was mistakenly moved to be done only when link is first
detected to be lost. Fixed a problem with poor network performance on
certain silicon in e1000e when configured for 100M HDX performance.
Carolyn adds register defines needed for time sync functions and the code
to call the updated defines.
Jacob adds the ixgbe function for writing PCI config word and checks
whether the adapter has been removed first.
Mark adds the bit __IXGBEVF_REMOVING to indicate that the module is being
removed because the __IXGBEVF_DOWN bit had been overloaded for this
purpose, but leads to trouble. ixgbevf_down function can now prevent
multiple executions by doing test_and_set_bit on __IXGBEVF_DOWN.
v2:
- dropped patch Mitch's patch "i40evf: Support RSS option in ethtool"
based on feedback from Ben Hutchings so that Mitch can re-work the
patch solution
v3:
- removed unnecessary parenthesis in patch 1 based on feedback from David
Miller
- changed a macro to get the next queue to a function in patch 2 based on
feedback from David Miller
- added blank lines after variable declaration and code in two functions
in patch 6 based on feedback from David Miller
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
The ixgbevf_down function can now prevent multiple executions by
doing test_and_set_bit on __IXGBEVF_DOWN. This did not work before
introduction of the __IXGBEVF_REMOVING bit, because of overloading
of __IXGBEVF_DOWN. Also add smp_mb__before_clear_bit call before
clearing the __IXGBEVF_DOWN bit.
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Add a bit, __IXGBEVF_REMOVING, to indicate that the module is being
removed. The __IXGBEVF_DOWN bit had been overloaded for this purpose,
but that leads to trouble. A few places now check both __IXGBEVF_DOWN
and __IXGBEVF_REMOVING.
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Inline with the current use for ixgbe_read_pci_cfg_word, create a
similar function for writing PCI config, which checks whether the
adapter has been removed first, if Live Error Recovery has been enabled.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This patch adds defines needed for implementing the auxiliary time sync
functions and also changes code to call the updated defines instead of
the old.
Reported-by: Richard Cochran <ricahrdcochran@gmail.com>
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This patch causes the TCTL to be explicitly set to fix a problem with
poor network performance (throughput) on certain silicon when configured
for 100M HDX performance.
Cc: Todd Fujinaka <todd.fujinaka@intel.com>
Signed-off-by: Dave Ertman <davidx.m.ertman@intel.com>
Acked-by: Bruce W. Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
The check for pending Tx work when link is lost was mistakenly moved to be
done only when link is first detected to be lost. It turns out there is a
small window of opportunity for additional Tx work to get queued up shortly
after link is dropped.
Move the check back to the place it was before in the watchdog task. Put in
additional debug information for other reset paths and a final catch-all for
false hangs in the scheduled function that prints out the hardware hang
message.
Signed-off-by: Dave Ertman <davidx.m.ertman@intel.com>
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Bump to version 0.3.36 for i40e and 0.9.16 for i40evf.
Change-ID: I7b4ff97b32d2825181803c03c316381a7608a618
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
If "vf_id" is smaller than hw->func_caps.vf_base_id then it leads to
an array underflow of the pf->vf[] array. This is unlikely to happen
unless the hardware is bad, but it's a small change and it silences a
static checker warning.
Fixes: 7efa84b7ab ('i40e: support VFs on PFs other than 0')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
We don't need context descriptors for every packet, only tso
or timesync. This fixes a bug in the driver where it would
always add a context even if all the passed in values
to the context descriptor function were 0/default values.
Change-ID: I0101d2b893380707b5c2de61aab3e16d4310e9a1
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
The hardware supports a feature to avoid updating the descriptor
ring by marking each descriptor with a DD bit, and instead
writes a memory location with an update to where the driver
should clean up to. Enable this feature.
Change-ID: I5da4e0681f0b581a6401c950a81808792267fe57
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This patch cleans up and moves a portion of i40e_open to i40e_vsi_open,
in order to have a shorter vsi_open function that does only that.
Change-ID: I1c418dda94dcfc0eb7d4386a70c330692ef5ecc9
Signed-off-by: Elizabeth Kappler <elizabeth.m.kappler@intel.com>
Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This enables option '-k/-K' in ethtool for NTUPLE control.
NTUPLE control requires a reset, to take effect. When the feature is
turned off, the SW list of stored FD SB filters gets cleaned up.
Change-ID: I9d564b67a10d4afa11de3b320d601c3d2e6edc1f
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Checkpatch complained in an earlier patch about using min(), but that
change would have been completely unrelated to the point of that patch.
So fix it here.
Change-ID: I2cd87b39cfd406850d283b88f259757a6bcd14cd
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
The HLUT programming loop in in i40evf_configure_rss was a) overly-
complicated, and b) just plain broken. Most of the entries ended up being
not written at all, so most of the flows ended up at queue zero.
Refactor the HLUT programming loop to simply walk through the registers
and write four values to each one, incrementing through the number of
available queues.
Change-ID: I75766179bc67e4e997187794f3144e28c83fd00d
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Commit 20d8435a1c (phy: micrel: add of configuration for LED mode) made the
obvious mistake when masking off the LED mode bits: forgot to do a logical NOT
to the mask with which it ANDs the register value, so that unrelated bits are
cleared instead.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Ben Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This netdev op allows the PF driver to control the virtual link state of
the VF devices. This can be used to deny naughty VF drivers access to
the wire, or to allow VFs (regardless of temperament) to communicate
with each other over the device's internal switch even though external
link is down.
Add the actual ndo function, and modify vc_notify_link_state to check
the link status of each VF before sending a message in the case when
physical link changes state.
Change-ID: Ib5a6924da78c540789f21d26b5e8086d71c29384
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Currently, via-rhine fails to call pci_disable_device() for errors
in rhine_init_one().
Reported-by: Huqiu Liu <liuhq11@mails.tsinghua.edu.cn>
Signed-off-by: Roger Luethi <rl@hellgate.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
To set AP in 1X1 or 2X2 mode through hostapd, we need to set
RX-STBC* in hostapd.conf file. Depending upon RX-STBC bit in
ht_cap IE received from hostapd, we need to update mcs set in
bss_cfg appropriately before starting AP.
Signed-off-by: Maithili Hinge <maithili@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch adds support to read sleep cookie for command
response before accessing buffer.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stations associated to mwifiex AP would not be able to ping AP
after scan was issued on AP interface. This happened because
there was no handling of extended scan event in AP. This patch
adds this handling and fixes ping failure issue.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Emit a prefix for the rsi_dbg messages.
Fix the format and argument mismatch and add
__printf(2, 3) to try to avoid more.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The ERP configuration is now done outside RF code in both rtl8180
and rtl8187 drivers.
The conf_erp callback in common RF ops struct is now useless.
Remove it.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This fixes the build for powerpc:
After merging the final tree, today's linux-next build (powerpc allyesconfig)
failed like this:
drivers/net/wireless/iwlwifi/mvm/debugfs.c: In function 'iwl_dbgfs_fw_error_dump_release':
drivers/net/wireless/iwlwifi/mvm/debugfs.c:161:2: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration]
vfree(file->private_data);
^
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
This is to address reports of this:
In file included from drivers/net/wireless/rsi/rsi_mgmt.h:22:0,
from drivers/net/wireless/rsi/rsi_91x_core.c:17:
drivers/net/wireless/rsi/rsi_91x_core.c: In function 'rsi_dbg':
drivers/net/wireless/rsi/rsi_main.h:44:20: error: function 'rsi_dbg' can never be inlined because it uses variable argument lists
static inline void rsi_dbg(u32 zone, const char *fmt, ...)
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Use pci_iounmap instead of iounmap when the virtual mapping was done
with pci_iomap. A simplified version of the semantic patch that finds this
issue is as follows: (http://coccinelle.lip6.fr/)
// <smpl>
@r@
expression addr;
@@
addr = pci_iomap(...)
@rr@
expression r.addr;
@@
* iounmap(addr)
// </smpl>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch fixes a NULL pointer dereference in the event of an
skb allocation failure in arp_reduce().
Signed-Off-By: David L Stevens <dlstevens@us.ibm.com>
Acked-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
The bnx2/bnx2x rings are made up of linked pages. However there is an
upper limit on the page size as some the page size settings are 16-bit
in the hardware/firmware interface. In the current code, some parts
use BNX2_PAGE_SIZE which has a 16K upper limit and some parts use
PAGE_SIZE. On archs with >= 64K PAGE_SIZE, it generates some compile
warnings. Define a new CNIC_PAGE_SZIE which has an upper limit of
16K and use it consistently in all relevant parts.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
For per device operations, cnic needs to dereference the RCU protected
cp->ulp_ops instead of the global cnic_ulp_tbl. In 2 locations,
cnic_send_nlmsg() and cnic_copy_ulp_stats(), it was referencing the
global table. If the device has been unregistered and these functions
are still being called (very unlikely scenarios), it could lead to NULL
pointer dereference.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This is a context modified revert of commit 6a9612e2cb
("net: cdc_ncm: remove ncm_parm field") which introduced
a NCM specification violation, causing setup errors for
some devices. These errors resulted in the device and
host disagreeing about shared settings, with complete
failure to communicate as the end result.
The NCM specification require that many of the NCM specific
control reuests are sent only while the NCM Data Interface
is in alternate setting 0. Reverting the commit ensures that
we follow this requirement.
Fixes: 6a9612e2cb ("net: cdc_ncm: remove ncm_parm field")
Reported-and-tested-by: Pasi Kärkkäinen <pasik@iki.fi>
Reported-by: Thomas Schäfer <tschaefer@t-online.de>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iEYEABECAAYFAlMmuSEACgkQjTAFq1RaXHOWUgCfbyIIhBEltzY+EtX+RNdVAS4j
KkwAnAz4iZJY+3SdjRyy5uG2mjhWRS/B
=RnxD
-----END PGP SIGNATURE-----
Merge tag 'linux-can-next-for-3.15-20140317' of git://gitorious.org/linux-can/linux-can-next
linux-can-next-for-3.15-20140317
Marc Kleine-Budde says:
====================
this is a pull request of three patches for net-next/master.
It consists of a patch by Oliver Hartkopp, which unifies the MTU
settings for CAN interfaces. A patch by Christopher R. Baker populates
netdev::dev_id for udev discrimination for multi interface CAN devices.
Alexander Shiyan contributes a patch for the mcp251x driver which fixes
the regulators operation if CONFIG_REGULATOR is not enabled.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
In generic, after an assignment, we use ';' instead of ','.
Although, it won't hurt.
Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
The current firmware advertises support for uAPSD, but
critical bugs force us to disable the feature.
When a fixed firmware will be available, we will be able to
re-enable uAPSD.
Cc: <stable@vger.kernel.org> [3.13+]
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
If the low-latency update is called but there's no change then
ignore the update instead of triggering all the required work.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Remove a spurious blank line in the quota code.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
In case of system low latency configure passive scan to be fragmented.
Set the following scan parameters for both immediate and scheduled scan:
- passive scan fragment duration = 20ms
- out-of-channel time = 70ms
- suspend time = 105ms
Restructure channel's active/passive dwell time configuration to better
suit the above change.
The idea is that under low latency traffic passive scan is fragmented,
i.e. that dwell on a particular channel will be fragmented. Each
fragment dwell time is 20ms and fragments period is 105ms. Skipping to
next channel will be delayed by the same period (105ms). So suspend_time
parameter describing both fragments and channels skipping periods is set
to 105ms. This value is chosen so that overall passive scan duration
will not be too long. Max_out_time in this case is set to 70ms, so for
active scanning operating channel will be left for 70ms while for
passive still for 20ms (fragment dwell).
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Some scan parameters should be dependent on traffic conditions.
Centralize conditions verification in one function and obtain
scan max out-of-channel and suspend time in that new function.
Rely on bound interfaces indication instead of association state
to calculate scan parameters. If no bound interfaces use default
values for out-of-channel and suspend time parameters.
Additionally, get rid of NL80211_SCAN_FLAG_LOW_PRIORITY checks
since no use case for this exists so far.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
[reword commit log a bit]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
The firmware decided to not implement this API in this way,
so for now remove setting the field completely. This will
allow the firmware to change how to use this field later.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
In order to debug the firmware, we need to be able to set
the BT priority of WiFi packets. This priority is set based
on the type of the packet (control frames, EAPOL etc...).
For debugging purposes, allow to override this priority by
a debugfs controlled value.
Enable this feature that needs this priority to be able to
test it.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
When the firmware asserts, the driver will dump the firmware
state to an internal buffer. This buffer is kept aside until
it is dumped through debugfs. Once an external application
fetched the data, the buffer is freed and a new buffer can
be allocated in case another assert occurs.
A udev event is sent to trigger an external application.
A simple rule like:
DRIVER=="iwlwifi", ACTION=="change", RUN+="/sbin/dump_sram.sh"
can fetch the data from debugfs.
Here is my dump_sram.sh:
phyname=$(basename ${DEVPATH})
date=$(date +%F_%H_%M)
filename=/var/log/iwl-sram-${phyname}-${date}.bin
cat /sys/kernel/debug/ieee80211/${phyname}/iwlwifi/iwlmvm/fw_error_dump > ${filename}
The current SRAM size is 80KB so, currently:
$ ls -lh iwl-sram-phy0-2014-03-16_13_14.bin
-rw-r--r-- 1 emmanuel emmanuel 81K Mar 16 13:15 iwl-sram-phy0-2014-03-16_13_14.bin
and after compression:
$ ls -lh iwl-sram-phy0-2014-03-16_13_14.bin.xz
-rw-r--r-- 1 emmanuel emmanuel 13K Mar 16 13:15 iwl-sram-phy0-2014-03-16_13_14.bin.xz
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Only ratelimit the ones that might spam, omiting the ones from
enslave/deslave.
CC: Jay Vosburgh <fubar@us.ibm.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
The networking core does it for the driver during registration time.
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
When compiling the i40e and the i40evf driver into the same kernel I get:
LD drivers/net/ethernet/intel/built-in.o
drivers/net/ethernet/intel/i40evf/built-in.o:(.data+0x300): multiple definition of `i40e_ptype_lookup'
drivers/net/ethernet/intel/i40e/built-in.o:(.data+0x780): first defined here
make[3]: *** [drivers/net/ethernet/intel/built-in.o] Error 1
make[2]: *** [drivers/net/ethernet/intel] Error 2
make[1]: *** [drivers/net/ethernet/] Error 2
make: *** [sub-make] Error 2
Fix this by renaming the i40evf version of this structure from
i40e_ptype_lookup to i40evf_ptype_lookup.
This build failure was introduced in:
commit 206812b5fc
Author: Jesse Brandeburg <jesse.brandeburg@intel.com>
i40e/i40evf: i40e implementation for skb_set_hash
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
Cc: Catherine Sullivan <catherine.sullivan@intel.com>
Signed-off-by: Eric W Biederman <ebiederm@xmission.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
The commit 2800209994 (e1000e: Refactor PM flows) changed the
SET_SYSTEM_SLEEP_PM_OPS to open-coded assignment, but forgot to
protect them with CONFIG_PM_SLEEP. Then cause the following build
error when PM is disabled:
drivers/net/ethernet/intel/e1000e/netdev.c:7079:13:
error: 'e1000e_pm_suspend' undeclared here (not in a function)
.suspend = e1000e_pm_suspend,
^
drivers/net/ethernet/intel/e1000e/netdev.c:7080:13:
error: 'e1000e_pm_resume' undeclared here (not in a function)
.resume = e1000e_pm_resume,
^
drivers/net/ethernet/intel/e1000e/netdev.c:7082:11:
error: 'e1000e_pm_thaw' undeclared here (not in a function)
.thaw = e1000e_pm_thaw,
^
Signed-off-by: Kevin Hao <haokexin@gmail.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Command line parameters QueuePairs, Node, EEE, DMAC and InterruptThrottleRate
do not exist these days. Remove all references to them in the Documentation
folder and update code comments.
Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
commit f280e89a (drivers: net: cpsw: fix for cpsw crash when build as modules)
moved cpts_register()/cpts_unregister() to ndo_open()/ndo_stop(), but failed
to remove cpts_register in cpsw_probe() which leads to a double registration
and the following debug object splat.
[ 18.991902] ODEBUG: init active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x2c
[ 19.082249] [<c0059e80>] (init_timer_key) from [<c04965d4>] (cpts_register+0x1f0/0x2c4)
[ 19.090642] [<c04965d4>] (cpts_register) from [<c04931dc>] (cpsw_ndo_open+0x780/0x81c)
[ 19.098948] [<c04931dc>] (cpsw_ndo_open) from [<c0599c2c>] (__dev_open+0xb4/0x118)
Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch changes the Ethernet Makefile and Kconfig files to add the Altera
Ethernet driver component.
Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch adds the Altera Triple Speed Ethernet Makfile and
Kconfig file.
Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch adds the main driver and header file for the Altera Triple
Speed Ethernet driver.
Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch adds miscellaneous files for the Altera Ethernet Driver,
including ethtool support.
Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch adds the SGDMA soft IP support for the Altera Triple
Speed Ethernet driver.
Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch adds the MSGDMA soft IP support for the Altera Triple
Speed Ethernet driver.
Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1. For the 64 bits dma mask use dma_set_mask_and_coherent instead of
dma_set_mask and dma_set_coherent_mask.
2. For the 32 bits dma mask dma_set_coherent_mask is only called if
dma_set_mask fails, which is unusual. Assuming this as a bug, fixes
it by replacing calls to dma_set_mask and dma_set_coherent_mask by a
call to dma_set_mask_and_coherent.
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Tested-by: Jonas Hahnfeld <hahnjo@hahnjo.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch adds devicetree support for the at86rf230 driver.
Possible gpios to configure are "reset-gpio" and "sleep-gpio".
Also add support to configure the "irq-type" for the irq polarity
register.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch make the reset pin optionally. Some devices like the atben
from qi-hardware don't have a reset pin externally. The usually way is
to turn power off/on for the atben device to initiate a device reset.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
While checkpatch another patch I got a:
"WARNING: msleep < 20ms can sleep for up to 20ms"
The datasheet of at86rf231 and at86rf212 says a minimum delay for reset
pulse width and spi access latency after reset is 625 nanoseconds.
This patch removes the 1 milliseconds sleep and replace it with a 1
microseconds udelay which should be also okay for the reset pulse width.
To change the state from RESET -> TRX_OFF the at86rf230 device needs 120
microseconds, this is a worst case of all at86rf* chips.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
There is no need to lock the clearing of IRQ_TRX_END in status.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch fix a unexpected state change for the at86rf231 chip.
We can't change into STATE_FORCE_TX_ON while the chip is in one of
SLEEP, P_ON, RESET, TRX_OFF, and all *_NOCLK states.
In this case we are in the TRX_OFF state. See datasheet [1] page 71 for
more information.
Without this patch you will get the following message on a at86rf231 device:
[ 20.065218] unexpected state change: 8, asked for 4
[ 20.070527] ------------[ cut here ]------------
[ 20.075414] WARNING: CPU: 0 PID: 160 at net/mac802154/ieee802154_dev.c:43 mac802154_slave_open+0x70/0xb8()
[ 20.085594] Modules linked in: autofs4
[ 20.089667] CPU: 0 PID: 160 Comm: ifconfig Not tainted 3.14.0-20140108-1-00993-g905c192 #162
[ 20.098612] [<c00127b8>] (unwind_backtrace) from [<c0010b1c>] (show_stack+0x10/0x14)
[ 20.106819] [<c0010b1c>] (show_stack) from [<c0033838>] (warn_slowpath_common+0x60/0x80)
[ 20.115311] [<c0033838>] (warn_slowpath_common) from [<c00338e8>] (warn_slowpath_null+0x18/0x20)
[ 20.124590] [<c00338e8>] (warn_slowpath_null) from [<c057b7e8>] (mac802154_slave_open+0x70/0xb8)
[ 20.133880] [<c057b7e8>] (mac802154_slave_open) from [<c0488a58>] (__dev_open+0xa8/0x108)
[ 20.142553] [<c0488a58>] (__dev_open) from [<c0488cb0>] (__dev_change_flags+0x8c/0x148)
[ 20.151051] [<c0488cb0>] (__dev_change_flags) from [<c0488d84>] (dev_change_flags+0x18/0x48)
[ 20.159968] [<c0488d84>] (dev_change_flags) from [<c04e2e9c>] (devinet_ioctl+0x2b0/0x63c)
[ 20.168623] [<c04e2e9c>] (devinet_ioctl) from [<c04712e4>] (sock_ioctl+0x23c/0x29c)
[ 20.176727] [<c04712e4>] (sock_ioctl) from [<c00e3cb8>] (do_vfs_ioctl+0x4a8/0x578)
[ 20.184671] [<c00e3cb8>] (do_vfs_ioctl) from [<c00e3dd4>] (SyS_ioctl+0x4c/0x78)
[ 20.192402] [<c00e3dd4>] (SyS_ioctl) from [<c000da00>] (ret_fast_syscall+0x0/0x48)
[ 20.200392] ---[ end trace 9a34542f4ea08e47 ]---
This patch was tested on at86rf231 and at86rf212.
[1] http://www.atmel.com/images/doc8111.pdf
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Now that we call netdev_*() under netif_msg_*() checks, we can fold these into
netif_*() macro invocations.
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Convert dev_*(&ndev->dev, ...) to netdev_*(ndev, ...) calls since they are a bit
shorter and at the same time give more information on a device.
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Convert pr_*() to netdev_*() calls as the latter provide info on a device.
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Exit the driver's probe() method when the register layout is unknown as the
driver would cause kernel oops in this case anyway.
While at it, move the corresponding error message printout and convert it from
pr_err() to dev_err().
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
The netpoll packet receive code only becomes active if the netpoll
rx_skb_hook is implemented, and there is not a single implementation
of the netpoll rx_skb_hook in the kernel.
All of the out of tree implementations I have found all call
netpoll_poll which was removed from the kernel in 2011, so this
change should not add any additional breakage.
There are problems with the netpoll packet receive code. __netpoll_rx
does not call dev_kfree_skb_irq or dev_kfree_skb_any in hard irq
context. netpoll_neigh_reply leaks every skb it receives. Reception
of packets does not work successfully on stacked devices (aka bonding,
team, bridge, and vlans).
Given that the netpoll packet receive code is buggy, there are no
out of tree users that will be merged soon, and the code has
not been used for in tree for a decade let's just remove it.
Reverting this commit can server as a starting point for anyone
who wants to resurrect netpoll packet reception support.
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch adds the Redpine Signals' 91x wireless driver.
Signed-off-by: Fariya Fatima <fariyaf@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
When disconnecting some CID, corresponded Tx vring get released. During vring
release, all descriptors get freed. It is possible that Tx NAPI working on the same
vring simultaneously. If it happens, descriptor may be double freed.
To protect from the race above, make sure NAPI won't process the same vring.
Introduce 'enabled' flag in the struct vring_tx_data. Proceed with Tx NAPI only if
'enabled' flag set. Prior to Tx vring release, clear this flag and make sure NAPI
get synchronized.
NAPI enablement status protected by wil->mutex, add protection where it was
missing and check for it.
During reset, disconnect all peers first, then proceed with the Rx vring. It allows for
the disconnect flow to observe proper 'wil->status' and correctly notify cfg80211 about
connection status change
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
make sure reset flow executed in order
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Use 'real' indication for hardware state.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
GRO is easy to enable when already using NAPI framework,
and it improves CPU utilisation. Enable it by default.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
These methods can change device state, serialize with others
similar ones like up/down
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
when STA receiving connect() when already connected,
it should return error
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
upon fw error interrupt - in STA mode, disconnect/cancel scan and
then reset FW/HW
added module param - no_fw_recovery which is false by default
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
wil_reset() removes vring's
At the same time NAPI may be active performing Rx/Tx completion.
If this happens, Rx/Tx polling functions going to access already removed vrings
Make sure NAPI is idle and won't be started prior to vring removal.
For this, track NAPI enabled state
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
When switching between STA and AP modes, memory allocated for Rx vring leaks
This is because start_ap() allocates Rx vring but stop_ap() do not free it.
Logically, Rx vring is not valid (HW can't use it anymore), so free it in reset()
Also, check double init for Rx vring and bail out with -EINVAL
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Convert 2 often printed messages to dynamic ones
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Configure hardware to perform full reset on "power good". This mean,
reset HW on system boot. This improves card stability.
By default this is off.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Put all registers in order for easier navigation;
fix naming to reflect hardware cluster
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hardware bug triggered by the MSI init while INTx asserted for some reason.
De-assert INTx prior to MSI set-up
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Useful to detect hardware problems
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
When FW crashes, dmesg get polluted with the "FW not ready"
error message. Print it only once per FW lifecycle
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Support for new chip revision. Revision read from the
internal register, PCIE config's "revision id" register
do not indicate HW version properly
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Introduce enum to describe mapping type; allow 'none' in addition to
'single' and 'page'; this is preparation for GSO
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
When setting fragmented skb for Tx, assign skb to the last descriptor
and set number of fragments in the 1-st one
On Tx complete, HW sets "DU" bit in Tx descriptor only for the last
descriptor; so search for it using number of fragments field.
Middle descriptors may have "DU" bit not set by the hardware.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
New firmware do support scan while connected. Enable it.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
When connection established, as reported by WMI_CONNECT_EVENTID,
4-way handshaking required for the secure connection is not done
yet. It is indicated by another WMI event. Wait for it and only then
allow data traffic. In case of non-secure connection, FW reports
"data port open" immediately after connection.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The registers for temperature compensation need to
be programmed only for active chains. Use the TX chainmask
to make sure that this is done properly for QCA953x.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Along with AR9340 and AR955x, this is also needed for
the QCA953x SoC.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eeprom read operations are mixed in the probe function.
Make the code more readable and clean by extracting this code and
moving it in a dedicated function.
The variable eeprom_cck_table_adr, now useless, is here because
it will be needed for rtl8187se support, that I hope to add soon.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
SLOT, SIFS, DIFS, EIFS, CW and ACK-timeout registers are set in an
RF-code callback and their values are fixed.
This patch moves this off the rf-code, and introduce two new functions
that calculate these values depending by slot time and CW values
requested by mac80211.
This seems to improve performances on my setup.
Currently the ack and slot time values could be stored in a local
variable, but this patch stores it in the driver "priv" structure
because it will be useful for rtl8187se support that will be added
(hopefully) soon.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Basic rates setting is done with hardcoded register write with
fixed settings.
This patch introduces a new function that makes it possible to
configure basic rates and it add a check for mac80211
BSS_CHANGED_BASIC_RATES flag in order to eventually invoke that
function when needed.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
While changing board-type variable to enum, I have added enum
value for rtl8187se by mistake.
This will causes gcc warnings with unhandled switch/cases.
Remove it temporarily until I will push also rtl8187se changes.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The nl80211 iftype was converted to a mode value and stored in
brcmf_cfg80211_vif structure. The value was used only within
brcmfmac driver to decide execution of conditional code. Better
use wireless_dev::iftype for that as the wdev is contained in
the brcmf_cfg80211_vif structure.
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
When the SDIO driver goes in low power state it must assure that
a clock request in ChipCLKCSR is set. Otherwise waking up the
device can fail. The register is read and if necessary the ALP
clock will be requested.
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
When connecting without specifying the channel it can take quite
some time to connect. This is because not all parameters for the
scan operation are set to optimized values. This patch changes
these parameters resulting in a much faster connect in certain
situations.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
SDIO tx uses a sequence number which is common for data
and control. This requires that access to this sequence number
is protected. A mutex was used to achieve this, but it also
required the reordering of code for tx control.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BCM4354 is an a/b/g/n/ac 2x2 WiFi chip. This patch adds support for it through
SDIO interface.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
we will need it to make common-beacon code work.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
we will need it for ath9k_htc, may be other drivers too
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
to reduce difference between ath9k and ath9k_htc
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
If CONFIG_REGULATOR is not set, devm_regulator_get() returns NULL,
so use IS_ERR_OR_NULL() macro for checks.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
My objective is to be able to totally discriminate CAN ports on multi-port
cards via udev so as to rename them to semantically interesting/unique names
for my system (e.g., "ecuCAN" and "auxCAN" instead of "can0" and "can1").
The following patch assigns the dev_id field to match the channel number on all
multi-channel devices. I can only test my two-port Peak PCI card, but it works
as expected: ATTRS{dev_id} now expresses the port number and my udev rules now
unambiguously pick out and rename my individual CAN ports.
Signed-off-by: Christopher R. Baker <cbaker@rec.ri.cmu.edu>
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net> [PEAK PCAN-USB pro and EMS PCMCIA]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
CAN interfaces only support MTU values of 16 (CAN 2.0) and 72 (CAN FD).
Setting the MTU to other values is pointless but it does not really hurt.
With the introduction of the CAN FD support in drivers/net/can a new
function to switch the MTU for CAN FD has been introduced.
This patch makes use of this can_change_mtu() function to check for correct
MTU settings also in legacy CAN (2.0) devices.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Enable protocol offloading (arp and NS) on D0i3.
The offloading allows the fw answer NS and arp requests
without waking up the host.
Since protocol offloading is saved between D0i3
entries, we have to explicitly disable it in
case we don't want it.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
In order to restore the qos seq number on d0i3 exit,
we need to read it from the wowlan status.
However, in order to make sure we use correct seq num
for tx frames, we need to defer any outgoing frames,
and re-enqueue them only after the seq num is configured
correctly.
Sync new Tx aggregations with D0i3 so that the correct
seq num is used for them. Wait synchronously for D0i3
exit before starting a new Tx agg.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Configure the QoS counters when entering D0i3.
The fw might use them later when performing protocol
offloading (we'll update the the counters back on
d0i3 exit in a following patch).
Non-QoS counter is handled internally in the fw, so
no need to configure it.
Also, add support for a new version of WOWLAN_CONFIG_CMD
Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Enable beacon filter only if at least one beacon from candidate
AP is received before or after association. Check this condition before
enabling BF upon secured association completion. Add BF enablement to
mac80211 event that indicates beacon is received after association.
Too early beacon filtering enablement can lead to disconnection due to
missing AP's beacon after association.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Blink led mode is not supported by iwlmvm. This doesn't mean
that we should prevent any operation if it is selected by
the user.
Instead of failing without any notice to the user, fallback
to the default mode (RF mode) if the blink mode
is selected and print an error to inform the user.
Reported-by: Steven Haigh <netwiz@crc.id.au>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
instead of duplicating the same loop multiple times,
use a new function for it.
this will be later used also for clearing other
windows in the table.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Make _rs_collect_tx_data get window as param, in order
to be able to set various windows.
This will be used later for saving tpc statistics
as well.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Currently RTS protection was done whenever trasnmitting an AMPDU.
This limits throughput in cases where there's no need for protection.
Disable this too inclusive protection for now.
Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
We should explore all possible columns when searching to be
as resilient as possible to changing conditions. This fixes
for example a scenario where even after a sudden creation of
rssi difference between the 2 antennas we would keep doing MIMO
at a low rate instead of switching to SISO at a higher rate using
the better antenna which was the optimal configuration.
Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Scheduled scan was disabled because it was broken. Now it is
fixed and got disabled by mistake by a merge.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Processing any incoming packets with a with a napi budget of 0
is incorrect driver behavior.
This matters as netpoll will shortly call drivers with a budget of 0
to avoid receive packet processing happening in hard irq context.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>