Performance may decrease compared to explicitly selected bus mode.
endchoice
-config WIZNET_TX_FLOW
- bool "Use transmit flow control"
- depends on WIZNET_W5100 || WIZNET_W5300
- default y
- help
- This enables transmit flow control for WIZnet chips.
- If unsure, say Y.
-
endif # NET_VENDOR_WIZNET
struct w5100_priv *priv = netdev_priv(ndev);
u16 offset;
- if (IS_ENABLED(CONFIG_WIZNET_TX_FLOW))
- netif_stop_queue(ndev);
+ netif_stop_queue(ndev);
offset = w5100_read16(priv, W5100_S0_TX_WR);
w5100_writebuf(priv, offset, skb->data, skb->len);
w5100_write(priv, W5100_S0_IR, ir);
mmiowb();
- if (IS_ENABLED(CONFIG_WIZNET_TX_FLOW) && (ir & S0_IR_SENDOK)) {
+ if (ir & S0_IR_SENDOK) {
netif_dbg(priv, tx_done, ndev, "tx done\n");
netif_wake_queue(ndev);
}
S0_MR_MACRAW : S0_MR_MACRAW_MF);
mmiowb();
w5300_command(priv, S0_CR_OPEN);
- w5300_write(priv, W5300_S0_IMR, IS_ENABLED(CONFIG_WIZNET_TX_FLOW) ?
- S0_IR_RECV | S0_IR_SENDOK :
- S0_IR_RECV);
+ w5300_write(priv, W5300_S0_IMR, S0_IR_RECV | S0_IR_SENDOK);
w5300_write(priv, W5300_IMR, IR_S0);
mmiowb();
}
{
struct w5300_priv *priv = netdev_priv(ndev);
- if (IS_ENABLED(CONFIG_WIZNET_TX_FLOW))
- netif_stop_queue(ndev);
+ netif_stop_queue(ndev);
w5300_write_frame(priv, skb->data, skb->len);
mmiowb();
w5300_write(priv, W5300_S0_IR, ir);
mmiowb();
- if (IS_ENABLED(CONFIG_WIZNET_TX_FLOW) && (ir & S0_IR_SENDOK)) {
+ if (ir & S0_IR_SENDOK) {
netif_dbg(priv, tx_done, ndev, "tx done\n");
netif_wake_queue(ndev);
}