From patchwork Thu Aug 3 09:13:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinming Hu X-Patchwork-Id: 9878505 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 877556037D for ; Thu, 3 Aug 2017 09:13:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 754C928871 for ; Thu, 3 Aug 2017 09:13:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A32B28887; Thu, 3 Aug 2017 09:13:38 +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 E8D0B28871 for ; Thu, 3 Aug 2017 09:13:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751828AbdHCJNg (ORCPT ); Thu, 3 Aug 2017 05:13:36 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35819 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751236AbdHCJNf (ORCPT ); Thu, 3 Aug 2017 05:13:35 -0400 Received: by mail-pf0-f196.google.com with SMTP id j68so954577pfc.2 for ; Thu, 03 Aug 2017 02:13:34 -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; bh=AISQ6ZcdxqhbS1mMBf2Se3I6jwyNeUl9jtA/2l/oFA8=; b=YCOKngZTCMZJvajKIJu2+fDKmNCWJ/cJZSdOp4s5nmWFAe0epYfQ2keluOaw5KXLg2 l95VhItosE1XyjQLu/fqVMfiLlKV9J/mvunvmBsl/y70+jr9TbfD//VZP+eEYCakXeyn 5AP7XPYJCk34ZTgZINWtHOg4EvmVZX3cOKX6FFWGKd5aTF83XVJYpvY+/6x25drJSQYR sO7kkoqjhz4veK4Xn0qVYyBFT3faziChYH1MdbbR/bYptSfGOa7QXpZu1Hl7lusjeliF qYxyvFG18aNgp3q8diC4kM2ea9nrR3hwtoeExytZLXHnO7Bhwea5e50otS2LKu46Bd0A BP+w== 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; bh=AISQ6ZcdxqhbS1mMBf2Se3I6jwyNeUl9jtA/2l/oFA8=; b=KX3M9J0pNnLNa94PY/GNheq3Q8WGe5cwo+PIVt6qn3BmLVW8lAo4DAfB61skb0LIKO L/EnaXxcKLRB7vsXkhtzGADf3jdS+r17hpBRHq9ctaI+DqL0pMYHNZuzPbHtxh/KC5Wa 8efhTOVFxBP5R1/h3iMVT1brjf5dE8Hv61facl6bVySOReuhXMVV2zT7w03/OV5rxZmt NElLZ2CjV7ftm1K1I539HuFxAcpSkDno/O4VHjphANfXvsCQ2dTGcXQvHGQrNtQZiaxN gOjtePHyaOn5a2HGtTcusrSGUngu/uncG2K/cbGqZDX/1pJCd/JFmBBuBpdndJzlp4YQ zcUg== X-Gm-Message-State: AIVw113XcXMEsqNpwGfmeTlxF6IwviNdwdfneKeWb7j3tkiR0SmyV0dg yuVij+O7OgYHzpeM X-Received: by 10.84.218.2 with SMTP id q2mr1212837pli.320.1501751614474; Thu, 03 Aug 2017 02:13:34 -0700 (PDT) Received: from ubuntu.members.linode.com ([2400:8902::f03c:91ff:fee7:7cf1]) by smtp.gmail.com with ESMTPSA id k73sm49882463pfg.17.2017.08.03.02.13.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Aug 2017 02:13:33 -0700 (PDT) From: Xinming Hu To: Linux Wireless Cc: Kalle Valo , Brian Norris , Dmitry Torokhov , rajatja@google.com, Zhiyuan Yang , Tim Song , Cathy Luo , Ganapathi Bhat , Xinming Hu Subject: [PATCH 1/2] mwifiex: Do not change bss_num in change_virtual_intf Date: Thu, 3 Aug 2017 09:13:27 +0000 Message-Id: <1501751608-12829-1-git-send-email-huxinming820@gmail.com> X-Mailer: git-send-email 2.7.4 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 From: Xinming Hu Commit "mwifiex: Do not change bss_type in change_virtual_intf" Keep original bss_type unchanged. bss_num should keep the same style, in this way. Unique tuple (bss_type, bss_num) will be able to locate the right priv structure. Signed-off-by: Xinming Hu Signed-off-by: Cathy Luo Signed-off-by: Ganapathi Bhat --- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c index 820475a..58720c9 100644 --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c @@ -893,23 +893,15 @@ static int mwifiex_deinit_priv_params(struct mwifiex_private *priv) switch (type) { case NL80211_IFTYPE_STATION: case NL80211_IFTYPE_ADHOC: - priv->bss_num = mwifiex_get_unused_bss_num(adapter, - MWIFIEX_BSS_TYPE_STA); priv->bss_role = MWIFIEX_BSS_ROLE_STA; break; case NL80211_IFTYPE_P2P_CLIENT: - priv->bss_num = mwifiex_get_unused_bss_num(adapter, - MWIFIEX_BSS_TYPE_P2P); priv->bss_role = MWIFIEX_BSS_ROLE_STA; break; case NL80211_IFTYPE_P2P_GO: - priv->bss_num = mwifiex_get_unused_bss_num(adapter, - MWIFIEX_BSS_TYPE_P2P); priv->bss_role = MWIFIEX_BSS_ROLE_UAP; break; case NL80211_IFTYPE_AP: - priv->bss_num = mwifiex_get_unused_bss_num(adapter, - MWIFIEX_BSS_TYPE_UAP); priv->bss_role = MWIFIEX_BSS_ROLE_UAP; break; default: