From patchwork Wed Nov 28 17:29:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 152331 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1365139ljp; Wed, 28 Nov 2018 09:29:34 -0800 (PST) X-Google-Smtp-Source: AFSGD/VpPwFb5GGJrkxAz9f9QllZz5oq/jElshidDcn38BWkNAilDpiBWyrRqs2crBBY3DbRzAUG X-Received: by 2002:a17:902:4827:: with SMTP id s36mr36553062pld.168.1543426174242; Wed, 28 Nov 2018 09:29:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543426174; cv=none; d=google.com; s=arc-20160816; b=pX9ZkH8oaI5c9Hfa9kHa3PAruIlsLPDCuWCKq50sw6iOhSrQCXHUFd98WV3sryHaBj Wo8TDDXrty9In0L6t0EBBv8QSwLDIAi3wfIWoxuvSWwIvD5JBb7kQqjWlZwHKPeuagev 1hRsbD1V7tN7HtXS/LymOBKTXGTR7XirZ679sLOTktT2ehwCyh0tLN65zlciucCMAQkc 7lxJPzap+eUnCFqb1HFFj3t/A5ls0a+Qod2lr7F4LPdvUUKUNexEu6axhDvaEDhGZo08 kYGNWvJ3V9UOvxh1tjARpexqnMWU8Rf1tVAwMkJHiuWPw7qW3vISgoxRSTX4ItV/PK/o CZPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=mDqA/ivhvdtvBtGYw++tkGHIok22fxyQ+MKhF2uc9NM=; b=SyRmd7ibs/XXY5OUggGFA9dGkY+V7c4+e6484+h1hzB7+k5o9v9woi+RgPB7YPSfdT B7qdxrYZ7q8G+tZGWIKulznIkaHSdDmMEBrv4sU8FxBBO/msq80Ima7N1cLMuoGv+mS+ QopgwwGlMrc2T6suqHogpKwnzxGw4GiIh0ZyAH0HJz5KtyRzZC0cu2bwE6ZeZeHPUL+0 kj21+XfvEeL69dI7M/zfc23uxl0Bc6ZBFgBoFNjsM2JMB/1xV8oBEGj16w2EOPyFm3AE tIMcmFttlfx8DhNrYfx1UCIyV3gP4QcWjEDiFqXymjS9v9H484QZYXRBj+3umZERnVo0 hY5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dfzlDW1W; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 44si8357481plb.57.2018.11.28.09.29.32; Wed, 28 Nov 2018 09:29:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dfzlDW1W; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729212AbeK2Ebr (ORCPT + 15 others); Wed, 28 Nov 2018 23:31:47 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:42099 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729050AbeK2Ebr (ORCPT ); Wed, 28 Nov 2018 23:31:47 -0500 Received: by mail-pl1-f194.google.com with SMTP id x21-v6so17697489pln.9 for ; Wed, 28 Nov 2018 09:29:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mDqA/ivhvdtvBtGYw++tkGHIok22fxyQ+MKhF2uc9NM=; b=dfzlDW1WipnJF94ZjeKZvLJXI5x9e5lTkjYhAJ2JgOBTpmiuztsZlM9LHuv9p43Wer gexb8qGQxGOtWqraPHcp5m9Jc1qnh0YF1LYJZ3D0QTCAqJpXEB/5a6krPHh2Fk/QYCjK a/1htc0SkGPT5hyXjJ4sONxK4366TyFmkmWBE= 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=mDqA/ivhvdtvBtGYw++tkGHIok22fxyQ+MKhF2uc9NM=; b=aNgsS65vCNwqR44QmH6l3Ds7/Q66OatY/ur9SRAoqR7FqbmoVkDJqVUqwIAcrGP7/1 9P/p7RuF08QK7qUCtX9JuKHjvfUVpjlc6CHWuazrvEouCIeK6nmh30dwZJqvr12cid0W TIo3GknZ4AbS7QzkJFZOg3fgwf072ZD1TL0JtsnJ/X3Y1+q4gh3fCSqqi+YWGlhWqgwl pYtlOtJFdLVGQm8fN15/0hNp7lub2s8yT1qto6EijyQn2KsReL9KaOyRm7slSSwMa4VA 1FJB3x++y9uraNwFObx84LaHdgAIAZr57wHFH/0RpaEjBEjjqnLfSZQ6JptWjITYjPaQ he8Q== X-Gm-Message-State: AA+aEWaKtg5p+aqBMPAknrEzculOtqr1dPYwNB60ypeLWE2dEso21hMw NU3CC4WdnEj+WUTobkUUCJvoL09/sM8= X-Received: by 2002:a17:902:14b:: with SMTP id 69mr38326666plb.52.1543426164320; Wed, 28 Nov 2018 09:29:24 -0800 (PST) Received: from localhost.localdomain ([49.207.53.6]) by smtp.gmail.com with ESMTPSA id 84sm13624360pfk.134.2018.11.28.09.29.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Nov 2018 09:29:23 -0800 (PST) From: Amit Pundir To: Greg KH Cc: Stable , Karthik D A , Amitkumar Karwar , Kalle Valo Subject: [PATCH for-4.4.y 04/10] mwifiex: fix p2p device doesn't find in scan problem Date: Wed, 28 Nov 2018 22:59:03 +0530 Message-Id: <1543426149-7269-5-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543426149-7269-1-git-send-email-amit.pundir@linaro.org> References: <1543426149-7269-1-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Karthik D A commit 3d8bd85c2c9e47ed2c82348aa5b6029ed48376ae upstream. Marvell p2p device disappears from the list of p2p peers on the other p2p device after disconnection. It happens due to a bug in driver. When interface is changed from p2p to station, certain variables(bss_type, bss_role etc.) aren't correctly updated. This patch corrects them to fix the issue. Signed-off-by: Karthik D A Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo [AmitP: Refactored to fix driver file path in linux-4.4.y] Signed-off-by: Amit Pundir --- drivers/net/wireless/mwifiex/cfg80211.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.7.4 diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 6fcaa949b14a..1e074eaf613d 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c @@ -1150,6 +1150,12 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, priv->adapter->curr_iface_comb.p2p_intf--; priv->adapter->curr_iface_comb.sta_intf++; dev->ieee80211_ptr->iftype = type; + if (mwifiex_deinit_priv_params(priv)) + return -1; + if (mwifiex_init_new_priv_params(priv, dev, type)) + return -1; + if (mwifiex_sta_init_cmd(priv, false, false)) + return -1; break; case NL80211_IFTYPE_ADHOC: if (mwifiex_cfg80211_deinit_p2p(priv))