Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2561812ybz; Sun, 19 Apr 2020 04:23:07 -0700 (PDT) X-Google-Smtp-Source: APiQypID6GV0nHNddZpspyfA5B0TSdrmjNeqYVIf3JKIvFqhmN6xFedT39AZgNpMVySX/tX6NDST X-Received: by 2002:a05:6402:310b:: with SMTP id dc11mr9628526edb.143.1587295387324; Sun, 19 Apr 2020 04:23:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587295387; cv=none; d=google.com; s=arc-20160816; b=VXF5Fc0/tNA692Yif6BRWX0cdkRVV27kNi5pG4OPK10UaYblZI+UsRv3vcgOmX8a+3 NKZwbc8sGKzStwqnwsY3E9B5mwRPPxffPTJnMowe5FRVoqvTSy1wjq2n+kBEKg06N1fA oFrfTIHZhKALl2/o+nGGN3wmFN2xkdVEN5fhgBIO4AWDaBbJDUI+We3xyrzVGy+ZksO4 mgpsvjT1HP7DPD/JiPmKhf9m9tQhmRAG1e/XFOA83Hfin5evfartDtnjisCrgSsa3nbu EmtrgZxTeozwqLh+tcSIsYN76We6Q/UBBCBvbAuoe/vQ4YAASk0zEItIaD4aJxiTsx2c mqoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:cc:to:dkim-signature; bh=oqIZa3zYdSKtfEDW9ORxtSFvOk9NL3nLKI1j4QeSOmQ=; b=Mrca6n/I8Xroo++PRZYSlVzlQupS/3FyKyGB1lU6f5qbII4nGmAHDVNKLrtasOQ+Kv cq7Gr/QycM6CyuMtk8oSLOd6qcBSg8OW4zKb9xGRzhzsRQnyiv8cS5xLF0cWmUFc/Taf R1foKVBW1pGMU9ufyVPcez+jswQKhEOwAvrb2agjKMkdguA80QYFay6mTdMUQ3aPhUX/ Xlyz7q50zJmn/VYennR1I7oy6CB2F4MQxXeSbw5yuwkbQgFFja7nCWedTxAXaJI5Gp28 YK+R53F03LG0svuXetU0n8l8KjTi1T2Fq3k7SixoqGbHdIWR2ORX+dK+UU/ExDAAUmZt CcdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Bi0/GvMW"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yc9si17042667ejb.319.2020.04.19.04.22.26; Sun, 19 Apr 2020 04:23:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Bi0/GvMW"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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 S1725970AbgDSLU5 (ORCPT + 99 others); Sun, 19 Apr 2020 07:20:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725841AbgDSLU4 (ORCPT ); Sun, 19 Apr 2020 07:20:56 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6834AC061A0C for ; Sun, 19 Apr 2020 04:20:56 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id t63so6640295wmt.3 for ; Sun, 19 Apr 2020 04:20:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=oqIZa3zYdSKtfEDW9ORxtSFvOk9NL3nLKI1j4QeSOmQ=; b=Bi0/GvMW65TgGIUxdL7xdk4vUKiw75Y3eeIbhx/Hf8Ct93Lh3J9p2G7NAdrwrRJTZ4 u/sYbkMNGWcyMu+n9L7PpzSe8it37ZEqkXaoy8csZlthHAv51yHP8Bk56SJaV9BOXybI VkC0PosRPTZ5Jwg5SE2KlUgUs3JKc5/8RwK/wLKs9w7STzfDsVw8cZqdjuHKQdxR0Wsz qvpcwE+xPiqkd0KAKzOvSEev/uSuw6mh8ZVx4L10+Uvj/GlLvhFek+nvwVw0TdxspHns 5Zxf3N34FfJxK/tugrNxVLGfjiYvRwSAxNhnyEd75Ec+RogEg+CG1gWBxc3uTK2k8lxg 8rHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=oqIZa3zYdSKtfEDW9ORxtSFvOk9NL3nLKI1j4QeSOmQ=; b=f8aqdFgpFbGvrWpgW/LzRvgFGQRnjEejWI477wu697KG4JDXIaq2oCUwPHAG97rBAI UCDX8JpT2NOT77TZrBoxHVgUq8BkiYzFRLCrQFKrePGLnhAHuAlMn391yUIcM27qNUah jWLRUZA1tTZQyuruCmuNCNTvbyHX9sYexH1GctaDg/edosMitqbc7gHBqGWhn0yXZn7R 1vhhf4TfHemIF0112p+YhgJDIJk/QzxYmuwsqrZrR6Ek+9obIuJiWFpTzt0vmnAyf40P P6VulamESCilyJrVSdol9sSJZOW0rJJDRIhVlTb6o5n6H5udYV7bBUfWaI1WFQHwliVR NW4w== X-Gm-Message-State: AGi0Pubp7kR/tyjDcHzyLZMzeA/F9wr1SQdX8g5jtEjjvkm9EfK99FI7 +1trq+EoHo19ymDOGS/9mMKDsIQq X-Received: by 2002:a1c:ba56:: with SMTP id k83mr12141163wmf.1.1587295255163; Sun, 19 Apr 2020 04:20:55 -0700 (PDT) Received: from [192.168.43.18] (188.29.165.57.threembb.co.uk. [188.29.165.57]) by smtp.gmail.com with ESMTPSA id h2sm14536720wmb.16.2020.04.19.04.20.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Apr 2020 04:20:54 -0700 (PDT) To: Greg Kroah-Hartman Cc: "devel@driverdev.osuosl.org" , linux-wireless@vger.kernel.org, Oscar Carter From: Malcolm Priestley Subject: [PATCH] staging: vt6656: call vnt_update_pre_ed_threshold from vnt_config. Message-ID: <1b00c112-347c-b0bb-61ed-a874ee448ff8@gmail.com> Date: Sun, 19 Apr 2020 12:20:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org vnt_update_pre_ed_threshold needs to be updated more often so call from vnt_config where it updated on any of config changes. It must have maximum sensitivity when the device is off channel or idle. Remove all the other calls in scanning and bss. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/main_usb.c | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 3268d86fe93b..4bca0b99cf45 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -763,6 +763,12 @@ static int vnt_config(struct ieee80211_hw *hw, u32 changed) if (changed & IEEE80211_CONF_CHANGE_POWER) vnt_rf_setpower(priv, conf->chandef.chan); + if (conf->flags & (IEEE80211_CONF_OFFCHANNEL | IEEE80211_CONF_IDLE)) + /* Set max sensitivity*/ + vnt_update_pre_ed_threshold(priv, true); + else + vnt_update_pre_ed_threshold(priv, false); + return 0; } @@ -810,7 +816,6 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, vnt_set_short_slot_time(priv); vnt_set_vga_gain_offset(priv, priv->bb_vga[0]); - vnt_update_pre_ed_threshold(priv, false); } if (changed & (BSS_CHANGED_BASIC_RATES | BSS_CHANGED_ERP_PREAMBLE | @@ -937,25 +942,6 @@ static int vnt_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, return 0; } -static void vnt_sw_scan_start(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, - const u8 *addr) -{ - struct vnt_private *priv = hw->priv; - - /* Set max sensitivity*/ - vnt_update_pre_ed_threshold(priv, true); -} - -static void vnt_sw_scan_complete(struct ieee80211_hw *hw, - struct ieee80211_vif *vif) -{ - struct vnt_private *priv = hw->priv; - - /* Return sensitivity to channel level*/ - vnt_update_pre_ed_threshold(priv, false); -} - static int vnt_get_stats(struct ieee80211_hw *hw, struct ieee80211_low_level_stats *stats) { @@ -1001,8 +987,6 @@ static const struct ieee80211_ops vnt_mac_ops = { .prepare_multicast = vnt_prepare_multicast, .configure_filter = vnt_configure, .set_key = vnt_set_key, - .sw_scan_start = vnt_sw_scan_start, - .sw_scan_complete = vnt_sw_scan_complete, .get_stats = vnt_get_stats, .get_tsf = vnt_get_tsf, .set_tsf = vnt_set_tsf, -- 2.25.1