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
@@ -758,13 +758,13 @@ void rtl8723be_tx_polling(struct ieee80211_hw *hw, u8 hw_queue)
|
||||
}
|
||||
|
||||
u32 rtl8723be_rx_command_packet(struct ieee80211_hw *hw,
|
||||
struct rtl_stats status,
|
||||
const struct rtl_stats *status,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
u32 result = 0;
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
|
||||
switch (status.packet_report_type) {
|
||||
switch (status->packet_report_type) {
|
||||
case NORMAL_RX:
|
||||
result = 0;
|
||||
break;
|
||||
|
@@ -620,6 +620,6 @@ void rtl8723be_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
|
||||
bool firstseg, bool lastseg,
|
||||
struct sk_buff *skb);
|
||||
u32 rtl8723be_rx_command_packet(struct ieee80211_hw *hw,
|
||||
struct rtl_stats status,
|
||||
const struct rtl_stats *status,
|
||||
struct sk_buff *skb);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user