Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp362525lqh; Sat, 4 May 2024 04:38:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW8jxI8181qG10fECTDpf+UqTFxm9/I4xKMcUI6CDrDlqzZC43OAcRvGVAgD54atLs13bR0WXT7jj5YxC473RJ0lGovJpEVC3fQwCsSuQ== X-Google-Smtp-Source: AGHT+IFf/WVhp/s1zojxa8zGdEjSKoKSXsLJeTnsezJn/Euxj1PmOvaJi7jB4EMT5Dn3YXQ9idoM X-Received: by 2002:a05:6a21:81af:b0:1ae:426a:b53b with SMTP id pd47-20020a056a2181af00b001ae426ab53bmr6284724pzb.1.1714822710989; Sat, 04 May 2024 04:38:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714822710; cv=pass; d=google.com; s=arc-20160816; b=bKmGZuVteooM6c6TuqoEnGqE0hAXr+e0CKmEeHyrXiVZT6HZVQWuCytv0Fi+wKEvA/ r9+0mV6wHSu1YnOuM10XwxXU+GO4Gl1jkkGAewuDLlXB5BC20qRX9UQBAEPLEFxmPKUR tdwAtddM8oR41yqqQYdAl8KPFmPqPOf3TdZd56mi0j3nceUeriLvRX0cUWIXkvD36FMz nFaLMDwRK1IjPiHLSTioKraXru7pt5P9UMiBP2BFo6dtvueB4NLB3AfKDYnuh8hQBoBL HRyLvQtjHWtEtQEJmS9OkKPoLStdsOJcGsr67vXlSsWuTiVnJQ8/TMov+9YlL8N7fGUl 1Yig== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=ivduYjnKooIvCzo+9PZ0p3l6JwzFtME3Zf755c6CflY=; fh=gOk7shFKQcRojRlY2Sw2KCW4lRp7v1ZfEeyKHbAtxkA=; b=rSaWToKZrcZsJQgMXfp6vbwHXAh/2dq61u9QwuvwW1SyBFVuHMTeT80Z4MlCxdJRWd ZQdcVj3Lv2iw2S5t2kXUbJj7XB7NWLSF46Czhh2yM/OFVPxOF2ya9N5J2WExoChH/R+4 Esm0A6gx6HFCbB7nX+mWAG13tPRleaqR1Kvfx4JVIYlDliXBRDtjLazvznPTMOUD5NVf G0GK8wR4mZjH0RvKWyeF3AGZbKc8Fe6oy/qPSddFP83samDb25XgBkQXMUHbI0830bg1 uWATk+2V4rJEgiazlDUmAOkYOa0zkhHem/23xwpD88R2o5AKeXQh/RoTrVgbPbo5OBaQ Xtcg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VpFSXYHN; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-wireless+bounces-7162-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7162-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id t4-20020a17090ad50400b002a25f744524si4088144pju.185.2024.05.04.04.38.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 May 2024 04:38:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7162-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VpFSXYHN; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-wireless+bounces-7162-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7162-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 5CEF2B20D30 for ; Sat, 4 May 2024 11:38:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3052B613D; Sat, 4 May 2024 11:38:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VpFSXYHN" X-Original-To: linux-wireless@vger.kernel.org Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88A841C6BD for ; Sat, 4 May 2024 11:38:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714822703; cv=none; b=Z3QuBiO1J0CEYViRD5RbUCZrCehDDl+zwGGgu/bSA23/Sue8OewJnyfUpZZcrZYleNl5dAJQxzGkC0sazrHZeyPiMUJtvGOBQCDDpOaCU3gJJUD9kIq9508kJ7fBYwD53ucEdchK2vaii0MDhIV9YgWmr/qELMqA6c3JKCvIgo4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714822703; c=relaxed/simple; bh=kQRzXgnB7nFNXcwztKf99J2NPeU2NxZM1fbn2TWKujU=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=B9lY4dDH+zxhsmXShRbEh2E5GDjglKchpttEnuAdHQaVFCNujaNoFFZah7uB11YeZKuw48KLRNMkRKemTCUzhb9faVRl/qUhBAMCojUiOcb5IS3gXaGI0xFZhX02D2J6i5m6hhqUilCX69XZQIjUPUMX6wZpvTn11YBzcCkVNx0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=VpFSXYHN; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-41b782405d5so5007055e9.2 for ; Sat, 04 May 2024 04:38:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714822700; x=1715427500; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=ivduYjnKooIvCzo+9PZ0p3l6JwzFtME3Zf755c6CflY=; b=VpFSXYHN3A60TgHQfmXEfKVfl4bbK5kYUndShF+1+1CGI1ahElfCnGCVRF/nlpUpJJ wGGQurTHHjyNzbadprmzALIkBCXiftvG2kQzUUiYnNvfD56LjD7FXIiYHisDge8FD0g2 +Kw3pEzOavdaOnN1Q5/6o77lnokVc8sy8sq8IkHr5VxOI/7bnhpOZVVF5DWqEDFhxt4G DLE/Hv27hcJy0BqD1eR5m0BRFLWEC/kNqFBeVfRaan2ouwxAZEjvZCP/9UR8g9e99sz1 Mq/W4Gm0FV/Bsp4PSen5R7fop+O+hDmOv48cjhI34AdRAHWazftz6/Cemkm1ozLSPsCQ UKCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714822700; x=1715427500; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ivduYjnKooIvCzo+9PZ0p3l6JwzFtME3Zf755c6CflY=; b=Vxyqz6f8ksJ2htDf9Pe3DePiC1I1M9BMf+WfQWCMqbA7KGppeghyb/gmG7l+fKy7FL 0g7QbKviDj7zH09ScgZRav/zKaL2Zra0qRXmwSyPZ3XP+XEUo5pwpU7Rj2FVPomr4PRL o8jHOCUocdk3xJhoDZv7e/Ojs3wagutKIh/F3IzyDlB6dCjngA7ho2U6MvF9ZKKpnQYk ft7CJ0ILxE/SthEFGc0sH5mWEx+/qH0oI/IUfvotqZ8oqlGOTZDqS4ugZNU2AmevLB2+ v6D34blgGxwkEv79/1fXhXrDsAj15nnmL3es8HgRbAEXoaU1SwkwJoj5e4miv3BvmWK6 6BQg== X-Forwarded-Encrypted: i=1; AJvYcCXvsNaCgD6pFm5gkZ7tplWYA5k50fY5BjY+uwS1Fff3VxOU5RJnWOYZMAWrK8Bs+/pTCj7TzzQ5Jc6hVHEp2fo1i8i0LZBI0v4RudbWtAU= X-Gm-Message-State: AOJu0YxSQC18CVYSwjtDdFqVOzsES4KFOnvrVLtrddRcYlGyvphChAI8 Dc7WuMDZJn2Jj+Llm3a/Qwo1PICkPCqmsE3AfgC2W3qRVb4CDBWrDJG4LKnw/Bk= X-Received: by 2002:a05:600c:46ce:b0:41c:2313:da8d with SMTP id q14-20020a05600c46ce00b0041c2313da8dmr5347169wmo.0.1714822699606; Sat, 04 May 2024 04:38:19 -0700 (PDT) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id t9-20020a05600c450900b0041bd920d41csm8938326wmo.1.2024.05.04.04.38.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 May 2024 04:38:19 -0700 (PDT) Date: Sat, 4 May 2024 14:38:15 +0300 From: Dan Carpenter To: Jiri Pirko Cc: Kalle Valo , Johannes Berg , "Gustavo A. R. Silva" , "David S. Miller" , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] wifi: mwl8k: initialize cmd->addr[] properly Message-ID: Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailer: git-send-email haha only kidding This loop is supposed to copy the mac address to cmd->addr but the i++ increment is missing so it copies everything to cmd->addr[0] and only the last address is recorded. Fixes: 22bedad3ce11 ("net: convert multicast list to list_head") Signed-off-by: Dan Carpenter --- From static analysis. Untested. drivers/net/wireless/marvell/mwl8k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell/mwl8k.c b/drivers/net/wireless/marvell/mwl8k.c index 9e534e0a324a..d3d07bb26335 100644 --- a/drivers/net/wireless/marvell/mwl8k.c +++ b/drivers/net/wireless/marvell/mwl8k.c @@ -2720,7 +2720,7 @@ __mwl8k_cmd_mac_multicast_adr(struct ieee80211_hw *hw, int allmulti, cmd->action |= cpu_to_le16(MWL8K_ENABLE_RX_MULTICAST); cmd->numaddr = cpu_to_le16(mc_count); netdev_hw_addr_list_for_each(ha, mc_list) { - memcpy(cmd->addr[i], ha->addr, ETH_ALEN); + memcpy(cmd->addr[i++], ha->addr, ETH_ALEN); } } -- 2.43.0