From patchwork Fri Jan 27 12:09:29 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: 9541733 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 6F39C60429 for ; Fri, 27 Jan 2017 12:22:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 590AF27F85 for ; Fri, 27 Jan 2017 12:22:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B0AC27FC0; Fri, 27 Jan 2017 12:22:22 +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 A834E27F85 for ; Fri, 27 Jan 2017 12:22:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932752AbdA0MUp (ORCPT ); Fri, 27 Jan 2017 07:20:45 -0500 Received: from lpdvrndsmtp01.broadcom.com ([192.19.229.170]:37008 "EHLO rnd-relay.smtp.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932664AbdA0MUe (ORCPT ); Fri, 27 Jan 2017 07:20:34 -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 B2EF430C14D; Fri, 27 Jan 2017 04:09:43 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com B2EF430C14D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1485518983; bh=rpTWl/Be0jjdQeiprYubqCMTDX6f0r6Y1oOVtVGBP9U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i8MEDFm2LNuGW4IWUvYcAuUwDlIqxZx/EJae6+YOaMBTs8nHJ0bEGvw23UY1M852S 9vy6BYS8cfYyinywH5zV9X3ftehhX/QNlPCR7C64EXG0iPvGCCrlshpvhqML7NM5fa D9g4q/Yoz07hdOWBhkgM1m27azcCNWJEcD+Weiwk= 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 6CBF587C72; Fri, 27 Jan 2017 04:09:43 -0800 (PST) Received: by jenkins-cam-14.cam.broadcom.com (Postfix, from userid 25152) id D01D4B851C7; Fri, 27 Jan 2017 12:09:42 +0000 (GMT) From: Arend van Spriel To: Kalle Valo Cc: linux-wireless , Arend van Spriel Subject: [PATCH 3/5] brcmfmac: fix handling firmware results for wowl netdetect Date: Fri, 27 Jan 2017 12:09:29 +0000 Message-Id: <1485518971-28183-4-git-send-email-arend.vanspriel@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1485518971-28183-1-git-send-email-arend.vanspriel@broadcom.com> References: <1485518971-28183-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;