diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index b5649b16cd43bade6337885b3433bfa06b05004c..74e934c7e6f887f0fc5e792395ee8ddc98fe6746 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -853,9 +853,9 @@ struct efx_nic_type {
 
 /* Iterate over all RX queues belonging to a channel */
 #define efx_for_each_channel_rx_queue(_rx_queue, _channel)		\
-	for (_rx_queue = &_channel->efx->rx_queue[0];			\
-	     _rx_queue < &_channel->efx->rx_queue[EFX_MAX_RX_QUEUES];	\
-	     _rx_queue++)						\
+	for (_rx_queue = &_channel->efx->rx_queue[_channel->channel];	\
+	     _rx_queue;							\
+	     _rx_queue = NULL)						\
 		if (_rx_queue->channel != _channel)			\
 			continue;					\
 		else