From patchwork Tue Nov 24 17:37:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Oh X-Patchwork-Id: 7692541 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 67CF49F716 for ; Tue, 24 Nov 2015 17:41:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7691320794 for ; Tue, 24 Nov 2015 17:41:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 942F8207BB for ; Tue, 24 Nov 2015 17:41:19 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a1HaZ-0002WK-7F; Tue, 24 Nov 2015 17:41:11 +0000 Received: from wolverine02.qualcomm.com ([199.106.114.251]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a1HZ4-0007fS-Rg for ath10k@lists.infradead.org; Tue, 24 Nov 2015 17:39:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1448386780; x=1479922780; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=D6++14BkCuC6RFbstd/jfV4XuiGm3hpj2tczHoUwqB0=; b=WYZqb38VnTo8EHBKFvzIX3FUfI/LI6dQ9shLlgB6ujCzSG0+xZh3idAK yzlOmMy4OtHg0+CRh5UZQcaLFj95KVXVvCu1z9OdyTrtHmZKpDI+ZvHMj JyoH9kj/Ag+L5XA/8pdXZQLi02igIby8Jt8/BHFigJzgEmtRpPscjoH8/ Q=; X-IronPort-AV: E=McAfee;i="5700,7163,7995"; a="244951159" Received: from ironmsg02-l-new.qualcomm.com (HELO ironmsg02-L.qualcomm.com) ([10.53.140.109]) by wolverine02.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 24 Nov 2015 09:39:17 -0800 X-IronPort-AV: E=Sophos;i="5.20,338,1444719600"; d="scan'208";a="589985648" Received: from nasanexm01b.na.qualcomm.com ([10.85.0.82]) by ironmsg02-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 24 Nov 2015 09:39:15 -0800 Received: from poh-linux2.qualcomm.com (10.80.80.8) by NASANEXM01B.na.qualcomm.com (10.85.0.82) with Microsoft SMTP Server (TLS) id 15.0.1076.9; Tue, 24 Nov 2015 09:39:14 -0800 From: Peter Oh To: Subject: [PATCH 3/3] ath10k: apply Mesh subtype when Mesh interface created. Date: Tue, 24 Nov 2015 09:37:35 -0800 Message-ID: <1448386655-13936-4-git-send-email-poh@qca.qualcomm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1448386655-13936-1-git-send-email-poh@qca.qualcomm.com> References: <1448386655-13936-1-git-send-email-poh@qca.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01B.na.qualcomm.com (10.85.0.82) To NASANEXM01B.na.qualcomm.com (10.85.0.82) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151124_093939_732399_9767C50D X-CRM114-Status: UNSURE ( 9.22 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.6 (-------) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP QCA988X firmware starting from 10.2.4.70.12-2 has capability to support Mesh Control Field Present bit in QoS field in native Wi-Fi mode. Hence apply Mesh subtype according to the WMI service map. Firmware will allows unicast, broadcast, multicast, and WDS frame (FromDS = 1 and ToDS = 1) to be received via the interface, once Mesh subtype is used. The firmware and this patch together make native Wi-Fi mode comply to IEEE802.11s Mesh frame in open mode, but the firmware doesn't yet support secured Mesh mode. Signed-off-by: Peter Oh --- drivers/net/wireless/ath/ath10k/mac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 6637854..6d151a2 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -4361,7 +4361,9 @@ static int ath10k_add_interface(struct ieee80211_hw *hw, arvif->vdev_type = WMI_VDEV_TYPE_IBSS; break; case NL80211_IFTYPE_MESH_POINT: - if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags)) { + if (test_bit(WMI_SERVICE_MESH, ar->wmi.svc_map)) { + arvif->vdev_subtype = WMI_VDEV_SUBTYPE_MESH; + } else if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags)) { ret = -EINVAL; ath10k_warn(ar, "must load driver with rawmode=1 to add mesh interfaces\n"); goto err;