Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1895118ybz; Sat, 18 Apr 2020 10:42:22 -0700 (PDT) X-Google-Smtp-Source: APiQypK61Dlm5ryy1SulWHW0J62rEy4GqP7+wJ4EsQoqu1ghQivlPrlHHCfHNHguHHk8e2Tx/Q15 X-Received: by 2002:a05:6402:32e:: with SMTP id q14mr8008827edw.84.1587231742033; Sat, 18 Apr 2020 10:42:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587231742; cv=none; d=google.com; s=arc-20160816; b=oJorLlE0+F344mWqEmKSPDJ01gw6TR4Ul9qSDQzmVRYH2yBVXoL4jcYCbMcbl51VIB 8UvfR0ltprvbAPW7a1Qxkw0La2bY+72ZVoiU83TAsOaE6Fl76qstplGnEtOtyp5Z8Nu/ eKSNGyfO2tA78KoNpVXD3yC/gjhKQYfmoQCVsQACKtPnMkTZ+bscaiX9TGPaOFMyS/7d Yb6Oq+bH5CDaj1zAytVaMnJa4jJRwADqVpgHKv1Lq5t3hLY9OXSeznxG5JPTF5uFn3tC lhY0oFD3kMBbcvz/XDgdveO0je8IaDLoKQMokgAxcUyY3cC8A2KKKljpkAnew/qYINko GlYw== 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=kd5smkYSSB4FMGfeUinz8PyTLct8IRvqqCqI7WSgIBU=; b=qSc4p03Zg/1z/W7tK4pt1VsyPYCicJym3L0lky8lA84Qp0cql6vh4kETz/+/Pc1EA3 bwsofi2vXQQ29Zotab+pHmnMoRFekawkO0QnRqMyY30fNwUPIVTnjWqM0Q39XcErWXtz qtOy/EPF9y8h0wORFCR1Hsu5JxuA6m1w3G0cZodSW3fSOZUfs/VYyFPFK4JT2IrzH04P 5mA0wEDH72u3WByprQ2JFwWS/EFRqUHqxWxxRAU0DApWl9KVNDNHlcpf+falVrB3CJ4d mzIsICjQz+TKjtKtyTNMfx4ra9fli6C/5cwZ2CU2DjFd+EOOrTjFQwEUMu4ZB+MQ+rF3 yxpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=m0YBAMO+; 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 k5si195891edr.491.2020.04.18.10.41.40; Sat, 18 Apr 2020 10:42:22 -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=m0YBAMO+; 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 S1726036AbgDRRhX (ORCPT + 99 others); Sat, 18 Apr 2020 13:37:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725887AbgDRRhW (ORCPT ); Sat, 18 Apr 2020 13:37:22 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92AC6C061A0C; Sat, 18 Apr 2020 10:37:22 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id y24so6413968wma.4; Sat, 18 Apr 2020 10:37:22 -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=kd5smkYSSB4FMGfeUinz8PyTLct8IRvqqCqI7WSgIBU=; b=m0YBAMO+WbOSfBzFNh/zTyWpfKuquX6JVZcYc1RO47R4U8ERmZkkp77mvErsv2TMNx AHnJWPahXlZRTaR3gKiIXUg5S0UU6XY0yM8HrzQOBA0ebNTbTzk1CKyuXm6nH+7Kwc+n yHoH6IffyFpAPWwPKG6R4Rd6lCiC7MWXDlWLJdRw3Un+Gf2DQsmMCL4TqLgZgCf0W7pj uwGWhJKD67nwdaciNeAxwx8afn8aG0s4dbCE4C7Mt2Plmx2f9YCi+BoPGNbMtJqeqiTs fAqyjV+X3NQXPQUji5TFPnQ+j0MSt/c4AJNtWbI0rt8SnZKQcxRdGmRJs9RaWhiy6Oe0 tAMw== 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=kd5smkYSSB4FMGfeUinz8PyTLct8IRvqqCqI7WSgIBU=; b=V31Q6/Pq73ojDWjPQFvH+3HPZydM52UPixImusLPvdN3ISEJ+tBdVZB2vXMTrsTqXd oFYqhESDjjB+FxjLxJqkMoOz+abQ9L3H0nfL9E4+Nel1b3ZpkuFuD8rmqRUIDKeTQRwI Xksqj5eM01adP69NJYqNvHx6Z0C99sQpVHl3LGXW4SNUS90qkgseHRHiLLxEA6xywaDB DV9/WUGRf8FtpyfMLQIPvald2HnJ3mvbFnWymzF7Ld8dde68KqlZDMFMsbNqQdt9Cz3V mg8hAoTU1IthM6lqEby+XIHl6bQ5g1LR6l0OeoUOOoDybriwZHylSmHFufSGWxiawrP2 56KQ== X-Gm-Message-State: AGi0PuZQPCgMsOhjtaTcWlcePHu9xZd18vz8CYH/9dZTDezp8c6CNlPP cSug5cZKo9l/Xp8lWjM+coQkPHV9 X-Received: by 2002:a7b:c3cf:: with SMTP id t15mr9224669wmj.34.1587231441017; Sat, 18 Apr 2020 10:37:21 -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 q187sm12501075wma.41.2020.04.18.10.37.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 18 Apr 2020 10:37:20 -0700 (PDT) To: Greg Kroah-Hartman Cc: "devel@driverdev.osuosl.org" , linux-wireless@vger.kernel.org, Oscar Carter , stable@vger.kernel.org From: Malcolm Priestley Subject: [PATCH ] staging: vt6656: Fix calling conditions of vnt_set_bss_mode Message-ID: <44110801-6234-50d8-c583-9388f04b486c@gmail.com> Date: Sat, 18 Apr 2020 18:37:18 +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_set_bss_mode needs to be called on all changes to BSS_CHANGED_BASIC_RATES, BSS_CHANGED_ERP_PREAMBLE and BSS_CHANGED_ERP_SLOT Remove all other calls and vnt_update_ifs which is called in vnt_set_bss_mode. Fixes an issue that preamble mode is not being updated correctly. Fixes: c12603576e06 ("staging: vt6656: Only call vnt_set_bss_mode on basic rates change.") Cc: stable Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/main_usb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index fcd0fe5e6d72..85d4133315b1 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -625,8 +625,6 @@ static int vnt_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) priv->op_mode = vif->type; - vnt_set_bss_mode(priv); - /* LED blink on TX */ vnt_mac_set_led(priv, LEDSTS_STS, LEDSTS_INTER); @@ -706,7 +704,6 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, priv->basic_rates = conf->basic_rates; vnt_update_top_rates(priv); - vnt_set_bss_mode(priv); dev_dbg(&priv->usb->dev, "basic rates %x\n", conf->basic_rates); } @@ -735,11 +732,14 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, priv->short_slot_time = false; vnt_set_short_slot_time(priv); - vnt_update_ifs(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 | + BSS_CHANGED_ERP_SLOT)) + vnt_set_bss_mode(priv); + if (changed & (BSS_CHANGED_TXPOWER | BSS_CHANGED_BANDWIDTH)) vnt_rf_setpower(priv, conf->chandef.chan); -- 2.25.1