From patchwork Wed Nov 28 14:40:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 152295 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1170849ljp; Wed, 28 Nov 2018 06:40:25 -0800 (PST) X-Google-Smtp-Source: AFSGD/XvJZwPgfm29USJbO7h/FXe9Urz+BhDs7uOkk+cwNn0Dzhn7x4XAoohi7DLt7X1BKgqyF9q X-Received: by 2002:a17:902:6948:: with SMTP id k8mr36763122plt.2.1543416025683; Wed, 28 Nov 2018 06:40:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543416025; cv=none; d=google.com; s=arc-20160816; b=0r+7BUfCv20dSRhso8dObMeKZMBxYy5O0w902vu2qfDtGb3ut/zRphNwgEZG+CUy49 MtcM2upvTzarnOrCsey1MhCc/gfrD2W4Qe4AW5BPWDsM6H5ce4jhdi70mxrfB5VswcbU oVjWVMu7FXcjO9cOaWqmA5mmXaa2bf7Jgd387dsi9MNW+VgRJijOrsq5Pr4ZPPt/1zC1 of+Ui/8YNpLelSiQA8TdhUlOJ1eX7qCdiWSgvTCkEhdDDBGnXUtvEI0AxO9tM1wMWetL UWAnaMno7szzT0nJu5eXbiXnZNmiHypY8iMccJW/yj2YNMIjRiRQSNSgwX4iLw+zApkN k8HA== 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=xxHr+mLY2J0CwMqhv5EY/rzK6JZk0S4t4fOGsDq5K+4=; b=S2M23d/30H7BqakmTt2g8sxQRGhD2671/atsAUXaTTTtiTk+qA+xHcNxM0cKqWpPJd LCRF9pgVKyoIoLM1KVTbUBnAyPj/DEJg7g+YamS5+KP3MxYLK+iDeDewEhr+M1HbGna0 4JlRQCRKLaptXxzR+KGTOhEEa8lcrVFEEFb9FzyKywvNlxnEPR3M5muZ3xUp/sFKHbg2 ksGS6cXV4Mdeprn+0NKBmeAauBoqcgXwmqAAJjX2YVN5nS5J5YPskL/XXubYOnOaMpYc 6prJ7P5hgOZPJpF5zid9reCrD5/1rhSJM2A8H+MjK6m5mru17MT3C/qZKwWinGWeA36s rCNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jVXSYfju; 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 l23si7489048pgh.533.2018.11.28.06.40.25; Wed, 28 Nov 2018 06:40:25 -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=jVXSYfju; 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 S1728442AbeK2BmR (ORCPT + 15 others); Wed, 28 Nov 2018 20:42:17 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:32940 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728223AbeK2BmR (ORCPT ); Wed, 28 Nov 2018 20:42:17 -0500 Received: by mail-pl1-f195.google.com with SMTP id z23so17485011plo.0 for ; Wed, 28 Nov 2018 06:40: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=xxHr+mLY2J0CwMqhv5EY/rzK6JZk0S4t4fOGsDq5K+4=; b=jVXSYfjuVMakQuHsvr3JTYyjitiE3PsZatsKkeZmA4BD5WAB18JILda0hPwrgbvw6+ mHMeEv1Y9qHmdJa/D9mG9ZbwqjgR76Fn2LJP4JJXU1oZgG3uEbSQNP2g+1AIc/U1aKAX dSg8U/Dnmjh+Ga0oI4cEIJdk+StM/9plEFHRw= 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=xxHr+mLY2J0CwMqhv5EY/rzK6JZk0S4t4fOGsDq5K+4=; b=NRWzRuHUd8MDsdVMnnqnb1o8Oq1gy2QI4Bl4vcRNxwcSjV7BOyuTDddRtK04n4G/F5 Gq/v1KZi3a0WzsxStkOVGAzUt8Rx1p1FXvUXFvFn7I171wgP0OWEOBjI3WlQ3nFQWBt/ +K0M28PQz6Z2PaeVQAXfgZ2FHctXaLhegNs9oyFv6dm7oNw8h1NyBW0pK/QxpsDSD2ov TLJQS8jMLjsjYTEOZohaL/cUY4cfho8tSFChXk1Gf6d6Sd/dVquFBVy7vngR2ycnvk3U qSCuJhj0Nb62m0mJECZ5YyP8EvXj3e6Dskad0+ahRH3pV8JGJ7+yb+178/KT9RDEz0Wa RovA== X-Gm-Message-State: AA+aEWYSl3LSczUTHpHGjqje8UltqsvcKKWhXGoCQiv8c2xUBQ5Xt6sT R54TnJcG7x6x3kHtUjMe9W6JRQ== X-Received: by 2002:a17:902:7402:: with SMTP id g2mr36488633pll.198.1543416023961; Wed, 28 Nov 2018 06:40:23 -0800 (PST) Received: from localhost.localdomain ([49.207.53.6]) by smtp.gmail.com with ESMTPSA id b26sm24227637pfe.91.2018.11.28.06.40.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Nov 2018 06:40:22 -0800 (PST) From: Amit Pundir To: Greg KH Cc: Stable , Karthik D A , Amitkumar Karwar , Kalle Valo Subject: [PATCH for-4.9.y 06/10] mwifiex: fix p2p device doesn't find in scan problem Date: Wed, 28 Nov 2018 20:10:00 +0530 Message-Id: <1543416004-1547-7-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543416004-1547-1-git-send-email-amit.pundir@linaro.org> References: <1543416004-1547-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 Signed-off-by: Amit Pundir --- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.7.4 diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c index 2054948050e2..4da3541471e6 100644 --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c @@ -1209,6 +1209,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))