staging: rtl8821ae: Pass large struct by const reference

struct rtl_stats is rather huge (152 bytes), and since
rtl8812ae_rx_command_packet_handler() does not modify it, it might as
well be passed by const reference.

Reported by Coverity: CID 1167285

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Rasmus Villemoes 2014-07-01 12:25:44 +02:00 committed by Greg Kroah-Hartman
parent a71d10df0d
commit 57fc3b7c4d
3 changed files with 4 additions and 4 deletions

View File

@ -861,7 +861,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
break; break;
} }
rtlpriv->cfg->ops->rx_command_packet_handler(hw, status, skb); rtlpriv->cfg->ops->rx_command_packet_handler(hw, &status, skb);
/* /*
*NOTICE This can not be use for mac80211, *NOTICE This can not be use for mac80211,

View File

@ -227,14 +227,14 @@ void rtl8821ae_deinit_sw_vars(struct ieee80211_hw *hw)
static u32 rtl8812ae_rx_command_packet_handler( static u32 rtl8812ae_rx_command_packet_handler(
struct ieee80211_hw *hw, struct ieee80211_hw *hw,
struct rtl_stats status, const struct rtl_stats *status,
struct sk_buff *skb struct sk_buff *skb
) )
{ {
u32 result = 0; u32 result = 0;
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
switch (status.packet_report_type) { switch (status->packet_report_type) {
case NORMAL_RX: case NORMAL_RX:
result = 0; result = 0;
break; break;

View File

@ -1853,7 +1853,7 @@ struct rtl_hal_ops {
u32 cmd_len, u8 *p_cmdbuffer); u32 cmd_len, u8 *p_cmdbuffer);
bool (*get_btc_status)(void); bool (*get_btc_status)(void);
u32 (*rx_command_packet_handler)(struct ieee80211_hw *hw, u32 (*rx_command_packet_handler)(struct ieee80211_hw *hw,
struct rtl_stats status, const struct rtl_stats *status,
struct sk_buff *skb); struct sk_buff *skb);
}; };