Message ID | 03dd39114b1e5c029cd8022245403a079ff03ae7.1666288416.git.tanjubrunostar0@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp265977wrr; Thu, 20 Oct 2022 11:39:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7/dfKkORAZ8jLIgTtVk9hKd8FFNfT3aJNpScPU2yk9noOnaPf39y11j/oII4/7H8MikYx7 X-Received: by 2002:a62:4c2:0:b0:52e:bd4d:50e1 with SMTP id 185-20020a6204c2000000b0052ebd4d50e1mr15363353pfe.8.1666291165852; Thu, 20 Oct 2022 11:39:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666291165; cv=none; d=google.com; s=arc-20160816; b=bJEMxnT6BUFGM21x9GdhL+3uKUoFBnIXdQdMOpUb5q8Azn8eJ7UU2MjydZ9OPNJzR7 AvkXelip/Ge+JCvpOrnPzhN0xh9JMEFYjEyi9wOjA9FmtiHa23sxAml8OLkHV/aJMrKh ymw5teQO3fxXJ1TyQdk907lwsHu9iIKtkg7ZjqdmuXPua4m1gw3oHza+rZ00NS7Sn40m gzwsmZ4gzXAWciLl+cIekzutUY9AaI943wS1dq5rZe7FfnMBjn6zpllvQWXMTLstQqT5 QP86sEu8XGEDJu8fM934Q1uxh2N/vgU9NfrVlMDplHMC9h+dTZCWKXujz6w9Ejwad9Dt dCCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=s10DD2bi79V+xICsKZzl2wJQlQcRDXrwKveFEEfHFNU=; b=uU8AHSlNF9LWW6UwxgxOS916SFWB26r75/JI1Bt6ibjtjzNarf5Gg+qx+xzcq7Zo7x P3bIpb21vdK3teWBOMKyB2ufhYUqV9VHmC7evBTe/B1bd5O30/k1U1H/cHaMlWkGoEbi EEPfpi3wJb6NAGqanB41tjXWEcn6OKvlj26IiVZeQ4RR0kPuwHS5AS7sqd/wVJJaGjib N/fx4ivx1/S7983y5NiiM2nhSHgfLQ6uiozNMvTiOfD2vOMeconP3FHKwCc/aNeLXqnY aE+auXsgHQea556ZXWiH0ij41dEVq0nCCNmCg5cuQx66tjNht0A/J7wJ1a0FwBxTzpGN q19w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Qd5U4LiD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 33-20020a631261000000b004629ce15656si23349963pgs.196.2022.10.20.11.39.12; Thu, 20 Oct 2022 11:39:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Qd5U4LiD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230263AbiJTSaC (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Thu, 20 Oct 2022 14:30:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230227AbiJTS3r (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 20 Oct 2022 14:29:47 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD5CB220C3 for <linux-kernel@vger.kernel.org>; Thu, 20 Oct 2022 11:29:45 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id j4so1002426lfk.0 for <linux-kernel@vger.kernel.org>; Thu, 20 Oct 2022 11:29:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=s10DD2bi79V+xICsKZzl2wJQlQcRDXrwKveFEEfHFNU=; b=Qd5U4LiDXA6FuonSe3Y4QdQO30sUdfBCSDiezwfWqixsQ81peTxRnkcBkhgo18/HnS Fecne8UMUr8/wm/DVZgB5BqrxQaj/5K1+8Nk7oL8/YEP9FQTJF4BsEpESNdMgV/npoa9 3rlvBgyS3S/hvOrlrpempdjEQIzHA/JnXq243e1i05vt6GRClKGaVmmyPU0H6YzclNQu O1NFckB1dt/2WqEf47XvSWsTtppo2nsXfTvQYpU3jf1uvlp8S2+V8RAGqfyZAc3p2DbM goebqfokRduLAbW8SaoyF9r7xEnzFEry8x0oPQASP5mUX2SOKUcC80g1PZx5wpOlbr1i rjRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=s10DD2bi79V+xICsKZzl2wJQlQcRDXrwKveFEEfHFNU=; b=R2PgooDM577nd5Be8YmsfausPp0xbELvtXsTn59Eujd9c9gwXxbrnvnpvSOWU3RFdK sETtDUBZpdTGwaLtbIUT7Em6fYI1tj7bgn1ucx/HADFkrKgFd3ZvFTrekIJJQLIsSqCu 4qZAjGMe84hBHDf7Ys9UeziMISSSkYPTTCE9WakcTJJjaszy1NVfox3bcDAc7PIkRVii l9E5XzrfYmxpZLB40wmcM2IO4I1Ay2+KI6TxdSDHwjhLgou5FJotPSAXiiUnv2J9vEpV 37SI3qycOe9nSUodyMztd+SsQMOqqSdF+nfQv6hOCULVdV6AsboUoFf6L/VhCs7oosI7 p46g== X-Gm-Message-State: ACrzQf1WAC7quZgWXPfQi0Pd5c52RYQW7FsbU6BG6jwsLlf5s3OUeBh0 5giXblmasMndtLkL1lISzU/vRLH4tdrYgrQ5 X-Received: by 2002:a05:6512:487:b0:4a2:2977:3a83 with SMTP id v7-20020a056512048700b004a229773a83mr5476069lfq.88.1666290584010; Thu, 20 Oct 2022 11:29:44 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id h10-20020a0565123c8a00b00497a3e11608sm2797216lfv.303.2022.10.20.11.29.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 11:29:43 -0700 (PDT) From: Tanjuate Brunostar <tanjubrunostar0@gmail.com> To: forest@alittletooquiet.net Cc: greg@kroah.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev, Tanjuate Brunostar <tanjubrunostar0@gmail.com> Subject: [PATCH 4/6] staging: vt6655: refactor long lines of code in s_vGenerateTxParameter Date: Thu, 20 Oct 2022 18:27:44 +0000 Message-Id: <03dd39114b1e5c029cd8022245403a079ff03ae7.1666288416.git.tanjubrunostar0@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <cover.1666288416.git.tanjubrunostar0@gmail.com> References: <cover.1666288416.git.tanjubrunostar0@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747232925773987784?= X-GMAIL-MSGID: =?utf-8?q?1747232925773987784?= |
Series |
staging: vt6655: a series of checkpatch fixes on
|
|
Commit Message
Tanjuate Brunostar
Oct. 20, 2022, 6:27 p.m. UTC
fix checkpatch errors by refactoring long lines of code in the function: s_vGenerateTxParameter
Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
---
drivers/staging/vt6655/rxtx.c | 70 ++++++++++++++++++++++++-----------
1 file changed, 48 insertions(+), 22 deletions(-)
Comments
Hi Tanjuate, Thank you for the patch! Yet something to improve: [auto build test ERROR on staging/staging-testing] url: https://github.com/intel-lab-lkp/linux/commits/Tanjuate-Brunostar/staging-vt6655-a-series-of-checkpatch-fixes-on/20221021-023139 patch link: https://lore.kernel.org/r/03dd39114b1e5c029cd8022245403a079ff03ae7.1666288416.git.tanjubrunostar0%40gmail.com patch subject: [PATCH 4/6] staging: vt6655: refactor long lines of code in s_vGenerateTxParameter config: ia64-allyesconfig compiler: ia64-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/15a1ddd8d558d352c2381105b7f025740f73ba00 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Tanjuate-Brunostar/staging-vt6655-a-series-of-checkpatch-fixes-on/20221021-023139 git checkout 15a1ddd8d558d352c2381105b7f025740f73ba00 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/staging/vt6655/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): drivers/staging/vt6655/rxtx.c: In function 's_vGenerateTxParameter': >> drivers/staging/vt6655/rxtx.c:1014:55: error: 'pvRrvT' undeclared (first use in this function) 1014 | struct vnt_rrv_time_ab *buf = pvRrvT | ^~~~~~ drivers/staging/vt6655/rxtx.c:1014:55: note: each undeclared identifier is reported only once for each function it appears in >> drivers/staging/vt6655/rxtx.c:1015:33: error: expected ',' or ';' before 'ime' 1015 | ime; | ^~~ vim +/pvRrvT +1014 drivers/staging/vt6655/rxtx.c 924 925 /* 926 * 927 * Description: 928 * Generate FIFO control for MAC & Baseband controller 929 * 930 * Parameters: 931 * In: 932 * pDevice - Pointer to adapter 933 * pTxDataHead - Transmit Data Buffer 934 * pTxBufHead - pTxBufHead 935 * pvRrvTime - pvRrvTime 936 * pvRTS - RTS Buffer 937 * pCTS - CTS Buffer 938 * cbFrameSize - Transmit Data Length (Hdr+Payload+FCS) 939 * bNeedACK - If need ACK 940 * uDescIdx - Desc Index 941 * Out: 942 * none 943 * 944 * Return Value: none 945 * 946 - 947 * unsigned int cbFrameSize, Hdr+Payload+FCS 948 */ 949 static void s_vGenerateTxParameter(struct vnt_private *pDevice, 950 unsigned char byPktType, 951 struct vnt_tx_fifo_head *tx_buffer_head, 952 void *pvRrvTime, 953 void *pvRTS, 954 void *pvCTS, 955 unsigned int cbFrameSize, 956 bool bNeedACK, 957 unsigned int uDMAIdx, 958 void *psEthHeader, 959 unsigned short wCurrentRate) 960 { 961 u16 fifo_ctl = le16_to_cpu(tx_buffer_head->fifo_ctl); 962 bool bDisCRC = false; 963 unsigned char byFBOption = AUTO_FB_NONE; 964 965 tx_buffer_head->current_rate = cpu_to_le16(wCurrentRate); 966 967 if (fifo_ctl & FIFOCTL_CRCDIS) 968 bDisCRC = true; 969 970 if (fifo_ctl & FIFOCTL_AUTO_FB_0) 971 byFBOption = AUTO_FB_0; 972 else if (fifo_ctl & FIFOCTL_AUTO_FB_1) 973 byFBOption = AUTO_FB_1; 974 975 if (!pvRrvTime) 976 return; 977 978 if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { 979 if (pvRTS) { /* RTS_need */ 980 /* Fill RsvTime */ 981 struct vnt_rrv_time_rts *buf = pvRrvTime; 982 983 buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, 984 wCurrentRate); 985 buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize, 986 wCurrentRate); 987 buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, 988 wCurrentRate); 989 buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, 990 wCurrentRate, bNeedACK); 991 buf->rrv_time_b = 992 vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, 993 pDevice->byTopCCKBasicRate, bNeedACK); 994 995 s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, 996 psEthHeader, wCurrentRate, byFBOption); 997 } else {/* RTS_needless, PCF mode */ 998 struct vnt_rrv_time_cts *buf = pvRrvTime; 999 1000 buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, 1001 wCurrentRate, bNeedACK); 1002 buf->rrv_time_b = 1003 vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, 1004 pDevice->byTopCCKBasicRate, bNeedACK); 1005 buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize, 1006 wCurrentRate); 1007 1008 /* Fill CTS */ 1009 s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK, 1010 bDisCRC, wCurrentRate, byFBOption); 1011 } 1012 } else if (byPktType == PK_TYPE_11A) { 1013 if (pvRTS) {/* RTS_need, non PCF mode */ > 1014 struct vnt_rrv_time_ab *buf = pvRrvT > 1015 ime; 1016 1017 buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, 1018 wCurrentRate); 1019 buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, 1020 wCurrentRate, bNeedACK); 1021 1022 /* Fill RTS */ 1023 s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, 1024 psEthHeader, wCurrentRate, byFBOption); 1025 } else if (!pvRTS) {/* RTS_needless, non PCF mode */ 1026 struct vnt_rrv_time_ab *buf = pvRrvTime; 1027 1028 buf->rrv_time = 1029 vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, cbFrameSize, 1030 wCurrentRate, bNeedACK); 1031 } 1032 } else if (byPktType == PK_TYPE_11B) { 1033 if (pvRTS) {/* RTS_need, non PCF mode */ 1034 struct vnt_rrv_time_ab *buf = pvRrvTime; 1035 1036 buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, 1037 wCurrentRate); 1038 buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, 1039 wCurrentRate, bNeedACK); 1040 1041 /* Fill RTS */ 1042 s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, 1043 psEthHeader, wCurrentRate, byFBOption); 1044 } else { /* RTS_needless, non PCF mode */ 1045 struct vnt_rrv_time_ab *buf = pvRrvTime; 1046 1047 buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, 1048 wCurrentRate, bNeedACK); 1049 } 1050 } 1051 } 1052
Hi Tanjuate, Thank you for the patch! Yet something to improve: [auto build test ERROR on staging/staging-testing] url: https://github.com/intel-lab-lkp/linux/commits/Tanjuate-Brunostar/staging-vt6655-a-series-of-checkpatch-fixes-on/20221021-023139 patch link: https://lore.kernel.org/r/03dd39114b1e5c029cd8022245403a079ff03ae7.1666288416.git.tanjubrunostar0%40gmail.com patch subject: [PATCH 4/6] staging: vt6655: refactor long lines of code in s_vGenerateTxParameter config: x86_64-allmodconfig compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/15a1ddd8d558d352c2381105b7f025740f73ba00 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Tanjuate-Brunostar/staging-vt6655-a-series-of-checkpatch-fixes-on/20221021-023139 git checkout 15a1ddd8d558d352c2381105b7f025740f73ba00 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/staging/vt6655/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): >> drivers/staging/vt6655/rxtx.c:1014:34: error: use of undeclared identifier 'pvRrvT' struct vnt_rrv_time_ab *buf = pvRrvT ^ >> drivers/staging/vt6655/rxtx.c:1014:40: error: expected ';' at end of declaration struct vnt_rrv_time_ab *buf = pvRrvT ^ ; 2 errors generated. vim +/pvRrvT +1014 drivers/staging/vt6655/rxtx.c 924 925 /* 926 * 927 * Description: 928 * Generate FIFO control for MAC & Baseband controller 929 * 930 * Parameters: 931 * In: 932 * pDevice - Pointer to adapter 933 * pTxDataHead - Transmit Data Buffer 934 * pTxBufHead - pTxBufHead 935 * pvRrvTime - pvRrvTime 936 * pvRTS - RTS Buffer 937 * pCTS - CTS Buffer 938 * cbFrameSize - Transmit Data Length (Hdr+Payload+FCS) 939 * bNeedACK - If need ACK 940 * uDescIdx - Desc Index 941 * Out: 942 * none 943 * 944 * Return Value: none 945 * 946 - 947 * unsigned int cbFrameSize, Hdr+Payload+FCS 948 */ 949 static void s_vGenerateTxParameter(struct vnt_private *pDevice, 950 unsigned char byPktType, 951 struct vnt_tx_fifo_head *tx_buffer_head, 952 void *pvRrvTime, 953 void *pvRTS, 954 void *pvCTS, 955 unsigned int cbFrameSize, 956 bool bNeedACK, 957 unsigned int uDMAIdx, 958 void *psEthHeader, 959 unsigned short wCurrentRate) 960 { 961 u16 fifo_ctl = le16_to_cpu(tx_buffer_head->fifo_ctl); 962 bool bDisCRC = false; 963 unsigned char byFBOption = AUTO_FB_NONE; 964 965 tx_buffer_head->current_rate = cpu_to_le16(wCurrentRate); 966 967 if (fifo_ctl & FIFOCTL_CRCDIS) 968 bDisCRC = true; 969 970 if (fifo_ctl & FIFOCTL_AUTO_FB_0) 971 byFBOption = AUTO_FB_0; 972 else if (fifo_ctl & FIFOCTL_AUTO_FB_1) 973 byFBOption = AUTO_FB_1; 974 975 if (!pvRrvTime) 976 return; 977 978 if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { 979 if (pvRTS) { /* RTS_need */ 980 /* Fill RsvTime */ 981 struct vnt_rrv_time_rts *buf = pvRrvTime; 982 983 buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, 984 wCurrentRate); 985 buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize, 986 wCurrentRate); 987 buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, 988 wCurrentRate); 989 buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, 990 wCurrentRate, bNeedACK); 991 buf->rrv_time_b = 992 vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, 993 pDevice->byTopCCKBasicRate, bNeedACK); 994 995 s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, 996 psEthHeader, wCurrentRate, byFBOption); 997 } else {/* RTS_needless, PCF mode */ 998 struct vnt_rrv_time_cts *buf = pvRrvTime; 999 1000 buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, 1001 wCurrentRate, bNeedACK); 1002 buf->rrv_time_b = 1003 vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, 1004 pDevice->byTopCCKBasicRate, bNeedACK); 1005 buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize, 1006 wCurrentRate); 1007 1008 /* Fill CTS */ 1009 s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK, 1010 bDisCRC, wCurrentRate, byFBOption); 1011 } 1012 } else if (byPktType == PK_TYPE_11A) { 1013 if (pvRTS) {/* RTS_need, non PCF mode */ > 1014 struct vnt_rrv_time_ab *buf = pvRrvT 1015 ime; 1016 1017 buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, 1018 wCurrentRate); 1019 buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, 1020 wCurrentRate, bNeedACK); 1021 1022 /* Fill RTS */ 1023 s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, 1024 psEthHeader, wCurrentRate, byFBOption); 1025 } else if (!pvRTS) {/* RTS_needless, non PCF mode */ 1026 struct vnt_rrv_time_ab *buf = pvRrvTime; 1027 1028 buf->rrv_time = 1029 vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, cbFrameSize, 1030 wCurrentRate, bNeedACK); 1031 } 1032 } else if (byPktType == PK_TYPE_11B) { 1033 if (pvRTS) {/* RTS_need, non PCF mode */ 1034 struct vnt_rrv_time_ab *buf = pvRrvTime; 1035 1036 buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, 1037 wCurrentRate); 1038 buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, 1039 wCurrentRate, bNeedACK); 1040 1041 /* Fill RTS */ 1042 s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, 1043 psEthHeader, wCurrentRate, byFBOption); 1044 } else { /* RTS_needless, non PCF mode */ 1045 struct vnt_rrv_time_ab *buf = pvRrvTime; 1046 1047 buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, 1048 wCurrentRate, bNeedACK); 1049 } 1050 } 1051 } 1052
On 20-10-2022 23:57, Tanjuate Brunostar wrote: > fix checkpatch errors by refactoring long lines of code in the function: s_vGenerateTxParameter > > Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com> > --- > drivers/staging/vt6655/rxtx.c | 70 ++++++++++++++++++++++++----------- > 1 file changed, 48 insertions(+), 22 deletions(-) > > diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c > index dc853b83459b..42f4261293ba 100644 > --- a/drivers/staging/vt6655/rxtx.c > +++ b/drivers/staging/vt6655/rxtx.c > @@ -839,7 +839,8 @@ s_vFillCTSHead(struct vnt_private *pDevice, > } > > if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { > - if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) { > + if (byFBOption != AUTO_FB_NONE && uDMAIdx != > + TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) { > /* Auto Fall back */ > struct vnt_cts_fb *buf = pvCTS; > /* Get SignalField, ServiceField & Length */ > @@ -878,7 +879,10 @@ s_vFillCTSHead(struct vnt_private *pDevice, > > ether_addr_copy(buf->data.ra, > pDevice->abyCurrentNetAddr); > - } else { /* if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) */ > + } else { > + /* if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && > + * uDMAIdx != TYPE_BEACONDMA) > + */ > struct vnt_cts *buf = pvCTS; > /* Get SignalField, ServiceField & Length */ > vnt_get_phy_field(pDevice, uCTSFrameLen, > @@ -964,50 +968,72 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, > /* Fill RsvTime */ > struct vnt_rrv_time_rts *buf = pvRrvTime; > > - buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, wCurrentRate); > - buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize, wCurrentRate); > - buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, wCurrentRate); > - buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK); > - buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK); > - > - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); > + buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, > + wCurrentRate); > + buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize, > + wCurrentRate); > + buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, > + wCurrentRate); > + buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, > + wCurrentRate, bNeedACK); > + buf->rrv_time_b = > + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, > + pDevice->byTopCCKBasicRate, bNeedACK); > + > + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, > + psEthHeader, wCurrentRate, byFBOption); > } else {/* RTS_needless, PCF mode */ > struct vnt_rrv_time_cts *buf = pvRrvTime; > > - buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK); > - buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK); > - buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize, wCurrentRate); > + buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, > + wCurrentRate, bNeedACK); > + buf->rrv_time_b = > + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, > + pDevice->byTopCCKBasicRate, bNeedACK); > + buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize, > + wCurrentRate); > > /* Fill CTS */ > - s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK, bDisCRC, wCurrentRate, byFBOption); > + s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK, > + bDisCRC, wCurrentRate, byFBOption); > } > } else if (byPktType == PK_TYPE_11A) { > if (pvRTS) {/* RTS_need, non PCF mode */ > - struct vnt_rrv_time_ab *buf = pvRrvTime; > + struct vnt_rrv_time_ab *buf = pvRrvT > + ime; I'm not sure if this patch is compiled ? In my understanding the recommendation is have the patch compiled and if possible basic sanity done (can discuss with respective maintainers if they can help / guide) before sending here. Please do the needful. Thanks. > > - buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, wCurrentRate); > - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK); > + buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, > + wCurrentRate); > + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, > + wCurrentRate, bNeedACK); > > /* Fill RTS */ > - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); > + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, > + psEthHeader, wCurrentRate, byFBOption); > } else if (!pvRTS) {/* RTS_needless, non PCF mode */ > struct vnt_rrv_time_ab *buf = pvRrvTime; > > - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, cbFrameSize, wCurrentRate, bNeedACK); > + buf->rrv_time = > + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, cbFrameSize, > + wCurrentRate, bNeedACK); > } > } else if (byPktType == PK_TYPE_11B) { > if (pvRTS) {/* RTS_need, non PCF mode */ > struct vnt_rrv_time_ab *buf = pvRrvTime; > > - buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, wCurrentRate); > - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK); > + buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, > + wCurrentRate); > + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, > + wCurrentRate, bNeedACK); > > /* Fill RTS */ > - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); > + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, > + psEthHeader, wCurrentRate, byFBOption); > } else { /* RTS_needless, non PCF mode */ > struct vnt_rrv_time_ab *buf = pvRrvTime; > > - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK); > + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, > + wCurrentRate, bNeedACK); > } > } > } Regards, ~Praveen.
On Fri, 21 Oct 2022, Praveen Kumar wrote: > On 20-10-2022 23:57, Tanjuate Brunostar wrote: > > fix checkpatch errors by refactoring long lines of code in the function: s_vGenerateTxParameter > > > > Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com> > > --- > > drivers/staging/vt6655/rxtx.c | 70 ++++++++++++++++++++++++----------- > > 1 file changed, 48 insertions(+), 22 deletions(-) > > > > diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c > > index dc853b83459b..42f4261293ba 100644 > > --- a/drivers/staging/vt6655/rxtx.c > > +++ b/drivers/staging/vt6655/rxtx.c > > @@ -839,7 +839,8 @@ s_vFillCTSHead(struct vnt_private *pDevice, > > } > > > > if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { > > - if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) { > > + if (byFBOption != AUTO_FB_NONE && uDMAIdx != > > + TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) { > > /* Auto Fall back */ > > struct vnt_cts_fb *buf = pvCTS; > > /* Get SignalField, ServiceField & Length */ > > @@ -878,7 +879,10 @@ s_vFillCTSHead(struct vnt_private *pDevice, > > > > ether_addr_copy(buf->data.ra, > > pDevice->abyCurrentNetAddr); > > - } else { /* if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) */ > > + } else { > > + /* if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && > > + * uDMAIdx != TYPE_BEACONDMA) > > + */ > > struct vnt_cts *buf = pvCTS; > > /* Get SignalField, ServiceField & Length */ > > vnt_get_phy_field(pDevice, uCTSFrameLen, > > @@ -964,50 +968,72 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, > > /* Fill RsvTime */ > > struct vnt_rrv_time_rts *buf = pvRrvTime; > > > > - buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, wCurrentRate); > > - buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize, wCurrentRate); > > - buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, wCurrentRate); > > - buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK); > > - buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK); > > - > > - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); > > + buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, > > + wCurrentRate); > > + buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize, > > + wCurrentRate); > > + buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, > > + wCurrentRate); > > + buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, > > + wCurrentRate, bNeedACK); > > + buf->rrv_time_b = > > + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, > > + pDevice->byTopCCKBasicRate, bNeedACK); > > + > > + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, > > + psEthHeader, wCurrentRate, byFBOption); > > } else {/* RTS_needless, PCF mode */ > > struct vnt_rrv_time_cts *buf = pvRrvTime; > > > > - buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK); > > - buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK); > > - buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize, wCurrentRate); > > + buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, > > + wCurrentRate, bNeedACK); > > + buf->rrv_time_b = > > + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, > > + pDevice->byTopCCKBasicRate, bNeedACK); > > + buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize, > > + wCurrentRate); > > > > /* Fill CTS */ > > - s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK, bDisCRC, wCurrentRate, byFBOption); > > + s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK, > > + bDisCRC, wCurrentRate, byFBOption); > > } > > } else if (byPktType == PK_TYPE_11A) { > > if (pvRTS) {/* RTS_need, non PCF mode */ > > - struct vnt_rrv_time_ab *buf = pvRrvTime; > > + struct vnt_rrv_time_ab *buf = pvRrvT > > + ime; > > I'm not sure if this patch is compiled ? In my understanding the recommendation is have the patch compiled and if possible basic sanity done (can discuss with respective maintainers if they can help / guide) before sending here. Please do the needful. Thanks. In particular, always be sure that you have a .o file for the .c file that you changed. The safest is to first try just compiling the file: make path/to/my/file.o Some files can't be compiled in that way. You may need to do, eg make path/to/my/ instead, but then there is a risk that even if you have compiled the directory, you have not actually compled the file that you changed. So always check for the .o file. julia > > > > > - buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, wCurrentRate); > > - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK); > > + buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, > > + wCurrentRate); > > + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, > > + wCurrentRate, bNeedACK); > > > > /* Fill RTS */ > > - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); > > + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, > > + psEthHeader, wCurrentRate, byFBOption); > > } else if (!pvRTS) {/* RTS_needless, non PCF mode */ > > struct vnt_rrv_time_ab *buf = pvRrvTime; > > > > - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, cbFrameSize, wCurrentRate, bNeedACK); > > + buf->rrv_time = > > + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, cbFrameSize, > > + wCurrentRate, bNeedACK); > > } > > } else if (byPktType == PK_TYPE_11B) { > > if (pvRTS) {/* RTS_need, non PCF mode */ > > struct vnt_rrv_time_ab *buf = pvRrvTime; > > > > - buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, wCurrentRate); > > - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK); > > + buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, > > + wCurrentRate); > > + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, > > + wCurrentRate, bNeedACK); > > > > /* Fill RTS */ > > - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); > > + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, > > + psEthHeader, wCurrentRate, byFBOption); > > } else { /* RTS_needless, non PCF mode */ > > struct vnt_rrv_time_ab *buf = pvRrvTime; > > > > - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK); > > + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, > > + wCurrentRate, bNeedACK); > > } > > } > > } > > Regards, > > ~Praveen. > >
On Fri, Oct 21, 2022 at 8:16 AM Julia Lawall <julia.lawall@inria.fr> wrote: > > > > On Fri, 21 Oct 2022, Praveen Kumar wrote: > > > On 20-10-2022 23:57, Tanjuate Brunostar wrote: > > > fix checkpatch errors by refactoring long lines of code in the function: s_vGenerateTxParameter > > > > > > Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com> > > > --- > > > drivers/staging/vt6655/rxtx.c | 70 ++++++++++++++++++++++++----------- > > > 1 file changed, 48 insertions(+), 22 deletions(-) > > > > > > diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c > > > index dc853b83459b..42f4261293ba 100644 > > > --- a/drivers/staging/vt6655/rxtx.c > > > +++ b/drivers/staging/vt6655/rxtx.c > > > @@ -839,7 +839,8 @@ s_vFillCTSHead(struct vnt_private *pDevice, > > > } > > > > > > if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { > > > - if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) { > > > + if (byFBOption != AUTO_FB_NONE && uDMAIdx != > > > + TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) { > > > /* Auto Fall back */ > > > struct vnt_cts_fb *buf = pvCTS; > > > /* Get SignalField, ServiceField & Length */ > > > @@ -878,7 +879,10 @@ s_vFillCTSHead(struct vnt_private *pDevice, > > > > > > ether_addr_copy(buf->data.ra, > > > pDevice->abyCurrentNetAddr); > > > - } else { /* if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) */ > > > + } else { > > > + /* if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && > > > + * uDMAIdx != TYPE_BEACONDMA) > > > + */ > > > struct vnt_cts *buf = pvCTS; > > > /* Get SignalField, ServiceField & Length */ > > > vnt_get_phy_field(pDevice, uCTSFrameLen, > > > @@ -964,50 +968,72 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, > > > /* Fill RsvTime */ > > > struct vnt_rrv_time_rts *buf = pvRrvTime; > > > > > > - buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, wCurrentRate); > > > - buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize, wCurrentRate); > > > - buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, wCurrentRate); > > > - buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK); > > > - buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK); > > > - > > > - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); > > > + buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, > > > + wCurrentRate); > > > + buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize, > > > + wCurrentRate); > > > + buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, > > > + wCurrentRate); > > > + buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, > > > + wCurrentRate, bNeedACK); > > > + buf->rrv_time_b = > > > + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, > > > + pDevice->byTopCCKBasicRate, bNeedACK); > > > + > > > + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, > > > + psEthHeader, wCurrentRate, byFBOption); > > > } else {/* RTS_needless, PCF mode */ > > > struct vnt_rrv_time_cts *buf = pvRrvTime; > > > > > > - buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK); > > > - buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK); > > > - buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize, wCurrentRate); > > > + buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, > > > + wCurrentRate, bNeedACK); > > > + buf->rrv_time_b = > > > + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, > > > + pDevice->byTopCCKBasicRate, bNeedACK); > > > + buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize, > > > + wCurrentRate); > > > > > > /* Fill CTS */ > > > - s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK, bDisCRC, wCurrentRate, byFBOption); > > > + s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK, > > > + bDisCRC, wCurrentRate, byFBOption); > > > } > > > } else if (byPktType == PK_TYPE_11A) { > > > if (pvRTS) {/* RTS_need, non PCF mode */ > > > - struct vnt_rrv_time_ab *buf = pvRrvTime; > > > + struct vnt_rrv_time_ab *buf = pvRrvT > > > + ime; > > > > I'm not sure if this patch is compiled ? In my understanding the recommendation is have the patch compiled and if possible basic sanity done (can discuss with respective maintainers if they can help / guide) before sending here. Please do the needful. Thanks. > > In particular, always be sure that you have a .o file for the .c file that > you changed. The safest is to first try just compiling the file: > > make path/to/my/file.o > > Some files can't be compiled in that way. You may need to do, eg > > make path/to/my/ > > instead, but then there is a risk that even if you have compiled the > directory, you have not actually compled the file that you changed. So > always check for the .o file. > > julia > > > > > > > > > > - buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, wCurrentRate); > > > - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK); > > > + buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, > > > + wCurrentRate); > > > + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, > > > + wCurrentRate, bNeedACK); > > > > > > /* Fill RTS */ > > > - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); > > > + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, > > > + psEthHeader, wCurrentRate, byFBOption); > > > } else if (!pvRTS) {/* RTS_needless, non PCF mode */ > > > struct vnt_rrv_time_ab *buf = pvRrvTime; > > > > > > - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, cbFrameSize, wCurrentRate, bNeedACK); > > > + buf->rrv_time = > > > + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, cbFrameSize, > > > + wCurrentRate, bNeedACK); > > > } > > > } else if (byPktType == PK_TYPE_11B) { > > > if (pvRTS) {/* RTS_need, non PCF mode */ > > > struct vnt_rrv_time_ab *buf = pvRrvTime; > > > > > > - buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, wCurrentRate); > > > - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK); > > > + buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, > > > + wCurrentRate); > > > + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, > > > + wCurrentRate, bNeedACK); > > > > > > /* Fill RTS */ > > > - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); > > > + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, > > > + psEthHeader, wCurrentRate, byFBOption); > > > } else { /* RTS_needless, non PCF mode */ > > > struct vnt_rrv_time_ab *buf = pvRrvTime; > > > > > > - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK); > > > + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, > > > + wCurrentRate, bNeedACK); > > > } > > > } > > > } > > > > Regards, > > > > ~Praveen. > > > > Thanks for the guidance. Will do that
diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index dc853b83459b..42f4261293ba 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -839,7 +839,8 @@ s_vFillCTSHead(struct vnt_private *pDevice, } if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { - if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) { + if (byFBOption != AUTO_FB_NONE && uDMAIdx != + TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) { /* Auto Fall back */ struct vnt_cts_fb *buf = pvCTS; /* Get SignalField, ServiceField & Length */ @@ -878,7 +879,10 @@ s_vFillCTSHead(struct vnt_private *pDevice, ether_addr_copy(buf->data.ra, pDevice->abyCurrentNetAddr); - } else { /* if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) */ + } else { + /* if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && + * uDMAIdx != TYPE_BEACONDMA) + */ struct vnt_cts *buf = pvCTS; /* Get SignalField, ServiceField & Length */ vnt_get_phy_field(pDevice, uCTSFrameLen, @@ -964,50 +968,72 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, /* Fill RsvTime */ struct vnt_rrv_time_rts *buf = pvRrvTime; - buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, wCurrentRate); - buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize, wCurrentRate); - buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, wCurrentRate); - buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK); - buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK); - - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); + buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, + wCurrentRate); + buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize, + wCurrentRate); + buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, + wCurrentRate); + buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, + wCurrentRate, bNeedACK); + buf->rrv_time_b = + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, + pDevice->byTopCCKBasicRate, bNeedACK); + + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, + psEthHeader, wCurrentRate, byFBOption); } else {/* RTS_needless, PCF mode */ struct vnt_rrv_time_cts *buf = pvRrvTime; - buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK); - buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK); - buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize, wCurrentRate); + buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, + wCurrentRate, bNeedACK); + buf->rrv_time_b = + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, + pDevice->byTopCCKBasicRate, bNeedACK); + buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize, + wCurrentRate); /* Fill CTS */ - s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK, bDisCRC, wCurrentRate, byFBOption); + s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK, + bDisCRC, wCurrentRate, byFBOption); } } else if (byPktType == PK_TYPE_11A) { if (pvRTS) {/* RTS_need, non PCF mode */ - struct vnt_rrv_time_ab *buf = pvRrvTime; + struct vnt_rrv_time_ab *buf = pvRrvT + ime; - buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, wCurrentRate); - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK); + buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, + wCurrentRate); + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, + wCurrentRate, bNeedACK); /* Fill RTS */ - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, + psEthHeader, wCurrentRate, byFBOption); } else if (!pvRTS) {/* RTS_needless, non PCF mode */ struct vnt_rrv_time_ab *buf = pvRrvTime; - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, cbFrameSize, wCurrentRate, bNeedACK); + buf->rrv_time = + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, cbFrameSize, + wCurrentRate, bNeedACK); } } else if (byPktType == PK_TYPE_11B) { if (pvRTS) {/* RTS_need, non PCF mode */ struct vnt_rrv_time_ab *buf = pvRrvTime; - buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, wCurrentRate); - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK); + buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, + wCurrentRate); + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, + wCurrentRate, bNeedACK); /* Fill RTS */ - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, + psEthHeader, wCurrentRate, byFBOption); } else { /* RTS_needless, non PCF mode */ struct vnt_rrv_time_ab *buf = pvRrvTime; - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK); + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, + wCurrentRate, bNeedACK); } } }