From patchwork Sat Apr 29 12:03:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 9705781 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7A164603F9 for ; Sat, 29 Apr 2017 12:04:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BD3428558 for ; Sat, 29 Apr 2017 12:04:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6090928688; Sat, 29 Apr 2017 12:04:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE92F28636 for ; Sat, 29 Apr 2017 12:04:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426283AbdD2MEP (ORCPT ); Sat, 29 Apr 2017 08:04:15 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33664 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1426783AbdD2MEI (ORCPT ); Sat, 29 Apr 2017 08:04:08 -0400 Received: by mail-wm0-f68.google.com with SMTP id y10so15609324wmh.0 for ; Sat, 29 Apr 2017 05:04:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wa7tgPfNvNDXaPO2scuaBb/FLc283I7LmIquxKa5Cic=; b=ceJL0bxrXUE2eZf4XzRsA7izLmDXFnk3BpO8P0JAmuc96EssERhBVIL+R70RNC6vg8 FljUZXQF93t6dTx83oh8MfUk9+lcMsRA9L5bH2fNXKSmKSX06jxfNBpdyvH9l8AQllFP c7uSVNzlWRv2U2tvXd+B9E/YbBGDI1RshsOis6hV3VKLB4VZvnCCIXCgDMZyw0tVtKqG 8m2m/8RbBQBIqxFHaUlcaQjxHfx6eLICgPzun5302AXJ9blx6qjmVGHlM/sIZEm3Jqok /r1T5UUKSJ0T3nOLA6x95KTGVP4l8UEXnrMT6aa6Gy7N8R8ld2VK8gqSN3eoxw/pjISi rEvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wa7tgPfNvNDXaPO2scuaBb/FLc283I7LmIquxKa5Cic=; b=pqCn22AKrnJvabgwYbWL78oIxDkR3PI7dR4tjTiM3FJh89/B3bc0Lfl0ySwa9qLA1d YoTAfHVwtKelpmnRq9LvwALfvwJ7ivwqjjLKGlhTg5JEYaL9bKsnfre2RTSkbkweMQyc iZV1Jh7F3utuwOoYsILVd2vWmJEm0SGQqPu1cch0BF1CZ/zSOsGtj3f9WHy/MwqOtkGl jf3jzf257I9kcHtfE2bH1QUCCxHLo+WCEwl8PMizdFX6tgO5nc5HE6DTVDVkdsRRQNot s8YLR8SS86VnsI1cRrY3LQAZQ8yaPUmbiPkUboirBGpzDso3ok3H6LvRNX5+3Vh7/IMz EkAg== X-Gm-Message-State: AN3rC/50YlXEx5PTkrLySyXQ/8QNTJ/Agfu3RUMfODvETCJ8bBfAW9/X pp6tJbWgZXkBsQ== X-Received: by 10.28.105.11 with SMTP id e11mr1655562wmc.7.1493467447514; Sat, 29 Apr 2017 05:04:07 -0700 (PDT) Received: from localhost.localdomain (188.29.165.54.threembb.co.uk. [188.29.165.54]) by smtp.gmail.com with ESMTPSA id 30sm1463083wrp.6.2017.04.29.05.04.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Apr 2017 05:04:07 -0700 (PDT) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, Malcolm Priestley Subject: [PATCH 4/4] staging: vt6656: Only call vnt_set_bss_mode on basic rates change. Date: Sat, 29 Apr 2017 13:03:45 +0100 Message-Id: <20170429120345.3782-4-tvboxspy@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170429120345.3782-1-tvboxspy@gmail.com> References: <20170429120345.3782-1-tvboxspy@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP To ensure the bss is always synchronized only call on basic rate change. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/main_usb.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 06f7841d44d3..095b85567306 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -637,7 +637,6 @@ static int vnt_config(struct ieee80211_hw *hw, u32 changed) { struct vnt_private *priv = hw->priv; struct ieee80211_conf *conf = &hw->conf; - u8 bb_type; if (changed & IEEE80211_CONF_CHANGE_PS) { if (conf->flags & IEEE80211_CONF_PS) @@ -651,15 +650,9 @@ static int vnt_config(struct ieee80211_hw *hw, u32 changed) vnt_set_channel(priv, conf->chandef.chan->hw_value); if (conf->chandef.chan->band == NL80211_BAND_5GHZ) - bb_type = BB_TYPE_11A; + priv->bb_type = BB_TYPE_11A; else - bb_type = BB_TYPE_11G; - - if (priv->bb_type != bb_type) { - priv->bb_type = bb_type; - - vnt_set_bss_mode(priv); - } + priv->bb_type = BB_TYPE_11G; } if (changed & IEEE80211_CONF_CHANGE_POWER) { @@ -690,6 +683,7 @@ 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); } @@ -850,7 +844,6 @@ static void vnt_sw_scan_start(struct ieee80211_hw *hw, { struct vnt_private *priv = hw->priv; - vnt_set_bss_mode(priv); /* Set max sensitivity*/ vnt_update_pre_ed_threshold(priv, true); }