From: Markus Stockhausen Date: Fri, 30 Jan 2026 12:49:39 +0000 (+0100) Subject: realtek: eth: drop pick queue functions X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b2f8975f7ceb244accb87642ce6e52aa059ffa9;p=thirdparty%2Fopenwrt.git realtek: eth: drop pick queue functions The operating system has enough features to control the transmit queues. There is no need to provide a hard coded distribution function. Especially differentiating between a round robin for RTL83xx and high/low priority for RTL93xx makes no sense. All devices have the same low/high priority queues. Simply present two "generic" queues to the kernel. Signed-off-by: Markus Stockhausen Link: https://github.com/openwrt/openwrt/pull/21778 Signed-off-by: Robert Marko --- diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c index 3f5621179a5..f47a8c538ae 100644 --- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c +++ b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c @@ -1063,29 +1063,6 @@ txdone: return ret; } -/* Return queue number for TX. On the RTL83XX, these queues have equal priority - * so we do round-robin - */ -static u16 rteth_83xx_pick_tx_queue(struct net_device *dev, struct sk_buff *skb, - struct net_device *sb_dev) -{ - static u8 last; - - last++; - return last % TXRINGS; -} - -/* Return queue number for TX. On the RTL93XX, queue 1 is the high priority queue - */ -static u16 rteth_93xx_pick_tx_queue(struct net_device *dev, struct sk_buff *skb, - struct net_device *sb_dev) -{ - if (skb->priority >= TC_PRIO_CONTROL) - return 1; - - return 0; -} - static int rtl838x_hw_receive(struct net_device *dev, int r, int budget) { struct rteth_ctrl *ctrl = netdev_priv(dev); @@ -1493,7 +1470,6 @@ static const struct net_device_ops rteth_838x_netdev_ops = { .ndo_open = rteth_open, .ndo_stop = rteth_stop, .ndo_start_xmit = rteth_start_xmit, - .ndo_select_queue = rteth_83xx_pick_tx_queue, .ndo_set_mac_address = rteth_set_mac_address, .ndo_validate_addr = eth_validate_addr, .ndo_set_rx_mode = rteth_838x_set_rx_mode, @@ -1537,7 +1513,6 @@ static const struct net_device_ops rteth_839x_netdev_ops = { .ndo_open = rteth_open, .ndo_stop = rteth_stop, .ndo_start_xmit = rteth_start_xmit, - .ndo_select_queue = rteth_83xx_pick_tx_queue, .ndo_set_mac_address = rteth_set_mac_address, .ndo_validate_addr = eth_validate_addr, .ndo_set_rx_mode = rteth_839x_set_rx_mode, @@ -1581,7 +1556,6 @@ static const struct net_device_ops rteth_930x_netdev_ops = { .ndo_open = rteth_open, .ndo_stop = rteth_stop, .ndo_start_xmit = rteth_start_xmit, - .ndo_select_queue = rteth_93xx_pick_tx_queue, .ndo_set_mac_address = rteth_set_mac_address, .ndo_validate_addr = eth_validate_addr, .ndo_set_rx_mode = rteth_930x_set_rx_mode, @@ -1631,7 +1605,6 @@ static const struct net_device_ops rteth_931x_netdev_ops = { .ndo_open = rteth_open, .ndo_stop = rteth_stop, .ndo_start_xmit = rteth_start_xmit, - .ndo_select_queue = rteth_93xx_pick_tx_queue, .ndo_set_mac_address = rteth_set_mac_address, .ndo_validate_addr = eth_validate_addr, .ndo_set_rx_mode = rtl931x_eth_set_multicast_list,