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: 7692491 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@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 9FF679F2EC for ; Tue, 24 Nov 2015 17:39:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF504207BB for ; Tue, 24 Nov 2015 17:39:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 01AEB207E4 for ; Tue, 24 Nov 2015 17:39:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754738AbbKXRjW (ORCPT ); Tue, 24 Nov 2015 12:39:22 -0500 Received: from wolverine01.qualcomm.com ([199.106.114.254]:44795 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752912AbbKXRjP (ORCPT ); Tue, 24 Nov 2015 12:39:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1448386755; x=1479922755; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=D6++14BkCuC6RFbstd/jfV4XuiGm3hpj2tczHoUwqB0=; b=g/GZ49zTlJbApC38/8rc/pIDsO6/4wkKInlecmZysDl4kMJAGlkzxTQO Yifs2ixoyiCztLl976+NUJYc1l2PXulnWDeTpHCoK2M/okocKKShhYIfs Mo7WfrKZ0rJB4un29nluYHsZNtA0Z4wExj0Z0Za/aanfG06QrMRe+qrvQ E=; X-IronPort-AV: E=McAfee;i="5700,7163,7995"; a="151630726" Received: from ironmsg02-l-new.qualcomm.com (HELO ironmsg02-L.qualcomm.com) ([10.53.140.109]) by wolverine01.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 24 Nov 2015 09:39:15 -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: CC: 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) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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;