rtlwifi: pass struct rtl_stats by reference as it is more efficient
passing rtl_stats by value is inefficient; the structure is over 300 bytes in size and generally just one field (packet_report_type) is being accessed, so the pass by value is a relatively large overhead. This change just affects just the rx_command_packet calls. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:

committed by
Kalle Valo

parent
064b32f822
commit
ce2542435a
@@ -855,7 +855,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
|
||||
}
|
||||
/* handle command packet here */
|
||||
if (rtlpriv->cfg->ops->rx_command_packet &&
|
||||
rtlpriv->cfg->ops->rx_command_packet(hw, stats, skb)) {
|
||||
rtlpriv->cfg->ops->rx_command_packet(hw, &stats, skb)) {
|
||||
dev_kfree_skb_any(skb);
|
||||
goto new_trx_end;
|
||||
}
|
||||
|
Reference in New Issue
Block a user