From patchwork Tue Nov 21 07:24:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinming Hu X-Patchwork-Id: 10067705 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 49DE1602B7 for ; Tue, 21 Nov 2017 07:24:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D2DF28E80 for ; Tue, 21 Nov 2017 07:24:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 31FBF28ECE; Tue, 21 Nov 2017 07:24:36 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 AE42728E80 for ; Tue, 21 Nov 2017 07:24:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753097AbdKUHYd (ORCPT ); Tue, 21 Nov 2017 02:24:33 -0500 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:59618 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752905AbdKUHYc (ORCPT ); Tue, 21 Nov 2017 02:24:32 -0500 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vAL7OKND025877; Mon, 20 Nov 2017 23:24:27 -0800 Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2ebwcecnhb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 20 Nov 2017 23:24:27 -0800 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 20 Nov 2017 23:24:26 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Mon, 20 Nov 2017 23:24:26 -0800 Received: from smtp.marvell.com (unknown [10.38.32.107]) by maili.marvell.com (Postfix) with SMTP id 045613F703F; Mon, 20 Nov 2017 23:24:22 -0800 (PST) Received: by smtp.marvell.com (sSMTP sendmail emulation); Tue, 21 Nov 2017 15:24:20 +0800 From: Xinming Hu To: Linux Wireless CC: Kalle Valo , Brian Norris , Dmitry Torokhov , , Zhiyuan Yang , Tim Song , Cathy Luo , James Cao , Ganapathi Bhat , Ellie Reeves , Xinming Hu Subject: [PATCH] mwifiex: do not support change AP interface to station mode Date: Tue, 21 Nov 2017 15:24:03 +0800 Message-ID: <1511249043-21404-1-git-send-email-huxm@marvell.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-11-21_03:, , signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1711210101 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 Firmware do not support change interface from micro-ap mode to station mode, forbidden this operation in driver accordingly. Signed-off-by: Cathy Luo Signed-off-by: Xinming Hu --- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c index 6e0d9a9..a87758f 100644 --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c @@ -1181,6 +1181,12 @@ static int mwifiex_deinit_priv_params(struct mwifiex_private *priv) switch (type) { case NL80211_IFTYPE_ADHOC: case NL80211_IFTYPE_STATION: + if (mwifiex_get_priv_by_id(priv->adapter, priv->bss_num, + MWIFIEX_BSS_TYPE_STA)){ + mwifiex_dbg(priv->adapter, INFO, + "Skip change virtual interface\n"); + return 0; + } return mwifiex_change_vif_to_sta_adhoc(dev, curr_iftype, type, params); break;