Skip to content

Commit

Permalink
qca_spi: Introduce QCASPI_RX_MAX_FRAMES
Browse files Browse the repository at this point in the history
Currently qca_spi reserves enough space for 4 complete Ethernet over SPI
frames in the receive buffer. Unfortunately this is hidden under a magic
number. So replace it with a more self explaining define.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Stefan Wahren authored and David S. Miller committed Jan 31, 2024
1 parent c7f6250 commit fa53439
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/qualcomm/qca_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ qcaspi_netdev_init(struct net_device *dev)
qca->burst_len = qcaspi_burst_len;
qca->spi_thread = NULL;
qca->buffer_size = (dev->mtu + VLAN_ETH_HLEN + QCAFRM_HEADER_LEN +
QCAFRM_FOOTER_LEN + 4) * 4;
QCAFRM_FOOTER_LEN + 4) * QCASPI_RX_MAX_FRAMES;

memset(&qca->stats, 0, sizeof(struct qcaspi_stats));

Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/qualcomm/qca_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

#define QCASPI_TX_RING_MAX_LEN 10
#define QCASPI_TX_RING_MIN_LEN 2
#define QCASPI_RX_MAX_FRAMES 4

/* sync related constants */
#define QCASPI_SYNC_UNKNOWN 0
Expand Down

0 comments on commit fa53439

Please sign in to comment.