Received: by 10.213.65.68 with SMTP id h4csp2118883imn; Sun, 8 Apr 2018 20:10:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx486tkD3Tob/OTi0Id7uyAmRDL7sOvltG7Nb91WQmeg57FomObI4P3Hfny8U28iusE52lo+q X-Received: by 2002:a17:902:86:: with SMTP id a6-v6mr37530314pla.298.1523243342685; Sun, 08 Apr 2018 20:09:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243342; cv=none; d=google.com; s=arc-20160816; b=tVsd6/soYC3Ue9YPogKo6IgL4fv5dsN2jHzxHvrM9PK2CGGsFerHWrji4P2J8hrwGR /NCTIceeVqaMhiBpgHEkXLqRStcMzNGLkksaKYXO1i2eYrwbCMXk2gBUn0jwdmcswhJi m+lRj3jEGkmKlCZx59nWQIkYrNUP0QK24xO2qGyTIg8YM+HlKnL3AqF2UJJ/MRGP0O9J vDPET5vH0fE0lTgg5rZAipGseVDscAxXAr2IZl5mu6x+yO3UEYyH3DFrP0BC0sUo/1ux Mp0zBwootUu3p0TLCYvEI5/fpDaQZWJlxqD03uTZM7mEXuJbin/TIwEKaFJ2oD9/2387 eNVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=6bHq1JmyUQy5/6QmEukOASDohBy4gZkJc6vBylb6tpY=; b=Lo6JP1AcY52af2OhYjP0TIA1yuVfy9lUodhlWgnGurEcQx9y4mLhDL7AKIWZNW9MPY QsUv8vDnQjhClGTZ4ddXH4uVO5am46jWfKOr+tGFlEsVRLzvpyL1MxWvRd9Xw7Et9L1G bDUmP6YnhmmsX5The92ZbNSsKfSzYEsg4FGMooJEVST93hYvlTUbM+ahJWFUBMj5AD0U b9nbMBxYbd4Nhl1LTJ8cmAiUXaW/KCv9n/+giHVJqdOizsIcocveP+aaM0zL6QYQOv0R f+0mOE+HJC+SSpSyWoqQ1UUvg2bHR3zrjEXR8FesBpP1BBENilEVVBtEGBPaO4s/xSVk LERw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=ifd4+JOE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e7si10465709pgq.348.2018.04.08.20.08.25; Sun, 08 Apr 2018 20:09:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@microsoft.com header.s=selector1 header.b=ifd4+JOE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932528AbeDICTS (ORCPT + 99 others); Sun, 8 Apr 2018 22:19:18 -0400 Received: from mail-sn1nam02on0125.outbound.protection.outlook.com ([104.47.36.125]:10314 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755780AbeDIAaW (ORCPT ); Sun, 8 Apr 2018 20:30:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=6bHq1JmyUQy5/6QmEukOASDohBy4gZkJc6vBylb6tpY=; b=ifd4+JOETz8KPjvndonFQNeqbIyWoEQbdHBtqvRhQ/gXkUtKL7kMCFMN+helvtBCfZgjzHlH6bNAvkV369OirAVhqIEOStJCgzj3yF96GE4QQDRvs/AksF0J/sqKf5mx3+cQjEOs4svJ1qzlvZHmk1zbX4Ru9RK0x6Bb7G5txQw= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:30:17 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:30:17 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Johannes Berg , Luca Coelho , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 127/293] iwlwifi: mvm: track and report IBSS manager status to mac80211 Thread-Topic: [PATCH AUTOSEL for 4.9 127/293] iwlwifi: mvm: track and report IBSS manager status to mac80211 Thread-Index: AQHTz5kh+zxMR5mtOU+URH4oo3TqRg== Date: Mon, 9 Apr 2018 00:24:31 +0000 Message-ID: <20180409002239.163177-127-alexander.levin@microsoft.com> References: <20180409002239.163177-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002239.163177-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1032;7:xkLR3/VxHIjHTBpoLyseKw+JK3LltQNpXmeOSObz9xlIaVdZ+484Rx9qW7wAibl8GZpB+cgrntjD27lQwrZQNpLn7Q6OoziosSJeoZIFSptX3EY8dMapm10sduYhNDM6eFCiYGuXydD57onP3+yLJuT/6L/p4fIICU+SUCsuYZyQ9BHLx4/M0E0IwfUsI3a0mU62I5YnWk8iJBDE0Dh76QY+asRt03uQkdMfFWt5gRvZ7LKGuFxRGbOfFPR7INee;20:K8JsGwoM2sMaExlffgs8FMs4a1NOELcFA+3T+x32oEdCyIw6qrw4iQaXuY/XgpF5jFCGVLZIoX3LGqsBT9W+mCnC1BX5+oJzZh4gToJxP0vXPMCEpLtjZ6p6IMedwtMvHqK8Ya0r3VyI2oHiTOr8JB9EBqq67OQ/EqBvqUKHR8M= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 133cf3bb-1821-4f28-d1b6-08d59db1119e x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1032; x-ms-traffictypediagnostic: DM5PR2101MB1032: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(60795455431006)(89211679590171)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231221)(944501327)(52105095)(10201501046)(93006095)(93001095)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR2101MB1032;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1032; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(979002)(39380400002)(346002)(396003)(39860400002)(376002)(366004)(189003)(199004)(5660300001)(76176011)(99286004)(10090500001)(2900100001)(105586002)(305945005)(7736002)(107886003)(2501003)(5250100002)(14454004)(53936002)(4326008)(8936002)(68736007)(25786009)(86612001)(3846002)(66066001)(1076002)(486006)(316002)(72206003)(22452003)(106356001)(186003)(97736004)(6436002)(6116002)(476003)(2616005)(478600001)(6486002)(10290500003)(2906002)(110136005)(54906003)(6512007)(81156014)(81166006)(8676002)(36756003)(11346002)(3660700001)(446003)(6666003)(86362001)(26005)(102836004)(575784001)(3280700002)(6506007)(22906009)(217873001)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1032;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: iWyKu/3FFmpE8zBT/rCitQuC9F5c/ee8INtU3NkiCdmzzXKm+QuOW8J68VW7VIXnLaH/Y6LRzLPpiTV8JeC6ufdaRuo9Nr0unp3JT4X8N6aWIbQnEEQsQiuGZm/3CbtzVjaDpOU71jFsyExsHiy9gOuUXSDs5HfaCPHnsjfekYdjeBKHF3pTl3vuIJ+gh1mBDeJ7KNbM0BJjDaQ+BmK816bbgoGcgVumaPUR4e2VOWfASXmgG5GSUwcrGd5d99UyxxQ1gZoa5ThOZFB6CL3qDXZqUA2mNnTKDKR/++rktIsDLEtZIQcT7xZ1bjhu2nShao3OWR92iJ4DIrqHjlhFgsLSYxK6wroyxPi/Fbv1e3ymq4L0TFd4Hk67lKb+AwLMGMteyB6EnRLfJzIN3IWVXOgakPUqk7Hj9OCzP4+bXC8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 133cf3bb-1821-4f28-d1b6-08d59db1119e X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:24:31.9719 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1032 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johannes Berg [ Upstream commit 2f0282db41194c0099a019b2761911d6c69cbdb9 ] Shaul reported that when iwlmvm was sending beacons, it didn't properly also take ownership of the probe responses. This is because the whole mac80211 callback (tx_last_beacon) wasn't implemented. Fix that to make IBSS discovery work better. Reported-by: Shaul Triebitz Signed-off-by: Luca Coelho Signed-off-by: Sasha Levin --- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 1 + drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 9 +++++++++ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 +++ 3 files changed, 13 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/ne= t/wireless/intel/iwlwifi/mvm/mac-ctxt.c index 6b962d6b067a..ee8b12424d03 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c @@ -1434,6 +1434,7 @@ void iwl_mvm_rx_beacon_notif(struct iwl_mvm *mvm, =20 beacon_notify_hdr =3D &beacon->beacon_notify_hdr; mvm->ap_last_beacon_gp2 =3D le32_to_cpu(beacon->gp2); + mvm->ibss_manager =3D beacon->ibss_mgr_status !=3D 0; =20 status =3D le16_to_cpu(beacon_notify_hdr->status.status) & TX_STATUS_MSK; IWL_DEBUG_RX(mvm, diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/ne= t/wireless/intel/iwlwifi/mvm/mac80211.c index f1231c0ea336..3d6401eafe52 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -3621,6 +3621,13 @@ static int iwl_mvm_switch_vif_chanctx(struct ieee802= 11_hw *hw, return ret; } =20 +static int iwl_mvm_tx_last_beacon(struct ieee80211_hw *hw) +{ + struct iwl_mvm *mvm =3D IWL_MAC80211_GET_MVM(hw); + + return mvm->ibss_manager; +} + static int iwl_mvm_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, bool set) @@ -4218,6 +4225,8 @@ const struct ieee80211_ops iwl_mvm_hw_ops =3D { .join_ibss =3D iwl_mvm_start_ap_ibss, .leave_ibss =3D iwl_mvm_stop_ap_ibss, =20 + .tx_last_beacon =3D iwl_mvm_tx_last_beacon, + .set_tim =3D iwl_mvm_set_tim, =20 .channel_switch =3D iwl_mvm_channel_switch, diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wir= eless/intel/iwlwifi/mvm/mvm.h index c60703e0c246..49e84efbbb0e 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -989,6 +989,9 @@ struct iwl_mvm { /* system time of last beacon (for AP/GO interface) */ u32 ap_last_beacon_gp2; =20 + /* indicates that we transmitted the last beacon */ + bool ibss_manager; + bool lar_regdom_set; enum iwl_mcc_source mcc_src; =20 --=20 2.15.1