From patchwork Mon Sep 13 13:01:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 12488951 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BBAEEC433EF for ; Mon, 13 Sep 2021 13:02:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A300460F9F for ; Mon, 13 Sep 2021 13:02:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238234AbhIMNEB (ORCPT ); Mon, 13 Sep 2021 09:04:01 -0400 Received: from mail-bn8nam08on2055.outbound.protection.outlook.com ([40.107.100.55]:54369 "EHLO NAM04-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237666AbhIMNDs (ORCPT ); Mon, 13 Sep 2021 09:03:48 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lHY8x5gInPO6wOq9L2+npDr45go6qxEarwvM/8iVc4eDxTsAwP4PqXZzIQn4/mj0knbeDlSpcBLsPE2olRARIxERdo+tet17JnjNi/GaZbfi/HiIW34HEcOqrB4Bl8qyYgQ2NY+432W6qDKkDKSg6CdIgg2udIYYJ1oKFzmcEKmJPBYIrxpfn0xR5is181M79r85ncVMk+YfKPwsU1nfqt315bagNbhKYC8I7FbAjcAwY93quHuMewdw9O6XeN7ZdDbsnPHxhEBb0r1vhpiIXjtz0mMyRwq99KNgY9GK0nTMTCWYV49ZDUEZ8Z9Y4zqkjwWqvVnZ5cnljfyw4vRQtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Ltkb34xn1l2676USN4kZ+ng0WW2jWxAd1JTkXQJO7zI=; b=ZSl2m5V7T963qYmWJoMpvNwClyLKjE4I2v+2TgvaSLJtoeuLSJ/R8Iyr19PxhssWBj9t/BAwkFb8LuKDiiJxXFLhhONA+bIYd/75oeJMVdk+NK68V7Qj/aPZV8fD2r82jXY2CiEg/Uj8kz9sb0t2L9i7WrsD9mUqSEHTFs4sbCE4LZ6CPeXZePhDtVDaTSP/3X3zCXCzxJPj4qyPQU6xMW8f6OaIz9TkTmryvXluW+XlXgcC+KAVsVD4Se2SKLRISKkMM41jpkGp69RykVvI3AZuHwuCAn8r6MKhBabe0/9sxV5o2a/9X/Sy9gmVZjiorsORQjSk3IFsRya6SrKrBg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ltkb34xn1l2676USN4kZ+ng0WW2jWxAd1JTkXQJO7zI=; b=QmPVM5qFNe7QH6b9H9xv7UplD93acVPKJMBuMxWiUb0lHQYkN9xRL3DQhmi3OsYjT987256dsCzSe3VI74AxBA8B0itnEwxcDzBiNPVS29DTLIhNuUZL8mtL++8olOK6NwHMSOY8YRpPv3iDBSEhmgCpr0SqS9+JofRHjFvaos4= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none;driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA2PR11MB4860.namprd11.prod.outlook.com (2603:10b6:806:11b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:02:28 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02:28 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH v3 06/32] staging: wfx: drop unused argument from hif_scan() Date: Mon, 13 Sep 2021 15:01:37 +0200 Message-Id: <20210913130203.1903622-7-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cb985e32-68be-4daa-2c95-08d976b6bd20 X-MS-TrafficTypeDiagnostic: SA2PR11MB4860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:854; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QED/HfA2lLp6vPsXdjR4V68I5v4W+cbqdnrfDbc38CE68Ol28+vIGkr5fAfbeTd0cFyp7xDAAIBfPR8EIgV28oW47MZvb8S9RuZIQ43iFvBkqBIjMNqcQeQjjMpB+OoehFdIP77itj5bhe65jBpxWJEqQFuRCvUiz+hBRTYuVbQjZlMgtC+ZBQ4Hm79ZfSt5UYCaC2B0+Awir0sKXN72lYNrb7HE/2OXXFd2olSIA08V6ZNJ/K3ZHUOxIGy1BAiQhs1YAnZ4fpff4nPtUcddfAWDha0H5n2P9EQH5oMceMo4G/3cUs80HZtwj0GH8aCtdi1XP4sCNbLHvGRuHg5kuv0J3goCdO5rPvYH/yTlE3YpaOhFtKEMY3kHAiUFbY34VcabVp5kvrLO8q0GP0QEe1MZjphG6MZFCJLThvZqPdg6rx0nCuwVGjoHcMgZSqbcDtr+itQ1YZyBFH22LJog5Iwh8nzKyV+fb9v3o+vmMauRuMwq+biWdaLD9IyZCaxoDWGVnbM0ndrIY1+jJFFGs91KO8Zbp5D6wUuxZUJPapINEkosZfpNSMCIPFWMGQmDM0UwDEdiBelvgestmmMys2+wTlNEi6hm+liPCU69Zelb9DWXWVJCztROAaIrSjH7eN2s8zgpBfgyNzQqqOU0QMoAqNa8AJg222dWH/7S7O4dRKX17BMeSTP/JtkPV4omfzXyHCp91h9cYrXObd3bhw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR11MB2718.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(956004)(66574015)(6666004)(66946007)(2616005)(26005)(36756003)(38100700002)(38350700002)(316002)(4326008)(107886003)(7696005)(54906003)(5660300002)(52116002)(66556008)(1076003)(66476007)(6486002)(508600001)(8936002)(83380400001)(86362001)(2906002)(8676002)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?vO2NXS21a///h3EmvGtWFv23k3Kl?= =?utf-8?q?j8eFSUTgDkZwSDYozQDry168CE7sZ0kgxAA7BzkIom6MeYVXvZn3oXICqr2oWUIYo?= =?utf-8?q?AjYqg9013tSn1G5xXjxg39n3g/UkVnh7OOluSSM1vH4m6frk5VVUdZSdTZvTuH1fD?= =?utf-8?q?ttp3JrsnhopHjqbbLJgy7FfnBNX4CZENnKnVTdno3wl8MQnUzIGjv2G8GfREtnmZx?= =?utf-8?q?89/gpJnnpNlJyZiKBpfMUJyUv+SCEKeYyl2wfeTKRYX3axzlAryr9/OIJMaJsuRS3?= =?utf-8?q?A1fYERiTxJ+XR3xNN45xAR1I1aZ8VoQCIi8+laEu8GBdX7e8bAFAY/dN2ObFFnlqI?= =?utf-8?q?H7K7Y6+CgE/bu+0hcu/jSMG5Ue72Okxkwe6/N09iCJhUQ0RUMN6I1mcqHecHT2u1M?= =?utf-8?q?c2AlSHFzb302LEU8EtgNRwAYZh9pg2E3NVCLDN1tvdjdOS8vVvdjX/QduIr9Rpn//?= =?utf-8?q?zctAG2tF2wCTU+mQxdJsOexakJK0SzzpvpZ14Gq6mllDTkK+yMis/TQqYPFQPffIo?= =?utf-8?q?07ceqzse4CG8jNXbJi1WBcabP1A2kWpMc4ScHhLRNac9OgQ6ko7U8w1f1xPmDU+Ao?= =?utf-8?q?UR6+s2iyASHYEf8Uv+3Wg8IMgnfH7iFRXfMEDgSHSom8JQrPczoqB/eDtbzBQ+msk?= =?utf-8?q?N880/FcmRiwB+2xzXqr3AKJVpkPNWxRPPOAEzHRQpTw8OMm+dhrf+zxZU/epumnEK?= =?utf-8?q?UiA2YAL9JztL5/6JxJoqNg1OOamvulOim7CXJMu8LUP0a9XX0xfwZtKFJKNrcOYiI?= =?utf-8?q?4KamyEGot2jEPSKhlTqOge1rR3lDO25/O2RMQ892cwy5oZJIZkac8O6Dv+bGzXTMN?= =?utf-8?q?vndliTRorLf+fBRSNp9gb8JRAA1m4aJRXsL1SMx/n7fxqekYTG02VM1xojpOutJgZ?= =?utf-8?q?J5M2KpCdH8gg2YTyg0AJrPWDfCTCA+WSDFhQ8pYy/waX6bJgreNY15m7tIuU3ZvnX?= =?utf-8?q?Vs5QchaaJX/+dWJEj3DSqm/8KLWti8dsC25WR1Z2jOIXJaDmDSIIW9193+szk00td?= =?utf-8?q?ABeRULk0wSDUnPLEKMIW1anRvI0/7ca0gyAWlFIo92mTGfMXIIBwKStvZ3i8JQw1z?= =?utf-8?q?3UY4Vs7L5HZG+GFVtJj8tVZX7H3n+YDFT/tvLabqHyLbkZYPBZqOgTv8HZFmVDI+U?= =?utf-8?q?J3znObA43pJvJnRuDOQBmafGlvYB1s0w8PB67XZUL9Dok8hyZTJrCk3Ru8Zhy9MzT?= =?utf-8?q?Ib4REcUzbFv06Y4o/XPLsL4g+J0EbkhbbPy7bpdtjBpuCYRW0aOa/JnjUXArIl/3n?= =?utf-8?q?cVoz33086dQ0dFEG?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: cb985e32-68be-4daa-2c95-08d976b6bd20 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:28.0282 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6jTaiSfbmBBqPpPiR2jcAckSJ8aGnizkcjK3E7xLVLgO9slpvvnJwq4Xft4vzHfanltpjL4oBMG23zyFytctig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4860 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller It is no more necessary to compute the expected duration of the scan request. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 9 +-------- drivers/staging/wfx/hif_tx.h | 2 +- drivers/staging/wfx/scan.c | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 63b437261eb7..14b7e047916e 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -227,14 +227,13 @@ int hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, } int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req, - int chan_start_idx, int chan_num, int *timeout) + int chan_start_idx, int chan_num) { int ret, i; struct hif_msg *hif; size_t buf_len = sizeof(struct hif_req_start_scan_alt) + chan_num * sizeof(u8); struct hif_req_start_scan_alt *body = wfx_alloc_hif(buf_len, &hif); - int tmo_chan_fg, tmo_chan_bg, tmo; WARN(chan_num > HIF_API_MAX_NB_CHANNELS, "invalid params"); WARN(req->n_ssids > HIF_API_MAX_NB_SSIDS, "invalid params"); @@ -269,12 +268,6 @@ int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req, body->num_of_probe_requests = 2; body->probe_delay = 100; } - tmo_chan_bg = le32_to_cpu(body->max_channel_time) * USEC_PER_TU; - tmo_chan_fg = 512 * USEC_PER_TU + body->probe_delay; - tmo_chan_fg *= body->num_of_probe_requests; - tmo = chan_num * max(tmo_chan_bg, tmo_chan_fg) + 512 * USEC_PER_TU; - if (timeout) - *timeout = usecs_to_jiffies(tmo); wfx_fill_header(hif, wvif->id, HIF_REQ_ID_START_SCAN, buf_len); ret = wfx_cmd_send(wvif->wdev, hif, NULL, 0, false); diff --git a/drivers/staging/wfx/hif_tx.h b/drivers/staging/wfx/hif_tx.h index 3521c545ae6b..46eed6cfa247 100644 --- a/drivers/staging/wfx/hif_tx.h +++ b/drivers/staging/wfx/hif_tx.h @@ -40,7 +40,7 @@ int hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, int hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, void *buf, size_t buf_size); int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req80211, - int chan_start, int chan_num, int *timeout); + int chan_start, int chan_num); int hif_stop_scan(struct wfx_vif *wvif); int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, struct ieee80211_channel *channel, const u8 *ssid, int ssidlen); diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c index 695b06974194..9e2d08317c9e 100644 --- a/drivers/staging/wfx/scan.c +++ b/drivers/staging/wfx/scan.c @@ -56,7 +56,7 @@ static int send_scan_req(struct wfx_vif *wvif, wfx_tx_lock_flush(wvif->wdev); wvif->scan_abort = false; reinit_completion(&wvif->scan_complete); - ret = hif_scan(wvif, req, start_idx, i - start_idx, NULL); + ret = hif_scan(wvif, req, start_idx, i - start_idx); if (ret) { wfx_tx_unlock(wvif->wdev); return -EIO;