From patchwork Thu Nov 8 03:48:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10673415 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-2.web.codeaurora.org (Postfix) with ESMTP id 13A9D14E2 for ; Thu, 8 Nov 2018 03:48:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDC652BD48 for ; Thu, 8 Nov 2018 03:48:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E0B552BD97; Thu, 8 Nov 2018 03:48:16 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 81CBA2BD48 for ; Thu, 8 Nov 2018 03:48:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728718AbeKHNVg (ORCPT ); Thu, 8 Nov 2018 08:21:36 -0500 Received: from mail-eopbgr700128.outbound.protection.outlook.com ([40.107.70.128]:28160 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728652AbeKHNVg (ORCPT ); Thu, 8 Nov 2018 08:21:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z4+ChptdaYn482F6G1p9utYjPUpQZV+xIIoHAOFk49g=; b=GFRbwhR5gkE+xtGWdlG5X8lHTW5lPNfoVrrhzPey4OJXX1Z7kKfDd/ua0lGD8oAlH4O67wO9r6GlZXt4CMLz6TzbE+JVaO4GEOIzjMi8yXGKbTPJ7qZNdI4ku10jx8zy9V+aZy9sBhuSi2VYe5BiD5J2jTb1bL8RgF+VviXIGPs= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1387.namprd06.prod.outlook.com (10.162.111.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.28; Thu, 8 Nov 2018 03:48:05 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979%3]) with mapi id 15.20.1294.034; Thu, 8 Nov 2018 03:48:05 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Chi-Hsien Lin Subject: [PATCH 1/5] brcmfmac: set apsta to 1 when AP start on primary interface. Thread-Topic: [PATCH 1/5] brcmfmac: set apsta to 1 when AP start on primary interface. Thread-Index: AQHUdxXaYZfqcTceYUWeFeJO2wET2w== Date: Thu, 8 Nov 2018 03:48:05 +0000 Message-ID: <1541648845-194984-2-git-send-email-chi-hsien.lin@cypress.com> References: <1541648845-194984-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1541648845-194984-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: MWHPR15CA0064.namprd15.prod.outlook.com (2603:10b6:301:4c::26) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1387;6:BYaaCiZbdFwJZxnApW/h5rddTKCEQ+b0NiQHjJK2BienDmQwWlHOXurlKKUvKuCJ+0irhyNBCFANyVBLdBknz8bVWd2WoA1o0Ub44xjQ0ORA43ENLBax0j7yz+RR9WoD6pKFkxUJaSx2+Nf2037hWnGIkvPT0hYhaJc0kqLguWXQBGMkUwJsdlj06LAJ7zBStU2OT4bkxIYyjqAR7s0jL05PeuKcQfFhHQnhuaw6rw5dGGdZ1CYnij8WR8N9lbnO+oW9a49hLfq03nfE9+vCgP7OFyOaF++1ypajsMy++to+/J6T1vBajo2xdVEU7EspZTwEejTfLYVyMLPIjv3KElHXNnKCDvgUq9N2rWwlVWESTl4nJ5qmAvMpJFP3XfuiIhiT19yfoej72qGrwHzWo6s5g1lXxQ0z6MU3PkRXOx1PPVnTehCpbhCi6FsbjsMGWx7/QE0+nGwRnaSAxR4o9g==;5:nAIhqz3zNhdDdYwR/tulk97dVLGiDoKCYkOg283OWFwWyPN6UJddD036RLd16cV8lN7x3BpUG5NHKmScDELDbwRkTGY/hbz16qhooXy1LXNiaQAcYz0OIQ7ulwOQrNLheY18eh0ZYU97eoJWZci38972ogGnR02MxZ2OV6TA8Sg=;7:nIxI5ithJt+LGWRDuSS6V4WgY0F1wO1f47ztmsSDGFKxJW52zxUgvpC2m12BZRxbBOzlLfF7Zy1lBH6xgXzC2ZZbFfUD298hOBerUfoyE8kIPWiCRfQSX3rdmJtGevEMLJa711mZsSeg9zI5EdAj2A== x-ms-office365-filtering-correlation-id: b816ac32-68d8-4e67-c90d-08d6452cfd20 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1387; x-ms-traffictypediagnostic: BY1PR0601MB1387: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(258095267146985); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1387;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1387; x-forefront-prvs: 0850800A29 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(366004)(136003)(396003)(376002)(39860400002)(199004)(189003)(68736007)(6116002)(3846002)(256004)(6916009)(316002)(72206003)(66066001)(7736002)(305945005)(71200400001)(71190400001)(2351001)(186003)(2616005)(36756003)(476003)(105586002)(446003)(11346002)(26005)(97736004)(486006)(106356001)(386003)(81156014)(76176011)(81166006)(4326008)(6436002)(2906002)(25786009)(6506007)(52116002)(8936002)(53936002)(102836004)(6512007)(14454004)(478600001)(99286004)(5660300001)(54906003)(8676002)(107886003)(6486002)(5640700003)(2501003)(2900100001)(86362001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1387;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: nBzQSurZjRg5NRJ0vqxLYixm+XXVbxuCRrdgtW98756s0m8XZbV67Z/gPlL2f4V2ojiA7+bYZzg2utqAowTOWygOO97Lds9ckAoDQRPFPLhVabnCWTYxAaKSUZ5GyNj3hiL8CdNIYtf1sh6A1d1xcY0djPWxRFVgQpc6POrF+x/UFWCNzJbfW6kl7XPmEay0Gh1+kQVACO/JvOTGV3O280HT3Up7v0Dley5Vl13BdwBSWT++1eyTGPVy0KAEyXb/ugMxoYF9ZB8cWwgfypk//QLQLyHwmgYtSo15npYVsQ4jH2GgIGl1xtyTkWsCp8sCcAS7RXC06d58YE0otR846k2ZYVtWP+GdtfYLvhAtLhU= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: b816ac32-68d8-4e67-c90d-08d6452cfd20 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Nov 2018 03:48:05.3040 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1387 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: Wright Feng APSTA can work on two band concurrently with using VSDB(Virtual Simultaneous Dual-Band) or RSDB(Real Simultaneous Dual-Band) features. In this case, we have to keep apsta is 1 in firmware side. However, if we start wpa_supplicant on wlan0 and then start hostapd on wlan 1, the apsta will be set to 0, and we will see data stall on wlan0(station) So that, we only set apsta to 1 when AP start on primary interface. Signed-off-by: Wright Feng Signed-off-by: Chi-Hsien Lin --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 230a378c26fc..165ab1a3f943 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -4513,9 +4513,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev, } } - if ((dev_role == NL80211_IFTYPE_AP) && - ((ifp->ifidx == 0) || - !brcmf_feat_is_enabled(ifp, BRCMF_FEAT_RSDB))) { + if (dev_role == NL80211_IFTYPE_AP && ifp->ifidx == 0) { err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1); if (err < 0) { brcmf_err("BRCMF_C_DOWN error %d\n", err); From patchwork Thu Nov 8 03:48:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10673419 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-2.web.codeaurora.org (Postfix) with ESMTP id 29D4214E2 for ; Thu, 8 Nov 2018 03:48:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D056E28AA0 for ; Thu, 8 Nov 2018 03:48:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BED2528949; Thu, 8 Nov 2018 03:48:27 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 2040821E5A for ; Thu, 8 Nov 2018 03:48:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728745AbeKHNVv (ORCPT ); Thu, 8 Nov 2018 08:21:51 -0500 Received: from mail-eopbgr700128.outbound.protection.outlook.com ([40.107.70.128]:28160 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728652AbeKHNVv (ORCPT ); Thu, 8 Nov 2018 08:21:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z99AfVk8jXlT6RaRe2WzXh/q8rQeaJ8QlaNjcy8p074=; b=s+SLyBxxep3UA3cmzXLodClVhbnICPa2W33mxg1/kPamqih3xdr1NnZ131KYuWbyTKw5mpw3tlMh5/mIGS2nO6taoGcCS6g3LouSvYsf0X32jdYV4RdcQ2wGbn8IaQ4Yn5gpLaejFaNgiJmpJAFAIHJcidPtIr8Ac2zggE/XKoQ= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1387.namprd06.prod.outlook.com (10.162.111.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.28; Thu, 8 Nov 2018 03:48:07 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979%3]) with mapi id 15.20.1294.034; Thu, 8 Nov 2018 03:48:07 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Chi-Hsien Lin Subject: [PATCH 2/5] brcmfmac: remove "arp_hostip_clear" from "brcmf_netdev_stop" Thread-Topic: [PATCH 2/5] brcmfmac: remove "arp_hostip_clear" from "brcmf_netdev_stop" Thread-Index: AQHUdxXbBfDep3bQw0uZVaWVgYrWog== Date: Thu, 8 Nov 2018 03:48:06 +0000 Message-ID: <1541648845-194984-3-git-send-email-chi-hsien.lin@cypress.com> References: <1541648845-194984-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1541648845-194984-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: MWHPR15CA0064.namprd15.prod.outlook.com (2603:10b6:301:4c::26) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1387;6:xvaU0EZrRLO4BGEYQpZV1w2rFLIV5k6s9jyGV030kLge1StFKuYCQWx70S0AkIoO3CnhYnMfmlYOyuXYk4Bn3hSzbPW6hG2QHl/9pz7GBTZYMSwFGxYes5rXRNrjy81jsrA1GYupivGSrnmwBgtGkMYdnuDWUrreYWqCQlL/t+XG5EcEmbI8dnq1Ob8LQo5ofAO8ndAAikMT3vKY7T5VabJUUhCfG2Q3dk0llpIZMlHFc5qBE74BIiJvzDt6wx/+kaaCB5eOHvW+0lfG2tsPY5TtplkWzhxqS4t4X2vYm0dVouRbbZm9/oSHGNDGeubgqlhgSncKTyvC5+R0eHRNWl2cU7sm1rIWr2bnMs25TkRh4MZgkPUwD1Ai6wcaBTdq7M7QtHN7q5WKIf0+qmd7YkgPzDwUZn1K1FSPa1uK7muGA/eWoauBoZy/dhZ7AllzaMUo2KTrJZBdM0wwctnyKg==;5:roCkv6QZkJV9/6ce1tB4OWKSExVl6camrxHdqKzyAw9SzxrknYvtPz6E963TuHJftqT/AAUdgnTdZdIIAcal0Jsw3xhGz9xFmFiOgxjsfZMTdQlUHAQT3uyztINhNAPfXrfZlJBplvqcZ/9LpSeSoRkOI3iIrB9STGMGBJaTptU=;7:CH+KdQTMSZb5F3pYxPPsSYVdAwwjdRnxNRYySKSjKkET6njm1Hw2kA6/nj8dMhFJCHI2aTAYAq/zA1uomchHXz83NMCuUFxTjoSQW5B99OkbexsSgrWcSp/c+CvvZmqV9wA2FJ8de/zBfR4Qo+KYCw== x-ms-office365-filtering-correlation-id: 969c551f-2530-4378-3b29-08d6452cfe1b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1387; x-ms-traffictypediagnostic: BY1PR0601MB1387: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(21532816269658)(258095267146985); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1387;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1387; x-forefront-prvs: 0850800A29 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(366004)(136003)(396003)(376002)(39860400002)(199004)(189003)(68736007)(6116002)(3846002)(256004)(6916009)(316002)(72206003)(66066001)(7736002)(305945005)(71200400001)(14444005)(71190400001)(2351001)(186003)(2616005)(36756003)(476003)(105586002)(446003)(11346002)(26005)(97736004)(486006)(106356001)(386003)(81156014)(76176011)(81166006)(4326008)(6436002)(2906002)(25786009)(6506007)(52116002)(8936002)(53936002)(102836004)(6512007)(14454004)(478600001)(99286004)(5660300001)(54906003)(8676002)(107886003)(6486002)(5640700003)(2501003)(2900100001)(86362001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1387;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: m4vXni3k+p4VT31+J0cbbHoO5T7n97Q8FDu5fuEqeogsoXc2Jd4urMTOSxZ3Tjhyx13EVN09WeoNVYMeVTl1Mh2Hkk3UMpKlX4a2KvV6RrJPHehpwE9q1WcAA7zNyFXCPcqLRT/JRodLb4Iuiyv8T/HdcIgmU4gFdhJzKOtGtgMWN/9HL3n/EkJ9/qE5DrcxX5/4su6ZPrwEC+ymYVBeh2zfxuPMefkruQ3Jzq9UeAXjjzHt9qkjDT4xTk/Rs3JsLNWE+ugxG4A6XXSMXTp9zEdT0DMFvJxtEKB9CEx1gBRWwhV1gJkIuWUIlTVsWxY5GlJZ7KOS1dgS5RjHX2LmgBwIbPmHkgDTAM1SBwzJSDo= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 969c551f-2530-4378-3b29-08d6452cfe1b X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Nov 2018 03:48:06.8933 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1387 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: Wright Feng The firmware does not respond ARP request and causes ping failure with following steps: 1. Bring up interface ifconfig wlan0 up or start wpa_supplicant 2. Set the IP address ifconfig wlan0 192.168.100.10 3. Bring down interface or ifconfig wlan0 down or kill wpa_supplicant 4. Bring up interface again and set the same IP address 5. Connect to AP(192.168.100.1) and ping to AP will be failed. FMAC clears arp_hostip when bringing down the interface, but not set it back if setting the same IP address. We are able to see the IP address in interface info(inconfig wlan0) but the ping still cannot work because the firmware ARP offload does not respond the ARP request. Because of that, we remove "arp_hostip_clear" from function "brcmf_netdev_stop" Signed-off-by: Wright Feng Signed-off-by: Chi-Hsien Lin Reviewed-by: Franky Lin --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c index b1f702faff4f..e1666cf3801c 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c @@ -533,8 +533,6 @@ static int brcmf_netdev_stop(struct net_device *ndev) brcmf_cfg80211_down(ndev); - brcmf_fil_iovar_data_set(ifp, "arp_hostip_clear", NULL, 0); - brcmf_net_setcarrier(ifp, false); return 0; From patchwork Thu Nov 8 03:48:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10673421 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-2.web.codeaurora.org (Postfix) with ESMTP id 2C12314E2 for ; Thu, 8 Nov 2018 03:48:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B3E52990A for ; Thu, 8 Nov 2018 03:48:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F21BA2BAB7; Thu, 8 Nov 2018 03:48:29 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 7E5B22B5FC for ; Thu, 8 Nov 2018 03:48:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728750AbeKHNVx (ORCPT ); Thu, 8 Nov 2018 08:21:53 -0500 Received: from mail-eopbgr700128.outbound.protection.outlook.com ([40.107.70.128]:28160 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728621AbeKHNVx (ORCPT ); Thu, 8 Nov 2018 08:21:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=R9hTQkPB3buVA4dXzvH+VvkmHo2/426VhA/4uX4UXRY=; b=cSZs7m9XTbfkxRXn0F1QOfFpqv062E+6IYtrroExEIgFPqpvjo3yLTUQAWAyLJebcr5YMrxEMjavW7eMY1OqstKZytz161csxPpmRudmhcUqmEYmgYpPR2a/j1BXntUNLSRKpu5TbsnwO0YCww8bmvYu0Q4Qb5gitPo+VbSV+ZA= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1387.namprd06.prod.outlook.com (10.162.111.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.28; Thu, 8 Nov 2018 03:48:08 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979%3]) with mapi id 15.20.1294.034; Thu, 8 Nov 2018 03:48:08 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Madhan Mohan R , Chi-Hsien Lin Subject: [PATCH 3/5] brcmfmac: p2p cert 6.1.9-support GOUT handling p2p presence request Thread-Topic: [PATCH 3/5] brcmfmac: p2p cert 6.1.9-support GOUT handling p2p presence request Thread-Index: AQHUdxXc3XSx4lbuXE+GWA6BIJ9K8A== Date: Thu, 8 Nov 2018 03:48:08 +0000 Message-ID: <1541648845-194984-4-git-send-email-chi-hsien.lin@cypress.com> References: <1541648845-194984-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1541648845-194984-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: MWHPR15CA0064.namprd15.prod.outlook.com (2603:10b6:301:4c::26) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1387;6:D+xJNN+BBzf+pHIUi2Gk5+DBCtNs3RntjJW5AmPI/dJbHbuEWMiFH0Ch2V4DOhdP1fKGL1KQ5bUQ408I5dnePdU81sDDgYEmrwahrdTFcZReOCYh/qAEDKzpWDsJBQwIag/2at4taAhN5VENlGI+cr8yfjs5G52kVlopYPR0HUNXtVh5zxqHkqKU6986UFsIAY38aHrmBZEVC+F5CejXi9Y6ZDsZ/ed5Y31ZU/sB2O7Gyx5hBCkUAlzv4vPcskv22lZDu0LELyn28i2pwfCgKbOdRjWaq5F8gMVmKlWMzHDx85ec6gpUnnkYp3mAHoevwWWOPOKjpKCvtB75SwExQDcZ2Qd+ildyM7nbFYWlSJc56xIZ7TEi3zAOo9VXnfixXwHgTIU5FnYi3b9ygfqy/9PIkZBtdK0z46XaXe0qyRfA8xRqgjY+eUJjYlcYWDOM3RGFUSTWzEDpLJ4Nx7QJ3Q==;5:+hBCy7X6BZ1BhiGhdhCnNlrHozhh+CXV8CTzNYYawjh12zahlNfMXyACg3ya+xe/qVMWzBQT+bfvwGHAlM7ToiPEQxyrCjttLOgsOVrBnapQiazKSytspMVd8OTmmDe3B2LdjoaTFg3AM0UUJu/ld/K+a9eytTj3d+gqjDzE7Us=;7:SIRYTIyxnJf7j4UHCGv4hPa1Bx9GXv2AE3SCcShjhyxTJpMye5c4Bxo6OEwdqEZRotdxX3UKHkFVK1k91Lfg/gD+7v93uXJEhFrfnDl4NYVpu6D9ttOZouYTEismPQrwP5IGjrBP4oV56DZ1HB2oBA== x-ms-office365-filtering-correlation-id: 3d2496bd-e37c-4b45-f3e3-08d6452cff19 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1387; x-ms-traffictypediagnostic: BY1PR0601MB1387: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(258095267146985); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1387;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1387; x-forefront-prvs: 0850800A29 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(366004)(136003)(396003)(376002)(39860400002)(199004)(189003)(68736007)(6116002)(3846002)(256004)(6916009)(316002)(72206003)(66066001)(7736002)(305945005)(71200400001)(14444005)(71190400001)(2351001)(186003)(2616005)(36756003)(476003)(105586002)(446003)(11346002)(26005)(97736004)(486006)(106356001)(386003)(81156014)(76176011)(81166006)(4326008)(6436002)(2906002)(25786009)(6506007)(52116002)(8936002)(53936002)(102836004)(6512007)(14454004)(478600001)(99286004)(5660300001)(54906003)(8676002)(107886003)(6486002)(5640700003)(2501003)(2900100001)(86362001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1387;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: u+HxF83hy16mRxCE3lbrBFdyrmaeSEb6AQ6i4K2NyRX33HFPThDdhnlaQL7qTmG25aQ+UIeufzw3bN9j4EN0exNOq6mfWcobpWfcjd8TUhyWY0RauQGqvlt98GHplhkMeKnW5yEc4U3RTBhTHPRjbpre6E7XXXtYxMjeGRXlFMGaS+yASP1KAULXOU13LjlZLFWUdQo8Q14O/mlPe8gEU5fobHr+DqB2xZ/7zng0gZaqy/HFyR6VM4z9fb5FewYq62APMYKi9q6UnsNFA5Gm7Wc+jRxXmxSTEv4+ONH64KIMPnyUe5aNZNvIgPzymMIzt2+6wX6qC6rYYE3EqCdK1cA9k/6OBjtVXd32UkBlFu8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3d2496bd-e37c-4b45-f3e3-08d6452cff19 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Nov 2018 03:48:08.6437 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1387 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: Madhan Mohan R Send p2p presence response from the p2p interface address instead of the p2p device address. This is needed for p2p cert 6.1.9 to pass. Signed-off-by: Madhan Mohan R Signed-off-by: Chi-Hsien Lin --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c index 456a1bf008b3..dfdd30b19c42 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c @@ -1493,6 +1493,7 @@ static s32 brcmf_p2p_tx_action_frame(struct brcmf_p2p_info *p2p, struct brcmf_fil_af_params_le *af_params) { struct brcmf_cfg80211_vif *vif; + struct brcmf_p2p_action_frame *p2p_af; s32 err = 0; s32 timeout = 0; @@ -1502,7 +1503,13 @@ static s32 brcmf_p2p_tx_action_frame(struct brcmf_p2p_info *p2p, clear_bit(BRCMF_P2P_STATUS_ACTION_TX_COMPLETED, &p2p->status); clear_bit(BRCMF_P2P_STATUS_ACTION_TX_NOACK, &p2p->status); - vif = p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif; + /* check if it is a p2p_presence response */ + p2p_af = (struct brcmf_p2p_action_frame *)af_params->action_frame.data; + if (p2p_af->subtype == P2P_AF_PRESENCE_RSP) + vif = p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION].vif; + else + vif = p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif; + err = brcmf_fil_bsscfg_data_set(vif->ifp, "actframe", af_params, sizeof(*af_params)); if (err) { From patchwork Thu Nov 8 03:48:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10673423 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-2.web.codeaurora.org (Postfix) with ESMTP id 9BCB714E2 for ; Thu, 8 Nov 2018 03:48:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8AE82BE34 for ; Thu, 8 Nov 2018 03:48:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DCFB02BE39; Thu, 8 Nov 2018 03:48:31 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 77FBE2BE34 for ; Thu, 8 Nov 2018 03:48:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728756AbeKHNVz (ORCPT ); Thu, 8 Nov 2018 08:21:55 -0500 Received: from mail-eopbgr700128.outbound.protection.outlook.com ([40.107.70.128]:28160 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728652AbeKHNVz (ORCPT ); Thu, 8 Nov 2018 08:21:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DH6wggynTqLbz9NiBtsYcN2eUHjKVHRfbzfxc3J4zMo=; b=U6txQ5QcITdCeLy9kuaMqK5Q1sXMKon8fRg3yS0jdseIYhc8oQB6CvqY1FH2Lo9qlv4+f5IEB+ymtDpafuLdNqCSETfFFOxOnj681j7UXeqdpbO0u2oFM/WUEl8F7EQainO8S3pf/vAslejbf9DLTZrzE/6xFhAGuhn+6gh+Olo= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1387.namprd06.prod.outlook.com (10.162.111.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.28; Thu, 8 Nov 2018 03:48:10 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979%3]) with mapi id 15.20.1294.034; Thu, 8 Nov 2018 03:48:10 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Chi-Hsien Lin Subject: [PATCH 4/5] brcmfmac: only generate random p2p address when needed Thread-Topic: [PATCH 4/5] brcmfmac: only generate random p2p address when needed Thread-Index: AQHUdxXd3lsn11F9p0y3tsTW/V9B5g== Date: Thu, 8 Nov 2018 03:48:10 +0000 Message-ID: <1541648845-194984-5-git-send-email-chi-hsien.lin@cypress.com> References: <1541648845-194984-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1541648845-194984-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: MWHPR15CA0064.namprd15.prod.outlook.com (2603:10b6:301:4c::26) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1387;6:5U3BfwJ3/zNPZwy0Q0rzI2YKxth+o6YiSBJnQ+6Z+i26ZQosEyesRSebStM8iZqvMTkGMqPga9qSbeg/tFv/UJ0O0Wl6r7AGEv+NDB3OnPB6gLYVC6rszuZB/OOqyfU9WKiwjLFgsgY7fGrMZEQvVL9cFlVj9P9n06LZBhs2disRpOkB19uNNZVmu6KtpGqKII3utKNfxW/zldoB5GHAGOpRUSp6fsLjLUK+/lefFfOLRUDPr0cQoDrMcHGMiyDTmf3TNBF5AVcrm/0YgHrDjYsitv95bH2N3SkC/arHXVl84kK5UvSYLQxFxYrTEhr0OBicsks2lk/zaSpbeY7I7Obccwie6pPMbFz6g3VLOv0vU+5v2jWnTqjh/Jfko/SDXCoBPGsVnwT0MLtUitTAs5YVjR7TkcuwIYe54xaeSn5P5YEYWdiU3L3BxnvVIouSNeZyDm8ZgJqP3wf53U+46Q==;5:Wn5600zDksBX3h3u6PK8L+r5uKb3QIIuL2X9Dz8x0AhfL8ZwoEJRHILENhp0KBhkKOovYuYL28AXwa8LlwXaF9HZW1bj1FtwhyS5+0GS+Krgywg1kUJD4uu9IbS3i34iENZp2ydY5CNvPCNUvg4jHD57DHKtiRXc41NORDStEN0=;7:X0lG3iXnhMvVnpjvDmBNTldG0162LObYefccl47UkwZonttJtY0m2ltTxXz5Z/grJ0kfTfv7Szy3z6dTSr+Xqcqgreq9IYZjEEqJlsrTslZcx5NocBuPwFlPUW2YMa0Vy9uc+WA03ivmzjDcuFSiww== x-ms-office365-filtering-correlation-id: f9d89ece-e4d3-4fcf-ac9d-08d6452d0018 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1387; x-ms-traffictypediagnostic: BY1PR0601MB1387: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(258095267146985); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1387;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1387; x-forefront-prvs: 0850800A29 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(366004)(136003)(396003)(376002)(39860400002)(199004)(189003)(68736007)(6116002)(3846002)(256004)(6916009)(316002)(72206003)(66066001)(7736002)(305945005)(71200400001)(71190400001)(2351001)(186003)(2616005)(36756003)(476003)(105586002)(446003)(11346002)(26005)(97736004)(486006)(106356001)(386003)(81156014)(76176011)(81166006)(4326008)(6436002)(2906002)(25786009)(6506007)(52116002)(8936002)(53936002)(102836004)(6512007)(14454004)(478600001)(99286004)(5660300001)(54906003)(8676002)(107886003)(6486002)(5640700003)(2501003)(2900100001)(86362001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1387;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: aoMvJeB80R20YShIkiQV72NaD5B+glJC2j9fL4z6jJw44mXxwBvfLwXODrIjT01wFz1K2kMa8rRQf7etXBt6PemlKL1sqU/+5vKP8czLh0qC3NqePQeQPN5jbXuLlKR+on+JC64nCM6bFHjt88XYQ+zKM9oR5oIJ2D4i0831Qk1wDsIxRHonnYImXgETwyYb7cXQXMPUe9AejLnKheSJbyfJmHaRFcOiRdbFnSOnt3wYE7+Ojhd9gpFqwtJbPKHvU9nSnaghzLcCYYgE6rWA01nbo76HdYn7tgyOLqTkjofco/Pl0C590j+Rvxod1bDCjh8V6Qnqg9roIvpeJuzOeNm+ls6pvC0o9uz6sVe2QCg= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: f9d89ece-e4d3-4fcf-ac9d-08d6452d0018 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Nov 2018 03:48:10.2470 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1387 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 P2p spec mentioned that the p2p device address should be the globally administered address with locally administered bit set. Therefore, follow this guideline by default. When the primary interface is set to a locally administered address, the locally administered bit cannot be set again. Generate a random locally administered address for this case. Signed-off-by: Chi-Hsien Lin Reviewed-by: Arend van Spriel --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c index dfdd30b19c42..1629ceecd9b5 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c @@ -467,10 +467,21 @@ static int brcmf_p2p_set_firmware(struct brcmf_if *ifp, u8 *p2p_mac) */ static void brcmf_p2p_generate_bss_mac(struct brcmf_p2p_info *p2p, u8 *dev_addr) { + struct brcmf_if *pri_ifp = p2p->bss_idx[P2PAPI_BSSCFG_PRIMARY].vif->ifp; bool random_addr = false; + bool local_admin = false; - if (!dev_addr || is_zero_ether_addr(dev_addr)) - random_addr = true; + if (!dev_addr || is_zero_ether_addr(dev_addr)) { + /* If the primary interface address is already locally + * administered, create a new random address. + */ + if (pri_ifp->mac_addr[0] & 0x02) { + random_addr = true; + } else { + dev_addr = pri_ifp->mac_addr; + local_admin = true; + } + } /* Generate the P2P Device Address obtaining a random ethernet * address with the locally administered bit set. @@ -480,6 +491,9 @@ static void brcmf_p2p_generate_bss_mac(struct brcmf_p2p_info *p2p, u8 *dev_addr) else memcpy(p2p->dev_addr, dev_addr, ETH_ALEN); + if (local_admin) + p2p->dev_addr[0] |= 0x02; + /* Generate the P2P Interface Address. If the discovery and connection * BSSCFGs need to simultaneously co-exist, then this address must be * different from the P2P Device Address, but also locally administered. From patchwork Thu Nov 8 03:48:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10673425 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-2.web.codeaurora.org (Postfix) with ESMTP id 3F02F15E9 for ; Thu, 8 Nov 2018 03:48:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAA6D2BE34 for ; Thu, 8 Nov 2018 03:48:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9EDA02BE45; Thu, 8 Nov 2018 03:48:33 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 1E4F02BE37 for ; Thu, 8 Nov 2018 03:48:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728758AbeKHNV4 (ORCPT ); Thu, 8 Nov 2018 08:21:56 -0500 Received: from mail-eopbgr700128.outbound.protection.outlook.com ([40.107.70.128]:28160 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728621AbeKHNV4 (ORCPT ); Thu, 8 Nov 2018 08:21:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nGfy/RHN+eTqgGOQnCKVx9UjPpN/xpv0l8g4XVwPGkI=; b=b1YuO08B7DbxrTf9Rp/Gzi5iW1diKbnf60CN9wkQnpShrIBKcyMXRTK+VQ8eJtVDiqGIkW4oYuspRpowjeSO40NC77Y5HxpDWS8EUBBIqMTyawo+zMREaADPKwaw3jt6dH1hoRq5yMWiXRMV7mG8JWmpIF45ryLeo5Lr13NrBvA= Received: from BY1PR0601MB1436.namprd06.prod.outlook.com (10.162.111.23) by BY1PR0601MB1387.namprd06.prod.outlook.com (10.162.111.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.28; Thu, 8 Nov 2018 03:48:12 +0000 Received: from BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979]) by BY1PR0601MB1436.namprd06.prod.outlook.com ([fe80::199f:c63e:1449:1979%3]) with mapi id 15.20.1294.034; Thu, 8 Nov 2018 03:48:12 +0000 From: Chi-Hsien Lin To: "linux-wireless@vger.kernel.org" CC: "brcm80211-dev-list@broadcom.com" , brcm80211-dev-list , Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Ryohei Kondo , Chi-Hsien Lin Subject: [PATCH 5/5] brcmfmac: add vendor ie for association responses Thread-Topic: [PATCH 5/5] brcmfmac: add vendor ie for association responses Thread-Index: AQHUdxXedRJ/h2Hgzkac5itXjkj7Lg== Date: Thu, 8 Nov 2018 03:48:11 +0000 Message-ID: <1541648845-194984-6-git-send-email-chi-hsien.lin@cypress.com> References: <1541648845-194984-1-git-send-email-chi-hsien.lin@cypress.com> In-Reply-To: <1541648845-194984-1-git-send-email-chi-hsien.lin@cypress.com> Accept-Language: en-US, zh-TW Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [12.110.209.245] x-clientproxiedby: MWHPR15CA0064.namprd15.prod.outlook.com (2603:10b6:301:4c::26) To BY1PR0601MB1436.namprd06.prod.outlook.com (2a01:111:e400:522c::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0601MB1387;6:80SirHeRqWo+8k9EL5okKXCJtxFlZ2pGnCRWt9yEklW3bwb92hLtIXaovG8IDHn9ArbTKzDo5lyNqGsoY3Ofgyf/hoKht1aUtLIpQ9phikOtUHWhPIw850xwbodXuhWLvuItGXAa2AxgPU1IJDGiZoAv8ArnUujW1FT75lslCT0Id3KjmPT7ieA8inNG+AcuEhce8897dVwBYNMmMuGMWwfAJISDyCx3AIYUfUzDcrnJlbPOPumkCk8eGcUQEW6/lvJTGSlxqdMO188Ao2McqeTkVFpCOEA/TQDYICutKvmfXdRvdkTqKrojj5qiS4i9Np2o4Ph3/7Q8OEaI88imyZYemHORvvcmmS+XHKtrq80qtEgDDZvhSYy6Q+dD7aSj/nGsXPF19jFMrFEV1FvFPgEGn7tazwTZd7I1H63eqbx35Zvs9nEDX+m4uIiF3yf+GGSsd/+f+M3IrzxiZBKWtA==;5:xKdU6eJRfDCdZTwLHYWJhK5w07amOr3ZiqOrkMcUV1Z8rbI5e4n8uX+gVQnejgz5F1gh0wsWK4856mzn7MIT/O5Nq2+DyDj1RCXs78s0ZBIv2WbmVYlVM+2tqlqGMphdvSNF2TSEPi9IjtSo423Em6TbZwZPXa79dqY7yLyeoBk=;7:WoJDRdUeGau+WPEvEdvyvWNRYdMQc/G/8FZLUqrRsMooI9gkqUqSYUc3Qdf2dgQJNMeX3ph1AKmcYafNvDybbYEImTxRP1qK+JzLd8QX+eW11MsSOCyk6DbmX4TWQy5jmkRbf/u6IifQawCGdtIpQQ== x-ms-office365-filtering-correlation-id: 6e691bf5-6b84-46ed-618f-08d6452d0119 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:BY1PR0601MB1387; x-ms-traffictypediagnostic: BY1PR0601MB1387: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(258095267146985); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:BY1PR0601MB1387;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0601MB1387; x-forefront-prvs: 0850800A29 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(366004)(136003)(396003)(376002)(39860400002)(199004)(189003)(68736007)(6116002)(3846002)(256004)(6916009)(316002)(72206003)(66066001)(7736002)(305945005)(71200400001)(14444005)(71190400001)(2351001)(186003)(2616005)(36756003)(476003)(105586002)(446003)(11346002)(26005)(97736004)(486006)(106356001)(386003)(81156014)(76176011)(81166006)(4326008)(6436002)(2906002)(25786009)(6506007)(52116002)(8936002)(53936002)(102836004)(6512007)(14454004)(478600001)(99286004)(5660300001)(54906003)(8676002)(107886003)(6486002)(5640700003)(2501003)(2900100001)(86362001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0601MB1387;H:BY1PR0601MB1436.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: dN7LZL8FLM/cQJAz2p/Qjduc2FmaZTctbb9NjpmNdcDKiBaSQ3v1bstZbQDNdwdlE++9LpD9dqoHhZuPWqbfId3Jl2gjHH1arS+IlBy73r7v+Vx78axFXcULcIDMCnYsRh+PsBin8XO7msENrvlBLB3FQQY62gzkI39t2Kc0oTx5V4aBGrbt300MPJcMladNZ5QcV/gXtl5Sj16PIAe/h4rJ9YtnVKri6ItCwbwFdt+NIpcVltWPWVILOTtIYLGNopJKE5B4CKn3NY2tFmkYkhZcJTUOwKxq7jO3YTTbYaQk+sgm7h7JuLI/kRMpny0MTbEDW/wwPw6umU9NGqxr0XiXG12p5CQ9VHUuTTqitIY= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e691bf5-6b84-46ed-618f-08d6452d0119 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Nov 2018 03:48:12.0544 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0601MB1387 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: Ryohei Kondo Miracast Certification clause 6.1.2 may fail if there is no WFD IE in p2p assoc response. This change allows WFD IE to be added to p2p assoc response. Related WFA certification: 6.1.2 P-SnUT operating as a Group Owner accepts a WFD Session with a Reference Source Signed-off-by: Ryohei Kondo Signed-off-by: Chi-Hsien Lin Reviewed-by: Arend van Spriel --- .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 14 ++++++++++++++ .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 165ab1a3f943..8cb02befcf81 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -4237,6 +4237,11 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_cfg80211_vif *vif, s32 pktflag, mgmt_ie_len = &saved_ie->assoc_req_ie_len; mgmt_ie_buf_len = sizeof(saved_ie->assoc_req_ie); break; + case BRCMF_VNDR_IE_ASSOCRSP_FLAG: + mgmt_ie_buf = saved_ie->assoc_res_ie; + mgmt_ie_len = &saved_ie->assoc_res_ie_len; + mgmt_ie_buf_len = sizeof(saved_ie->assoc_res_ie); + break; default: err = -EPERM; brcmf_err("not suitable type\n"); @@ -4386,6 +4391,15 @@ brcmf_config_ap_mgmt_ie(struct brcmf_cfg80211_vif *vif, else brcmf_dbg(TRACE, "Applied Vndr IEs for Probe Resp\n"); + /* Set Assoc Response IEs to FW */ + err = brcmf_vif_set_mgmt_ie(vif, BRCMF_VNDR_IE_ASSOCRSP_FLAG, + beacon->assocresp_ies, + beacon->assocresp_ies_len); + if (err) + brcmf_err("Set Assoc Resp IE Failed\n"); + else + brcmf_dbg(TRACE, "Applied Vndr IEs for Assoc Resp\n"); + return err; } diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h index a4aec0004e4f..6a2a3b276cda 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h @@ -162,19 +162,23 @@ enum brcmf_vif_status { * @probe_req_ie: IE info for probe request. * @probe_res_ie: IE info for probe response. * @beacon_ie: IE info for beacon frame. + * @assoc_res_ie: IE info for association response frame. * @probe_req_ie_len: IE info length for probe request. * @probe_res_ie_len: IE info length for probe response. * @beacon_ie_len: IE info length for beacon frame. + * @assoc_res_ie_len: IE info length for association response frame. */ struct vif_saved_ie { u8 probe_req_ie[IE_MAX_LEN]; u8 probe_res_ie[IE_MAX_LEN]; u8 beacon_ie[IE_MAX_LEN]; u8 assoc_req_ie[IE_MAX_LEN]; + u8 assoc_res_ie[IE_MAX_LEN]; u32 probe_req_ie_len; u32 probe_res_ie_len; u32 beacon_ie_len; u32 assoc_req_ie_len; + u32 assoc_res_ie_len; }; /**