From patchwork Fri Oct 20 03:48:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lin X-Patchwork-Id: 736593 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91887CDB474 for ; Fri, 20 Oct 2023 03:48:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376289AbjJTDsr (ORCPT ); Thu, 19 Oct 2023 23:48:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376280AbjJTDsa (ORCPT ); Thu, 19 Oct 2023 23:48:30 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2050.outbound.protection.outlook.com [40.107.21.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E5EBD63; Thu, 19 Oct 2023 20:48:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hQ7OJFMikuS79Uo4KUc5eG3Ri8jpfNYbu0x+a08lIQqGPSqcyhHgYvRK2eSoWcw/KtgVvxGsUZDpHtlnHac/dCaLb2zP2ELwjRaBWQty2lHpQvqLzN3B75WnDeAFRqVqJ0SaK50LdEIeohSkGtiHTbkT2XZt+pceJpwSqhIFh+oWtG0Vx1Qw2bovdIFVsP4fp9znSwdNSynMoHUlkLYqh3zfhyo+HoEwukdswQZGE1s3MzuwjV0GiCPuw1pCGwmJBqurgUeBIQTbytdbffSHIiXya23v3nTCBzmtW9K/o+sPkviisvwUdFdJ2iXXuYHWDuFL7+yRgt8ZOGUtaX/Vag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=x4g8aiFpAPO46rCCo4fpIYzWi8yIvh5ziB7zpPcJZQQ=; b=OwTY3yB4ersACrdc4H/Zi7Ba41C7sa3rmEAXepSz34b7ViFAiq6ggCGL4Zdswz6HmPxoyjA8//zoBVD3o4m426Ri4FAGEOFoVpBetXPxaPUl2wqWrYpNSRjAgDtqtVmm0xYqmxzh5i2n0M7L3pm6i0bv0YPH1ouzZswTTSV78tok8nhcGzus0DSDQaBo7dVn1NoUW8vdUmdvt5MvlaFm1p9RtI2+9KMGylkWbRYxbGWvuIXE3N3nJhnbfJLqmGQn38OzsfdNp1O0gH/9m9v0w07t8Izc79fKvtvvQHQ0fRMsX2wb58gbr2o+xteqGyhe9+uuEqXMNU4S/54i5NoTpQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x4g8aiFpAPO46rCCo4fpIYzWi8yIvh5ziB7zpPcJZQQ=; b=VjyA59KZiSJbl3paJPqEF6Rs8lpVD7k+YaqQz5Ckqthoh5Kn/nMwr47CdEFp82e2h6tt3K6EEJx2whOgdTymOHTugzg6QfUkjVH3ZO7AVoPNYkul6uSnFgakIXWKBY6eaqcFIn1zaXX1f+IjJRUnaZ1AGsY5p8mlhCHDYolV1Hg= Received: from PA4PR04MB9638.eurprd04.prod.outlook.com (2603:10a6:102:273::20) by VI1PR04MB7069.eurprd04.prod.outlook.com (2603:10a6:800:127::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.11; Fri, 20 Oct 2023 03:48:22 +0000 Received: from PA4PR04MB9638.eurprd04.prod.outlook.com ([fe80::34dd:289e:9e8b:9c9b]) by PA4PR04MB9638.eurprd04.prod.outlook.com ([fe80::34dd:289e:9e8b:9c9b%7]) with mapi id 15.20.6933.011; Fri, 20 Oct 2023 03:48:22 +0000 From: David Lin To: "linux-wireless@vger.kernel.org" CC: "linux-kernel@vger.kernel.org" , "briannorris@chromium.org" , "kvalo@kernel.org" , "francesco@dolcini.it" , Sharvari Harisangam , David Lin , Pete Hsieh Subject: [PATCH v6 4/6] wifi: mwifiex: fixed missing WMM IE for assoc req. Thread-Topic: [PATCH v6 4/6] wifi: mwifiex: fixed missing WMM IE for assoc req. Thread-Index: AdoDCER83S1icFhzSwGFhocieyul/g== Date: Fri, 20 Oct 2023 03:48:22 +0000 Message-ID: Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PA4PR04MB9638:EE_|VI1PR04MB7069:EE_ x-ms-office365-filtering-correlation-id: 23f643a8-b00c-4d0f-1c55-08dbd11f6807 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mcymvGXyMF8HRHKuqa0nUa3dINIRZnDO4xj5qk/bxvNDULWhLxYNEQLT9hGCtgP0eHO1oQgzFOhZAOeSgDmZITSF9APDGkJoLFCI9DesVQyAFL4yLSHz3xVs2fFIf1MBDpguvLHbLdxQRKvzfSmKXyGW16eSISTR1/8MztXzjwOPn71cQHV51kzRw9QaMBp0gQ4yeZYQ6oHsLNbEy4bw51ZDCNEnLpd5vdUhLB+PQzep9NlHYQw5S/FgnteMwnil5ppHSeYhGC/agct6VVi4DSDsyHoDX3an4M6k46UYH8slklVUAn5uZpS/xB5wr/IIYL2nohF7Fc7JbAleit3Vktoxjf6VJXLD5PMFrtz+H/mA3+4c01m0Ollw+QDh5uqljq+7WpV/Sc+GN8vE2balHlDj2giwLxQw3Jv/ezD4zXd45guyJExqeUXaRUpsXHUyyDyTOPlZfmnXqLrk60v9+Tkkz1kYK8dLGR+RaDuq539MGKcAfs8WyN9AqBSOJ1Rk1PAAUpxXjyhoa3ih2uWIDSrWXbvBsVy69SqmXzdUyFsRvPMcVj0H3P1Vav0mdk97VZPZv90igNM2aGwzTlaTjc1kJI9qhX7Jj2XVwfTdW76k9vwgrmFyRutyNDqLibvR x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PA4PR04MB9638.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(396003)(136003)(376002)(39860400002)(346002)(230922051799003)(186009)(1800799009)(64100799003)(451199024)(55016003)(38100700002)(41300700001)(4326008)(5660300002)(8676002)(8936002)(52536014)(86362001)(33656002)(2906002)(122000001)(478600001)(83380400001)(9686003)(7696005)(26005)(71200400001)(6506007)(316002)(38070700009)(66946007)(76116006)(54906003)(66476007)(6916009)(66446008)(64756008)(66556008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: NSYPu+LyCMZZYWEImssSGaLrnMprUNzWuJjjShMEQqciGYC/bVjDUZB5Llf8GtGhHvVatZjgyJQMgYfr9q1BoDGPjDlOGe39yXxFZsClLIlMhBShstN0lQh3E0jcKnR7lJg9GLJVjjkE0qPIDb0plBEa1hn8jZuvF9Qc8DiuYtLJNNOUqMzoz+qvEAonptUbQvyV2Cz1Etr642fjQcJnqZmPmrjx3or8ej4Bv0aLnG77QGjIxFTKCgKLK82QkSmBnZdJtsQ9mVwo/MVazN2OEtMYe6AIOJjHdG5llgC9zZ40gVhLkRuIt3vOUTgMxHBcEZL4QYc+JknedBL1PUthhOmWaL8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i1B6OFhBSegPVghez30yj+vB7FIZjrPl3EnPTXBVjBnejBqhzO+WkebP2QRhYrUHHDnkbxTRL6fBO/QyifIZ2VDZOO6Xkkxb3Ub/apq8kazIRwmDxKTItUsDNh37+gkfDMAtfJdTHyeCWaZBpmNqn0xeBdK09OCxlt2349RT MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PA4PR04MB9638.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 23f643a8-b00c-4d0f-1c55-08dbd11f6807 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Oct 2023 03:48:22.1936 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: UKlplxEwlwwljH/bNF5/rL3yZeED4qbtnly43mw5/8KP9yjhzaGd4RhblED4/4TE5jOaySMOxFXNpTN3J/Ozgw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7069 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Remain on channel must be removed after authentication is done. Otherwise WMM setting for assoiation request will be removed. Signed-off-by: David Lin --- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c index a21310f3807c..b99de9f4ca14 100644 --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c @@ -4306,6 +4306,8 @@ mwifiex_cfg80211_authenticate(struct wiphy *wiphy, if (!ret) { priv->roc_cfg.cookie = get_random_u32() | 1; priv->roc_cfg.chan = *req->bss->channel; + } else { + return -EFAULT; } } @@ -4418,6 +4420,16 @@ mwifiex_cfg80211_associate(struct wiphy *wiphy, struct net_device *dev, if (priv->auth_flag && !(priv->auth_flag & HOST_MLME_AUTH_DONE)) return -EBUSY; + if (priv->roc_cfg.cookie) { + ret = mwifiex_remain_on_chan_cfg(priv, HostCmd_ACT_GEN_REMOVE, + &priv->roc_cfg.chan, 0); + if (!ret) + memset(&priv->roc_cfg, 0, + sizeof(struct mwifiex_roc_cfg)); + else + return -EFAULT; + } + if (!mwifiex_stop_bg_scan(priv)) cfg80211_sched_scan_stopped_locked(priv->wdev.wiphy, 0);