Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4190799rdb; Mon, 11 Dec 2023 11:22:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IGxLKCdHdJ3lvYBaWIGbZuie3BRrYjU356qGZByWJh8U6f2wp7V14j+1mFbpeR2kFudteRP X-Received: by 2002:a05:6358:419d:b0:170:936d:8afe with SMTP id w29-20020a056358419d00b00170936d8afemr6783310rwc.49.1702322554973; Mon, 11 Dec 2023 11:22:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702322554; cv=none; d=google.com; s=arc-20160816; b=Km5KnIztC1gTj6/3KxmlLUoLAxyJ/Cd2Pb/2H/Q+spxJ57YrJuY1oLur+39ruP89XM LLwxdBTfB5IaNDA7NGvEfXS1wZXCSMqWNcnYa7BZ2IYg9QpHWNE5lgq5tgBetQOs7m+x czFprwjDVRAhpAZwPMBzqq2XzqMUC+PyBFv/Q6IvvIWT4Rx7OTrX64oMlP+Yf5So2q3p xGB8OxAW2BLeSmfyC3KWqhp7DFRbmAY6a8rSiGY4YPX5EKilYyui2hzUceyLTOGkjnMB oCJDhkD4p1iMaaziVOGhlMNJroQJxdzKQI/Elyt0Gp152yjma1y5kXwAHDW/i6lc6XUY 6xHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=15LJJIC+ZvEXcFWs9wkEalc+mlbTT7lJo9MkOjhcNVM=; fh=hCqV/aktaQEw/qxCdLsRjwod4c6jF5YNpItcJl9utu0=; b=jw3JVyCtVXcXVCNaCZ57lIN9EiLeaSklBVoBywvJSETf2sAkdarKIHBox8CEcmMDDG pCcFp5YtjsBG3pZuzMBPcMZq/C8347p/Nt4+wOeR1+8lPWwoENcnsWcSpvZonLftYLUZ gj4P9bXY972pZcvw41lCpDriPVYGtMgkuZFxlp+yYbf9jGbVoc1sXPEM2+4YsYb9GUq4 EPbEJSmpWPUbu20KZRZpuPljHxCq48wCPwW826bl5+s1cxACIHCYCJCwhZNJ2uU0NLUI 8HRwaEZ3R6zHSkVB0VI/dCT9GWkG4y199pYzQh/AyOU7q/zihW47oZgueXSJ8bTa30iU +DUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PYNJY063; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id o13-20020a634e4d000000b005bdd76219edsi6338325pgl.675.2023.12.11.11.22.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 11:22:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PYNJY063; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 6C9E6809D32A; Mon, 11 Dec 2023 11:22:32 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344445AbjLKTWM (ORCPT + 99 others); Mon, 11 Dec 2023 14:22:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229638AbjLKTWL (ORCPT ); Mon, 11 Dec 2023 14:22:11 -0500 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9582E9 for ; Mon, 11 Dec 2023 11:22:16 -0800 (PST) Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-54c68c8009eso1039293a12.1 for ; Mon, 11 Dec 2023 11:22:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702322535; x=1702927335; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=15LJJIC+ZvEXcFWs9wkEalc+mlbTT7lJo9MkOjhcNVM=; b=PYNJY063QqiACduHl2moz9DVilOrYml2yjnc0obZUVliTtN7+W2oGpOICbiEu/adTq Q9ScOS4f812vtvwuTIhy1dK15DnmUadsdmNcukD6Kfd8fihnaHL+1N75pNNdqyUgLuSk wiTOlh6kLxY1y3gAs2Vgio8SglMFCPvMBv7+Chq4/XGo8K2lDalg5ROzX3bCHYs367v9 XxyoG+HI4kTidM5yHozTytKBH0PpV/kRT0k8ffu1uRx3f/zyE5NymVgEQCrwpuKQGomi Px0o9EOMmwjF9HB5CKAs5ZArnSY9l435WAJZrm0cVLv+XgUtvjN5+3qfZ6ZtORzvNHYq 4vIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702322535; x=1702927335; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=15LJJIC+ZvEXcFWs9wkEalc+mlbTT7lJo9MkOjhcNVM=; b=NOUzfXzg5v76Aa8nR+87VBHBHUgt7BFGuptyje2X0sM/IzxB9Q6IZyUj5p+tZuMToa vOwhqGePyx3xZJaGtGNu6fGsbl4zvqeeNITx8Bb/HuOxItijGSJn/ReMYJ8WK2/qKBdS FxvFIlC47CwA97f01/joUwemKxrD0xcOqkMdgeaaUm6LTVXAXqVq2lt+RdqdOegMjyx4 3Tq5CIIqukkcqKdjqXq5JgehZhStHE1MAbj/+/BG5mI89DvtRTlzCDhoMvwgDIw4zx+O oE7eqZ4Nzf9kjINRQGx3sY07AkOtFGq/zH6wFU+zh2CSPYK0KozO1lkKPW7Rf4KMzGQh Y/OQ== X-Gm-Message-State: AOJu0YySPLlM1292qNFYAyfldlxtBmT6MfI+R88VRuk9DwQ6kHw/LqFc Dsr+vyX+UPcZJJRib4zg1rI= X-Received: by 2002:a17:907:8b8a:b0:a1d:5c34:2ce7 with SMTP id tb10-20020a1709078b8a00b00a1d5c342ce7mr5372808ejc.6.1702322535130; Mon, 11 Dec 2023 11:22:15 -0800 (PST) Received: from [192.168.0.104] (p54a07fa0.dip0.t-ipconnect.de. [84.160.127.160]) by smtp.gmail.com with ESMTPSA id vv8-20020a170907a68800b00a1d2b0d4500sm5210981ejc.168.2023.12.11.11.22.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Dec 2023 11:22:14 -0800 (PST) Message-ID: <20793387-da59-4192-bb86-b20aeb127a65@gmail.com> Date: Mon, 11 Dec 2023 20:22:12 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/4] Staging: rtl8192e: Remove variable bFirstSeg Content-Language: en-US To: Dan Carpenter , Tree Davies Cc: gregkh@linuxfoundation.org, anjan@momi.ca, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org References: <20231210193705.2131807-1-tdavies@darkphysics.net> <20231210193705.2131807-2-tdavies@darkphysics.net> <2cdb678d-b784-411e-8913-eb7666e08ccc@suswa.mountain> From: Philipp Hortmann In-Reply-To: <2cdb678d-b784-411e-8913-eb7666e08ccc@suswa.mountain> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 11 Dec 2023 11:22:32 -0800 (PST) On 12/11/23 09:37, Dan Carpenter wrote: > On Sun, Dec 10, 2023 at 11:37:02AM -0800, Tree Davies wrote: >> Remove variable bFirstSeg as it is defined but never used. >> >> Signed-off-by: Tree Davies >> --- >> drivers/staging/rtl8192e/rtllib.h | 1 - >> 1 file changed, 1 deletion(-) >> >> diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h >> index 0a8c44e497f5..c0a24826cd3b 100644 >> --- a/drivers/staging/rtl8192e/rtllib.h >> +++ b/drivers/staging/rtl8192e/rtllib.h >> @@ -103,7 +103,6 @@ struct cb_desc { >> /* Tx Desc Related flags (8-9) */ >> u8 bLastIniPkt:1; >> u8 bCmdOrInit:1; >> - u8 bFirstSeg:1; >> u8 bLastSeg:1; >> u8 bEncrypt:1; >> u8 tx_dis_rate_fallback:1; > > I don't think you can remove these. They're part of the protocol for > talking to the firmware. > > regards, > dan carpenter > Hi Dan, thanks for your response. struct cb_desc is used in conjunction with this line: struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + 8); from skbuff.h: /* * This is the control buffer. It is free to use for every * layer. Please put your private variables there. If you * want to keep them across layers you have to do a skb_clone() * first. This is owned by whoever has the skb queued ATM. */ char cb[48] __aligned(8); I think it has to do with the sku buffer and can be changed. Here a test: kernel@matrix-ESPRIMO-P710:~/Documents/git/kernels/staging$ git diff diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index cc9070f39004..f29efc605ba9 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -100,6 +100,7 @@ static inline void *netdev_priv_rsl(struct net_device *dev) /* defined for skb cb field */ /* At most 28 byte */ struct cb_desc { + u8 ph_temp[7]; /* Tx Desc Related flags (8-9) */ u8 bLastIniPkt:1; u8 bCmdOrInit:1; diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index ee527ba5d1a8..93292fc3faaf 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -189,6 +189,9 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct rtllib_device *ieee) struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + 8); spin_lock_irqsave(&ieee->lock, flags); + printk("Setting tcb_desc !!!\n"); + tcb_desc->ph_temp[0] = 0xAA; + tcb_desc->ph_temp[6] = 0xAA; /* called with 2nd param 0, no mgmt lock required */ rtllib_sta_wakeup(ieee, 0); Here the log: [ 9024.740612] rtl819xE 0000:03:00.0: Adapter(8192 PCI-E) is found - DeviceID=8192 [ 9025.773658] Setting tcb_desc !!! [ 9025.773783] Setting tcb_desc !!! [ 9025.797635] Setting tcb_desc !!! [ 9025.797701] Setting tcb_desc !!! [ 9025.849687] Setting tcb_desc !!! [ 9025.849743] Setting tcb_desc !!! [ 9025.977703] Setting tcb_desc !!! [ 9025.977740] Setting tcb_desc !!! [ 9026.105693] Setting tcb_desc !!! Performance as expected OK. Please reconsider your decision? Thanks Bye Philipp