diff options
author | Dave Jones <davej@redhat.com> | 2013-09-04 19:45:39 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-17 10:39:27 -0400 |
commit | f0cffa497e3c9d5205ece8ec40b4b0175ce35e6c (patch) | |
tree | 148b9d6f15fb5d5cd27a45ef05862cfc2c553552 | |
parent | 272b98c6455f00884f0350f775c5342358ebb73f (diff) |
staging/rtl8188eu: pass channel list by reference instead of copying struct.
Signed-off-by: Dave Jones <davej@fedoraproject.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index 8b2ba26ba38d..4b2eb8e9b562 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | |||
@@ -1827,13 +1827,13 @@ unsigned int OnAction_back(struct adapter *padapter, union recv_frame *precv_fra | |||
1827 | 1827 | ||
1828 | #ifdef CONFIG_88EU_P2P | 1828 | #ifdef CONFIG_88EU_P2P |
1829 | 1829 | ||
1830 | static int get_reg_classes_full_count(struct p2p_channels channel_list) | 1830 | static int get_reg_classes_full_count(struct p2p_channels *channel_list) |
1831 | { | 1831 | { |
1832 | int cnt = 0; | 1832 | int cnt = 0; |
1833 | int i; | 1833 | int i; |
1834 | 1834 | ||
1835 | for (i = 0; i < channel_list.reg_classes; i++) { | 1835 | for (i = 0; i < channel_list->reg_classes; i++) { |
1836 | cnt += channel_list.reg_class[i].channels; | 1836 | cnt += channel_list->reg_class[i].channels; |
1837 | } | 1837 | } |
1838 | 1838 | ||
1839 | return cnt; | 1839 | return cnt; |
@@ -2065,7 +2065,7 @@ void issue_p2p_GO_request(struct adapter *padapter, u8 *raddr) | |||
2065 | /* + number of channels in all classes */ | 2065 | /* + number of channels in all classes */ |
2066 | len_channellist_attr = 3 | 2066 | len_channellist_attr = 3 |
2067 | + (1 + 1) * (u16)(pmlmeext->channel_list.reg_classes) | 2067 | + (1 + 1) * (u16)(pmlmeext->channel_list.reg_classes) |
2068 | + get_reg_classes_full_count(pmlmeext->channel_list); | 2068 | + get_reg_classes_full_count(&pmlmeext->channel_list); |
2069 | 2069 | ||
2070 | *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr); | 2070 | *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr); |
2071 | p2pielen += 2; | 2071 | p2pielen += 2; |
@@ -2437,7 +2437,7 @@ static void issue_p2p_GO_response(struct adapter *padapter, u8 *raddr, u8 *frame | |||
2437 | /* + number of channels in all classes */ | 2437 | /* + number of channels in all classes */ |
2438 | len_channellist_attr = 3 | 2438 | len_channellist_attr = 3 |
2439 | + (1 + 1) * (u16)pmlmeext->channel_list.reg_classes | 2439 | + (1 + 1) * (u16)pmlmeext->channel_list.reg_classes |
2440 | + get_reg_classes_full_count(pmlmeext->channel_list); | 2440 | + get_reg_classes_full_count(&pmlmeext->channel_list); |
2441 | 2441 | ||
2442 | *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr); | 2442 | *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr); |
2443 | 2443 | ||
@@ -2859,7 +2859,7 @@ void issue_p2p_invitation_request(struct adapter *padapter, u8 *raddr) | |||
2859 | /* + number of channels in all classes */ | 2859 | /* + number of channels in all classes */ |
2860 | len_channellist_attr = 3 | 2860 | len_channellist_attr = 3 |
2861 | + (1 + 1) * (u16)pmlmeext->channel_list.reg_classes | 2861 | + (1 + 1) * (u16)pmlmeext->channel_list.reg_classes |
2862 | + get_reg_classes_full_count(pmlmeext->channel_list); | 2862 | + get_reg_classes_full_count(&pmlmeext->channel_list); |
2863 | 2863 | ||
2864 | *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr); | 2864 | *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr); |
2865 | 2865 | ||
@@ -3120,7 +3120,7 @@ void issue_p2p_invitation_response(struct adapter *padapter, u8 *raddr, u8 dialo | |||
3120 | /* + number of channels in all classes */ | 3120 | /* + number of channels in all classes */ |
3121 | len_channellist_attr = 3 | 3121 | len_channellist_attr = 3 |
3122 | + (1 + 1) * (u16)pmlmeext->channel_list.reg_classes | 3122 | + (1 + 1) * (u16)pmlmeext->channel_list.reg_classes |
3123 | + get_reg_classes_full_count(pmlmeext->channel_list); | 3123 | + get_reg_classes_full_count(&pmlmeext->channel_list); |
3124 | 3124 | ||
3125 | *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr); | 3125 | *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr); |
3126 | p2pielen += 2; | 3126 | p2pielen += 2; |