summaryrefslogtreecommitdiffstats
path: root/drivers/staging/r8188eu/core/rtw_cmd.c
diff options
context:
space:
mode:
authorSolomon Tan <wjsota@gmail.com>2022-04-25 13:28:03 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-26 11:28:35 +0200
commit8896ac5d0d3d9c5d9e67a22b0a9d36b6117fb2f0 (patch)
tree3b70ae207e18cf65c4d520237064b7eb29966b34 /drivers/staging/r8188eu/core/rtw_cmd.c
parent1efba7ef1d7da5944493728c5375fef5b2130de4 (diff)
downloadlinux-stable-8896ac5d0d3d9c5d9e67a22b0a9d36b6117fb2f0.tar.gz
linux-stable-8896ac5d0d3d9c5d9e67a22b0a9d36b6117fb2f0.tar.bz2
linux-stable-8896ac5d0d3d9c5d9e67a22b0a9d36b6117fb2f0.zip
Revert "staging: r8188eu: use in-kernel ieee channel"
This reverts commit 0afaa121813ed602bd203759c339cb639493f8c2 as changing rtw_ieee80211_channel to ieee80211_channel causes a memcpy bug as reported in: https://lore.kernel.org/linux-staging/67e2d10b-7f0f-9c5a-ce31-376b83ffba9e@gmail.com/ due to their size differences. Fixes: 0afaa121813e ("staging: r8188eu: use in-kernel ieee channel") Reported-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Solomon Tan <wjsota@gmail.com> Link: https://lore.kernel.org/r/20220425052802.2419-1-wjsota@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/r8188eu/core/rtw_cmd.c')
-rw-r--r--drivers/staging/r8188eu/core/rtw_cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index ebe2479d1402..f036a980ec1a 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -320,7 +320,7 @@ post_process:
* MUST TAKE CARE THAT BEFORE CALLING THIS FUNC, YOU SHOULD HAVE LOCKED pmlmepriv->lock
*/
u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid, int ssid_num,
- struct ieee80211_channel *ch, int ch_num)
+ struct rtw_ieee80211_channel *ch, int ch_num)
{
u8 res = _FAIL;
struct cmd_obj *ph2c;
@@ -366,8 +366,8 @@ u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid,
if (ch) {
int i;
for (i = 0; i < ch_num && i < RTW_CHANNEL_SCAN_AMOUNT; i++) {
- if (ch[i].hw_value && !(ch[i].flags & IEEE80211_CHAN_DISABLED)) {
- memcpy(&psurveyPara->ch[i], &ch[i], sizeof(struct ieee80211_channel));
+ if (ch[i].hw_value && !(ch[i].flags & RTW_IEEE80211_CHAN_DISABLED)) {
+ memcpy(&psurveyPara->ch[i], &ch[i], sizeof(struct rtw_ieee80211_channel));
psurveyPara->ch_num++;
}
}