From patchwork Fri Jan 27 12:27:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 9541751 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3342660415 for ; Fri, 27 Jan 2017 12:31:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 263A927F99 for ; Fri, 27 Jan 2017 12:31:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1ABDC28179; Fri, 27 Jan 2017 12:31:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7418027F99 for ; Fri, 27 Jan 2017 12:31:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932801AbdA0M3O (ORCPT ); Fri, 27 Jan 2017 07:29:14 -0500 Received: from lpdvrndsmtp01.broadcom.com ([192.19.229.170]:37854 "EHLO rnd-relay.smtp.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932522AbdA0M1z (ORCPT ); Fri, 27 Jan 2017 07:27:55 -0500 Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.224.233]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id E7D4430C16E; Fri, 27 Jan 2017 04:27:53 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com E7D4430C16E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1485520073; bh=rpTWl/Be0jjdQeiprYubqCMTDX6f0r6Y1oOVtVGBP9U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E23O7LOix8NztfA5DWKew6LTzvevjzSVQfPvfYked3MBYciLJYcmc4OakoX7JkpIH efnpRgjKtWHonZpx9lexgVp9gEI+cl8zY4iB7/bc0fvXSEA0zOsOMmZs8lXLSbyqtQ 8/C5Haja2u8j0RBFlpQNc18LcXcHhrDV+owV96Vw= Received: from jenkins-cam-14.cam.broadcom.com (jenkins-cam-14.cam.broadcom.com [10.177.128.77]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id A2E2787645; Fri, 27 Jan 2017 04:27:53 -0800 (PST) Received: by jenkins-cam-14.cam.broadcom.com (Postfix, from userid 25152) id 11832B851C8; Fri, 27 Jan 2017 12:27:53 +0000 (GMT) From: Arend van Spriel To: Kalle Valo Cc: linux-wireless , Arend van Spriel Subject: [PATCH V2 3/5] brcmfmac: fix handling firmware results for wowl netdetect Date: Fri, 27 Jan 2017 12:27:46 +0000 Message-Id: <1485520068-5807-4-git-send-email-arend.vanspriel@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1485520068-5807-1-git-send-email-arend.vanspriel@broadcom.com> References: <1485520068-5807-1-git-send-email-arend.vanspriel@broadcom.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For wowl netdetect the event data changed for newer chips. This was recently fixed for scheduled scan, but same change is needed for wowl netdetect. Removing now pointles += operation from both result handlers. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 302a78d..c81d78f 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -3330,7 +3330,6 @@ static int brcmf_start_internal_escan(struct brcmf_if *ifp, goto out_err; } - data += sizeof(struct brcmf_pno_scanresults_le); netinfo_start = brcmf_get_netinfo_array(pfn_result); for (i = 0; i < result_count; i++) { @@ -3478,8 +3477,7 @@ static s32 brcmf_config_wowl_pattern(struct brcmf_if *ifp, u8 cmd[4], return -EINVAL; } - data += sizeof(struct brcmf_pno_scanresults_le); - netinfo = (struct brcmf_pno_net_info_le *)data; + netinfo = brcmf_get_netinfo_array(pfn_result); memcpy(cfg->wowl.nd->ssid.ssid, netinfo->SSID, netinfo->SSID_len); cfg->wowl.nd->ssid.ssid_len = netinfo->SSID_len; cfg->wowl.nd->n_channels = 1;